|
22 | 22 | _STATISTIC_MEASURES = ["min", "max"] |
23 | 23 |
|
24 | 24 |
|
25 | | -OPTIONS_SCHEMA = vol.Schema({ |
26 | | - vol.Required(CONF_ENTITY_ID): selector.EntitySelector( |
27 | | - selector.EntitySelectorConfig( |
28 | | - domain=[SENSOR_DOMAIN, NUMBER_DOMAIN, INPUT_NUMBER_DOMAIN], |
29 | | - multiple=False, |
| 25 | +OPTIONS_SCHEMA = vol.Schema( |
| 26 | + { |
| 27 | + vol.Required(CONF_ENTITY_ID): selector.EntitySelector( |
| 28 | + selector.EntitySelectorConfig( |
| 29 | + domain=[SENSOR_DOMAIN, NUMBER_DOMAIN, INPUT_NUMBER_DOMAIN], |
| 30 | + multiple=False, |
| 31 | + ), |
30 | 32 | ), |
31 | | - ), |
32 | | - vol.Required(CONF_TYPE): selector.SelectSelector( |
33 | | - selector.SelectSelectorConfig( |
34 | | - options=_STATISTIC_MEASURES, translation_key=CONF_TYPE |
| 33 | + vol.Required(CONF_TYPE): selector.SelectSelector( |
| 34 | + selector.SelectSelectorConfig( |
| 35 | + options=_STATISTIC_MEASURES, translation_key=CONF_TYPE |
| 36 | + ), |
35 | 37 | ), |
36 | | - ), |
37 | | - vol.Required(CONF_EQUAL_UPDATES, default=False): selector.BooleanSelector(), |
38 | | -}) |
39 | | - |
40 | | -CONFIG_SCHEMA = vol.Schema({ |
41 | | - vol.Required("name"): selector.TextSelector( |
42 | | - selector.TextSelectorConfig( |
43 | | - type=selector.TextSelectorType.TEXT, autocomplete="off" |
44 | | - ), |
45 | | - ) |
46 | | -}).extend(OPTIONS_SCHEMA.schema) |
| 38 | + vol.Required(CONF_EQUAL_UPDATES, default=False): selector.BooleanSelector(), |
| 39 | + } |
| 40 | +) |
| 41 | + |
| 42 | +CONFIG_SCHEMA = vol.Schema( |
| 43 | + { |
| 44 | + vol.Required("name"): selector.TextSelector( |
| 45 | + selector.TextSelectorConfig( |
| 46 | + type=selector.TextSelectorType.TEXT, autocomplete="off" |
| 47 | + ), |
| 48 | + ) |
| 49 | + } |
| 50 | +).extend(OPTIONS_SCHEMA.schema) |
47 | 51 |
|
48 | 52 | CONFIG_FLOW = { |
49 | 53 | "user": SchemaFlowFormStep(CONFIG_SCHEMA), |
|
0 commit comments