Hey guys - I’m new to hass.io (0.87.1) and oddly enough I cannot get my automations to trigger. I have Lutron Caseta lights integrated that can be controled by the UI as well as the “Call Service” tab under developer tools. However, I cannot get the triggers to turn lights on or off.
At first I attempted to use a sunset trigger (which didn’t work). Then I moved to time triggers with the same result. Any idea what could be the cause? Issue with the internal clock?
Below is my config.yaml, automations.yaml, and system check.
Notes:
After several failed attempts I tried to adding platform: time and platform: time_date as sensors. The latter causes a failed config but the former has not. I can rerun the system check when I am home from work if that helps.
time 20:04:00 has been used with and without quotes
yaml files were verified with yamllint before use
xxx in config.yaml is redacted info (need to set up secrets)
Thanks for helping out a rookie. Feels silly that I cannot get the simplest automation to work.
config.yaml
homeassistant:
# Name of the location where Home Assistant is running
name: Home
# Location required to calculate the time the sun rises and sets
latitude: xxx
longitude: xxx
# Impacts weather/sunrise data (altitude above sea level in meters)
elevation: 0
# metric for Metric, imperial for Imperial
unit_system: imperial
# Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
time_zone: America/New_York
# Customization file
customize: !include customize.yaml
# Show links to resources in log and frontend
introduction:
# Enables the frontend
frontend:
panel_iframe:
configurator:
title: Configurator
icon: mdi:wrench
url: http://192.168.1.202:3218
nodered:
title: 'Node-Red'
icon: 'mdi:shuffle-variant'
url: 'http://192.168.1.202:1880/'
# Enables configuration UI
config:
lutron_caseta:
host: 192.168.1.18
keyfile: /ssl/lutron/caseta.key
certfile: /ssl/lutron/caseta.crt
ca_certs: /ssl/lutron/caseta-bridge.crt
# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
# http:
# base_url: example.duckdns.org:8123
# Checks for available updates
# Note: This component will send some information about your system to
# the developers to assist with development of Home Assistant.
# For more information, please see:
# https://home-assistant.io/blog/2016/10/25/explaining-the-updater/
updater:
# Optional, allows Home Assistant developers to focus on popular components.
# include_used_components: true
# Discover some devices automatically
discovery:
# Allows you to issue voice commands from the frontend in enabled browsers
conversation:
# Enables support for tracking state changes over time
history:
# View all events in a logbook
logbook:
# Enables a map showing the location of tracked devices
map:
# Track the sun
sun:
# Allow diagnosing system problems
system_health:
# Sensors
sensor:
# Weather prediction
- platform: yr
- platform: time_date
# Text to speech
tts:
- platform: google
# Cloud
cloud:
# Notification
notify:
- name: NOTIFIER_NAME
platform: pushbullet
api_key: xxx
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
Unfortunately platform: time does not work (with or without quoting 20:04:00, I have seen configs with both), neither does platform: sun, event: sunset. Your link was my initial guide - I started attempting things like platform: time_date out of desperation (from ~20 failures) and viewing other configurations.
Great idea - but the same result. This seems rather odd.
homeassistant:
# Name of the location where Home Assistant is running
name: Home
# Location required to calculate the time the sun rises and sets
latitude: xxx
longitude: xxx
# Impacts weather/sunrise data (altitude above sea level in meters)
elevation: 0
# metric for Metric, imperial for Imperial
unit_system: imperial
# Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
time_zone: America/New_York
# Customization file
customize: !include customize.yaml
# Show links to resources in log and frontend
introduction:
# Enables the frontend
frontend:
panel_iframe:
configurator:
title: Configurator
icon: mdi:wrench
url: http://192.168.1.202:3218
nodered:
title: 'Node-Red'
icon: 'mdi:shuffle-variant'
url: 'http://192.168.1.202:1880/'
# Enables configuration UI
config:
lutron_caseta:
host: 192.168.1.18
keyfile: /ssl/lutron/caseta.key
certfile: /ssl/lutron/caseta.crt
ca_certs: /ssl/lutron/caseta-bridge.crt
# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
# http:
# base_url: example.duckdns.org:8123
# Checks for available updates
# Note: This component will send some information about your system to
# the developers to assist with development of Home Assistant.
# For more information, please see:
# https://home-assistant.io/blog/2016/10/25/explaining-the-updater/
updater:
# Optional, allows Home Assistant developers to focus on popular components.
# include_used_components: true
# Discover some devices automatically
discovery:
# Allows you to issue voice commands from the frontend in enabled browsers
conversation:
# Enables support for tracking state changes over time
history:
# View all events in a logbook
logbook:
# Enables a map showing the location of tracked devices
map:
# Track the sun
sun:
# Allow diagnosing system problems
system_health:
# Sensors
sensor:
# Weather prediction
- platform: yr
- platform: time
# Text to speech
tts:
- platform: google
# Cloud
cloud:
# Notification
notify:
- name: NOTIFIER_NAME
platform: pushbullet
api_key: xxx
group: !include groups.yaml
automation:
- alias: 'Office Test'
trigger:
- platform: time
at: '13:36:00'
action:
- service: light.turn_off
entity_id: light.office_main_lights
script: !include scripts.yaml
19-02-19 17:04:05 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-19 17:34:05 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-19 18:04:05 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-19 18:39:05 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-19 19:09:05 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-19 19:44:05 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-19 20:19:05 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-19 20:44:03 INFO (MainThread) [hassio.updater] Fetch update data from https://s3.amazonaws.com/hassio-version/stable.json
19-02-19 20:44:03 INFO (MainThread) [hassio.addons.git] Update add-on https://github.com/hassio-addons/repository repository
19-02-19 20:44:03 INFO (MainThread) [hassio.addons.git] Update add-on https://github.com/home-assistant/hassio-addons repository
19-02-19 20:44:05 INFO (MainThread) [hassio.addons] Load add-ons: 53 all - 0 new - 0 remove
19-02-19 20:49:05 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-19 21:24:05 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-19 21:59:05 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-19 22:29:06 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-19 22:59:06 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-19 23:01:52 INFO (MainThread) [hassio.api.proxy] /homeassistant/api/services access from core_configurator
19-02-19 23:01:52 INFO (MainThread) [hassio.api.proxy] /homeassistant/api/events access from core_configurator
19-02-19 23:01:52 INFO (MainThread) [hassio.api.proxy] /homeassistant/api/states access from core_configurator
19-02-19 23:29:06 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-19 23:59:06 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-20 00:29:06 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-20 00:59:06 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-20 01:29:06 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-20 01:59:06 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-20 02:05:29 INFO (MainThread) [hassio.api.proxy] /homeassistant/api/services access from core_configurator
19-02-20 02:05:29 INFO (MainThread) [hassio.api.proxy] /homeassistant/api/events access from core_configurator
19-02-20 02:05:29 INFO (MainThread) [hassio.api.proxy] /homeassistant/api/states access from core_configurator
19-02-20 02:29:06 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-20 02:44:03 INFO (MainThread) [hassio.updater] Fetch update data from https://s3.amazonaws.com/hassio-version/stable.json
19-02-20 02:44:03 INFO (MainThread) [hassio.addons.git] Update add-on https://github.com/home-assistant/hassio-addons repository
19-02-20 02:44:03 INFO (MainThread) [hassio.addons.git] Update add-on https://github.com/hassio-addons/repository repository
19-02-20 02:44:05 INFO (MainThread) [hassio.addons] Load add-ons: 53 all - 0 new - 0 remove
19-02-20 02:59:06 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-20 03:29:06 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-20 03:59:06 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-20 04:29:06 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-20 04:59:06 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-20 05:29:06 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-20 06:04:06 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-20 06:39:06 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-20 07:14:06 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-20 07:49:06 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-20 08:24:06 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-20 08:44:03 INFO (MainThread) [hassio.snapshots] Found 1 snapshot files
19-02-20 08:44:03 INFO (MainThread) [hassio.host.info] Update local host information
19-02-20 08:44:03 INFO (MainThread) [hassio.utils.gdbus] Call org.freedesktop.DBus.Properties.GetAll on /org/freedesktop/hostname1
19-02-20 08:44:03 INFO (MainThread) [hassio.updater] Fetch update data from https://s3.amazonaws.com/hassio-version/stable.json
19-02-20 08:44:03 INFO (MainThread) [hassio.addons.git] Update add-on https://github.com/home-assistant/hassio-addons repository
19-02-20 08:44:03 INFO (MainThread) [hassio.addons.git] Update add-on https://github.com/hassio-addons/repository repository
19-02-20 08:44:04 INFO (MainThread) [hassio.host.services] Update service information
19-02-20 08:44:04 INFO (MainThread) [hassio.utils.gdbus] Call org.freedesktop.systemd1.Manager.ListUnits on /org/freedesktop/systemd1
19-02-20 08:44:06 INFO (MainThread) [hassio.addons] Load add-ons: 53 all - 0 new - 0 remove
19-02-20 08:54:06 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-20 09:24:06 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-20 09:54:06 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-20 10:24:06 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-20 10:54:06 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-20 11:24:07 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-20 11:54:07 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-20 12:24:07 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-20 12:54:07 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-20 13:24:07 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-20 13:54:07 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-20 14:24:07 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-20 14:44:03 INFO (MainThread) [hassio.updater] Fetch update data from https://s3.amazonaws.com/hassio-version/stable.json
19-02-20 14:44:03 INFO (MainThread) [hassio.addons.git] Update add-on https://github.com/hassio-addons/repository repository
19-02-20 14:44:03 INFO (MainThread) [hassio.addons.git] Update add-on https://github.com/home-assistant/hassio-addons repository
19-02-20 14:44:06 INFO (MainThread) [hassio.addons] Load add-ons: 53 all - 0 new - 0 remove
19-02-20 14:54:07 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-20 15:24:07 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-20 15:54:07 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-20 16:24:07 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-20 16:54:07 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-20 17:29:07 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-20 18:04:07 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-20 18:29:40 INFO (MainThread) [hassio.api.proxy] /homeassistant/api/services access from core_configurator
19-02-20 18:29:40 INFO (MainThread) [hassio.api.proxy] /homeassistant/api/events access from core_configurator
19-02-20 18:29:40 INFO (MainThread) [hassio.api.proxy] /homeassistant/api/states access from core_configurator
19-02-20 18:39:07 INFO (MainThread) [hassio.homeassistant] Updated Home Assistant API token
19-02-20 18:57:56 INFO (MainThread) [hassio.api.security] /homeassistant/check access from core_ssh
19-02-20 18:57:56 INFO (SyncWorker_9) [hassio.docker] Run command 'python3 -m homeassistant -c /config --script check_config' on homeassistant/raspberrypi3-homeassistant
Log Viewer (via hassio.local:4277)
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/aiohttp/web_protocol.py", line 275, in data_received
messages, upgraded, tail = self._request_parser.feed_data(data)
File "aiohttp\_http_parser.pyx", line 523, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadStatusLine: invalid HTTP method
also, even more basic, have you checked in the dev-states page to see if the automation is “on”? if not it won’t ever run. If it isn’t “on” then you need to turn it to “on” by clicking the box to the left of the automation then turn on the toggle in the box that pops up.
@finity thanks for the suggestion as I did not know you could turn off automatons from that page. That said, the automation was turned on - so this is not the cause. Learned something new though!
@pnbruckner I removed the sensor platform: time and reran my previous automation (below) and it still did not work. Oddly enough when I woke my pc, the office lights turned off. Very odd since hass.io is running on a rpi.
I usually give a 2-3 minute buffer from the current time (ex if it is 8:05 I set the trigger to 8:08), but not 10 mins. In theory the updates should be instantaneous as soon as the config is saved, correct?
This might be the simple missing piece. I have certainly tried restarting but with as many config edits as I have tried the two may have not lined up correctly. I will incorporate this tonight.
Do you also need a restart with edits to automations.yaml?
There may be limited scenarios in which you can change something and then use one of the “reload” buttons on the general config page, but I’ve long since given up on those. I always restart when changing anything (except now for ui-lovelace.yaml, which only requires a browser refresh.)
Also, can you try entering those templates into the Template Editor? The point of those is to determine if your clock and time zone settings are correct. Many people have been tripped up on those.
I’ve never had any issues with any of the “reload…” buttons in the configuration page. It took me a while to figure out what “reload core” meant but once I figured it out I saw that it was working as well.
But anything else in the config you will need to restart, and if it’s a new/modified custom card for lovelace you will need to restart HA, refresh your lovelace page from the top right menu and clear the cache.