Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support climate and sensor selector for temp sensor #33

Merged
merged 1 commit into from
Nov 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion custom_components/hvac_group/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
import voluptuous as vol

from homeassistant.components.climate import DOMAIN as CLIMATE_DOMAIN
from homeassistant.components.sensor import (
DOMAIN as SENSOR_DOMAIN,
DEVICE_CLASS_TEMPERATURE,
)
from homeassistant.const import CONF_NAME
from homeassistant.core import callback, HomeAssistant
from homeassistant.helpers import entity_registry as er, selector
Expand Down Expand Up @@ -35,7 +39,14 @@
),
vol.Optional(CONF_TOGGLE_COOLERS): selector.BooleanSelector(),
vol.Required(CONF_CURRENT_TEMPERATURE_ENTITY_ID): selector.EntitySelector(
selector.EntityFilterSelectorConfig(domain=CLIMATE_DOMAIN)
selector.EntitySelectorConfig(
filter=[
selector.EntityFilterSelectorConfig(
domain=SENSOR_DOMAIN, device_class=DEVICE_CLASS_TEMPERATURE
),
selector.EntityFilterSelectorConfig(domain=CLIMATE_DOMAIN),
]
)
),
vol.Required(CONF_HIDE_MEMBERS, default=False): selector.BooleanSelector(),
}
Expand Down