mirror of
https://github.com/home-assistant/core.git
synced 2025-07-10 14:57:09 +00:00
Add Plugwise temperature_offset number (#100029)
Add temperature_offset number
This commit is contained in:
parent
1f3b3b1be3
commit
c01a9987b5
@ -60,6 +60,16 @@ NUMBER_TYPES = (
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
||||
),
|
||||
PlugwiseNumberEntityDescription(
|
||||
key="temperature_offset",
|
||||
translation_key="temperature_offset",
|
||||
command=lambda api, number, dev_id, value: api.set_temperature_offset(
|
||||
number, dev_id, value
|
||||
),
|
||||
device_class=NumberDeviceClass.TEMPERATURE,
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
|
@ -79,6 +79,9 @@
|
||||
},
|
||||
"max_dhw_temperature": {
|
||||
"name": "Domestic hot water setpoint"
|
||||
},
|
||||
"temperature_offset": {
|
||||
"name": "Temperature offset"
|
||||
}
|
||||
},
|
||||
"select": {
|
||||
|
@ -69,3 +69,23 @@ async def test_adam_dhw_setpoint_change(
|
||||
mock_smile_adam_2.set_number_setpoint.assert_called_with(
|
||||
"max_dhw_temperature", "056ee145a816487eaa69243c3280f8bf", 55.0
|
||||
)
|
||||
|
||||
|
||||
async def test_adam_temperature_offset_change(
|
||||
hass: HomeAssistant, mock_smile_adam: MagicMock, init_integration: MockConfigEntry
|
||||
) -> None:
|
||||
"""Test changing of number entities."""
|
||||
await hass.services.async_call(
|
||||
NUMBER_DOMAIN,
|
||||
SERVICE_SET_VALUE,
|
||||
{
|
||||
ATTR_ENTITY_ID: "number.zone_thermostat_jessie_temperature_offset",
|
||||
ATTR_VALUE: 1.0,
|
||||
},
|
||||
blocking=True,
|
||||
)
|
||||
|
||||
assert mock_smile_adam.set_temperature_offset.call_count == 1
|
||||
mock_smile_adam.set_temperature_offset.assert_called_with(
|
||||
"temperature_offset", "6a3bf693d05e48e0b460c815a4fdd09d", 1.0
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user