Skip to content

Instantly share code, notes, and snippets.

@mathieucarbou
Created March 7, 2024 11:32
Show Gist options
  • Save mathieucarbou/f5f2556e6df207bcda664782214e3a76 to your computer and use it in GitHub Desktop.
Save mathieucarbou/f5f2556e6df207bcda664782214e3a76 to your computer and use it in GitHub Desktop.
Home Assistant Hourly Weather with Met.no
# https://www.home-assistant.io/integrations/template
template:
- trigger:
- platform: homeassistant
event: start
- platform: time_pattern
minutes: /30
action:
service: weather.get_forecasts
data:
type: hourly
target:
entity_id: weather.weather_forecast_home
response_variable: forecast_data
sensor:
name: Weather Forecast Home Hourly
unique_id: 44C9F3D7-D5DB-405A-93ED-33B017AA56FE
state: "{{ forecast_data['weather.weather_forecast_home'].forecast[0].condition }}"
attributes:
forecast: "{{ forecast_data['weather.weather_forecast_home'].forecast }}"
updatedAt: "{{ now().isoformat() }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment