Why does the esphome sensor send fake value even when disconnected?

Hello. When I switched from mqtt to HA api, the home assistant shows that sensor updates every minute even when it sleeps. I do not like that, because while sensor sleeps, the HA shows not current value but last, which may not reflec actual value. The sensor sleeps for 24 hours. What is wrong with the configuration?

sensor:
  - platform: ina219
    max_voltage: 6.0V
    update_interval: 24h
    bus_voltage:
      force_update: false
      id: mqpr03ina
      name: mqpr03ina
      accuracy_decimals: 3
      filters:

I don’t understand. If you want a more recent measurement you’ll need to make measurements more often

Usually the sensor retains the previous value in HA until a new value is published. Do you want to make the state unknown when the sensor sleeps?

Hello, thanks for response. What I want to see is “Last update: 20 hours ago”. But I still get max. 1 minute.

If it’s asleep, what is sending the update?

No idea. But the value is definitely not coming from the sensor. The battery voltage jitter and when sensor dies, home assistant gets constant updates every minute with latest value. Nevermind, I switched over to mqtt, that correctly shows latest measurement and its value.

api:
image

Here I reflashed the sensor, disabled api: (blue line) and added mqtt: (red line). You can see that Home assistant still shows it is receiving values via api: even if it has been disabled.

image

How did you add the mqtt sensor?

standard way:

mqtt:
  broker: 10.0.0.54
  username: ___
  password: ___
  birth_message:
    topic: mqtt_firebee_test/status
    payload:
    qos: 2
  will_message:
    topic: mqtt_firebee_test/status
    payload:
  on_message:
    - topic: mqtt_firebee_test/ota_mode
      payload: 'ON'
      then:
        - deep_sleep.prevent: deep_sleep_1
    - topic: mqtt_firebee_test/sleep_mode
      payload: 'ON'
      then:

That’s the ESPHome mqtt integration setup. What does your mqtt sensor configuration look like in Home Assistant?