Open harmptor opened 8 months ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
The component priority is very low, below wifi, because it wants to be able to check for firmware updates. I think that needs to be reconsidered.
update
is set to false
.Following the flow of the light.py
:
Means: if it doesn't have the firmware data, the component will be marked as failed.
Means: Only set the firmware data if the hex is not None
.
Means: if update
is set to false
we will return None
.
To solve this; the python code must forward that update
to the c++ code / skip the update loop if the data is undefined.
Would be interesting to se what the following log line says on your setup "STM32 current firmware version: %d.%d, desired version: %d.%d".
Edit: Made some changes. Would be great if you could test them: https://github.com/esphome/esphome/pull/7407 You could also set update: true, boot everything once and then reset update to false.
The problem
Whenever my Shelly Dimmer 2 boots and cannot connect to WiFi, it seems to not set up the shelly_dimmer platform correctly. I have a lightswitch connected to
GPIO14
and when the device boots while the wifi is turned off, hitting the switch doesn't toggle the light. (it does when there is a wifi connection at boot, obviously) I suspect it is because when setting up the component, it checks for the latest STM firmware and that fails without wifi. I think this should be fairly easy to reproduce, but if there's anything missing let me know :)Which version of ESPHome has the issue?
2023.11.6
What type of installation are you using?
pip
Which version of Home Assistant has the issue?
No response
What platform are you using?
ESP8266
Board
shelly dimmer 2
Component causing the issue
shelly_dimmer
Example YAML snippet
Anything in the logs that might be useful for us?
No response
Additional information
This discord thread is how I found out that it must be an issue with the shelly_dimmer component. https://discord.com/channels/429907082951524364/1184940799784394832