Newbie automation use case: can this be done?

Ok apologies if I’m posting in the wrong place. I want to have an automation hub text me if the refrigerator doesn’t open for some period of time. Can this be done? Any suggestions on what would work for this? Hardware and hub choices? Appreciate the advice

Hardware

  • Door/contact sensor: A simple magnetic sensor on the refrigerator door will detect when it opens and closes.
  • Optional extras: motion or temperature sensors inside the fridge, but the door sensor alone is enough.

Hub / Platform

  • You can use Home Assistant, SmartThings, or Hubitat. All of them support rules and notifications.
  • The hub connects to the sensor and can send alerts via SMS, push notification, or even Telegram.

Automation logic

  • Rule: If the fridge door sensor does not change to “open” within a set period (e.g., 6 hours), send a notification.
  • This is done with a timer or “for” condition that checks inactivity.

Example (Home Assistant YAML)

- alias: "Fridge not opened alert"
  trigger:
    - platform: state
      entity_id: binary_sensor.fridge_door
      to: "off"
      for: "6:00:00"   # 6 hours without opening
  action:
    - service: notify.mobile_app_yourphone
      data:
        message: "⚠️ The refrigerator has not been opened in the last 6 hours."
1 Like

I use YoLink temp humidity sensors (8003) in each freezer and fridge. They measure the temp going up relatively quickly. I use to see if the door has been left open or compressor failure for longer rises.

The YoLink LoRa radios have no problem punching through the metal fridge to their hub

So my yaml doesn’t do exactly what you want, but basically if you set up the sensor and get a baseline from it from defrost phases (HA provides that as well as the YoLink app), and then set a few baselines for how it rises with the door open, you would get that answer relatively short order if you define “some period of time”

Logic:
If the fridge temp is below the door open threshold for time x,
Then send notification, etc

Yolink has a smart fridge bundle, (2) 8003 temp/humidty sensors and their hub for ~ $60 US on shop.yosmart.com. It’s. Easy to integrate YoLink with HA. I have 27 YoLink devices and have used them 4 years.

1 Like