Open drinfernoo opened 2 years ago
@drinfernoo Can you check to ensure the formatting on your sensors.yaml file is correct? Though I would expect this to print an error...hmm. Try adding the following before 181
if (SENSORS is None):
LOGGER.error(f"Failed to load sensors.yaml.")
Adding those lines, and then publishing to wyzesense2mqtt/reload
... allowed the reload to work. Maybe the issue I was experiencing was a fluke, but it seemed like it would happen every time 🤔
Those lines shouldn't have affected the behavior of the script, from what I can tell... though there are a few lines lower that might fail if SENSORS
is None
:
https://github.com/raetha/wyzesense2mqtt/blob/944f9165a5346352ddd8300ca87a8ba68be42f4d/wyzesense2mqtt/wyzesense2mqtt.py#L181
https://github.com/raetha/wyzesense2mqtt/blob/944f9165a5346352ddd8300ca87a8ba68be42f4d/wyzesense2mqtt/wyzesense2mqtt.py#L206
But as you mentioned, I would think these would give an error.
My sensors.yaml
is definitely formatted correctly... or none of my sensors would work at all 😉
I still have this odd behavior... wondering what we can do to fix this 🤔
Describe the Bug
I added a new sensor today, and after modifying
sensors.yaml
to change the name and device class, tried publishing towyzesense2mqtt/reload
... But that just makes the container stop working. During this process, I was tailing the container log (docker logs -f wyzesense2mqtt
), and nothing happened after the reload message was received, including any further state updates from the sensors. Restarting the container restored regular behavior.Steps To Reproduce
Steps to reproduce the behavior:
self_topic_root/reload
Expected Behavior
Publishing a reload message should... reload the sensors 😅
Additional Context
The last bit of my log, and then nothing happened after this: