Help a beginner wih YAML

Very simple setup seems complicated to program!

I’m very new to HA and YAML. Started 2 weeks ago.
I just can’t google a solution to this simple setup:

I have a TRV and a thermometer in the same room (SONOFF).
The TRV have the option for setting a offset.

I want the offset to be calculated by ThermometerTemp minus TRVTemp and have HA set the offset to this value.

These are the enitities and attributes for this:

‘sensor.termometer_temperature’ - The actual temperature on the thermometer
‘climate.termostat_1’,‘current_temperature’ - The temperature the TRV measures
‘number.termostat_1_local_temperature_calibration’ - The TRV offset

Don’t know if it needs some trigger or conditions. If it does, then it should run everytime ThermometerTemp is not equal to ThermostatTemp.

What do I need to insert in my YAML file to make this work?

TIA

Hi Ricky Jensen,

Welcome to the community!

The best thing about HA at this point for new users is the UI editor. While it is possible to make things that don’t work there, it is almost impossible to make something that will break your system. Give it a try, see what you come up with. If you run into a road block move to the edit in YAML screen and copy-paste it here using the <> tools in the forum to format the code properly.

You can also look in the Blueprint exchange to maybe find exactly what you are looking for and you don’t have to code it at all, or that has some code in that you can copy to do your thing.