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

Input Number and MQTT

$
0
0

@Alessandro_Bacioccol wrote:

Hello Forum,
i started to connect my Arduino to Home Assistant using MQTT protocol.
I have to pass some parameters defined with input-number integration to Arduino then I create a button on the front end with the following code:

type: button
tap_action:
  action: call-service
  service: mqtt.publish
  service_data:
    topic: Hassio
    payload: '{{ states.input_number.box1.state | int }}'

The issue i am founding is that the payload is not the number of the input_number but it’s a string containing “{{ states.input_number.box1.state | int }}”.

What i did wrong?

Thanks in advance
Alessandro

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 95365

Trending Articles



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