2018-05-17 17:53:37 +00:00
|
|
|
sensor:
|
|
|
|
- platform: darksky
|
|
|
|
api_key: !secret darksky_api_key
|
|
|
|
monitored_conditions:
|
|
|
|
- temperature
|
|
|
|
- summary
|
|
|
|
- hourly_summary
|
|
|
|
- daily_summary
|
|
|
|
automation:
|
|
|
|
- alias: Morning weather
|
|
|
|
action:
|
|
|
|
- data: {}
|
|
|
|
service: script.weather_report
|
|
|
|
condition:
|
|
|
|
- after: '6:00'
|
|
|
|
before: '12:00'
|
|
|
|
condition: time
|
|
|
|
id: '1521686674842'
|
|
|
|
trigger:
|
|
|
|
- entity_id: light.living_room
|
|
|
|
from: 'off'
|
|
|
|
platform: state
|
|
|
|
to: 'on'
|
|
|
|
script:
|
|
|
|
weather_report:
|
|
|
|
alias: Weather report
|
|
|
|
sequence:
|
|
|
|
- service: script.sonos_tts
|
|
|
|
data_template:
|
|
|
|
message: >-
|
|
|
|
{% if now().hour > 17 %}
|
|
|
|
Good evening!
|
|
|
|
{% elif now().hour > 12 %}
|
|
|
|
Good afternoon!
|
|
|
|
{% else %}
|
|
|
|
Good morning!
|
|
|
|
{% endif %}
|
|
|
|
{% if is_state('device_tracker.homeassistant_pixel', 'home') %}
|
|
|
|
Hi Correl!
|
|
|
|
{% endif %}
|
|
|
|
{% if is_state('device_tracker.stephaniesiphone', 'home') %}
|
|
|
|
Hi Stephanie!
|
|
|
|
{% endif %}
|
|
|
|
{% if is_state('device_tracker.PhilsGalaxyS7Edge', 'home') %}
|
|
|
|
Hi Phil!
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
Today's forecast is
|
|
|
|
{{ states.sensor.dark_sky_daily_summary.state }}
|
|
|
|
Right now, the weather is
|
|
|
|
{{ states.sensor.dark_sky_summary.state}} at
|
|
|
|
{{ states.sensor.dark_sky_temperature.state }}
|
|
|
|
degrees,
|
|
|
|
{{ states.sensor.dark_sky_hourly_summary.state }}
|
|
|
|
|
|
|
|
{{ [ 'I hope you''re ready for an interesting day!',
|
|
|
|
'Get ready, today should be a fun one!',
|
|
|
|
'Get out there and kick some butt!',
|
|
|
|
|
|
|
|
] | random }}
|
|
|
|
|
2018-06-14 20:38:20 +00:00
|
|
|
group:
|
|
|
|
DarkSky:
|
|
|
|
view: yes
|
|
|
|
icon: mdi:weather-rainy
|
|
|
|
entities:
|
|
|
|
- group.darksky_sensors
|
|
|
|
- group.darksky_automations
|
|
|
|
- group.darksky_scripts
|
|
|
|
darksky_sensors:
|
|
|
|
name: Sensors
|
|
|
|
entities:
|
|
|
|
- sensor.dark_sky_summary
|
|
|
|
- sensor.dark_sky_hourly_summary
|
|
|
|
- sensor.dark_sky_daily_summary
|
|
|
|
- sensor.dark_sky_temperature
|
|
|
|
darksky_automations:
|
|
|
|
name: Automations
|
|
|
|
entities:
|
|
|
|
- automation.morning_weather
|
|
|
|
darksky_scripts:
|
|
|
|
name: Scripts
|
|
|
|
entities:
|
|
|
|
- script.weather_report
|