In one of my rules I want it to say a command like "House is now in away mode" on my living room Google Home, but if the volume is set to something low you cannot hear it. I can set the volume to 100 then have it speak the message but then it's left at 100 and can be quite jaring the next time you go to use the Google Home. Is there a way to capture the volume level first and save to a variable then set it to 100 and after the message is spoken reset the volume to the previous level saved in the variable? I don't see an option to poll the value from a Chromecast/Google Home?
You can set a variable equal to any device attribute. And you can use a variable in the setVolume command.
So I set a variable first then tell it the attribute to pull its value from? Sorry I was thinking it was the other way around! Let me try
so I select "Select Mode or Variables, Run Custom action" and the next box only gives me the option for Mode or Custom Action. How would I set it?
NM the reason is I didn't realize I had to create the variable first. I have now set and retrieved the variable... thank you!!!
Can you post a screenshot of this rule to make it easy for others to follow? Thanks!
Is anyone able to post a screenshot of exactly how they are doing this? i.e. setting a variable as the current volume, changing the volume and then restoring the original volume from the variable. I have no experience with variables and am struggling to do this.
Here is the solution I used
Awesome!! Thanks so much! My Google-fu wasn't very good. I was searching all over for how to do this. it's actually very straight forward!
Now to spend the rest of my night updating my existing automations...
Honestly I am lazy and a video is way easier to make then trying to type it all out haha. I had the same problem and now that I have done it once I'm like "This is so simple" It's a learning curve for sure but once you get to know it you think "how did I not know how to do this" Hubitat did a great job with this hub.
what if i want to select many speaker do i have to do a rule for each speaker?
Annouce WASHER DONE at 100 volume on 4 speakers and the return volume to 50