Have Google home reads virtual device variable

Hi

I have made a custom driver, and created a virtual device out of it.

The virtual device consists of variable that I'd like to know the value from time to time.

Is there a way to have the integration with Google Home so that I can ask the variable value by talking to google?

For your reference, the capabilities I use for the custom driver are:

  • capability "PowerMeter"
  • capability "Initialize"
  • capability "Refresh"

Does google need to know the value and do something, or do you just want it spoken on a google device?

If you just want it spoken on demand, then this is how I do it with Rule Machine and Follow Me:

Create a virtual switch to act as the trigger for this command.
Set the virtual switch to auto off after 500ms.
Add the virtual switch to google home integration so google home sees it as a switch.
Setup a routine in google home that detects when you say "tell me X value" or whatever your key phrase is and turns the virtual switch 'on'.. I usually put in as many phrases as i can think of with various ways to say things so i dont have to remember the exact phrasing. for example: "What is X Value" "tell me X value" etc...
In Rule Machine, set a trigger for this switch turning 'on', then in the actions, format and send your message with any variables to google speakers using the Follow Me app.

I also do this with CATT director to send dashboards, web pages and ip camera feeds to my google home hub.

1 Like

I maintain a Google Home integration that exposes most of the device types Google natively supports:

If Google has a matching device trait for your device's property then there's a good chance it's supported (or support could be added). If not, then hacky rube goldberg setups like @mbarone described are likely your best bet.

Thanks for this suggestion!
I created this through RM and chromecast integration (beta).