Newbie that has just converted from Homebridge and Home Assistant is so much quicker!
I’ve created a Script which which uses the google assistant sdk to unlock a Gainsborough door lock which isn’t compatible with much more than Google and Alexa.
The Script appears in HomeKit, but it appears as a switch/light/fan.
Has anyone got any guidance on how I can present it to HomeKit as a Lock instead so I can tell Siri “unlock the door” rather than “turn on the door”?
I looked into Template Locks but haven’t been able to get that to work.
Hi Pieter, thanks for taking the time to come back to me.
I have the following but it doesn’t seem to execute the script.
Like I said, I am new to the Home Assistant world.
My current script to unlock the door is UnlockFrontDoor
We need to see that script, but you probably don’t want to call the same script for locking and unlocking. A script is only on while running. Do you have a way of knowing the lock’s state?
The lock is a Gainsborough Trilock Freestyle. In Australia it’s a good front door lock but the smarts to it are average.
The only way I have found that I can interact with it through Home Assistant is through a Google SDK command as the lock connects to Google and Alexa. I am a big HomeKit user.
So this is the Unlock script. I could use a similar script to ask Google SDK if it’s locked. Note that the lock is set to auto lock after 2mins anyway so assuming its always in the locked state is fine. Thats why I had unlock for both states.
alias: UnlockFrontDoor
sequence:
- service: google_assistant_sdk.send_text_command
data:
command:
- Unlock the front entry door
- "1234"
icon: mdi:account
mode: single