jdeneef / ha_gpiod

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

reads state of INPUT pins and sets on update_lines #4

Closed dukrat closed 4 months ago

dukrat commented 4 months ago

I believe this might resolve https://github.com/jdeneef/ha_gpiod/issues/3 Having update_lines read the current state of configured INPUT ports and set it on the entity allows for restarts to detect the current state of things.

jdeneef commented 4 months ago

I did something similar, but for all gpiod from startup iso update_lines, and updating the same in updates for binary_sensor instead of assuming the state. Not sure this would fix the issue #3, but let's see. Thanx for thinking along though!