If a magnetic lock is set to momentary, there doesn’t seem to be a way, using HA, to schedule when that lock is to be in momentary mode. If you wanted to unlock the doors for a period of time, then lock them again and put them back in momentary mode, you have to do it manually for each door system.
Continuous could solve that problem, but then the MQTT messages sent to HA need to be in sync with the state of the lock and the door. Both states need to be able to be reported, continuously. Not just when there’s activity.
The idea would be that I could walk up to the lock, trip it, and depending upon my card, I could use NodeRED to do a certain set of actions. If it’s a “red” card, keep the lock unlocked. If it’s a “blue” card, lock it right away, etc. Right now, the only way to have NodeRED or HA manage automations on the door through MQTT is to have the lock in continuous mode, but that poses the state problem, as HA can become out of sync with the actual state of the door, and the actual state of the relay.
Any ideas?