Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Scan for outdated or missing drivers - takes under a minute3Clear out junk files and repair common Windows errorsiTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
A door or window contact sensor can start a smart-home routine whenever its state changes to open or closed. The useful pattern is simple: choose the sensor state as the starter, add optional conditions such as a time window or another device state, then select an action on a compatible light, plug, notification service or other device. The exact choices depend on your sensor, hub, platform, region and automation editor. Treat these routines as convenience features, not as your only security or safety system.
Google’s automation documentation illustrates the model with the starter phrase When window is open…
and lists supported device actions. See Google’s supported automation starters, conditions and actions and its guide to managing smart-home automations for the current options in that ecosystem.
How a contact-sensor automation works
A contact sensor has two parts, usually mounted on the frame and the moving door or window. When the parts separate, the sensor reports an open/contact-broken state; when they meet, it reports closed/contact-restored. Your smart-home platform receives that state and can use it as an automation starter.
An automation normally has three layers:
- Starter: the event or state that begins the routine, such as “front door opens” or “bedroom window is open.”
- Conditions: optional rules that must also be true, such as a selected time period or the state of another device.
- Actions: what the system does next, such as turning on a compatible light or sending an available notification.
Google documents contact-sensor starters and supported on/off actions, but feature availability varies by device and platform. A sensor may need a particular hub or integration, and a light or plug may expose fewer controls than you expect. Verify the actual sensor state, action and editor options before building a routine.
#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.
Practical automations worth building
Turn on an entry light when the door opens
This is the clearest use case. Set the entry door’s open state as the starter and a compatible hallway, porch or entry light as the action. Add a time condition if you only want the light after sunset or during a chosen evening period. The routine is useful when arriving with full hands, but it only works if the platform exposes the sensor’s open state and the light’s on action in the same automation system.
Decide how the light should turn off. If your editor supports a delay or a second routine, turn it off after a short interval or when the door closes. If neither option exists, avoid assuming the light will switch off automatically; use a separate supported trigger or a manual control.
Use a window-open state as a reminder or routine starter
“When window is open…” is an official example of a contact-sensor starter. You can pair that starter with a notification or another action only when your platform explicitly offers it. The phrase does not guarantee that every sensor ecosystem can send a notification, nor that every notification service is available in every region or language.
For a practical reminder, choose a window that is easy to forget, such as a guest-room or bathroom window. If the editor supports duration, require the window to remain open for a period before acting; otherwise, a brief opening while cleaning may trigger the routine immediately.
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.
Make the response context-aware
Conditions keep a useful routine from running at inconvenient times. For example, an open door can turn on a light only during a selected time window, or an open window can trigger an action only when another device reports a particular state. Google’s current editor describes optional conditions, while also noting that the available conditions depend on the product combination and account setup.
- Use a time condition for night-only lighting.
- Use another device’s state when the response should depend on whether a related system is active.
- Skip conditions when the routine must respond at any hour and an extra rule would make it less reliable.
Control a lamp or other compatible light
A sensor can control a smart bulb, lamp or other connected light when the platform exposes that device and the required action. The safest starting point is a simple on action. Do not assume that every connected light supports brightness, color, scenes or an off action in the same editor; check the action list for the exact device.
If a door opens repeatedly, consider whether every event should trigger the light. A frequently used door can create repeated commands, so a time condition, a short delay or a separate “turn off” routine may be preferable where supported.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Switch a low-risk load through a compatible plug
A compatible smart plug may provide an on/off action for an appropriate low-risk device. For example, an entry event could switch on a simple lamp. Confirm both the plug’s supported action and the manufacturer’s guidance for the connected load.
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.
Do not use an unexpected power change as the control method for equipment where interruption or unattended operation could cause injury, damage or a dangerous state. A contact sensor is an event source, not a substitute for the equipment’s own controls, interlocks or safety systems.
Choose an idea by matching the trigger, action and risk
| Automation idea | Starter | Action to verify | Important limitation |
|---|---|---|---|
| Entry lighting | Door changes to open | Turn on a compatible light | Sensor and light must be exposed in the same platform; decide how the light turns off. |
| Window reminder | Window changes to open or remains open, if duration is supported | Notification or another listed action | Notification availability is platform-specific; the official example establishes the starter, not universal notification support. |
| Night-only response | Door or window opens | Light or other supported action | Requires an editor condition for the chosen time window. |
| State-dependent response | Door or window opens | Action allowed only when another device meets a condition | Available conditions vary by platform and device integration. |
| Plug-controlled lamp | Door opens | Turn a compatible plug on | Use only with a suitable low-risk load and follow manufacturer guidance. |
The table describes patterns, not universal guarantees. A platform may support the sensor but not the desired action, or support both devices without allowing them in one routine.
Check compatibility before buying or configuring
Compatibility is more than a wireless logo on the package. Confirm each item below for your exact model and account:
- Sensor state: the platform must expose open/closed or contact/no-contact as an automation starter.
- Connection path: determine whether the sensor connects directly, through a required hub, or through a third-party integration.
- Action device: verify that the chosen light, plug or service appears in the same automation editor.
- Exact action: check whether the editor offers on, off, brightness, scene, notification or only a subset.
- Conditions and timing: confirm that the editor supports the time, device-state or duration rule you need.
- Software and region: feature availability can depend on the editor version, language, account, region and product combination.
- Power and placement: install the sensor so the two parts align as specified and monitor battery status if the platform reports it.
Google’s support pages are useful references for the concepts and currently listed capabilities, but they are changeable documentation. Check the help page for your platform and the sensor manufacturer’s compatibility list before relying on a particular combination: supported starters, conditions and actions.
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
Set up a door or window routine
The labels differ across platforms, but the workflow is consistent. Use the following sequence rather than starting with the action and guessing which sensors are available.
- Install and name the sensor. Pair it with the required hub or app, mount the two pieces according to the manufacturer’s alignment guidance, and give it a precise name such as “Kitchen window” or “Garage entry door.”
- Confirm the live state. Open and close the door or window while watching the app. Make sure the platform changes between open and closed reliably before creating a routine.
- Create an automation. In the platform’s automation editor, choose the option to add a starter, trigger or “when” rule.
- Select the contact event. Choose the named sensor and its open state. Some editors present a phrase such as “When window is open…”; others use a binary contact-state menu.
- Add only necessary conditions. Choose a time window or another device state if it prevents unwanted activations. If your editor supports a duration, use it for reminders that should not react to a momentary opening.
- Choose and test the action. Select the compatible light, plug or other listed device, then choose the exact action. Save the automation and test it with the door or window in normal use.
- Test the opposite and failure cases. Close the contact, reopen it, repeat the event, and check what happens if the action device is unavailable. Confirm whether the routine repeats, stays on, or requires a separate off routine.
Keep names and rooms unambiguous. “Door” is difficult to troubleshoot when several contacts exist; “Basement side door” makes the starter and event obvious.
Prevent nuisance triggers
- Use the right event: choose open rather than any state change when closing should not activate the action.
- Limit the schedule: add a time condition for routines that make sense only at night or during occupied hours.
- Account for repeated openings: a busy entrance can issue many events. Use a delay, duration or separate off logic if your editor supports it.
- Check physical alignment: a loose or misaligned magnet can report false openings. Remount it and retest before changing the automation.
- Watch battery and connectivity indicators: intermittent reports can look like a logic error but originate with the sensor or network.
- Keep a manual fallback: household members should still be able to operate the light or device without the routine.
Troubleshoot when the routine does not run
The sensor never appears as a starter
Confirm that the sensor is paired to the same account or ecosystem as the automation editor and that its integration exposes contact state. If a hub is required, check that it is online. A sensor can be visible for status monitoring yet unavailable as an automation starter.
Free tools Windows power users keep installed
One-click scans. No signup required.
The sensor state is stale or wrong
Open and close the contact while viewing its live status. Recheck alignment, battery level and hub or network connectivity. Do not compensate for a sensor that reports incorrectly by adding more complicated conditions; fix the state report first.
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.
The action device is missing
Verify that the light or plug is linked to the same platform and that the desired action is supported. A device may be controllable in its own app but not exposed to the platform’s automation editor, or it may offer on/off but not brightness or scenes.
The routine runs at the wrong time
Inspect every condition, including the account’s time zone and any schedule or device-state requirement. Temporarily remove nonessential conditions to identify which rule blocks the action, then restore only the conditions you actually need.
It works sometimes
Intermittent operation can result from internet, Wi-Fi, hub or third-party service availability. Google warns that smart-home automations are convenience features and may not always work when those dependencies fail. Test the physical device locally and retain a manual method for important functions.
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 →Safety and security boundaries
A contact sensor can tell an automation that a door or window state changed; it cannot prove who caused the change, that the opening is authorized, or that a property is secure. Do not present a light or notification routine as an alarm, access-control system or sole security measure.
Likewise, do not use a sensor-triggered plug or other automation as the only safeguard for heaters, tools, medical equipment, locks or any load whose unexpected power change could cause harm. Follow the product manufacturer’s instructions and use dedicated safety controls where the consequence of failure matters. Google’s guidance states that automations depend on working internet, Wi-Fi and third-party services and may not always operate: manage smart-home automations.
A sensible first project
Start with an entry light because the result is visible and easy to reverse. Choose one door, one compatible light and one starter: the door opening. Test it locally, then add a night-time condition only if it solves a real nuisance. Once the basic path is reliable, try a window reminder or a low-risk plug-controlled lamp, checking the platform’s supported actions each time. This incremental approach reveals compatibility and connectivity limits before you automate anything consequential.
Quick 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.

