Is there a way I can get the weatherSummary into a notification? And into a dashboard?
Thanks.
Is there a way I can get the weatherSummary into a notification? And into a dashboard?
Thanks.
Notifcation? .... perhaps. I have a RM4 rule that will send a Pushover message anytime the 'alert' changes. You could do the same with the 'weatherSummary'.
weatherSummary, or any other attribute you have selected can be put on a dashboard. Select the device, then 'attribute' then the attribute you want to show. (If it is an 'optional' attribute make sure you have it turned 'on' in the device preferences).
Great, thanks. Will try it.
Yeah, I'd like to send the text from weatherSummary to myself each morning in a notification.
Tried to stuff the weatherSummary into a variable using the device attributes. Doesn't work. Tried also to refresh the poll prior in the rule. Still doesn't work.
Seems like there should be a way to get a device attribute into a variable and then use it in a message or notification surely?
I'm seeing this error in the logs...
This is a question for a RM4 topic, not this driver. The weatherSummary attribute is available .... you just need to figure out how to get it to do what you want. I don't beleive that requires any driver modifications (let me know if you think it does). Your question (for a RM4 topic) should be 'How to get a notification containing the contents of a custom attribute?'
Is your weatherSummary variable defined as a string?
Yes
Not yours! I know yours is (I've been studying your code a bit ) LOL
That was for @Angus_M That's what I think is the failure in setting the weatherSummary to a variable; The local (or global) variable isn't defined as a string.
Agreed. I will raise it to @bravenel.
Dear Bruce - is it possible to stick the string contents of a custom variable into a notification/message please? I'm hoping to have the weatherSummary from the awesome new Darksky driver available in a notification/message every morning. Can't work out how to do it.
Yeah it's a string. I set it up like this...
I just get "Null" in my notification and spoken at my Google Mini, which is the initial value I gave the string when I set the (local) variable up. It's not getting the value from the driver. I guess I'm doing it wrong somehow.
Well, that shot down my theory! Hopefully Bruce will have an answer.
Yeah, no worries. Thanks for trying to help.
I tried it also with a Global Variable in case that would help, but same difference.
Just use %variable-name% in the message.
Tried that, as above. It didn't work (see error posted above).
Actually, I just managed to fix it by changing the name of the variable to 'weatherSummaryText'. Prior to that it was the same as the attribute ('weatherSummary'). I guessed maybe there was a conflict and by changing it, it now works! Maybe that's something you can check and resolve? It should be ok to have a variable with the same name as an attribute right?
Just my opinion, but if we are going based on good programming principles, then no. Attributes should probably be reserved for attributes only, much like keywords are in programming languages.
It puts the weatherSummary into a notification nicely, however it won't play on the Google Mini. Maybe the message is too long? Not sure if there's a limit. I also note that the text contains an html tag at the end with the Darksky attribution. Maybe it's that. It would need to be stripped off anyway before being spoken.
Here's the Chromecast error in the logs:
If I copy/paste the string into the driver text attribute for the Google Mini it plays very nicely. So it seems there is no issue with this long string with all the degrees and percentages in it. But it won't play from RM.
No worries. Anyway it's a nice notification message to get every morning with the latest weather and forecast and I learned something new today
Update: stripping off the attribution allows the Chromecast to play the string properly. I have an on-demand weather report straight to my Google Mini in beautifully enunciated English. It's perfect!
So, I have a question... Wouldn't it be easier to create a Google Assistant or Alexa routine to do the same thing?
[UPDATED]
V1.1.1
09/24/2019
Many 'behind the scene' changes and some noticeable changes inspired by @nh.schottfam. (at least I think it is @nh.schottfam? The changes came from 'imnotbob' through Github. There is no user 'imnotbot' in this community, but my not-so-good stalking led me to believe that 'imnotbob' and @nh.schottfam may be the same user?)
DASHBOARD ATTRIBUTES
(please provide feedback if you believe any of this is not right and I will correct ASAP)
Thanks for putting this together! I didn't see it in the chart, but SharpTools.io also accepts temperature
as the primary displayed temperature value. (edit: Looking at the code, I'd guess that's because humidity and temperature are included as normal values that are always published)
Here's an image showing where each of the attributes map to on the tile:
The only required attributes are weather
and either weatherIcon
or forecastIcon
(only one of the icons is needed).
If any of the other attributes are missing they will automatically be hidden from the tile.
PS. There's a typo in the heading of the chart and the first post of the thread - SharpTools.io should have a trailing 's'