raetha / wyzesense2mqtt

Configurable WyzeSense to MQTT Gateway intended for use with Home Assistant or other platforms that use MQTT discovery mechanisms.
MIT License
79 stars 22 forks source link

Sensors.yaml file not optional #44

Closed AK5nowman closed 3 years ago

AK5nowman commented 3 years ago

Describe the Bug

the Sensors.yaml file has to be defined and it has to had at least a single entry, contrary to what the instructions set says. There are no checks to see if the SENSORS global variable is set throughout the code and will fail silently in multiple locations.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Remove sensors.yaml file and start up

Expected Behavior

I expect the app to create and write the sensor data to the sensor.yaml file

tehstevo commented 3 years ago

Had the same experience in my install tonight. Putting a bogus entry into the sensors.yaml file resolved it.

raetha commented 3 years ago

This is now fixed in the devel branch. Thanks @AK5nowman for the PR that gave an easy way to handle this.

Will go to master branch with 1.2, hopefully this weekend.