Dark Sky Sensor - Rain prediction and alert

Hi All,

I am trying to get a Telegram message when it’s raining in my neighborhood and also if it will rain tomorrow.

To solve the first request, this is my code in automation.yalm:

id: ‘XXXXXXXXXXXX’
alias: Esta Lloviendo
trigger:

  • entity_id: sensor.dark_sky_summary
    platform: state
    to: rain
    condition: []
    action:
  • data:
    message: Esta lloviendo en casa. Ojo con la ropa tendida!
    service: notify.telegrammarcos

I am not sure if it will work but as in Valencia does not rain in months, I cannot test it yet :slight_smile:

Regarding the second request, get a message if it will rain tomorrow, I am not sure how to configure it. Any ideas?

On the other hand? where can I found the documentation I need to better understand how the dark sky sensors works? not enough info in HA official documentation or dark sky official. Or maybe I didn’t understand it. Youtube videos can also help!

Thank you in advance!

hey, there are docs at the darksky HP:

https://darksky.net/dev/docs

At the moment i try to get a rain alert using the notification platform: telegram

i will try this:

- alias: 'Benachrichtigung bei Regen'
  trigger:
    - platform: numeric_state
      entity_id: sensor.dark_sky_precip_probability
      above: 50
      below: 100
  action:
   - service: notify.telegram_thomas
     data: 
       title: 'Wetter'
       message: "Regenwahrscheinlichkeit {{ states('sensor.dark_sky_precip_probability') | round(0) }}%"

And an alert for Storm like this:

- alias: 'Benachrichtigung bei Unwetter'
  trigger:
    - platform: numeric_state
      entity_id: sensor.dark_sky_nearest_storm_distance
      above: 0
      below: 20
  action: 
     - service: notify.telegram_thomas
       data: 
         title: 'UNWETTERWARNUNG'
         message: "Das nächste Unwetter ist {{ states('sensor.dark_sky_nearest_storm_distance') | round(0) }}km entfernt!"

I hope it will work :smiley:

1 Like

Just now is winter in Chile and is gonna be rainy days, so i can test something about this.

I read in the darksky api documentation that they recomend DONT use the summary fieldt for automated purposes:

> The algorithm that generates a human-readable summary is complex and can produce millions of possible summaries—too many to be practical for automated processing. Moreover, we’re constantly tweaking the logic, so any pattern-matching you do against our summaries today could easily break tomorrow! By contrast, we promise to keep the values of icon property documented and warn you of any changes to that list.

I can get to work the RAIN alert by this.

- alias: Aviso de Lluvia
  hide_entity: true
  trigger:
    platform: state
    entity_id: sensor.dark_sky_icon
    to: rain
  action:
    service: notify.telegram
    data:
      message: Esta Lloviendo 

I want to do the same for when stop raining, but can make it work.

alias: Rain is over
  trigger:
    platform: state 
    entity_id: sensor.dark_sky_icon
    from: rain
    ## to: clear-day
  action:
    service: notify.telegram
    data:
      message: Dejo de llover

For the second request you have to add data for the number of days do you want to analize i the configuration. And then you can play with the data prediction for the next day

forecast: 
      - 1
1 Like