i’m using and input number as a timer set for my boiler:
input_number:
boiler_timer_set:
name: ‘Timer Set’
initial: 0
min: -240
max: 240
step: 15
unit_of_measurement: Minutes
using the following automation:
automation:
move status ui slider when an mqtt update received
- id: boiler_timerstatus_change
alias: Boiler Timer Status Setter
initial_state: 'on'
trigger:
platform: mqtt
topic: 'home/boiler/timer'
action:
service: input_number.set_value
data_template:
entity_id: input_number.boiler_timer_status
value: "{{ trigger.payload }}"
publish message when timer setter slider is moved
- id: boiler_timersetter_changed
alias: Boiler Timer Set
initial_state: 'on'
trigger:
platform: state
entity_id: input_number.boiler_timer_set
action:
service: "mqtt.publish"
data_template:
topic: "home/boiler/settimer"
retain: "false"
payload: '{{states("input_number.boiler_timer_set") | round(0)}}'
the mqtt device sends updates of the time left for the timer every minute and i want it to update the input number control to reflect it.
the problem is that the updates sent every minute by the device, updates the input number and this causes the input number to activate its action and publish a command to set the timer which is wrong.
is it possible to only update its value, but skip the mqtt.publish that it triggers in the case that the update did not happen from the user but from the subscription to “home/boiler/timer”?