Free tools Windows power users keep installed
One-click scans. No signup required.
For a dependable Home Assistant door or window alert, build around the sensor’s binary-sensor entity: trigger an automation when its state changes to on, then send a notification through the configured Home Assistant Companion app target for the phone you want to reach. Add a second automation with a for duration when you need a reminder that the opening has stayed open. Treat unknown and unavailable as connectivity or data-quality conditions, not as ordinary closed readings.
The distinction between a transition, a sustained state, and an unavailable sensor is what makes the setup predictable. The steps below show how to identify the right entity, create immediate and delayed alerts, add optional fallback channels, test the complete path, and diagnose failures without assuming that a notification was delivered merely because an automation ran.
As an Amazon Associate I earn from qualifying purchases.
What a reliable door or window alert actually does
A contact device is represented in Home Assistant as a binary sensor. Its stored state is normally on or off; the device class determines whether the interface presents those values as labels such as Open and Closed. A binary sensor can also be unknown or unavailable. Those values do not mean that the door is safely closed. See the Home Assistant binary sensor documentation for the state model and device classes.
Recommended Free Tools
A useful alert design has separate paths:
- Immediate opening: a state trigger fires when the entity changes to
on. - Left-open reminder: another state trigger waits for the entity to remain
onfor a chosen duration. - Sensor-health warning: an optional automation reports
unknownorunavailableso a silent sensor is not mistaken for a secure opening.
These paths should not be collapsed into one rule. A transition trigger reports the moment an opening occurs; it does not keep firing while the opening remains open. A duration trigger represents a different condition and is the correct tool for a “still open after N minutes” reminder. Home Assistant documents this transition behavior in its automation trigger guide.
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
Identify and inspect the correct sensor entity
Find the entity ID
Open the device or entity page for the contact sensor and copy the exact entity ID, such as the installation-specific value shown for that device. Do not rely only on the friendly name: several doors may be called “Door,” while the automation requires one unique entity. In the entity details, operate the contact and watch the state change in real time.
- Open the sensor’s entity details in Home Assistant.
- Confirm which value appears when the contact is physically open and which appears when it is closed.
- Record the entity ID exactly, including the
binary_sensor.domain and all underscores. - Check the device class. A contact sensor is normally presented with open/closed terminology, but the underlying trigger values remain
onandoff.
If the state does not change while you operate the contact, stop before building notifications. An automation cannot alert on a transition that Home Assistant never receives.
Understand every state you may see
| State | What it represents | How to use it in an alert design |
|---|---|---|
on |
The binary sensor’s active state; for a contact sensor this is normally shown as Open. | Use as the target state for an opening alert and for a sustained-open timer. |
off |
The inactive state; for a contact sensor this is normally shown as Closed. | Use to confirm that the opening has ended and to reset a duration trigger. |
unknown |
Home Assistant cannot determine a valid current state. | Do not interpret as closed. Consider a separate diagnostic notification. |
unavailable |
The entity is temporarily unavailable to Home Assistant. | Do not interpret as closed. Alert separately if sensor availability matters. |
Whether an unavailable-state alert is appropriate depends on what you are protecting and how much noise you can tolerate. For a seldom-used window, a diagnostic message may be more valuable than an immediate push. For a door used for security or access control, surfacing a prolonged unavailable state can prevent a false sense of security.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Create an immediate “notify me when a door opens” automation
Build it in the visual editor
In Home Assistant, go to Settings, then Automations & scenes, choose Create automation, and start with an empty automation. Add a State trigger, select the contact entity, and set the target state to on. Leave the “for” duration empty for this immediate rule.
Add an action that calls the notification service for the intended phone. The exact selector wording can vary by Home Assistant version, but the target must be the Companion app’s configured mobile notification service, not a similarly named entity or a persistent frontend notice. Give the notification a location-specific title and message, for example “Front door opened,” so simultaneous alerts remain distinguishable.
Save the automation only after checking the entity and notification target. Use a descriptive automation name that includes the opening, such as “Front door — immediate open alert.”
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
Understand the YAML structure
The following is a structural example. Replace both placeholder values with the entity ID and mobile notification target from your installation; it is not a ready-made automation with valid IDs:
alias: Front door - immediate open alert
trigger:
- platform: state
entity_id: binary_sensor.your_door_contact
to: 'on'
action:
- service: notify.mobile_app_your_device_id
data:
title: Door opened
message: The front door is open.
mode: single
The Companion documentation describes mobile targets in the form notify.mobile_app_<device_id>. The actual suffix is generated from the phone’s setup and must be copied from your available notification services. See Introduction to notifications for setup and permission requirements.
Account for an opening that already exists
A state trigger responds to a change. If the door is already open when you save or reload the automation, Home Assistant does not treat that unchanged on state as a new opening. The automation will wait until the contact returns to off and then changes to on again. This is expected behavior, not a failed notification.
For that reason, test an immediate alert by closing the contact first, waiting for Home Assistant to show off, and then opening it. If you need a startup or recovery message for an opening that remains open, design that as a separate condition rather than expecting the transition trigger to replay.
Add a reminder when an opening stays open
Use a separate state trigger with a duration
Create another automation with the same entity and target state on, but add a for duration. Home Assistant starts counting when the entity enters on; the action runs only if the entity is still on when the duration expires. Closing the door before the interval ends prevents that sustained-open trigger from firing.
The official notification documentation demonstrates this pattern with a 10-minute garage-door example. Another Home Assistant Core example uses five minutes for a back door. Those values are examples, not universal recommendations:
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
| Use case | Example duration documented by Home Assistant | Interpretation |
|---|---|---|
| Garage-door left-open reminder | 10 minutes | Notify only when the garage remains open for ten minutes. |
| Back-door sustained-open example | 5 minutes | Notify only when the back door remains open for five minutes. |
Choose a duration that fits the opening. A frequently used pantry door may need a longer grace period than a garage door, while a secure exterior door may justify a short reminder. Keep the immediate alert as its own automation; a for trigger is not a replacement for the notification at the moment of opening.
YAML pattern for a left-open reminder
Use your real entity and mobile target in place of the illustrative values:
alias: Front door - left open reminder
trigger:
- platform: state
entity_id: binary_sensor.your_door_contact
to: 'on'
for: '00:10:00'
action:
- service: notify.mobile_app_your_device_id
data:
title: Door still open
message: The front door has been open for 10 minutes.
mode: single
The notification service and entity are installation-specific. If you change the duration in the visual editor, verify that the saved automation still contains a state trigger with the intended for value.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Know what the reminder will and will not do
- It fires once when the duration is reached for that open interval; it does not repeat every minute while the door remains open.
- Closing the contact resets the timing. Opening it again starts a new interval.
- It does not send an immediate opening alert. Keep the transition automation if you want both messages.
- If the sensor becomes
unknownorunavailableduring the interval, the normal “still open” assumption is no longer reliable. Handle sensor health separately.
Configure phone delivery correctly
Set up the Companion app target
Phone push requires the Home Assistant Companion app to be installed and connected to your Home Assistant instance, with notification permission granted by the phone’s operating system. In Home Assistant, select the mobile notification service associated with the intended device. A family may have several targets, so verify the device name before saving the automation.
The service target generally follows the documented notify.mobile_app_<device_id> pattern. The generated device ID is installation-specific; do not copy one from another server or assume that a phone’s friendly name is the service name. The Companion notification guide explains the required app setup and permissions.
Write messages that identify the opening
Include the location in both the title and message when several sensors can alert the same phone. “Window opened” is ambiguous in a house with multiple rooms; “Kitchen window opened” tells the recipient which physical contact to check. For reminders, include the elapsed duration and use different wording from the immediate alert so the second message is understood as a persistence warning.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
Do not confuse push with a persistent frontend notice
The notify.persistent_notification action creates a notice inside Home Assistant’s frontend. It remains visible until dismissed or updated, which makes it useful for a dashboard reminder. It is not a phone push notification and does not replace a configured Companion app target. The service behavior is documented at Send a persistent notification.
You can use both channels intentionally: send a mobile push for immediate attention and create a persistent frontend notice for people who are currently viewing the dashboard. Describe the channels separately in your automation names so later maintenance does not mistake one for the other.
Surface unknown and unavailable sensors
Why a health alert is separate
An opening automation that triggers only on on cannot tell you that the entity stopped reporting. A sensor stuck at its last usable value, or one that becomes unavailable, can leave you without a meaningful open transition. Because unknown and unavailable are distinct from off, create a separate diagnostic automation if continued availability matters.
Design the diagnostic message
Use a state trigger for the same entity changing to unknown or unavailable, then send a message that says the sensor state is unavailable rather than claiming the door is open or closed. Include the sensor location and the time the problem began if your automation provides that information. A recovery automation can notify when the entity returns to a valid state, but avoid presenting recovery as proof that every earlier physical event was captured.
Choose whether to alert on either state immediately or only after it persists. A brief transition can be less important than a prolonged outage, while a security-critical contact may justify immediate reporting. The binary-sensor documentation explains these states and why they are not normal readings: binary sensor integration.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Clear out junk files and repair common Windows errors3Scan for outdated or missing drivers - takes under a minuteUse actionable notifications only with a fallback
Companion notifications can include action buttons. A button response sends an event back to Home Assistant, allowing an automation to perform a follow-up operation such as recording that you acknowledged the alert. The response path is not guaranteed: the Companion documentation warns that the event may not be emitted if the app crashes or closes.
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
If your automation waits for a button response, add a timeout and a fallback branch. After the timeout, send a second reminder, create a persistent frontend notice, or continue with a safe default. Never make a safety-critical workflow depend exclusively on a response that may never arrive. Define unique action identifiers for each opening so a response to one door cannot be mistaken for another. Read the implementation details and caveats in Actionable Notifications.
Test the complete alert path
Testing should exercise the physical contact, Home Assistant’s state model, the automation, and the phone—not just the automation editor.
- Verify the baseline: close the contact and confirm the entity shows
off, notunknownorunavailable. - Test the immediate rule: open the contact and confirm the state changes to
on, then check that the correct phone receives the location-specific message. - Test the reminder: close the contact, reopen it, and leave it open longer than the configured
forinterval. Confirm that the sustained-open message arrives. - Test cancellation: open the contact and close it before the duration expires. The left-open reminder should not be sent for that interval.
- Test the already-open case: reload or save the automation while the contact is open, then confirm that no immediate transition message appears until a close-and-reopen cycle occurs.
- Test health handling: if you can safely reproduce an unavailable or unknown state, confirm that the diagnostic message identifies the sensor condition rather than reporting a false closed state.
- Test action buttons: press each button and verify the expected event handling. Also verify the timeout or fallback by not responding.
The documentation describes the trigger and notification behavior; it does not establish delivery performance for your particular phone, network, sensor, or Home Assistant installation. Record what you observe during this test instead of assuming that a saved automation guarantees delivery.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →Troubleshoot by symptom
The automation never runs
- Open the entity details while operating the contact. If the state never changes, fix the integration or sensor connection before changing the automation.
- Confirm that the trigger uses the binary-sensor entity, not the device name or a similarly named helper.
- Confirm that the target state is
on. The interface may say Open, but the binary-sensor value used by the trigger ison. - Remember that an already-open contact does not create a new transition. Close it, wait for
off, and open it again.
The automation runs but no phone message arrives
- Check that the action targets the intended
notify.mobile_app_<device_id>service. - Confirm that the Companion app is signed in to the same Home Assistant installation and that operating-system notification permission is enabled.
- Send a simple test notification to the same target to distinguish an automation problem from a phone-delivery problem.
- Make sure you did not select
notify.persistent_notificationwhile expecting a push; that service updates the Home Assistant frontend only.
The reminder never appears
- Check the saved duration and verify that the entity stayed
onfor the entire interval. - Closing and reopening resets the timer, so a brief contact change can prevent the reminder.
- Confirm that the reminder is a separate automation or separate trigger and that its action points to a valid notification target.
You receive a false sense of security
- Review whether the entity is
unknownorunavailablerather thanoff. - Add a sensor-health automation if availability is important to the use case.
- Do not infer radio range, battery life, latency, or outage resilience from the automation syntax. Those properties depend on the physical sensor, protocol, network, and installation and are not established by the notification documentation.
Organize alerts when you have several openings
Give each automation a consistent name containing the location and purpose: “Kitchen window — immediate open,” “Kitchen window — left open,” and “Kitchen window — sensor unavailable.” Use the same naming in notification titles. This makes the automation list, phone history, and dashboard readable when several contacts change at once.
You can duplicate the immediate and sustained-open patterns for each entity, but replace every entity ID and notification message deliberately. A copied rule that still points to the previous room is more dangerous than a missing alert because it can make a test appear successful while monitoring the wrong opening. If many contacts share identical timing and recipients, keep the structure consistent while preserving location-specific text.
Reliability boundaries you should state plainly
Home Assistant can evaluate a state transition and call a notification service, but the configuration alone does not establish a guaranteed end-to-end delivery time or operation during every router, internet, phone, app, or Home Assistant outage. The available documentation does not provide claims about sensor radio range, battery life, latency, or notification guarantees. Treat your test results and installation-specific monitoring as the evidence for those factors.
The most dependable configuration is therefore layered: an immediate transition alert for prompt awareness, a separate duration reminder for an opening that is forgotten, and an optional availability alert for a sensor that can no longer provide a trustworthy state. Phone push and persistent frontend notices serve different destinations. Action buttons add a response path but require a timeout. Keeping those distinctions explicit prevents a normal trigger limitation or an unavailable sensor from being mistaken for a secure, closed door.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallQuick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

