mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 05:37:44 +00:00
Allow derivative/integration on input_number via the UI (#101439)
This commit is contained in:
parent
207adaf9cd
commit
c70c2f4be4
@ -6,6 +6,7 @@ from typing import Any, cast
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.input_number import DOMAIN as INPUT_NUMBER_DOMAIN
|
||||
from homeassistant.components.sensor import DOMAIN as SENSOR_DOMAIN
|
||||
from homeassistant.const import CONF_NAME, CONF_SOURCE, UnitOfTime
|
||||
from homeassistant.helpers import selector
|
||||
@ -66,7 +67,7 @@ CONFIG_SCHEMA = vol.Schema(
|
||||
{
|
||||
vol.Required(CONF_NAME): selector.TextSelector(),
|
||||
vol.Required(CONF_SOURCE): selector.EntitySelector(
|
||||
selector.EntitySelectorConfig(domain=SENSOR_DOMAIN),
|
||||
selector.EntitySelectorConfig(domain=[INPUT_NUMBER_DOMAIN, SENSOR_DOMAIN]),
|
||||
),
|
||||
}
|
||||
).extend(OPTIONS_SCHEMA.schema)
|
||||
|
@ -6,6 +6,7 @@ from typing import Any, cast
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.input_number import DOMAIN as INPUT_NUMBER_DOMAIN
|
||||
from homeassistant.components.sensor import DOMAIN as SENSOR_DOMAIN
|
||||
from homeassistant.const import CONF_METHOD, CONF_NAME, UnitOfTime
|
||||
from homeassistant.helpers import selector
|
||||
@ -58,7 +59,7 @@ CONFIG_SCHEMA = vol.Schema(
|
||||
{
|
||||
vol.Required(CONF_NAME): selector.TextSelector(),
|
||||
vol.Required(CONF_SOURCE_SENSOR): selector.EntitySelector(
|
||||
selector.EntitySelectorConfig(domain=SENSOR_DOMAIN)
|
||||
selector.EntitySelectorConfig(domain=[INPUT_NUMBER_DOMAIN, SENSOR_DOMAIN])
|
||||
),
|
||||
vol.Required(CONF_METHOD, default=METHOD_TRAPEZOIDAL): selector.SelectSelector(
|
||||
selector.SelectSelectorConfig(
|
||||
|
Loading…
x
Reference in New Issue
Block a user