One sensor is a 1-wire that updates every 10-minutes and one sensor is a Netatmo sensor via zigbee that updates when it feels like it. Maybe thats the problem? I can’t find any reason the template does not work…
One of the hardware sensors must be doing something funky.
The blips seem to be happening about 6 times per hour, as do updates to one of the sensors, and the blips coincide with those updates.
At first, I thought that the 1-wire sensor must be doing something funky, but it could be either one of them. Take a look at the history of the states that each sensor is reporting. You could also write an automation that triggers on either sensor’s state change and reports it in the log; you can then go back and see what the value of each states was at the moment when the blip happens.
(Like tom_l, I don’t have a clear hypothesis about just what is going wrong, because if one of the sensors was dropping out at some level, the float filter should peg it to 0 on the graph. It’s interesting that the pattern does not change even as the minimum value goes above 0…)
EDIT: Actually, I’m confused by why the legend in the graph identifies the blue data as “1-wire” when you say in your post that it updates every 10 minutes. Maybe that is just an error? I’d actually expect the once-every-ten-minutes-or-so update pattern to come from a Zigbee sensor.
The only way I can explain the graph is that when an update come in from the blue sensor, there is something off about the value that the red sensor reports via states.
I’m not trusting the graphs, which is why I suggested the automation. I can’t think of a way to square the graph with the code.
It’s also odd that:
The behavior seems to have stopped when the lower sensor crossed 2.5 degrees.
And just before it stops, the red curve shows a period of about 10 minutes where it corresponds to neither the blue or the yellow curve.
Point 2 makes me think that there is a discrepancy between the sensors the code is looking at and the sensors graphed… which brings me back to my point at the top of this post, I suppose, that I’m not trusting the graphs.
Yeah, it’s your 1-wire sensor going unavailable. You’ll need to account for that. I assume you don’t want the minimum sensor to go unavailable when that happens so an availability template is not the right choice. You can keep the last good state like this:
- sensor:
- name: "Lägsta temp utomhus"
unique_id: lowest_outside_temp
unit_of_measurement: "°C"
device_class: temperature
state: >
{% if has_value('sensor.temperatur_ute_baksida') and has_value('sensor.utomhus_temperatur') %}
{{ [ states('sensor.temperatur_ute_baksida')|float() , states('sensor.utomhus_temperatur')|float()] | min | round(1) }}
{% else %}
{{ this.state }}
{% endif %}