I am trying to use template to convert mm to inches for a Netatmo rain gauge. I have the below code which HA is not accepting as valid code so I won’t reboot. Any ideas what I’m doing wrong?
- platform: template
sensors:
rain_measurement:
entity_id:
- sensor_netatmo_my_home_master_bedroom_smart_rain_gauge_rain_today:
unit_of_measurement: in
Thank you jazzyisj and finity for helping me. This worked perfect and added round function to truncate the decimal places. Final code for anyone that needs this in future.
I cut and paste (*and change my device name) as gillman99 states to my configuration.yaml file. Right? I keep getting indention errors no matter how I try it.
Do I paste the code to the developer/template tab? Then what do I do with it? Copy the result string, to where?
Either way, tired of Netatmo rainfall reading in mm.
Converting measurements can sometimes feel like a puzzle, right?Your code seems like it’s on the right track, but maybe there’s a tiny detail tripping it up. Don’t worry, we’ve all been there!
If you’re looking for a handy tool to help with conversions, you might want to give ruler.only a shot. Sometimes a fresh perspective can do the trick. Good luck with your code, and here’s to making those conversions seamless!