Skip to content

Commit

Permalink
feat: sensors for temperature settings
Browse files Browse the repository at this point in the history
  • Loading branch information
bj00rn committed Nov 26, 2024
1 parent 5a3e495 commit e870a48
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions custom_components/saleryd_hrv/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,48 @@ async def async_setup_entry(
device_class=SensorDeviceClass.ENUM,
),
),
# normal mode target temperature
SalerydLokeSensor(
coordinator,
entry,
entity_description=SensorEntityDescription(
key=DataKeyEnum.TARGET_TEMPERATURE_NORMAL,
icon="mdi:home-thermometer",
name="Normal temperature",
device_class=SensorDeviceClass.TEMPERATURE,
state_class=SensorStateClass.MEASUREMENT,
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
entity_category=EntityCategory.DIAGNOSTIC,
),
),
# Cool mode target temperature
SalerydLokeSensor(
coordinator,
entry,
entity_description=SensorEntityDescription(
key=DataKeyEnum.TARGET_TEMPERATURE_COOL,
icon="mdi:home-thermometer",
name="Cool temperature",
device_class=SensorDeviceClass.TEMPERATURE,
state_class=SensorStateClass.MEASUREMENT,
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
entity_category=EntityCategory.DIAGNOSTIC,
),
),
# Economy mode target temperature
SalerydLokeSensor(
coordinator,
entry,
entity_description=SensorEntityDescription(
key=DataKeyEnum.TARGET_TEMPERATURE_ECONOMY,
icon="mdi:home-thermometer",
name="Economy temperature",
device_class=SensorDeviceClass.TEMPERATURE,
state_class=SensorStateClass.MEASUREMENT,
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
entity_category=EntityCategory.DIAGNOSTIC,
),
),
]

async_add_entities(sensors)

0 comments on commit e870a48

Please sign in to comment.