How to properly set up email notification for Wyze sensors?

Hello all!
I’m new to Home Assistant and I’ve been looking through various documentation and threads but cannot figure out a way to properly send an email notification based on a Wyze door sensor. So far with everything I’ve tried, I get nothing, and when I try to set it up via the automation.yaml file, I always get errors, despite copying and pasting code that worked else where. Any help would be appreciated!

The first thing to do is to set up your email notifier and get that working.

Then, check in Developer tools -> States what the door sensor reports for open and closed (binary_sensor entities will be on and off).

Then you’ll end up with an automation something like this

alias: "Email when the door opens"
trigger:
  - platform: state
    entity_id: binary_sensor.YOUR_DOOR_SENSOR
    to: 'on'
action:
  - service: notify.notify
    data:
      message: "Open sesame!"

1 Like

Yeah this works just as I need it to! Thank you!

Now that I’ve gone about playing with it, have I configured this properly? I’m trying to make it so it’ll notify me about any activity either A.) between 6:25 pm and 8:00 am or B.) is a weekend.

alias: WyzeDoor1Notification
  description: This automation will send an email notification when the Wyze Door
    1 Sensor is triggered anywhere between the times 6:25 pm and 8:00 am.
  trigger:
  - entity_id: binary_sensor.wyzesense_778cd426
    from: 'off'
    platform: state
    to: 'on'
  condition:
  - after: '18:25'
    before: '8:00'
    weekday:
      - sat
      - sun
    condition: time
  action:
  - data:
      message: Door Sensor 1 was triggered
    service: notify.myemail

If you want or you have to specify that. Currently your time condition only applies at the weekend:

  condition:
  - condition: or
    conditions:
    - condition: time
      after: '18:25'
      before: '8:00'
    - condition: time
      weekday:
      - sat
      - sun

or use the workday sensor:

  condition:
  - condition: or
    conditions:
    - condition: time
      after: '18:25'
      before: '8:00'
    - condition: state
      entity_id: binary_sensor.workday
      state: 'off'
1 Like

That does make sense, I’ll keep that in mind in the future. Thank you!:smiley: