I’ve a broadlink IR controller in 2 rooms to control the A/C
Both A/C are the same so when I teach one of my broadlink the IR commands it can be applied to the other broadlink as well.
I’ve created all the needed scripts to call the IR send command in one of the rooms and it work great,
now - I would like to duplicate it to the second room but just change the target entity.
I’ve tried to call the script with a dynamic entity_id but it doesn’t work - I either done something wrong or it’s not supported.
Here is my script:
alias: A/C Off
sequence:
- service: remote.send_command
data:
device: A/C
command:
- Power Off
target:
device_id: '{{ data.entity_id }}'
mode: single
icon: mdi:fan-off
The device name A/C
is identical in both rooms.
And here is the way how I call the script from the dashboard (using a button):
type: horizontal-stack
title: Master Bed Room A/C
cards:
- type: vertical-stack
cards:
- show_name: true
show_icon: true
type: button
tap_action:
action: toggle
entity: script.a_c_on_cold24auto
name: ❄️ A/C Cold 24'C Auto
icon_height: 50px
- type: vertical-stack
cards:
- show_name: true
show_icon: true
type: button
tap_action:
action: toggle
entity: script.a_c_off
icon_height: 50px
data:
entity_id: 4d0ef0dad66651b949659d663179aa64
Any suggestions?