#Automation triggerint with wrong value'

1 messages · Page 1 of 1 (latest)

clever mortar
#

Hello, i have this automation

alias: New automation
description: ""
triggers:
  - trigger: state
    entity_id:
      - input_number.birou
conditions: []
actions:
  - action: rest_command.borou_sus
    metadata: {}
    data:
      value: "{{ states('input_number.birou') }}"
mode: single

I want that when i movie the slider, the rest_command is runned and give the value of the input slider as parameter
this is the rest command

  borou_sus:
    url: "http://192.168.1.130/setHeight?height={{value}}"
    method: get

in traces i see the right value(screenshot), but when i receive the request the value is 90 everytime...
what is wrong?

#

can i somehow see the curl and the repsonse ?

rich root
#

Did you at one point have the command using a fixed value of 90?

clever mortar
#

Tbh. I'm not sure but it's possible... At start I had the restcommand with the value hard offed instead of variable

#

But after everytime I modify the yaml I restart the whole docker container...

#

Could it be cache or something like this?

clever mortar
#

if anyone have the same problem

#

i made it to work by this

#

the rest command is

rest_command:
  borou_sus:
    url: "http://192.168.1.130/setHeight?height={{ states('input_number.birou')|int }}"
    method: get
#

i don't need to send the variable

#

whenever is called it will take the value from input_number.birou

#
  alias: New automation
  description: ''
  triggers:
  - trigger: state
    entity_id:
    - input_number.birou
  conditions: []
  actions:
  - action: rest_command.borou_sus
    metadata: {}
    data: {}
  mode: single```