Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hotwater storage sensors to ViCare integration #126570

Merged
merged 1 commit into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions homeassistant/components/vicare/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,30 @@ class ViCareSensorEntityDescription(SensorEntityDescription, ViCareRequiredKeysM
state_class=SensorStateClass.MEASUREMENT,
entity_registry_enabled_default=False,
),
ViCareSensorEntityDescription(
key="dhw_storage_temperature",
translation_key="dhw_storage_temperature",
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
value_getter=lambda api: api.getDomesticHotWaterStorageTemperature(),
device_class=SensorDeviceClass.TEMPERATURE,
state_class=SensorStateClass.MEASUREMENT,
),
ViCareSensorEntityDescription(
key="dhw_storage_top_temperature",
translation_key="dhw_storage_top_temperature",
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
value_getter=lambda api: api.getHotWaterStorageTemperatureTop(),
device_class=SensorDeviceClass.TEMPERATURE,
state_class=SensorStateClass.MEASUREMENT,
),
ViCareSensorEntityDescription(
key="dhw_storage_bottom_temperature",
translation_key="dhw_storage_bottom_temperature",
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
value_getter=lambda api: api.getHotWaterStorageTemperatureBottom(),
device_class=SensorDeviceClass.TEMPERATURE,
state_class=SensorStateClass.MEASUREMENT,
),
ViCareSensorEntityDescription(
key="hotwater_gas_consumption_today",
translation_key="hotwater_gas_consumption_today",
Expand Down
9 changes: 9 additions & 0 deletions homeassistant/components/vicare/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,15 @@
"hotwater_min_temperature": {
"name": "DHW min temperature"
},
"dhw_storage_temperature": {
"name": "DHW storage temperature"
},
"dhw_storage_top_temperature": {
"name": "DHW storage top temperature"
},
"dhw_storage_bottom_temperature": {
"name": "DHW storage bottom temperature"
},
"hotwater_gas_consumption_today": {
"name": "DHW gas consumption today"
},
Expand Down