You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current implementation of sensor.py is trying to match exact metric name to predefined list. If it matches a preconfigured unit is applied. All other metrics have no unit at all.
To keep the current JSON format compatible I vote for a naming pattern like "%%". This (or a similar) pattern could easily be provided in the JSON payload by SMI.
sensor.py would need to subtract "%%" from the metrics name and apply the according unit the value.
My Tasmota installation reads three meters and provides their readings like this:
With my solution I had code size, RAM and network impact in mind. Two k/v pairs per metric is a much cleaner approach of course but has less likelihood of being merged into Tasmota.
I'd be ok with either solution as long as this dreaded problem (measurements without units) is resolved.
Current implementation of sensor.py is trying to match exact metric name to predefined list. If it matches a preconfigured unit is applied. All other metrics have no unit at all.
To keep the current JSON format compatible I vote for a naming pattern like "%%". This (or a similar) pattern could easily be provided in the JSON payload by SMI.
sensor.py would need to subtract "%%" from the metrics name and apply the according unit the value.
My Tasmota installation reads three meters and provides their readings like this:
The text was updated successfully, but these errors were encountered: