Closed garret closed 5 years ago
Should be value_json.ANALOG.A0
since A0 is nested under analog
the other question is for the home assistant support, it involves jinja templating and is out of the tasmota realm
Closing this issue as it has been answered.
See Wiki for more information. See Chat for more user experience. See Community for forum. See Code of Conduct
A thousand apologies for my English. I had the same concern and resolved it as follows:
value_template: "{{(value_json ['ANALOG']. A0 | float * 100/1024) | round (1)}}"
So I can convert an analogous reading into a value for example percentage in a simple way without having to use jinja templating.
I have mqtt client on Android. From mqtt i get {"Time":"2022-10-05T12:32:15","ANALOG":{"Range":1178}}
And all the same I see in app
How can I see only value - 1178?
That's a problem on configuring your app, not a Tasmota problem We don't know your app and how it is working. Ask the support team of your app
I installed latest version of Tasmota on a Wemos D1 mini and also commented the ADC voice to read the AnalogA0 input value. This value is given correctly in the main page ranging from 0 to 1024.
When I go in the console I can see that every 5 minutes a new MQTT topic is fired with the Analog value. I would like to take this value, report it in Home Assistant and also convert it.
However, first I did not understand how to extract this value to be reported in Home Assistant. This is the code I am using which is for sure not correct.
Another question would be if you know how to convert directly in home assistant this value ranging from 0 to 100% knowing that 1024 would be 100%. I know it can be done but I am very newbie to this.
Finally, the analog input is attached to a soil moistuire sensor. Attached to the same Wemos there is a relay shield. I noticed that when I switch on/off the relay, also the analog value is a little bit influenced (like it changes to 1018 from 1024 for instance). Is that normal?