jdeneef / ha_gpiod

gpiod based RPI gpio switches and sensors
https://github.com/jdeneef/ha_gpiod
MIT License
22 stars 4 forks source link

Problem Inputs after Power off/on #17

Open sergiosmt opened 1 day ago

sergiosmt commented 1 day ago

I noticed this problem: when you do a hardware reboot or after a power off/on the GPIO inputs are in a random state (on/off) and at the first change of state they are put in the correct state. The problem is for automations that do not work until the first change of state. I have a raspberry pi5. I have already set all inputs to "BIAS:PULL_UP". If I restart the Home assistant, however, all the inputs are correctly positioned in the off state. Thanks for the collaboration.

jdeneef commented 1 day ago

will need to test some more. I'm reading the sensor state before initialization, in theory that should work. Maybe adding things like bias etc might help getting better readings. Will test and share results