Any help on how to handle a little problem with my adjusted Osram Smart+ motion sensor temperature. Because this adjustment it means now and then (at restart for example) the adjusted temperature sensor show only this adjusted part:
It means some problems:
It ruins the statistics
It is also problematic in heating solutions - it sets the heating on when thinking it is only 0,7 C in the room. For a while but still.
Because I use these in heating I have some backup sensors just in case I can handle the problems remotely. I feel these Osrams follow the temperature better than for instance Xiaomis. Solution could be to create a sensor which uses xiaomi value when adjusted Osram shows only a adjustment part? But how?
Once again here from the backseat as a âPassengerâ I trust on you great âDriversâ
if this is temperature inside your home itâll never go below 5ÂșC one would hope, so you could instead use a template sensor and set it to the Osram value only if the temp is above 5
Let me know if you need help
I actually use platform template to calibrate (adjust) the the value from Osram. And to be honest sometimes the temperature of that place inside might drop to - 25 C. Itâs is my summer cabin which might be quite cold winter time without heating. And thatâs what I control with this sensor. I also have some other applications where I need to solve this problem when adjusted temperature drops to adjustment value in certain situations.
Have you tried a value template like {% if states('sensor.olohuone_osram_temp')|float <= 0 %}{{ states('sensor.osram_olkkari_temppi') }} {% else %}{{ states('sensor.osram_olkkari_temppi')|float + 1 }} {% endif %}
The other way would be to check the season and / or outside temperature to set your check
When do you get that issue with the drop?
If itâs just at restart, you could set a check that there has been at least 30 sec since restart
I use the uptime sensor with unit_of_measurement: hours and this condition in an automation: (states("sensor.uptime") | float > 0.1)
As mentioned before being as a passenger not a driver, I do not exactly understand what that does. I guess it means template does not provide the adjusted value if Osram is not ready to provide its value? I suppose this situation is due to the fact that Deconz addon is not ready yet to provide the sensor data to homeassistant after the restart?
Based on your answer, is there a possibility to create a sensor which will use other sensor value if primary is not available?
To be honest once again I do not have competence to comment your detailed proposals. However I think my problem is not related to environment temperature.
This issue will also happen when Osram for some reason drops from Deconz mesh.
I think the best solution is: if Osram is not available use the secondary sensor value. But I do not know how to write that code in template.
The reason why I am confused is because I understand we are creating actually this sensor.osram_olkkari_temppi (so how can it be an alternative if we just can not know its value. But to replace that with secondary sensor entity makes sense.
{{ states(âsensor.olohuone_tempâ)}}
Not sensor.olohuone_osram_temp (thatâs the primary sensor) Right?
You can have a sensor reference itself. It will pull the last piece of information that it had. All @lolouk44 is doing is saying that âif we have valid data, use it, otherwise use our previous dataâ.
Ok - as a passeger I edited provided solution a bit and this is what I tested and it worked. Sorry for the different sensors but they were easier to test:
osram_vierashuone_temppi:
friendly_name: "OsramVierashuoneTemppi"
unit_of_measurement: '°C'
value_template: >
{% if states('sensor.vierashuone_osram_temp') not in ['unknown', 'unavailable', 'none'] %}
{{ '%0.1f'|format(states('sensor.vierashuone_osram_temp')|float + 2.7) }}
{% else %}
{{ states('sensor.vierashuone_temp')}}
{% endif %}
Does it look OK for you Drivers?
And of course many thanks for helping me out with this issue - once again!