ok but how elese is a way to push that value to a api below, or also i connected it to PyLoxone and then the Vi1 shows as imported binary sensor âsensor.whirlpool_temoeraturâ
How must be a scriot or automation look to update every minute the value: sensor.whirlpool_temoeratur
with water_heater.my_lay_z_spa-state ?
Sorry, I donât get it. Are these both entities from Loxone? And with updating one sensor with the value, do you mean only in Home Assistamt or in Loxone?
Sorry may i didn´t give much explanation what i plan to do.
I have installed with hacs a integration for my lay z spa hottub, so i am able to see the actual temperature in Homeassistant. this gives me the entity water_heater.my_lay_z_spa.state
But i primary use loxone, i just have HA in a pi for playing a but and use it for my hottub
So not i want to push the value of the water temperature from the HA integration to the loxone binary sensor entity sensor.whirlpool_temperatur that all my other loxone devices in my ouse can see the temp.
Replace UUID with the value (I suppose you had to do this already to get the Loxone sensor into HA)
This will trigger every time the water_heater entityâs attribute current_temperature changes and sends the new value to Loxone via Webhook.
In case you need to send quickly changing value to Loxone (i.e. from power meter) websocket might not be the best solution. It had some undesirable side-effects for me (see the issue here) so I switched to sending the data other way. You have either the option to send data to Virtual Input as you originally wanted or maybe even better going through UDP.
You need to first define shell commands for each of the ways:
shell_command:
loxone_udp: /bin/sh loxone_udp.sh "{{ value }}"
loxone_vi: curl -X GET -H "Authorization:Basic xxxREDACTEDxxx" http://MINISERVER_IP/dev/sps/io/"{{ vi_name }}"/"{{ value}}"
For UDP you also need to create a simple shell script (i.e. by using the âTerminal & SSHâ addon) in the config directory and make it executable.
I have called it loxone_udp.sh :
For UDP you need to create the UDP input in Loxone with correct UDP command (like pcpower\v for my example above).
The reason why it didnât work for you using the REST Notify are most probably the templates. I have fought with them for some time till I gave up and found a way using this shell command.
I also think it is a bit safer to use the basic auth hash than plain text password if you decide to choose http. I prefer UDP as it is lighter.