line = re.sub('([0-9]+)\.([0-9]+)([F|C])', '\g<1>,\g<2>\g<3>', dev.states['foreText1'])
wideglidejrp wrote:Good morning, Dave. Thanks for the script. I had the impression when editing the settings that there was a choice for standard, without unit of measure. No? What I am trying to do is create a morning announcement. I used it today for first time and it worked quite nicely, although the F sounds unneeded. Do you use Ivona? I works very nicely but Amazon is making some major changes to how they offer it and not sure what impact that will have on the Sonos Plugin. I will check with Nick Lagaros on that. I look forward to chatting with you about how weather and home automation go hand in hand.
wideglidejrp wrote:Looks the same. Am I missing something?
re.sub('([0-9]+)[F|C]', '\g<1>', dev.states['foreText1'])
re.sub('([0-9]+)\.([0-9]+)([F|C])', '\g<1>,\g<2>\g<3>', dev.states['foreText1'])
wideglidejrp wrote:No, I meant the following two:
Thunderstorms during the morning will give way to cloudy skies this afternoon. High 23.1C. Winds E at 10.1 to 15 mph. Chance of rain 90%.
Becomes:
Thunderstorms during the morning will give way to cloudy skies this afternoon. High 23,1C. Winds E at 10.1 to 15 mph. Chance of rain 90%.
wideglidejrp wrote:What I am trying to do is mimic a short local forecast. I don't need to hear F or C or Knots or MPH. Ivona simply says whatever text you give it. I'll experiment with your script when I get back from Mexico on Monday. Another thing I want to build into my automation is alerts. Which variables would you recommend for that? I am thinking only significant one, like high winds or heavy rain, not just wind or rain. Then I would need to figure out how to create a trigger, and then that would fire an action to have Ivona make the announcement throughout the house. Might look for an MP3 clip preceding it. "Attention for Weather Alert". Might even be able to find a professionally recorded sound byte somewhere.
Different Computers wrote:I'm scratching my head a bit on using WU to trigger lights.
I have an Action Group called Cloudy Day Lights. Unsurprisingly, I would like to have it triggered when it becomes cloudy. Or Overcast. Or Rain. or Fog. You get the idea.
Trouble is, to make a trigger react to the WU forecast device state, as best as I can figure I would have to make a trigger for every one of those possible current conditions. Can't make it work the other way around by looking for NOT "sunny" because there's clear, and sun, and partly cloudy, etc.
Anyone got a work around or better idea?
Users browsing this forum: No registered users and 4 guests