Dallas sensor update interval in HA

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?

Thank you and best regards

Markus

esphome:
  name: temperatur-puffer
  friendly_name: Temperatur_Puffer


  on_boot:
    priority: 800
    then:
      #- script.execute: show_pages
       - display.page.show: page1   


esp32:
  board: esp32dev
  framework:
    type: arduino


binary_sensor:
  - platform: gpio
    pin: 
      number: GPIO025
      mode: 
        input: True
        pullup: True
    #filters:
      #- delayed_on_off: 1s
    name: "Bewegungssensor Puffer"
    id: my_sensor
    device_class: motion
    on_press: 
      then:
        #- script.execute: show_pages
        - display.page.show: page1
        - delay: 10s       
        - display.page.show: page5
    on_release: 
      then:
        - delay: 10s
        - display.page.show: page5



# Various ways to configure fonts
font:
  
    # gfonts://family[@weight]
  - file: "gfonts://Roboto"
    id: roboto_20
    size: 20

  - file: "gfonts://Roboto"
    id: roboto_14
    size: 14
  
  - file: "gfonts://Roboto"
    id: roboto_24
    size: 34

  - file: "gfonts://Roboto"
    id: roboto_26
    size: 16
    

one_wire:
  - platform: gpio
    pin: GPIO22

sensor:
  - platform: dallas_temp
    address: 0xff00000087272828 #Replace
    name: "Temperatur Mitte" 
    id: mitte
    update_interval: 1s
    entity_id: tempteratur.mitte
  


i2c:
  sda: GPIO016
  scl: GPIO017

display:
  - platform: ssd1306_i2c
    model: "SH1106 128x64"
    id: my_display
    address: 0x3C
  
    pages:
    
    - id: page1
      lambda: |-
        it.printf(20, 12, id(roboto_26), "Temp. Mitte: ");
        it.line(0,40,128,40);
        it.printf(45, 45, id(roboto_26), "%.1f °C", id(mitte).state);
       
       
    - id: page5
      lambda: |-
        it.printf(0, 0, id(roboto_24), "");

        
interval:
  - interval: 1s
    then:
      - if: 
          condition: 
            - binary_sensor.is_off: my_sensor
          then:
            - display.page.show: page5 
          else: 
            - display.page.show: page1 

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "vQ69HOpbBe4TYLxLFxsYvyNPhB9JRR9CdU131MGCfg8="

ota:
  - platform: esphome
    password: "454a2b48c9377891242968e32e54786d"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Temperatur-Puffer"
    password: "vPeTFwRgiFQi"

captive_portal:
    

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.