[UPDATED] - Weather Switch - Turn on a switch in response to weather

I suspect that Smarttiles is querying the driver…

The sendevents are needed for WS to ‘subscribe’ to the events (and therefore act upon them)
Do you have duplicate entries on the ‘device’ page now?


That would explain it. I learn something new every day. Here's a screen shot. And, point-of-fact, the SmartTiles are reading the lower case temperature which isn't accurate.

Back to the drawing board.

As you don’t have the sendEvent statements for the lower case info, it won’t update correctly (if at all)
What you are seeing is probably legacy data

If you don’t mind the duplicate entries then I can probably get this to work for SmartTiles as well as WS

It’s 1am in the UK now so I’ll have a look tomorrow for you.


Get some sleep! This is a fantastic app and I’m so happy you wrote it. I think there are really only 4 items that need a bit of nudging:


I need to step off and get some food and grog. I’ll take a swing at it a bit later (I’m -8 hours from you). I was just focusing on the driver. Now that I’ve taken a bit of a look at the child-class code, it doesn’t seem insurmountable.

I am working on the driver and app anyway tomorrow
I’m going to try to get the driver to compile a sort of “report” so I can get WS to send via SMS or pushover (until we have TTS then I’ll get Sonos to speak it)
I can’t use the built in report (fcctext or fcctext_metric) because I prefer to use a mixture of imperial and metric
In WS I plan to trigger the report with a virtual momentary switch so I can get it any time.


I had a 'play' this morning...

I have added the following lowercase attributes and events

  • feelsLike
  • humidity
  • temperature
  • weather
  • weatherIcon

See how this works for you :slight_smile:



If there is anything still missing, please let me know (and if it works OK or not)


You should now get something like this:

New version released on GitHub (link above)

The driver now creates a 'summary report' of the data collected.
You can select how to format it (imperial/metric etc)

I'm intending to use this with a new release of Weather Switch to SMS or use PushOver to send this report
For this version I have included the lowercase attributes

Let me know what you think and how you get on.


Good Afternoon!!

I loaded the new driver (with lowercase in the title) and the WS app is working find. Here's the view of the summary though I have to force a poll to get it on the page:

Here is the weather tile:


I added in an - attribute "city", "string" to pull the city:


I'm getting called into work early so I don't have time to hunt down by the percentPrecip nor the humidity are showing up. I'll give it a look over when I get back though.

Everything is looking pretty solid so far!

1 Like

If you are using station id: KCALOSAN362
Then I can’t see that it reports percentPrecip
I loaded this station into my driver and did a search for it but could not find it

Humidity is being reported from the capability so that should be the same as previuosly


I think we are both dancing around the same head of a pin. In that SmartTile, the info use to be there. This whole experience now leads me to question whether it was accurate which links to your point about my station. The perecentPrecip is a forecast and wouldn’t be provided by the weather station. So how it use to get it from the default or older driver I was using (which I lost in all of this shuffle), is still a mystery to me.

As far as I’m concerned your app is spot on and works for me. The SmartTile is more of a distraction with an app that isn’t being updated so it’s more of a curiosity to me. I’m sure there’s an easy answer to it.

I’ve added the ‘city’ attribute and sendEvent so that should work ok now.
I’ve also marked a couple of things to refresh when polled - they were not refreshing correctly before

Latest Driver version: 1.8.0



Ok… I think I got it!
we were looking for the wrong data name - It’s not percentPrecip but ‘pop’ (Probability of Precipitation)

Also I found a bug with the summary so it should show correctly now without having to poll

Have a look at version 1.9.0 on GitHub

This now has an attribute & sendEvent for ‘percentPrecip’ as requested :slight_smile:

I have also uploaded a new version of the app which can use ‘Chance Of Rain’ as a trigger


Good afternoon!

Just got up and will try the drive as soon as the coffee is brewed. The “percentPrecip” came directly from the code in SmartTiles. At this point (without having tried the 1.9.0 driver), the WS app works and most of the SmartTiles code works as well. For some odd reason, the humidity isn’t reporting correctly and I didn’t have any time yesterday to look into it.

Coffee is done and trying the new driver now.

Okay, the driver looks good. App is responding as it should. I forgot to post this earlier, but I receive the following error when I select the "poll"

This error seems to occur whether the auto poll is on or off.

BTW: I’m really enjoying the illuminance!

I started to play with the HU dashboard and here's a screenshot. Not sure why the humidity is showing a double % sign.

For Cobra's driver are you using the attributes option when setting up the tile? I was first just using the Humidity and was getting the double % like yours is showing. I also noticed that the value was wrong. Started digging around and found the attribute option and all is good now.


Hope this helps.

That’s a nice find!!

I’ve noticed the values were wrong too, but I’m also seeing that it may be due to the differing refresh times. If there are two “devices” with refresh commands timers and cacheing, there will be some differences. If I refresh both the WU and the dashboard, then I get a correct entry. Now sometimes I have to refresh a few times to sync things.

1 Like

I’ve 'tweaked’ the driver to try and get rid of the double percentage
Not sure if it will work
If it doesn’t please let me know and I’ll look again

Uploaded new files to github (same version number)


Download the Hubitat app