I have a working HA setup…and it has been running for a few years.
Core 2024.4.4
Supervisor 2024.04.0
Operating System 12.2
Frontend 20240404.2
In our media room, there is a lot of equipment that has to be powered on, input set etc. Currently partially using HA to call the Harmony Hub to do that automation, and just add a few items in the HA script.
I need to get away from Harmony, since Logitech stopped supporting it…and eventually it will die altogether.
The advantage of the Harmony system is it remembers the status of devices…so it doesn’t turn the receiver off when all you want to do is change inputs.
I am trying to take advantage of HA capabilities so it will not only remember what it turned on or off…but also (using ping) check the status if a device is already on or off.
Here is my first failure…this is in my scripts.yaml that is called by configuration.,yaml
theater_mode_off:
alias: Everything Off
sequence:
- service: script.turn_off
target:
entity_id: script.projector_power_off
- service: switch.turn_off
target:
entity_id: switch.denon_power
- service: switch.turn_off
target:
entity_id: switch.dvdo_power
- service_template: >
{% if is_state('binary_sensor.192_168_11_15', 'on') %}
script.pioneer_rec_poweroff
- service: remote.send_command
target:
entity_id: remote.hub
data:
num_repeats: 1
delay_secs: 0.4
hold_secs: 0
command: PowerOff
device: 40278461
#etc...
and
pioneer_rec_poweroff:
alias: ReceiveOFF
sequence:
- service: remote.send_command
target:
entity_id: remote.hub
data:
num_repeats: 1
delay_secs: 0.4
hold_secs: 0
command: PowerOff
device: 40278468
the implemenation with the ping is obviously wrong…but I don’t understand what I am doing…this is the transition…once it is working with these Harmony codes…then I can change it to use an IP 2 IR device and send the hex codes.
Am I putting this in the wrong location…ie should it be a blueprint instead (and no idea what those are either)
The script worked until I started fixing it with the ping check. I would like it to set boolean flags so that the power status of items was logged so other scripts can check…only a couple of items will work with the ping command.
If someone could just point me in the right direction, it would be appreciated.
Thanks.
Mic