File tree Expand file tree Collapse file tree 2 files changed +3
-0
lines changed
homeassistant/components/template
tests/components/template Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Original file line number Diff line number Diff line change 3434from homeassistant .const import (
3535 CONF_NAME ,
3636 CONF_TEMPERATURE_UNIT ,
37+ CONF_UNIQUE_ID ,
3738 STATE_UNAVAILABLE ,
3839 STATE_UNKNOWN ,
3940)
151152 vol .Optional (CONF_PRESSURE_UNIT ): vol .In (PressureConverter .VALID_UNITS ),
152153 vol .Required (CONF_TEMPERATURE_TEMPLATE ): cv .template ,
153154 vol .Optional (CONF_TEMPERATURE_UNIT ): vol .In (TemperatureConverter .VALID_UNITS ),
155+ vol .Optional (CONF_UNIQUE_ID ): cv .string ,
154156 vol .Optional (CONF_VISIBILITY_TEMPLATE ): cv .template ,
155157 vol .Optional (CONF_VISIBILITY_UNIT ): vol .In (DistanceConverter .VALID_UNITS ),
156158 vol .Optional (CONF_WIND_BEARING_TEMPLATE ): cv .template ,
Original file line number Diff line number Diff line change @@ -132,6 +132,7 @@ async def setup_weather(
132132 {
133133 "platform" : "template" ,
134134 "name" : "test" ,
135+ "unique_id" : "abc123" ,
135136 "attribution_template" : "{{ states('sensor.attribution') }}" ,
136137 "condition_template" : "sunny" ,
137138 "temperature_template" : "{{ states('sensor.temperature') | float }}" ,
You can’t perform that action at this time.
0 commit comments