Skip to content

Instantly share code, notes, and snippets.

@topdng
Created February 27, 2025 01:57
Show Gist options
  • Save topdng/0fa018f9c2424497a36581d53f006556 to your computer and use it in GitHub Desktop.
Save topdng/0fa018f9c2424497a36581d53f006556 to your computer and use it in GitHub Desktop.
Pirate Weather Config
template:
- trigger:
- platform: time_pattern
minutes: "/30"
action:
- service: weather.get_forecasts
data:
type: daily
target:
entity_id: weather.pirateweather
response_variable: daily
sensor:
- name: Pirate Weather Daily
unique_id: pirateweather_daily
state: "{{ daily['weather.pirateweather'].forecast[0].condition }}"
attributes:
forecast: "{{ daily['weather.pirateweather'].forecast }}"
- trigger:
- platform: time_pattern
minutes: "/30"
action:
- service: weather.get_forecasts
data:
type: hourly
target:
entity_id: weather.pirateweather
response_variable: hourly
sensor:
- name: Pirate Weather Hourly
unique_id: pirateweather_hourly
state: "{{ hourly['weather.pirateweather'].forecast[0].condition }}"
attributes:
forecast: "{{ hourly['weather.pirateweather'].forecast[:168] }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment