diff --git a/homeassistant/components/smartthings/icons.json b/homeassistant/components/smartthings/icons.json index f1034d1a55f..668dff961ee 100644 --- a/homeassistant/components/smartthings/icons.json +++ b/homeassistant/components/smartthings/icons.json @@ -74,6 +74,12 @@ "finished": "mdi:food-turkey" } }, + "diverter_valve_position": { + "state": { + "room": "mdi:sofa", + "tank": "mdi:water-boiler" + } + }, "manual_level": { "default": "mdi:radiator", "state": { diff --git a/homeassistant/components/smartthings/sensor.py b/homeassistant/components/smartthings/sensor.py index 6c8c78b4d32..8ae479e58f5 100644 --- a/homeassistant/components/smartthings/sensor.py +++ b/homeassistant/components/smartthings/sensor.py @@ -433,6 +433,16 @@ CAPABILITY_TO_SENSORS: dict[ ) ], }, + Capability.SAMSUNG_CE_EHS_DIVERTER_VALVE: { + Attribute.POSITION: [ + SmartThingsSensorEntityDescription( + key=Attribute.POSITION, + translation_key="diverter_valve_position", + device_class=SensorDeviceClass.ENUM, + options=["room", "tank"], + ) + ] + }, Capability.ENERGY_METER: { Attribute.ENERGY: [ SmartThingsSensorEntityDescription( diff --git a/homeassistant/components/smartthings/strings.json b/homeassistant/components/smartthings/strings.json index 0d8e5feabc0..c13fd0e7932 100644 --- a/homeassistant/components/smartthings/strings.json +++ b/homeassistant/components/smartthings/strings.json @@ -284,6 +284,13 @@ "completion_time": { "name": "Completion time" }, + "diverter_valve_position": { + "name": "Valve position", + "state": { + "room": "Room", + "tank": "Tank" + } + }, "dryer_mode": { "name": "Dryer mode" }, diff --git a/tests/components/smartthings/snapshots/test_sensor.ambr b/tests/components/smartthings/snapshots/test_sensor.ambr index 7e9dd5c08da..4197837112c 100644 --- a/tests/components/smartthings/snapshots/test_sensor.ambr +++ b/tests/components/smartthings/snapshots/test_sensor.ambr @@ -5945,6 +5945,63 @@ 'state': '1.08249458332857e-05', }) # --- +# name: test_all_entities[da_sac_ehs_000001_sub][sensor.eco_heating_system_valve_position-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'options': list([ + 'room', + 'tank', + ]), + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.eco_heating_system_valve_position', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Valve position', + 'platform': 'smartthings', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'diverter_valve_position', + 'unique_id': '1f98ebd0-ac48-d802-7f62-000001200100_main_samsungce.ehsDiverterValve_position_position', + 'unit_of_measurement': None, + }) +# --- +# name: test_all_entities[da_sac_ehs_000001_sub][sensor.eco_heating_system_valve_position-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'enum', + 'friendly_name': 'Eco Heating System Valve position', + 'options': list([ + 'room', + 'tank', + ]), + }), + 'context': , + 'entity_id': 'sensor.eco_heating_system_valve_position', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'room', + }) +# --- # name: test_all_entities[da_sac_ehs_000001_sub_1][sensor.heat_pump_main_energy-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ @@ -6222,6 +6279,63 @@ 'state': '4.50185416638851e-06', }) # --- +# name: test_all_entities[da_sac_ehs_000001_sub_1][sensor.heat_pump_main_valve_position-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'options': list([ + 'room', + 'tank', + ]), + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.heat_pump_main_valve_position', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Valve position', + 'platform': 'smartthings', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'diverter_valve_position', + 'unique_id': '6a7d5349-0a66-0277-058d-000001200101_main_samsungce.ehsDiverterValve_position_position', + 'unit_of_measurement': None, + }) +# --- +# name: test_all_entities[da_sac_ehs_000001_sub_1][sensor.heat_pump_main_valve_position-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'enum', + 'friendly_name': 'Heat Pump Main Valve position', + 'options': list([ + 'room', + 'tank', + ]), + }), + 'context': , + 'entity_id': 'sensor.heat_pump_main_valve_position', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'room', + }) +# --- # name: test_all_entities[da_sac_ehs_000002_sub][sensor.warmepumpe_energy-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ @@ -6499,6 +6613,63 @@ 'state': '0.000222076093320449', }) # --- +# name: test_all_entities[da_sac_ehs_000002_sub][sensor.warmepumpe_valve_position-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'options': list([ + 'room', + 'tank', + ]), + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.warmepumpe_valve_position', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Valve position', + 'platform': 'smartthings', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'diverter_valve_position', + 'unique_id': '3810e5ad-5351-d9f9-12ff-000001200000_main_samsungce.ehsDiverterValve_position_position', + 'unit_of_measurement': None, + }) +# --- +# name: test_all_entities[da_sac_ehs_000002_sub][sensor.warmepumpe_valve_position-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'enum', + 'friendly_name': 'Wärmepumpe Valve position', + 'options': list([ + 'room', + 'tank', + ]), + }), + 'context': , + 'entity_id': 'sensor.warmepumpe_valve_position', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'room', + }) +# --- # name: test_all_entities[da_wm_dw_000001][sensor.dishwasher_completion_time-entry] EntityRegistryEntrySnapshot({ 'aliases': set({