Google has finally allowed us to start automations using triggers from devices (missing for years) this is great news for items that are tricky with HA but just work with GH like google TV etc.
Here is a link if this is news to you Link
Problem is it works great with everything except Nabu Casa provided devices. If you want to trigger based on a device provided via Nabu Casa then you have to log into Google Home and tell it to refresh every time before the automation triggers.
Seems like to option to push updates to google in HA settings is less a push and more just allowing a pull when google requests. You can also see this behavior in Google home where states do not change unless you refresh or change screens.
This is even the case where you trigger a change in google Home for a HA device you still have to refresh before GH gets the trigger.
Here is an example Automation in GH Script Editor
metadata:
name: Switch-controlled light
description: When a switch is on, turn on a light.
automations:
- starters:
- type: device.state.OnOff
state: on
is: true
device: Switch_Lounge_Stereo - Lounge
actions:
- type: device.command.OnOff
devices:
- Lounge Chandelier Light - Lounge
on: true
If I instead use a google device like turn on the TV it works no problem.
Has anyone managed to trigger anything in Google Script Editor using a device provided by Nabu Casa?