This is not possible via the sdm api. My assumption is this is a privacy feature so that someone can’t use API access to turn on your camera when you’ve turned it off in the Google home app for example. (The Google home app can disable API access)
The new YAML automation tool can turn on/off cameras using an exposed entity.
Made them turn on and off depending on the state of my HA alarm, I’m so freaking exited over this!
Hope they don’t bork this later…
First I have my HA alarm exposed to Google Assistant.
For the turn on automation I use:
starters:
- type: device.state.ArmDisarm # This function supports arming and disarming as used in, for example, security systems.
state: isArmed
is: true
device: Alarm - Övrigt
actions:
- type: device.command.OnOff
on: true
devices:
- Vardagsrum kamera - Vardagsrum
- Kontor kamera - Kontor
- Kök kamera - Kök
- Hall kamera - Hall
Make sure you replace the device names with your own devices.
Then just change the true to false on the other automation.
Sorry for the late reply @Soloam, I’m not very active here.
I have some Nest cameras added to the Google Home app. As far as I understand the SDM Nest API doesn’t allow to arm/disarm.
I want to be able to arm/disarm Google Home via Home Assistant. Currently I have location based arming disarming setup in the Google Home app. But it doesn’t work that well. When I had the Blink cameras it worked perfectly to do it via Home Assistant. Just having an automation trigger based on our (me and my wife’s) zone.
I don’t subscribe to Nabu Casa. What is needed for this to work? Do I need to add the Google Assistant integration first and then expose an entity to Google Home?
As I understand it’s possible to integrate Google Home via Google Assistant integration. Even without the Nabu Casa subscription, but it’s tricky since I would need a developer project, API keys etc.
Yes, setting up the Google Assistant integration manually is necessary. Personally, I’m subscribed to Nabu Casa and have no experience with that.
Here’s a brief overview of what I did:
Exposing the alarm entity to Google Assistant: This step allowed Google Assistant to access the status of my alarm system.
Creating Google Home automations via the YAML editor: I used the YAML editor on home.google.com to make two automations. One activates when I arm the alarm and turn on the cameras, while the other triggers upon disarming, turning off the cameras. It’s worth noting that automations within the Google Home app cannot directly control the cameras, while those created through the YAML editor can.
Hi All, Finally got around to trying this - and sadly no luck.
code used:
metadata:
name: Turn off cameras when sleep mode is on
description: Turn off cameras when sleep mode is on
automations:
starters:
type: device.state.OnOff
device: Sleeping - Master BedRoom
state: on
is: true
actions:
type: device.command.OnOff
devices:
Camera - Kitchen Bi-folds
Utility Room Camera - Utility Room
on: false
The script editor returns an error when validated to say the line:
type: device.command.OnOff
is not supported. So either they changed it, or it never worked ( the addition of Gemmini to support is great mind - but couldn’t get me past this error )
and the nest hub max devices do not show up as controllable at all. So it seems Google only wants you to interact with cameras through a conscious effort - not in any automated way - except weirdly the schedule in the original app. sad but true!
mulling the idea of selling all my cameras for Unifi ones ( I have their network system anyway ) - but I do like the Nest Max as it’s a decreet way to have a camera in a home space. shame.
Thought I’d update for those who stumble across this forum post. happy to have someone step in and update me if the code or command can change to make it work?