So I have looked at Compensation - Home Assistant documentation as well as the git hub and WTH threads on the matter. My understanding is that I have two options:
Create a template sensor
Use Compensation in the YAML.
I dont want to create a template sensor ( I have a few of them), so I am trying to get the Compensation to work. I have the following YAML:
I pasted your sensor into my own config using one of my own temp sensors as source, and it’s working as expected. Did you make sure to restart Home Assistant after altering the configuration?
I think the OP believed there was not going to be a 2nd sensor…at least that was the idea behind using ‘compensation’, I only know this to work creating a 2nd sensor with ‘compensation’ in the naming
I didn’t originally pick this up from your post, but as @vingerha alludes, the Compensation integration does not alter the original sensor. It creates a new sensor. Your example will create a sensor with the entity id sensor.compensation_temp_a_offset.
Thank you both vingerha and Didgeridrew! You are correct that I did not realize it was going to create a new sensor. I was able to find the new entity.
I feel like a bit of an idiot now (however it would be nice if the fact it created a new entity was listed in the docs for us newbies :P)
Thank you again!
Edit: now that I know it is creating a new sensor anyway, I ended up going with a template sensor for a linear adjustment:
- sensor:
- name: "Adjusted Room a Temperature"
unique_id: a847aa6d-1c91-4a91-8eb2-4f333101d5c9
state_class: measurement
unit_of_measurement: °C
device_class: temperature
state: >
{% set temperature = states('sensor.room_a_temperature') | float(0) %}
{{ temperature - 0.5 }}
So did I for one of my temp sensors, the other one is ‘odd’ on its deviations so needed ‘compensation’
The creation of a new sensor is sort of implicit (for me) but the doc says to export a state and not a new sensor so… could be better indeed