diff --git a/homeassistant/components/vicare/binary_sensor.py b/homeassistant/components/vicare/binary_sensor.py index 61a5abce9426aa51eca9a130764710e1f25cae09..9d216404156b4eaa477feb1e9e5806893d585b3f 100644 --- a/homeassistant/components/vicare/binary_sensor.py +++ b/homeassistant/components/vicare/binary_sensor.py @@ -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(), + ), ) diff --git a/homeassistant/components/vicare/icons.json b/homeassistant/components/vicare/icons.json index 52148b1fa3239fca35b0a432439343ee2d1dd33e..c54be7af0d5e861abf51129f9063d58b90e226fa 100644 --- a/homeassistant/components/vicare/icons.json +++ b/homeassistant/components/vicare/icons.json @@ -18,6 +18,9 @@ }, "domestic_hot_water_pump": { "default": "mdi:pump" + }, + "one_time_charge": { + "default": "mdi:shower-head" } }, "button": { diff --git a/homeassistant/components/vicare/strings.json b/homeassistant/components/vicare/strings.json index 26ca0f5a264007fc2c96b5737281b99c0d047d2f..50eeaf038e0d5ba583a2003246b1911409150362 100644 --- a/homeassistant/components/vicare/strings.json +++ b/homeassistant/components/vicare/strings.json @@ -63,6 +63,9 @@ }, "domestic_hot_water_pump": { "name": "DHW pump" + }, + "one_time_charge": { + "name": "One-time charge" } }, "button": { diff --git a/tests/components/vicare/snapshots/test_binary_sensor.ambr b/tests/components/vicare/snapshots/test_binary_sensor.ambr index f3e4d4e1c843f38d45ec3675623d7d4871872faa..ec2451cd4661463ff0aa5ae4273c2b7029e140a9 100644 --- a/tests/components/vicare/snapshots/test_binary_sensor.ambr +++ b/tests/components/vicare/snapshots/test_binary_sensor.ambr @@ -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({