benleb / ad-automoli

💡 Fully automatic light management based on conditions like motion, illuminance, humidity, and other clever features
https://github.com/benleb/ad-automoli
MIT License
110 stars 29 forks source link

Undocumented motion sensor name format expection #84

Closed bluehallu closed 1 year ago

bluehallu commented 2 years ago

😩 Describe the issue/bug My sensor was called binary_sensor.ikea_motion_sensor (that's what the zigbee MQTT entity is called) so I decided to specify it instead of relying on autodetection. This didn't work with automoli complaining in logs that no light/sensors were given. Changing the sensor entity name to binary_sensor.motion_sensor_ikea fixed the problem

😒 Expected behavior Name conventions aren't enforced when sensors specified directly or the documentation clearly states the naming conventions are required even the user doesn't want to rely on autodiscovery

benleb commented 2 years ago

The naming of the lights is nothing AutoMoLi cares about. AutoMoLi has no fixed format or something like that, it just relies on the entities available in Home Assistant

if you have the entity "binary_sensor.ikea_motion_sensor" in home assistant, it should work in AutoMoLi too. So maybe you have confused something?

bluehallu commented 2 years ago

The code declares MOTION = "binary_sensor.motion_sensor_ which prevents the name I had from working. Renaming it as I described fixed the issue right away

evildad commented 1 year ago

The Readme now states that you need to follow the following scheme to work properly

sensor.illumination_room
binary_sensor.motion_sensor_room
binary_sensor.motion_sensor_room_something
light.room