I’m trying to achieve the following:
Apple HomeKit switch
switches an
Input Boolean
the state change of which triggers an
Automation
the action of which runs a
Script
So far:
- HomeKit successfully switches the Input Boolean
- The Input Boolean state change fails to trigger the automation
- The automation (when triggered manually) successfully runs the script
- The script does what it’s supposed to
All elements appear in the browser front-end and there are no syntax errors that I can see.
I’m defining my Input Boolean in configuration.yaml like this:
# Input Booleans
input_boolean:
tv_switch_bool:
name: TV on
initial: off
and my automation like this
# Automations
automation:
# Turn on TV and Virgin Media box
- alias: 'TV On'
trigger:
- platform: state
entity_id: input_boolean.tv_switch_bool
to: 'on'
action:
- service: script.turn_on
entity_id: script.tv_activity_on
I’ve been fiddling with this for hours, and I got it working briefly by deleting my automation and rewriting it by editing a pasted in example, so I figured I must have had a YAML formatting problem. But then I added in the next bit - automating a script from the input boolean state change from ‘off’ to ‘on’ - and it broke again. So I’ve gone back to just the one automation and it won’t work again!
Like I say: the script works fine, the automation works fine when triggered manually, and the input boolean responds to HomeKit, so its the Input Boolean to Automation bit that needs fixing.
Thanks for you help!
EDIT:
I manually installed Home Assistant (without hass.io) on Raspbian on a Raspberry Pi 2 B Rev 1.1.