I have an operational HA (been running over a year). I use AppDaemon to create screens to use 7" tablets as home controllers…that all works fine.
I am slowly changing from my Harmony Remote integration to using IPtoIR devices. That isn’t the problem.
Here is the area with trouble.
…and maybe my starting point is the problem…
I (after reading about 60 pages of forum entrys here and elsewhere) have decided to use input_boolean toggles as switches (so I can action based on the state and get a visual status on AppDaemon).
I have created scripts to do various control actions (power on/off right now…eventually select input etc)
I have created switches to read the input_boolean and call the appropriate script.
…and I added the ‘switches’ to my AppDaemon display…
I will list some code at the end…
Here is what works…the toggles through AppDaemon, I can confirm the correct action within the HA Settings>Entities etc… ie it says it was operated and state matches the AppDaemon button.
I can run the scripts directly from HA Settings>Entities ‘run’ and they work as expected…
Problem is that input_boolean toggle does not trigger a script…no errors, no log entries…just nothing.
So obviously I am missing a gigantic silly step…
most of configuration.yaml
default_config:
group: !include groups.yaml
automation: !include automations.yaml
remote: !include remote.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
switch:
- platform: template
switches:
theater_mode:
value_template: "{{ is_state('input_boolean.theater_mode', 'on') }}"
turn_on:
service: script.theater_mode_on
turn_off:
service: script.theater_mode_off
inside scripts.yaml
projector_power_on:
alias: Projector On
sequence:
- service: remote.send_command
target:
entity_id: remote.projector
data:
command: 'ON'
mode: single
theater_mode_on:
alias: Everything On
sequence:
- service: script.turn_on
target:
entity_id: script.projector_power_on
- service: switch.turn_on
target:
entity_id: switch.denon_power
- service: switch.turn_on
target:
entity_id: switch.dvdo_power
- service: switch.turn_on
target:
entity_id: switch.hub_receiver_power
automations.yaml is empty except for [] (I never edited it)
scenes.yaml is empty
I did the input_boolean editing within the HA webpage (Helpers)…not sure where that is stored. But on the HA webpage all the entries match what I have.
Hopefully I will figure it out…I am wondering if I need an automation to monitor those input_boolean statuses if if they change then call the script…but I am going with what other folks documented.
Mic