mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Add opentherm_gw.set_hot_water_setpoint service (#34579)
This commit is contained in:
parent
7ce6ae9421
commit
15113ae854
@ -43,6 +43,7 @@ from .const import (
|
|||||||
SERVICE_SET_CONTROL_SETPOINT,
|
SERVICE_SET_CONTROL_SETPOINT,
|
||||||
SERVICE_SET_GPIO_MODE,
|
SERVICE_SET_GPIO_MODE,
|
||||||
SERVICE_SET_HOT_WATER_OVRD,
|
SERVICE_SET_HOT_WATER_OVRD,
|
||||||
|
SERVICE_SET_HOT_WATER_SETPOINT,
|
||||||
SERVICE_SET_LED_MODE,
|
SERVICE_SET_LED_MODE,
|
||||||
SERVICE_SET_MAX_MOD,
|
SERVICE_SET_MAX_MOD,
|
||||||
SERVICE_SET_OAT,
|
SERVICE_SET_OAT,
|
||||||
@ -145,6 +146,7 @@ def register_services(hass):
|
|||||||
),
|
),
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
service_set_hot_water_setpoint_schema = service_set_control_setpoint_schema
|
||||||
service_set_hot_water_ovrd_schema = vol.Schema(
|
service_set_hot_water_ovrd_schema = vol.Schema(
|
||||||
{
|
{
|
||||||
vol.Required(ATTR_GW_ID): vol.All(
|
vol.Required(ATTR_GW_ID): vol.All(
|
||||||
@ -263,6 +265,21 @@ def register_services(hass):
|
|||||||
service_set_hot_water_ovrd_schema,
|
service_set_hot_water_ovrd_schema,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
async def set_dhw_setpoint(call):
|
||||||
|
"""Set the domestic hot water setpoint on the OpenTherm Gateway."""
|
||||||
|
gw_dev = hass.data[DATA_OPENTHERM_GW][DATA_GATEWAYS][call.data[ATTR_GW_ID]]
|
||||||
|
gw_var = gw_vars.DATA_DHW_SETPOINT
|
||||||
|
value = await gw_dev.gateway.set_dhw_setpoint(call.data[ATTR_TEMPERATURE])
|
||||||
|
gw_dev.status.update({gw_var: value})
|
||||||
|
async_dispatcher_send(hass, gw_dev.update_signal, gw_dev.status)
|
||||||
|
|
||||||
|
hass.services.async_register(
|
||||||
|
DOMAIN,
|
||||||
|
SERVICE_SET_HOT_WATER_SETPOINT,
|
||||||
|
set_dhw_setpoint,
|
||||||
|
service_set_hot_water_setpoint_schema,
|
||||||
|
)
|
||||||
|
|
||||||
async def set_device_clock(call):
|
async def set_device_clock(call):
|
||||||
"""Set the clock on the OpenTherm Gateway."""
|
"""Set the clock on the OpenTherm Gateway."""
|
||||||
gw_dev = hass.data[DATA_OPENTHERM_GW][DATA_GATEWAYS][call.data[ATTR_GW_ID]]
|
gw_dev = hass.data[DATA_OPENTHERM_GW][DATA_GATEWAYS][call.data[ATTR_GW_ID]]
|
||||||
|
@ -29,6 +29,7 @@ DOMAIN = "opentherm_gw"
|
|||||||
SERVICE_RESET_GATEWAY = "reset_gateway"
|
SERVICE_RESET_GATEWAY = "reset_gateway"
|
||||||
SERVICE_SET_CLOCK = "set_clock"
|
SERVICE_SET_CLOCK = "set_clock"
|
||||||
SERVICE_SET_CONTROL_SETPOINT = "set_control_setpoint"
|
SERVICE_SET_CONTROL_SETPOINT = "set_control_setpoint"
|
||||||
|
SERVICE_SET_HOT_WATER_SETPOINT = "set_hot_water_setpoint"
|
||||||
SERVICE_SET_HOT_WATER_OVRD = "set_hot_water_ovrd"
|
SERVICE_SET_HOT_WATER_OVRD = "set_hot_water_ovrd"
|
||||||
SERVICE_SET_GPIO_MODE = "set_gpio_mode"
|
SERVICE_SET_GPIO_MODE = "set_gpio_mode"
|
||||||
SERVICE_SET_LED_MODE = "set_led_mode"
|
SERVICE_SET_LED_MODE = "set_led_mode"
|
||||||
|
@ -52,6 +52,20 @@ set_hot_water_ovrd:
|
|||||||
state, or "A" to disable the override.
|
state, or "A" to disable the override.
|
||||||
example: "1"
|
example: "1"
|
||||||
|
|
||||||
|
set_hot_water_setpoint:
|
||||||
|
description: >
|
||||||
|
Set the domestic hot water setpoint on the gateway.
|
||||||
|
fields:
|
||||||
|
gateway_id:
|
||||||
|
description: The gateway_id of the OpenTherm Gateway.
|
||||||
|
example: "opentherm_gateway"
|
||||||
|
temperature:
|
||||||
|
description: >
|
||||||
|
The domestic hot water setpoint to set on the gateway. Not all boilers support this feature.
|
||||||
|
Values between 0 and 90 are accepted, but not all boilers support this range.
|
||||||
|
Check the values of the slave_dhw_min_setp and slave_dhw_max_setp sensors to see the supported range on your boiler.
|
||||||
|
example: "60"
|
||||||
|
|
||||||
set_gpio_mode:
|
set_gpio_mode:
|
||||||
description: Change the function of the GPIO pins of the gateway.
|
description: Change the function of the GPIO pins of the gateway.
|
||||||
fields:
|
fields:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user