Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95488

Input_number as trigger

$
0
0

@francisp wrote:

I have created the following input_number :

input_number:
  slider1:
    name: Slider
    min: 25
    max: 100
    step: 25

And the following automations :

- id: '1587227266094'
  alias: Adjust brightness eetkamer 100%
  description: ''
  trigger:
  - entity_id: input_number.slider1
    platform: state
    to: '100'
  condition: []
  action:
  - data:
      payload: '{"Protocol":"NEC","Bits":32,"Data":"0x44BBD827","DataLSB":"0x22DD1BE4","Repeat":0}'
      topic: IR_bridge/cmd/IrSend
    service: mqtt.publish
- id: '1587227266095'
  alias: Adjust brightness eetkamer 75%
  description: ''
  trigger:
  - entity_id: input_number.slider1
    platform: state
    to: '75'
  condition: []
  action:
  - data:
      payload: '{"Protocol":"NEC","Bits":32,"Data":"0x44BB34CB","DataLSB":"0x22DD2CD3","Repeat":0}'
      topic: IR_bridge/cmd/IrSend
    service: mqtt.publish
- id: '1587227266096'
  alias: Adjust brightness eetkamer 50%
  description: ''
  trigger:
  - entity_id: input_number.slider1
    platform: state
    to: '50'
  condition: []
  action:
  - data:
      payload: '{"Protocol":"NEC","Bits":32,"Data":"0x44BBFA05","DataLSB":"0x22DD5FA0","Repeat":0}'
      topic: IR_bridge/cmd/IrSend
    service: mqtt.publish
- id: '1587227266097'
  alias: Adjust brightness eetkamer 25%
  description: ''
  trigger:
  - entity_id: input_number.slider1
    platform: state
    to: '25'
  condition: []
  action:
  - data:
      payload: '{"Protocol":"NEC","Bits":32,"Data":"0x44BB728D","DataLSB":"0x22DD4EB1","Repeat":0}'
      topic: IR_bridge/cmd/IrSend
    service: mqtt.publish

But the automations never fire.

If I try something like this :

- id: '1587227266094'
  alias: Adjust brightness eetkamer 100%
  description: ''
  trigger:
  - entity_id: input_number.slider1
    platform: state
    to: 100
  condition: []
  action:
  - data:
      payload: '{"Protocol":"NEC","Bits":32,"Data":"0x44BBD827","DataLSB":"0x22DD1BE4","Repeat":0}'
      topic: IR_bridge/cmd/IrSend
    service: mqtt.publish

I get this error :

2020-04-18 18:52:25 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: expected str for dictionary value @ data['trigger'][0]['to']. Got None. (See ?, line ?). 

What is the correct syntax ?

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 95488

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>