I got a Temp sensor configured in ESPHOME on a D1 mini
After latest update… the sensor last value does not stay.
How can I let the last value stay…got an automation running on values.
Thnx in advance.
Below is the Config.
esphome:
name: lya-sensor
esp8266:
board: d1_mini_lite
Enable logging
logger:
Enable Home Assistant API
api:
ota:
wifi:
ssid: “”
password: “”
manual_ip:
Set this to the IP of the ESP
static_ip: 192.168.1.67
# Set this to the IP address of the router. Often ends with .1
gateway: 192.168.1.1
# The subnet of the network. 255.255.255.0 works for most home networks.
subnet: 255.255.0.0
output_power: 8.5dB
power_save_mode: high
Enable fallback hotspot (captive portal) in case wifi connection fails
Esphome sensor with 10 minutes deep sleep. Measure, connect, transmit, deep sleep.
Before upstate:
Last value is shown in dashboard and history graph solid line.
After april update:
Last value is unknown and history graph dashed/dotted line.
The value is only shown in the very short time period the sensor is connected to HA.
My other sensor that are always on and connected to HA api, show values.
I have the impression that HA switches to unknown as soon as esphome client disconnects and does not retain the last value in dashboard and history graph.
I think it is the april HA update that was released yesterday. Here in the screenshot you can see it.
21:45 I did the update. Before the line was solid and HA displayed the last value in dashboard. After HA april update 2023.04.0 (it was displayed as Supervisor 2023.04.0 update), the line gets dashed and the value in dashboard is unknown - unless the short periode the sensor connects to api.
I read in release logs, that something in recorder has been modified. Maybe this triggers this effect.
After updating home assistant to 2023.4.0 and i’m using native api, not mqtt.
Line in the graph became dashed until i’ve downgraded core back to 2023.3.6
Just to be sure I’m on track to make this work. I shouldn’t have to do anything extra; like in the config files to make the last updated value remain displayed in Lovelace frontend instead of displaying “unavailable”. Correct?
When my ESPHome esp8266 device goes offline for any reason, like sleeping or shutoff, “unavailable” is displayed on my dashboards.
It appears to be working okay now. While trying to switch my esp8266 device over to MQTT it started to work correctly with the HA API configured. I’m not sure what all was going on with my system but it snapped out of it and looks correct now.
My esp8266 ESPHome device is configured for the HA API and for deep-sleep. When sleeping the dashboard continues to display the last updated readings. Only one thing is different with the esp8266 config file from before is I commented out the AP section that gets added when setting up a new device.
Actually, upon a deeped inspection of logs, it looks like it was a problem with the sensor, not HA.
I seem to be still experiencing the same issue even after the 2023.12.1 update… I have a temperature/humidity ESPHome sensor set up, but while it’s in deep sleep the dashboards show “Unknown” and the graph logs nothing: