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

¿Atascado con una automatización de Home Assistant? ¿Alguna configuración que no va? Plantea tu problema e intentaremos ayudarte
Kalisto2000
Mensajes: 2
Registrado: Vie Abr 09, 2021 5:36 pm

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

Mensaje por Kalisto2000 » Vie Abr 09, 2021 5:58 pm

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.

Kalisto2000
Mensajes: 2
Registrado: Vie Abr 09, 2021 5:36 pm

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

Mensaje por Kalisto2000 » Dom Abr 18, 2021 10:12 am

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}} '

dadag
Mensajes: 1512
Registrado: Mar Dic 05, 2023 11:37 am

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

Mensaje por dadag » Mié Dic 06, 2023 5:33 pm

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แทงบอลเว็บแม่

dadag
Mensajes: 1512
Registrado: Mar Dic 05, 2023 11:37 am

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

Mensaje por dadag » Sab Dic 09, 2023 11:43 am

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.. 카지노사이트

dadag
Mensajes: 1512
Registrado: Mar Dic 05, 2023 11:37 am

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

Mensaje por dadag » Sab Dic 09, 2023 2:05 pm

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. فتح سجل تجاري في دبي

dadag
Mensajes: 1512
Registrado: Mar Dic 05, 2023 11:37 am

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

Mensaje por dadag » Dom Dic 10, 2023 12:48 pm

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

dadag
Mensajes: 1512
Registrado: Mar Dic 05, 2023 11:37 am

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

Mensaje por dadag » Dom Dic 10, 2023 1:06 pm

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

dadag
Mensajes: 1512
Registrado: Mar Dic 05, 2023 11:37 am

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

Mensaje por dadag » Lun Dic 11, 2023 3:14 pm

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

dadag
Mensajes: 1512
Registrado: Mar Dic 05, 2023 11:37 am

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

Mensaje por dadag » Lun Dic 11, 2023 3:53 pm

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

dadag
Mensajes: 1512
Registrado: Mar Dic 05, 2023 11:37 am

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

Mensaje por dadag » Lun Dic 11, 2023 4:09 pm

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

Responder