Weatherflow: add EVENT RAIN STARTED

Hi,

is there someone who can help me intergrade the “EVENT_RAIN_START” to use it in an automation when the rain starts.

the library used pyweatherflowudp has these events coded, so it should be easy to add it.

i’ve tried to add it via chatgpt without succes :smile:
i can see in the sensor.py that the EVENT_RAPID_WIND was already implement it, but how to use it in home assistant?

thanks in advance!

On my Ecowitt there is a sensor for hourly rain amount. I made an automation that looks that to be over 0. Helper is used to send a house broadcast.
Just another way to think about the problem.

  #####################################################
  # Weather Rain                                      #
  #####################################################
  - id: fb71efee-abb4-43b7-8bc4-eefa24814793
    alias: Is it raining?
    initial_state: true
    description: "check the rain sensor to see if it's raining"
    mode: single
    trigger:
      - platform: time_pattern
        minutes: "/5"
        id: Check every 5 minutes
    condition: []
    action: 
      - if:
          - alias: Rain detected
            condition: numeric_state
            entity_id: sensor.gw2000b_v2_2_4_hourly_rain_rate_piezo
            above: 0
        then:
          - alias: Toggle to on
            service: input_boolean.turn_on
            data:
              entity_id: input_boolean.rain
        else:
          - alias: Toggle to off
            service: input_boolean.turn_off
            data:
              entity_id: input_boolean.rain

Otherwise, sure, add it to Ecowitt and every other weatherstation out there.

This is the trigger I use:

platform: numeric_state
entity_id:
  - sensor.st_00012345_precipitation_intensity
above: "0"

Full automation:

alias: 🌧️ Stop lawn mower when it rains
trigger:
  - platform: numeric_state
    entity_id:
      - sensor.st_00012345_precipitation_intensity
    above: "0"
  - platform: state
    entity_id: lawn_mower.indego_12345
    to: mowing
condition:
  - condition: state
    entity_id: lawn_mower.indego_12345
    state: mowing
  - condition: numeric_state
    entity_id: sensor.st_00012345_precipitation_intensity
    above: "0"
action:
  - service: lawn_mower.dock
    target:
      entity_id: lawn_mower.indego_12345
mode: queued

great solution(s) but i think that the event broadcast is faster than the intensity updates, as this only updates at a curtain interval.

i will check that with openhab and a home assistant automation. with the current weather that shouldnt take to long…

i want to pull in my sunscreens as soon as a drop hits the tempest.

Is there any news on this subject? I use the _precipitation_intensity sensor as well for the sunscreens. Sadly, most of the times they are wet before they get the command from HA to pull up. I would like the command to come much earlier.

i now use this piece of code from the weatherflow forum:
wfudptools

ive exluded everyting exept for the precip start event and that will be send on the MQTT bus. and made it a system deamon, so it restarts automaticly.
i like it more when its intergrated in the real intergration instead of heaving several bits of code for the same product

it will not prevent your sunscreens from getting wet, but now its more of a webhook kind of response instead of a polling response. i think if you want to prevent it i think you need something like “buienradar”

I tried using “_precipitation_intensity” but the high winds here will trigger this automation. The Tempest app doesn’t register rain, but HA will. Does anybody what the Tempest app uses for it’s “It’s raining” notification?