Input_number not working

HI Guys

Struggling with a automation please please HELP!
(Bru rgb setup)
rgb light

mqtt state /command

state_topic: "home/deidre1"
command_topic: "home/deidre1/set"

Code

input_number:
  deidre_animation_speed:
    name: Deidre LED Strip Animation Speed
    initial: 10
    min: 0
    max: 150
    step: 10

the automation just does not work

  • id: ‘1557652512285’
    alias: Deidre LED Strip Animation Speed
    trigger:
    • entity_id: input_number.deidre_animation_speed
      platform: state
      to: ‘on’
      condition: []
      action:
    • data:
      payload_template: ‘{“transition”:{{ trigger.to_state.state | int }}}’
      topic: home/deidre1/set
      service: mqtt.publish

Thanks

You have to: 'on' in the trigger for your automation. This means that it will only trigger if the state of your input_number changes to “on”, which will never happen. Removing that should make it fire on any change in state of the input_number.