Hello,
I have a question about a temperature sensor which I installed. It shows the actual temperature on a little oled display and I want to read the temperature in HA for further automations. The oled is turned on by a motion sensor.
It works fine for a certain time but then the sensor stands still on a temperature in a certain moment an doesn´t change anymore. When the motion sensor discovers a motion the temperature will be set actually.
So I think I have a mistake in my yaml code, the update interval of the sensor is set to 1s and I want to have this data in that intervall in HA.
Could you have a look on the code and what I have done wrong?
That is very excessive. Temperature typically doesn’t change that quickly and after the fact is rarely relevant, especially if it is the same temperature. There are filters you can use to only send an update when the temperature changes by a certain amount or some time has elapsed.
As far as the issue you are seeing, you will need to look at the log to see what is going on.
Ok, I flashed it with the same code and it works normal.
Here the logs:
[17:48:20][D][dallas.temp.sensor:054]: ‘Temperatur Mitte’: Got Temperature=78.8°C
[17:48:20][D][sensor:094]: ‘Temperatur Mitte’: Sending state 78.75000 °C with 1 decimals of accuracy
[17:48:21][D][dallas.temp.sensor:054]: ‘Temperatur Mitte’: Got Temperature=78.8°C
[17:48:21][D][sensor:094]: ‘Temperatur Mitte’: Sending state 78.75000 °C with 1 decimals of accuracy
[17:48:22][D][dallas.temp.sensor:054]: ‘Temperatur Mitte’: Got Temperature=78.8°C
[17:48:22][D][sensor:094]: ‘Temperatur Mitte’: Sending state 78.75000 °C with 1 decimals of accuracy
[17:48:23][D][dallas.temp.sensor:054]: ‘Temperatur Mitte’: Got Temperature=78.8°C
[17:48:23][D][sensor:094]: ‘Temperatur Mitte’: Sending state 78.75000 °C with 1 decimals of accuracy
[17:48:24][D][dallas.temp.sensor:054]: ‘Temperatur Mitte’: Got Temperature=78.8°C
[17:48:24][D][sensor:094]: ‘Temperatur Mitte’: Sending state 78.75000 °C with 1 decimals of accuracy
[17:48:25][D][dallas.temp.sensor:054]: ‘Temperatur Mitte’: Got Temperature=78.8°C
[17:48:25][D][sensor:094]: ‘Temperatur Mitte’: Sending state 78.75000 °C with 1 decimals of accuracy
[17:48:26][D][dallas.temp.sensor:054]: ‘Temperatur Mitte’: Got Temperature=78.8°C
[17:48:26][D][sensor:094]: ‘Temperatur Mitte’: Sending state 78.75000 °C with 1 decimals of accuracy
[17:48:27][D][dallas.temp.sensor:054]: ‘Temperatur Mitte’: Got Temperature=78.8°C
[17:48:27][D][sensor:094]: ‘Temperatur Mitte’: Sending state 78.75000 °C with 1 decimals of accuracy
[17:48:28][D][dallas.temp.sensor:054]: ‘Temperatur Mitte’: Got Temperature=78.8°C
[17:48:28][D][sensor:094]: ‘Temperatur Mitte’: Sending state 78.75000 °C with 1 decimals of accuracy
[17:48:29][D][dallas.temp.sensor:054]: ‘Temperatur Mitte’: Got Temperature=78.8°C
[17:48:29][D][sensor:094]: ‘Temperatur Mitte’: Sending state 78.75000 °C with 1 decimals of accuracy
[17:48:30][D][dallas.temp.sensor:054]: ‘Temperatur Mitte’: Got Temperature=78.8°C
[17:48:30][D][sensor:094]: ‘Temperatur Mitte’: Sending state 78.75000 °C with 1 decimals of accuracy
[17:48:31][D][dallas.temp.sensor:054]: ‘Temperatur Mitte’: Got Temperature=78.8°C
[17:48:31][D][sensor:094]: ‘Temperatur Mitte’: Sending state 78.75000 °C with 1 decimals of accuracy
[17:48:32][D][dallas.temp.sensor:054]: ‘Temperatur Mitte’: Got Temperature=78.8°C
[17:48:32][D][sensor:094]: ‘Temperatur Mitte’: Sending state 78.75000 °C with 1 decimals of accuracy
[17:48:33][D][dallas.temp.sensor:054]: ‘Temperatur Mitte’: Got Temperature=78.8°C
[17:48:33][D][sensor:094]: ‘Temperatur Mitte’: Sending state 78.75000 °C with 1 decimals of accuracy
[17:48:34][D][dallas.temp.sensor:054]: ‘Temperatur Mitte’: Got Temperature=78.8°C
[17:48:34][D][sensor:094]: ‘Temperatur Mitte’: Sending state 78.75000 °C with 1 decimals of accuracy
[17:48:35][D][dallas.temp.sensor:054]: ‘Temperatur Mitte’: Got Temperature=78.8°C
I can change the interval to a higher value, that´s right.
But I don´t know why the sensor doesn´t deliver any values after a certain time.
I don’t know your motion sensor time settings, so it’s difficult to estimate the behavior, but I expect that these two automations don’t work well together.
Interval component doesn’t care about your binary sensor automations or delays.