Hi all,
I have automation for setting some mqtt topic using input number options via slider. Also sensor for reading topic if selected option has been recieved by mqtt. Automation is as follows:
- id: ebusd38
alias: Set Backup Mode Hwc
initial_state: true
trigger:
- platform: state
entity_id: input_number.backup_modehwc
action:
service: mqtt.publish
data_template:
topic: ebusd/ehp/BackupModeHwc/set
payload: "{{ states.input_number.backup_modehwc.state | float }}"
- id: ebusd39
alias: Get Backup Mode Hwc
initial_state: true
trigger:
- platform: mqtt
topic: ebusd/ehp/BackupModeHwc
action:
service: input_number.set_value
data_template:
entity_id: input_number.backup_mode_hwc
value: "{{ trigger.payload | float }}"
I’m using also other automatins for changing this mqtt topic, so the slider stays in last changed position. I hope you understand. Anyway, I want to make automation that will change slider corresponding to mqtt topic state, no matter if I change it or it is changed on any other way.
Can anyone help me with this? Any examples to share…
Thank you!!!