Página 1 de 7

AUTOMATIZACION: Problema publicar por MQTT el valor de un input Number

Publicado: Vie Abr 09, 2021 5:58 pm
por Kalisto2000
Hola,
estoy intentando enviar desde Home assistant por MQTT el valor de un input Number cuando este cambia de valor, pero no lo conseguido, he consultado la info de home asistant y probado lo que he encontado en su sitio oficial pero sin éxito he problado lo siguiente:

# It publishes its value to the same MQTT topic it is also subscribed to.
- alias: "Temp slider moved"
trigger:
platform: state
entity_id: input_number.target_temp
action:
service: mqtt.publish
data:
topic: "setTemperature"
retain: true
payload: "{{ states('input_number.target_temp') | int }}"

y otras muchas cosas pero sin éxito, creo que puede ser por la versión (tengo la 2021.3.4). Cambiando "payload:" por "payload template:" tampoco funciona.

Lo que si funciona es enviar un valor fijo por ejemplo si pongo <<payload: " prueba">>, funciona sin problemas.

Ya no se que probar.
Gracias de antemano.

Re: AUTOMATIZACION: Problema publicar por MQTT el valor de un input Number

Publicado: Dom Abr 18, 2021 10:12 am
por Kalisto2000
Vale, ya lo he resuelto, no hay nada como la persistencia. El caso es que ya lo había intentado de esta manera, pero supongo que habría algún pequeño error de sintaxis que no detecte en ese momento, pongo la solución por si le vale como ejemplo a alguien.

Código: Seleccionar todo

service: mqtt.publish
data:
  topic: PISO/terraza/hum_P1_min
  payload_template: '{{states.input_number.p1_min_hum.state | int}} '

Re: AUTOMATIZACION: Problema publicar por MQTT el valor de un input Number

Publicado: Mié Dic 06, 2023 5:33 pm
por dadag
Hey There. I discovered your blog using msn. That is a very smartly written article. I will make sure to bookmark it and come back to read more of your useful information. Thanks for the post. I will certainly return. UFABETแทงบอลเว็บแม่

Re: AUTOMATIZACION: Problema publicar por MQTT el valor de un input Number

Publicado: Sab Dic 09, 2023 11:43 am
por dadag
Hey. Very cool website!! Man .. Excellent .. Superb .. I’ll bookmark this website and take the feeds additionally…I’m glad to find a lot of helpful info here within the article. Thank you for sharing.. 카지노사이트

Re: AUTOMATIZACION: Problema publicar por MQTT el valor de un input Number

Publicado: Sab Dic 09, 2023 2:05 pm
por dadag
We still cannot quite believe that We possibly could come to be some checking important points available your webblog. Our family i are sincerely thankful with your generosity and then for giving me possibility pursue our chosen profession path. Just right information Manged to get in your web-site. فتح سجل تجاري في دبي

Re: AUTOMATIZACION: Problema publicar por MQTT el valor de un input Number

Publicado: Dom Dic 10, 2023 12:48 pm
por dadag
This was an incredible post. Really loved studying your site post. Your data was very informative and helpful. I think you’ll proceed posting and updating frequently. Looking forward to your subsequent one. Lift Master Automatic Gates Repair El Cajon

Re: AUTOMATIZACION: Problema publicar por MQTT el valor de un input Number

Publicado: Dom Dic 10, 2023 1:06 pm
por dadag
Amaze! Thank you! I constantly wished to produce in my internet site a thing like that. Can I take element of the publish to my blog? list of indian diplomatic missions

Re: AUTOMATIZACION: Problema publicar por MQTT el valor de un input Number

Publicado: Lun Dic 11, 2023 3:14 pm
por dadag
Whats up, I simply hopped over for your website online by means of StumbleUpon. Now not one thing I might generally learn, but I liked your feelings none the less. Thanks for making one thing worth reading. Handla THCp online

Re: AUTOMATIZACION: Problema publicar por MQTT el valor de un input Number

Publicado: Lun Dic 11, 2023 3:53 pm
por dadag
Oh my goodness! an incredible write-up dude. Appreciate it Nonetheless I’m experiencing problem with ur rss . Don’t know why Unable to register for it. Perhaps there is everyone obtaining identical rss dilemma? Anybody who knows kindly respond. Thnkx baby dan hoppfällbar barnvagn

Re: AUTOMATIZACION: Problema publicar por MQTT el valor de un input Number

Publicado: Lun Dic 11, 2023 4:09 pm
por dadag
The idea thinks fully correct. Most of smaller sized features ended up made by way of a lot of file education and learning. I adore the approval a great deal. a fantastic read