Skip to content

Commit

Permalink
Add trigger weather template (home-assistant#100824)
Browse files Browse the repository at this point in the history
* Add trigger weather template

* Add tests

* mod dataclass

* Remove legacy forecast

* Fix test failure

* sorting

* add hourly test

* Add tests

* Add and fix tests

* Improve tests

---------

Co-authored-by: Erik <[email protected]>
  • Loading branch information
gjohansson-ST and emontnemery authored Sep 27, 2023
1 parent fd53e11 commit 43954d6
Show file tree
Hide file tree
Showing 3 changed files with 768 additions and 36 deletions.
5 changes: 5 additions & 0 deletions homeassistant/components/template/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from homeassistant.components.number import DOMAIN as NUMBER_DOMAIN
from homeassistant.components.select import DOMAIN as SELECT_DOMAIN
from homeassistant.components.sensor import DOMAIN as SENSOR_DOMAIN
from homeassistant.components.weather import DOMAIN as WEATHER_DOMAIN
from homeassistant.config import async_log_exception, config_without_domain
from homeassistant.const import CONF_BINARY_SENSORS, CONF_SENSORS, CONF_UNIQUE_ID
from homeassistant.helpers import config_validation as cv
Expand All @@ -21,6 +22,7 @@
number as number_platform,
select as select_platform,
sensor as sensor_platform,
weather as weather_platform,
)
from .const import CONF_ACTION, CONF_TRIGGER, DOMAIN

Expand Down Expand Up @@ -55,6 +57,9 @@
vol.Optional(IMAGE_DOMAIN): vol.All(
cv.ensure_list, [image_platform.IMAGE_SCHEMA]
),
vol.Optional(WEATHER_DOMAIN): vol.All(
cv.ensure_list, [weather_platform.WEATHER_SCHEMA]
),
}
)

Expand Down
Loading

0 comments on commit 43954d6

Please sign in to comment.