Good evening,
Ich have a sensor (Lumi) that measures pressure and temperature. With the two values (and the altitude of the location [Thun in Switzerland) i’d like to calculate the pressure reduced to the sea level. I manged to get the the required code running in Development Tool/Template of Home Assistant. Means the code calculates the correct pressure (see screenshot in the attachment). Now im a bit puzlled, what are the next steps, to integrate this tested code in home assistant? Any help will be appreciated.
Since you have your formula working I suggest you create a template helper (you find them in the UI under settings) and paste your working formula into that. This helper you could use in HA for various things.
Good morning,
Today I had some time to continue on “my problem”. I had a look into the (German) Book “Home ASSISTANT - Das umfassende Handbuch” (Author: Udo Brandes). There I found two ways to solve my problem:
Add the yaml code directly to the “configuration.yaml” file (or to a dedicated .yaml file and use the include directive).
Create a template helper as you suggested
Since this is my very first template, I followed your recommendation. As a result: It works!