-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix state being cleared on disconnect with deep sleep esphome devices #90925
Conversation
Hey there @OttoWinter, @jesserockz, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
Needs more testing but I'm too tired to build a deep sleep esphome device so will have to do it tomorrow |
Tested with ---
esphome:
name: deepsleep
deep_sleep:
run_duration: 10s
sleep_duration: 1min
esp32:
board: nodemcu-32s
api:
id: api_server
# WiFi connection, correct these
# with values for your WiFi.
wifi:
ssid: SNIP
password: SNIP
logger:
# level: VERBOSE
# Enable Home Assistant API.
# Enable over-the-air updates.
ota:
# Enable Web server.
#web_server:
# port: 80
# Sync time with Home Assistant.
time:
- platform: homeassistant
id: homeassistant_time
# Text sensors with general information.
# Sensors with general information.
sensor:
# Uptime sensor.
- platform: uptime
name: deepsleep Uptime
- platform: template
name: deepsleep free Memory
lambda: return heap_caps_get_free_size(MALLOC_CAP_INTERNAL);
unit_of_measurement: 'B'
state_class: measurement
- platform: wifi_signal
name: "WiFi Signal Sensor"
update_interval: 2s |
Thanks for the fast fix. Just installed 2023.4.1 and dashboard shows last value again till next sensor update. 🙂 |
Proposed change
Fix state being cleared on disconnect with deep sleep esphome devices
Type of change
Additional information
Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.To help with the load of incoming pull requests: