I am setting up my smart home with nothing but tasmotas on esp8266s that I set up myself.
I did my last install about 3 years ago, and it had door sensors. I couldn’t figure out how I got HA to recognize them before. I was lucky and found an old backup of a tasmota config I had. Seems I was creating “fake” relays to trick HomeAssistant.
Basically I would set up one pin to be “door relay” (ie relay 3) but wouldn’t connect anything to that pin. I would then connect the door switch (reed switch with magnet on door) and set it up as the door switch (ie switch 3). When HA found the relay I switched it to door sensor and that was that.
The issue I now have is that in order to keep wifi connections down I am trying to use as many of the D1s pins as I can. I currently have 7 D1s set up, each with 7 to 10 devices connected to them.
Using my living room tasmota as an example. It has 3 real relays connected, 1 touch senor set as button, 1 buzzer, 1 door sensor set as switch, and two PIR sensors set as switch as well. I plan to add a presence sensor as well.
HA via mqtt discovered the 3 relays as switches. I’ve gone ahead and set two of them up as lights, and one as fan. That part is working great. I also see there are more entities like SSID, Signal, etc. that have been hidden by default.
What I don’t see are the switches and the buzzer. I know using rules on the tasmota I could force it to do what I want, but is there a “cleaner” way of doing it?
this video Talks about using passive buzzer on HA. First half of the video is flashing tasmota and setting up the buzzer as a buzzer in tasmota. On the HA end we call mqtt publish service and send commands to the tasmota to turn buzzer on and off, but the buzzer isn’t “added” to HA.
How would I add the buzzer to HA? What if i wanted the buzzer to show up on devices like light bulbs do, like fans, etc.
How about the door and PIR switches? Do I manually create those and just update status via mqtt?