Added support for One Time Charge Status to Vicare (#135984)

Co-authored-by: Christopher Fenner <9592452+CFenner@users.noreply.github.com>
Co-authored-by: kurens <migrzyb@users.noreply.github.com>
Co-authored-by: Dave T <17680170+davet2001@users.noreply.github.com>
Co-authored-by: Christopher Fenner <Christopher.Fenner@me.com>
pull/137343/head
kurens 2025-02-04 18:16:59 +01:00 committed by GitHub
parent 5dd03c037e
commit 0c56791d94
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 59 additions and 0 deletions

View File

@ -106,6 +106,12 @@ GLOBAL_SENSORS: tuple[ViCareBinarySensorEntityDescription, ...] = (
device_class=BinarySensorDeviceClass.RUNNING,
value_getter=lambda api: api.getDomesticHotWaterPumpActive(),
),
ViCareBinarySensorEntityDescription(
key="one_time_charge",
translation_key="one_time_charge",
device_class=BinarySensorDeviceClass.RUNNING,
value_getter=lambda api: api.getOneTimeCharge(),
),
)

View File

@ -18,6 +18,9 @@
},
"domestic_hot_water_pump": {
"default": "mdi:pump"
},
"one_time_charge": {
"default": "mdi:shower-head"
}
},
"button": {

View File

@ -63,6 +63,9 @@
},
"domestic_hot_water_pump": {
"name": "DHW pump"
},
"one_time_charge": {
"name": "One-time charge"
}
},
"button": {

View File

@ -373,6 +373,53 @@
'state': 'unavailable',
})
# ---
# name: test_all_entities[binary_sensor.model0_one_time_charge-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': None,
'entity_id': 'binary_sensor.model0_one_time_charge',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.RUNNING: 'running'>,
'original_icon': None,
'original_name': 'One-time charge',
'platform': 'vicare',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'one_time_charge',
'unique_id': 'gateway0_deviceSerialVitodens300W-one_time_charge',
'unit_of_measurement': None,
})
# ---
# name: test_all_entities[binary_sensor.model0_one_time_charge-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'running',
'friendly_name': 'model0 One-time charge',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.model0_one_time_charge',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'unavailable',
})
# ---
# name: test_binary_sensors[burner]
StateSnapshot({
'attributes': ReadOnlyDict({