Extend generic hygrostat/thermostat actuators using config flow (#121690)

This commit is contained in:
Joakim Plate 2024-07-10 23:11:02 +02:00 committed by GitHub
parent f3fe61f929
commit 7ed5feee92
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -7,9 +7,9 @@ from typing import Any, cast
import voluptuous as vol import voluptuous as vol
from homeassistant.components import fan, switch
from homeassistant.components.humidifier import HumidifierDeviceClass from homeassistant.components.humidifier import HumidifierDeviceClass
from homeassistant.components.sensor import DOMAIN as SENSOR_DOMAIN, SensorDeviceClass from homeassistant.components.sensor import DOMAIN as SENSOR_DOMAIN, SensorDeviceClass
from homeassistant.components.switch import DOMAIN as SWITCH_DOMAIN
from homeassistant.const import CONF_NAME, PERCENTAGE from homeassistant.const import CONF_NAME, PERCENTAGE
from homeassistant.helpers import selector from homeassistant.helpers import selector
from homeassistant.helpers.schema_config_entry_flow import ( from homeassistant.helpers.schema_config_entry_flow import (
@ -45,7 +45,7 @@ OPTIONS_SCHEMA = {
) )
), ),
vol.Required(CONF_HUMIDIFIER): selector.EntitySelector( vol.Required(CONF_HUMIDIFIER): selector.EntitySelector(
selector.EntitySelectorConfig(domain=SWITCH_DOMAIN) selector.EntitySelectorConfig(domain=[switch.DOMAIN, fan.DOMAIN])
), ),
vol.Required( vol.Required(
CONF_DRY_TOLERANCE, default=DEFAULT_TOLERANCE CONF_DRY_TOLERANCE, default=DEFAULT_TOLERANCE

View File

@ -7,8 +7,8 @@ from typing import Any, cast
import voluptuous as vol import voluptuous as vol
from homeassistant.components import fan, switch
from homeassistant.components.sensor import DOMAIN as SENSOR_DOMAIN, SensorDeviceClass from homeassistant.components.sensor import DOMAIN as SENSOR_DOMAIN, SensorDeviceClass
from homeassistant.components.switch import DOMAIN as SWITCH_DOMAIN
from homeassistant.const import CONF_NAME, DEGREE from homeassistant.const import CONF_NAME, DEGREE
from homeassistant.helpers import selector from homeassistant.helpers import selector
from homeassistant.helpers.schema_config_entry_flow import ( from homeassistant.helpers.schema_config_entry_flow import (
@ -38,7 +38,7 @@ OPTIONS_SCHEMA = {
) )
), ),
vol.Required(CONF_HEATER): selector.EntitySelector( vol.Required(CONF_HEATER): selector.EntitySelector(
selector.EntitySelectorConfig(domain=SWITCH_DOMAIN) selector.EntitySelectorConfig(domain=[fan.DOMAIN, switch.DOMAIN])
), ),
vol.Required( vol.Required(
CONF_COLD_TOLERANCE, default=DEFAULT_TOLERANCE CONF_COLD_TOLERANCE, default=DEFAULT_TOLERANCE