mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 06:07:17 +00:00
Add sensor, selector and switch for Plugwise Anna + Loria combination (#80558)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
parent
eca21ceff0
commit
0c8884fd51
@ -54,6 +54,16 @@ SELECT_TYPES = (
|
|||||||
options_key="regulation_modes",
|
options_key="regulation_modes",
|
||||||
device_class="plugwise__regulation_mode",
|
device_class="plugwise__regulation_mode",
|
||||||
),
|
),
|
||||||
|
PlugwiseSelectEntityDescription(
|
||||||
|
key="select_dhw_mode",
|
||||||
|
name="DHW mode",
|
||||||
|
icon="mdi:shower",
|
||||||
|
entity_category=EntityCategory.CONFIG,
|
||||||
|
command=lambda api, loc, opt: api.set_dhw_mode(opt),
|
||||||
|
current_option_key="dhw_mode",
|
||||||
|
options_key="dhw_modes",
|
||||||
|
device_class="plugwise__dhw_mode",
|
||||||
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -263,6 +263,13 @@ SENSORS: tuple[SensorEntityDescription, ...] = (
|
|||||||
device_class=SensorDeviceClass.HUMIDITY,
|
device_class=SensorDeviceClass.HUMIDITY,
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
),
|
),
|
||||||
|
SensorEntityDescription(
|
||||||
|
key="dhw_temperature",
|
||||||
|
name="DHW temperature",
|
||||||
|
native_unit_of_measurement=TEMP_CELSIUS,
|
||||||
|
device_class=SensorDeviceClass.TEMPERATURE,
|
||||||
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -6,6 +6,12 @@
|
|||||||
"cooling": "Cooling",
|
"cooling": "Cooling",
|
||||||
"heating": "Heating",
|
"heating": "Heating",
|
||||||
"off": "Off"
|
"off": "Off"
|
||||||
|
},
|
||||||
|
"plugwise__dhw_mode": {
|
||||||
|
"off": "Off",
|
||||||
|
"auto": "Auto",
|
||||||
|
"boost": "Boost",
|
||||||
|
"comfort": "Comfort"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,12 @@ SWITCHES: tuple[SwitchEntityDescription, ...] = (
|
|||||||
name="Relay",
|
name="Relay",
|
||||||
device_class=SwitchDeviceClass.SWITCH,
|
device_class=SwitchDeviceClass.SWITCH,
|
||||||
),
|
),
|
||||||
|
SwitchEntityDescription(
|
||||||
|
key="cooling_ena_switch",
|
||||||
|
name="Cooling",
|
||||||
|
icon="mdi:snowflake-thermometer",
|
||||||
|
entity_category=EntityCategory.CONFIG,
|
||||||
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -6,6 +6,12 @@
|
|||||||
"cooling": "Cooling",
|
"cooling": "Cooling",
|
||||||
"heating": "Heating",
|
"heating": "Heating",
|
||||||
"off": "Off"
|
"off": "Off"
|
||||||
|
},
|
||||||
|
"plugwise__dhw_mode": {
|
||||||
|
"off": "Off",
|
||||||
|
"auto": "Auto",
|
||||||
|
"boost": "Boost",
|
||||||
|
"comfort": "Comfort"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -47,6 +47,10 @@ async def test_anna_as_smt_climate_sensor_entities(
|
|||||||
assert state
|
assert state
|
||||||
assert float(state.state) == 29.1
|
assert float(state.state) == 29.1
|
||||||
|
|
||||||
|
state = hass.states.get("sensor.opentherm_dhw_temperature")
|
||||||
|
assert state
|
||||||
|
assert float(state.state) == 46.3
|
||||||
|
|
||||||
state = hass.states.get("sensor.anna_illuminance")
|
state = hass.states.get("sensor.anna_illuminance")
|
||||||
assert state
|
assert state
|
||||||
assert float(state.state) == 86.0
|
assert float(state.state) == 86.0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user