I’m trying to create a template to convert data coming in from my rtlsdr. It seems that my meter is sending data in ‘decimal’ and when converted to hexidecimal it show the correct meter reading.
I believe I can fix this with a template but it’s not working correctly:
Current value of sensor.water_meter: 0415237
{{ states('sensor.water_meter')}}
{{ states('sensor.water_meter') | int(states('sensor.water_meter'),16) }}
Expected after converted to hexidecimal: 65605
but in the template editor it outputs: 4280887
Can anybody offer any assistance?
(and yes this seems odd that I need to convert this way, but i’ve been recording and have double checked this is how the values are transmitted and sent. It’s not something stuck inside the rtlsdr or elsewhere. ODD
Thanks in advance!