Skip to content
Snippets Groups Projects
Unverified Commit 0c56791d authored by kurens's avatar kurens Committed by GitHub
Browse files

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

parent 5dd03c03
No related branches found
No related tags found
No related merge requests found
...@@ -106,6 +106,12 @@ GLOBAL_SENSORS: tuple[ViCareBinarySensorEntityDescription, ...] = ( ...@@ -106,6 +106,12 @@ GLOBAL_SENSORS: tuple[ViCareBinarySensorEntityDescription, ...] = (
device_class=BinarySensorDeviceClass.RUNNING, device_class=BinarySensorDeviceClass.RUNNING,
value_getter=lambda api: api.getDomesticHotWaterPumpActive(), 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(),
),
) )
......
...@@ -18,6 +18,9 @@ ...@@ -18,6 +18,9 @@
}, },
"domestic_hot_water_pump": { "domestic_hot_water_pump": {
"default": "mdi:pump" "default": "mdi:pump"
},
"one_time_charge": {
"default": "mdi:shower-head"
} }
}, },
"button": { "button": {
......
...@@ -63,6 +63,9 @@ ...@@ -63,6 +63,9 @@
}, },
"domestic_hot_water_pump": { "domestic_hot_water_pump": {
"name": "DHW pump" "name": "DHW pump"
},
"one_time_charge": {
"name": "One-time charge"
} }
}, },
"button": { "button": {
......
...@@ -373,6 +373,53 @@ ...@@ -373,6 +373,53 @@
'state': 'unavailable', '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] # name: test_binary_sensors[burner]
StateSnapshot({ StateSnapshot({
'attributes': ReadOnlyDict({ 'attributes': ReadOnlyDict({
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment