Ok so im on the mission of the cheapest home automation system possible. I want to make a momentary switch using just the GPIO on the raspberry pi. So if I were to connect two GPIO pins together it would tell home assistant “ON” and if they got disconnected to would say “OFF”. Kinda like a trip wire but I want to use it as a door sensor with some tinfoil. So while the door is closed the two pieces of tinfoil (with said GPIO pins attached) would be in contact and it would tell home assistant “ON” or “CLOSED” if possible. but when its open it would say “OFF” or “OPEN” if possible. If you know of any way to do this PLEASE let me know. I have been looking at the binary sensor but haven’t had ANY luck so far.
If you don’t like the reported state you can change it easily with a template sensor.