mirror of
https://github.com/home-assistant/core.git
synced 2026-09-25 07:51:46 -05:00
More mods
This commit is contained in:
@@ -187,4 +187,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||
|
||||
async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||
"""Unload Compensation config entry."""
|
||||
return await hass.config_entries.async_unload_platforms(entry, PLATFORMS)
|
||||
unload_ok = await hass.config_entries.async_unload_platforms(entry, PLATFORMS)
|
||||
if unload_ok:
|
||||
hass.data[DATA_COMPENSATION].pop(entry.entry_id, None)
|
||||
return unload_ok
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"""Config flow for statistics."""
|
||||
"""Config flow for Compensation integration."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
"""Compensation constants."""
|
||||
|
||||
from typing import Any
|
||||
|
||||
from homeassistant.const import Platform
|
||||
from homeassistant.util.hass_dict import HassKey
|
||||
|
||||
DOMAIN = "compensation"
|
||||
PLATFORMS = [Platform.SENSOR]
|
||||
@@ -16,7 +19,8 @@ CONF_PRECISION = "precision"
|
||||
CONF_POLYNOMIAL = "polynomial"
|
||||
CONF_POLYNOMIAL_CONFIG = "polynomial_config"
|
||||
|
||||
DATA_COMPENSATION = "compensation_data"
|
||||
|
||||
DATA_COMPENSATION: HassKey[dict[str, Any]] = HassKey("compensation_data")
|
||||
|
||||
DEFAULT_DEGREE = 1
|
||||
DEFAULT_NAME = "Compensation"
|
||||
|
||||
Reference in New Issue
Block a user