HI,
@NotoriousBDG, please let me ask in a dedicated thread here, continuing the Double trigger? home, not_home discussion we had
I have this input_select on my main system:
- alias: 'Activity selection'
id: 'Activity selection'
# hide_entity: True
initial_state: 'on'
trigger:
platform: state
entity_id: input_select.activity
condition:
condition: template
value_template: >
{{ states('input_select.activity') in
['Opstaan','Aan de slag','Home theater',
'Gym', 'Gaming', 'Selamat makan', 'Naar bed'] }}
action:
- service_template: >
{{ 'script.' + states('input_select.activity') | lower | replace(' ','_') }}
I have a second Homeassistant setup which needs to read the selection made on this main system. It has the exact same input select for now.
Which of course is cause for trouble, since they donât see each other, but do act on the same hardwareâŚ
Would it be possible to do that by publishing this activity selection over mqtt vice-versa?
If so, what would be the correct syntax for that?
I figured something like this:
service: mqtt.publish
data_template:
topic: "activity_selection"
retain: true
payload: >-
{
"activity": "{{ states('input_select.activity') }}"
}
of course Iâd need to read that on the second system, which up to now uses
device_tracker:
- platform: mqtt_json
devices:
activity_selection: activity_selection
Maybe I am over complicating things here.
Starting over:
2 systems having an identical input select, should be both master and slave. A choice made on either side should result in state change on both sides.
Hope you could have a look please, thx!