I’m trying to change the pressure units from millibars to inches HG which I’m much more accustomed. When I check my configurateion, it kepps yelling at me. Can someone see what I may be doing wrong? I’ve copied the template information into my configuration file. It looks like this:
Configuration invalid
Testing configuration at /config
ERROR:homeassistant.config:Invalid config for [sensor.template]: [sensor.dark_sky_pressure_hg] is an invalid option for [sensor.template]. Check: sensor.template->sensors->sensor.dark_sky_pressure_hg. (See ?, line ?). Please check the docs at https://home-assistant.io/components/sensor.template/
Failed config
sensor.template:
platform: template
sensors: [source /config/configuration.yaml:251]
sensor.dark_sky_pressure_hg: [source /config/configuration.yaml:252]
friendly_name: Pressure
unit_of_measurement: in Hg
value_template: {{ states('sensor.dark_sky_pressure')|float * 0.02953 }}
Successful config (partial)
sensor.template:
States shows this:
sensor.dark_sky_pressure 1006.6 attribution: Powered by Dark Sky
unit_of_measurement: mbar
friendly_name: Dark Sky Pressure
icon: mdi:gauge
It would be so much easier if there was a unit_of_measurement: for inHg. It would calculate to 29.724898 in Hg. I would eventually like to round this number to 2 decimal places, too if we can get this to work.