mirror of
https://github.com/Andre0512/hon.git
synced 2025-05-13 06:34:22 -04:00
Add first fridge sensors #41
This commit is contained in:
parent
0afbfe997d
commit
146e710881
32 changed files with 730 additions and 75 deletions
|
@ -1,7 +1,5 @@
|
|||
import logging
|
||||
|
||||
from pyhon import Hon
|
||||
|
||||
from homeassistant.components.sensor import (
|
||||
SensorEntity,
|
||||
SensorDeviceClass,
|
||||
|
@ -9,6 +7,7 @@ from homeassistant.components.sensor import (
|
|||
SensorEntityDescription,
|
||||
)
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import PERCENTAGE
|
||||
from homeassistant.const import (
|
||||
REVOLUTIONS_PER_MINUTE,
|
||||
UnitOfEnergy,
|
||||
|
@ -21,7 +20,7 @@ from homeassistant.const import (
|
|||
from homeassistant.core import callback
|
||||
from homeassistant.helpers.entity import EntityCategory
|
||||
from homeassistant.helpers.typing import StateType
|
||||
from homeassistant.const import PERCENTAGE
|
||||
from pyhon import Hon
|
||||
|
||||
from . import const
|
||||
from .const import DOMAIN
|
||||
|
@ -400,6 +399,26 @@ SENSORS: dict[str, tuple[SensorEntityDescription, ...]] = {
|
|||
options=list(const.DISHWASHER_PR_PHASE),
|
||||
),
|
||||
),
|
||||
"REF": (
|
||||
SensorEntityDescription(
|
||||
key="humidityEnv",
|
||||
name="Room Humidity",
|
||||
icon="mdi:water-percent",
|
||||
device_class=SensorDeviceClass.HUMIDITY,
|
||||
native_unit_of_measurement=PERCENTAGE,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
translation_key="humidity",
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key="tempEnv",
|
||||
name="Room Temperature",
|
||||
icon="mdi:thermometer",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
device_class=SensorDeviceClass.TEMPERATURE,
|
||||
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
||||
translation_key="room_temperature",
|
||||
),
|
||||
),
|
||||
}
|
||||
SENSORS["WD"] = unique_entities(SENSORS["WM"], SENSORS["TD"])
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue