Skip to content
SensorLatch

HUB 03 · Sensors

The Best Door Sensors for Home Assistant

Every sensor here can end up as an entity on your dashboard. What separates them is whether the thing carrying that state is a radio in your cupboard or a company's server.

By Stephen V.Updated How we pick
#ad

We earn a commission if you buy through our links. It does not change the price you pay, and it does not decide our picks — our selection criteria are published in full. How this works.

Verdict

The bottom line

For Home Assistant, buy the THIRDREALITY Zigbee Contact Sensor. It is plain Zigbee 3.0, so it joins the coordinator already plugged into your instance through ZHA or Zigbee2MQTT — no manufacturer hub, no manufacturer account, no manufacturer server, and no integration that can be deprecated out from under you. If you would rather build on Matter, the Aqara Door and Window Sensor P2 is the one to buy, with two prerequisites Home Assistant states plainly in its own documentation: the Matter Server and a Thread border router. To cover six or eight openings for the price of two sensors, the Aqara Zigbee three-pack is the cheapest route per door — with the caveat, published by Zigbee2MQTT rather than by Aqara, that these devices do not follow the Zigbee specification exactly and can drop off a mixed mesh.

The short answer

Quick picks

#ProductBest forScorePrice
01
THIRDREALITY THIRDREALITY Zigbee Contact Sensor (2-pack)
THIRDREALITY Zigbee Contact Sensor (2-pack)

The Home Assistant crowd's default. Plain Zigbee, no vendor cloud, no proprietary app requirement, and it is explicitly documented as working with Home Assistant, SmartThings and Hubitat.

Best for Home Assistant
8.6
$37.99Amazon
02
Aqara Aqara Door and Window Sensor P2
Aqara Door and Window Sensor P2

Thread, and that is the whole point. It joins a Matter fabric directly, so it reports to Apple Home, Google Home, SmartThings or Home Assistant without Aqara's cloud anywhere in the path.

Best door and window sensor
8.8
$27.99Amazon
03
Aqara Aqara Zigbee Door and Window Sensor (3-pack)
Aqara Zigbee Door and Window Sensor (3-pack)

The cheapest way to cover a whole house. Zigbee, tiny, and sold in threes — which matters because a real perimeter is six to twelve sensors, not one.

Best value multi-pack
8.6
$49.99Amazon
04
SwitchBot SwitchBot Contact Sensor
SwitchBot Contact Sensor

A contact sensor with a built-in motion detector and its own audible alert, so it does something useful before you have bought a hub or picked an ecosystem.

Best standalone alarm sensor
8.0
$32.29Amazon
05
YoLink YoLink LoRa Door Sensor Starter Kit
YoLink LoRa Door Sensor Starter Kit

For the outbuilding. LoRa radio gives quarter-mile open-air range, which is the only technology here that reaches a detached garage, a barn or a gate at the end of a drive.

Best long range
7.5
$47.63Amazon

#ad · Prices pulled live from the Amazon Product API, last checked October 20, 2026. Where we have no verified live price we show none — we would rather leave a gap than print a number that has gone stale. Scores are our own, compiled from published specs; they are not test results.

A contact sensor is the cheapest entity you will ever add to Home Assistant and one of the three most useful. It is a binary sensor that costs less than a takeaway, runs a year or more on a coin cell, and reports the one fact a camera cannot infer: that the door just opened. The question this page answers is not which sensor detects an opening best — a magnet and a reed switch are a solved problem — but what carries that state into your instance, and who owns it.

The best door sensors for Home Assistant start with the integration, not the sensor

Home Assistant publishes an IoT class for every integration, and it is the most useful thing on the page: it tells you whether the device is local or cloud, and whether it pushes state the moment it changes or waits to be asked. For a door sensor that distinction is the product. A sensor whose integration is Cloud Polling does not tell you the door opened; it tells you the door was open the last time something asked, which may have been minutes ago. There are four arrangements on sale and they are not equivalent:

  1. A radio you own. Zigbee through ZHA or Zigbee2MQTT, or Z-Wave through Z-Wave JS, with a coordinator stick on the machine running Home Assistant. The sensor joins your network. No vendor sits in the path at all, which means there is nothing to withdraw, discontinue or rate-limit.
  2. Matter over Thread. Also local — Home Assistant's Matter documentation says Matter products “always allow local control” — but it asks for two things first: the Matter Server, which the integration reaches over a WebSocket connection, and a Thread network with at least one border router near the sensor.
  3. Local Bluetooth. Home Assistant talks to the device directly over BLE with no hub. The published IoT class is Local Push, which is the right shape for a door, and the constraint is physical: Bluetooth has to reach from the sensor to the radio in your server.
  4. A vendor cloud. The sensor talks to the manufacturer's hub, the hub talks to the manufacturer's cloud, and Home Assistant asks that cloud. It works everywhere, it is how most of the market is built, and it puts a company's server between your door frame and your automation.

Arrangements one and two are structurally better. Three is excellent within range. Four is the one to understand before you buy rather than after. If the protocol words in that list are doing more work than you would like, the explainers are Z-Wave vs Zigbee vs Matter and what Matter actually changes for home security.

How we ranked them

Three criteria, in this order. First, what carries the state: a radio you own beats Thread, Thread beats local Bluetooth, and all three beat a cloud. Second, what the sensor does during an outage, because the reason to run Home Assistant at all is that the house keeps working when the internet does not. Third, cost per opening, since a real perimeter is six to twelve sensors and the per-unit price is what decides whether you cover the windows or only the front door. The rubric is published at our methodology, and the scores on the cards above are compiled from manufacturer documentation, Home Assistant's own integration pages and the Zigbee2MQTT device database — not from testing, which we do not do and do not claim.

Integration names and IoT classes as published by Home Assistant, October 2026. “Hub you must buy” counts hardware beyond the coordinator or radio already attached to your instance. Prices on the cards above are pulled live and dated October 20, 2026.
SensorHome Assistant integrationPublished IoT classVendor hub neededReports with the internet down
THIRDREALITY Zigbee Contact SensorZHA or Zigbee2MQTTLocal polling (ZHA)No, a coordinator stickYes
Aqara Door and Window Sensor P2Matter, via the Matter ServerLocal pushNo, a Thread border routerYes
Aqara Zigbee Door and Window Sensor (3-pack)ZHA or Zigbee2MQTTLocal polling (ZHA)No, a coordinator stickYes
SwitchBot Contact SensorSwitchBot over Bluetooth, or SwitchBot CloudLocal push, or cloud pollingNo for Bluetooth; yes for the cloud pathOn the Bluetooth path only
YoLink LoRa Door Sensor KitYoLinkCloud pushYes, included in the kitNo

THIRDREALITY Zigbee Contact Sensor — the one with nothing in the middle

This is the default in the Home Assistant community for a reason that has nothing to do with the hardware being special. It is a reed switch, a coin cell and a Zigbee 3.0 radio, and it behaves like a textbook Zigbee end device: it joins the coordinator you already run, it appears as a binary sensor, and it is finished. Zigbee2MQTT publishes the device entry — contact, battery percentage, battery voltage, a low-battery flag and a configurable open delay — and lists over-the-air firmware updates as supported, which is the unglamorous detail that tells you the device is still maintained.

What you are buying is the absence of things. No manufacturer app is required. No account exists to be migrated. No integration can be deprecated, because ZHA and Zigbee2MQTT are not a vendor's gift — Home Assistant describes ZHA as a “hardware-independent Zigbee gateway implementation” that forms a single Zigbee network of your own. Five years from now this sensor works the way it works today, and the company that made it has no ability to change that.

The honest costs, both in its registry entry above: it is physically larger than the Aqara sensors, so measure a narrow sash before ordering three for windows, and it assumes you already run a coordinator. If you do not, that is the real purchase and it comes before the sensor — see the buyer's guide below.

Aqara Door and Window Sensor P2 — the Matter route, with two prerequisites

The P2 speaks Thread and joins a Matter fabric, which makes it the most portable sensor here: the same device works in Home Assistant, Apple Home, Google Home or SmartThings, and Home Assistant's Matter documentation notes you can join one device to multiple controllers, with standard devices supporting at least five fabrics. If you want a sensor estate that survives you changing your mind about platforms, this is it. It is also the sensor this site ranks first in the general door and window roundup and in the Alexa rankings, where the absence of a vendor skill is decisive.

It is second here on an admission Home Assistant makes about itself. The Matter integration needs the Matter Server app, which the project recommends running on Home Assistant OS and explicitly does not support in a plain Docker container; Thread support requires Home Assistant OS 10 or later; a Thread device needs a border router within range; over-the-air updates for Thread devices do not work through an Apple border router; and the documentation describes the ecosystem as early-stage, with compatibility issues expected. Matter also deliberately exposes less than a native integration — for a contact sensor that is open, closed and battery level, which is all you need, but the ceiling is real and worth knowing about.

If your border router is an Apple TV or a HomePod, plan for a second one. Home Assistant documents that over-the-air firmware updates for Thread devices do not work with Apple border routers. The sensor still reports perfectly; you simply cannot update its firmware through that path.

Aqara Zigbee three-pack — the cheapest way to cover a whole house

A perimeter is not one door. Ground-floor windows, a patio slider, a garage side door and the front door is five to eight openings, and at that point the per-sensor price stops being a detail. These are among the smallest sensors in the category, they are sold in threes, and the same ZHA or Zigbee2MQTT coordinator reads them. Aqara's own documentation specifies an Aqara hub; in practice the Home Assistant world pairs them directly, and Zigbee2MQTT publishes a device entry exposing contact, battery percentage, voltage, device temperature and a trigger count.

The caveat is published, specific, and the reason this is rank three rather than rank one. Zigbee2MQTT states that Xiaomi-family devices do not fully follow the Zigbee standard and may drop off the network, and it names router brands that routinely cause them trouble — Centralite, General Electric, Iris, Ledvance, Legrand, OSRAM, Sylvania, SmartThings and Securifi among them. The documented workaround is to pair the sensor directly to the coordinator while standing next to it, and to watch for a link quality below 20. If your mesh routes through mains-powered devices from that list, buy one three-pack and see how it behaves before you commit the whole house. Diagnosing the drop-outs themselves, in order, is our sensor troubleshooting guide.

SwitchBot Contact Sensor — two integrations, and only one is any good for a door

SwitchBot is the interesting case on this page, because Home Assistant ships two separate integrations for it and they are not close in quality. The local one, SwitchBot, connects over Bluetooth with the IoT class Local Push, needs working Bluetooth on the host, and says plainly that a SwitchBot hub is not required. On that path this is a genuinely good Home Assistant device: instant state, no cloud, no hub, and it reports motion and light level as well as open and closed.

The cloud one is where buyers get caught. SwitchBot Cloud requires a hub, an account, a token and a secret key, and its published IoT class is Cloud Polling: each sensor requests a status update from the SwitchBot Cloud API once every ten minutes. There is a webhook that pushes contact-sensor updates faster, and the documentation is blunt about its condition — without a publicly reachable external URL or a Home Assistant Cloud subscription, those devices do not receive updates. Ten-minute polling is fine for a thermometer and useless for a door. So buy this sensor for the Bluetooth path, within Bluetooth range of your server, and take the constraint in its registry entry seriously: thick internal walls are the limit.

It earns its place anyway, because it is the only sensor here that makes a noise by itself. On a garage side door or a gate, an audible alert at the opening beats a notification that arrives wherever you happen to be. The brand-level version of this decision, if you are choosing a whole sensing estate rather than one device, is Aqara vs SwitchBot.

YoLink LoRa Door Sensor Kit — for the building Zigbee cannot reach

Buy this one for a distance problem and nothing else. LoRa carries roughly a quarter mile in open air, which makes it the only radio here that reaches a detached garage at the end of a drive, a barn, a gate or a shed across a paddock. Home Assistant lists the integration as verified for the YS7704-UC door sensor, the YS7706-UC garage door sensor and the YS7707-UC contact sensor, and account linking is provided free through Nabu Casa with no subscription required.

It is last because of what that integration is: IoT class Cloud Push, over an MQTT connection on port 8003, with the hub bridging YoLink's LoRa to YoLink's cloud. When your internet is down this sensor does not report to Home Assistant. For the structure it was bought for that trade is usually worth making — a shed door you would otherwise never know about beats a perfectly local sensor that cannot reach the shed — and the included SpeakerHub announces the opening aloud in the house either way. Everything inside the main building should still be Zigbee or Thread. One footnote from YoLink's own setup documentation, worth reading before you start: do not use UAC credentials for the Home Assistant integration.

The two we left off this page

Two of the cheapest sensors in the category are popular, well made, and effectively unavailable to Home Assistant, which is a different thing from being bad.

Ring Alarm contact sensors. Home Assistant's Ring integration supports doorbells, stick-up cams, chimes and intercoms. Alarm panels and their contact sensors are not in the supported device list, and the integration states that it does not connect locally to devices at all — all communication goes via the cloud, with data updates every 60 seconds. If you own a Ring Alarm base those sensors are excellent inside Ring, and they are ranked for exactly that in the Alexa roundup. They are not a Home Assistant purchase.

Wyze Entry Sensors. They need the Wyze Sense Hub, there is no official Home Assistant integration, and the brand's disclosure history is a fair thing to weigh before putting it on every door in the house. The budget argument behind them is real, and the Aqara three-pack answers it without the tie-in.

In detail

The picks, in full

01
THIRDREALITY THIRDREALITY Zigbee Contact Sensor (2-pack)

Best for Home Assistant

THIRDREALITY Zigbee Contact Sensor (2-pack)

Zigbee 3.0Any Zigbee coordinatorHome Assistant / SmartThings / Hubitat2-pack
Fully localZigbee coordinator required
8.6/10

The Home Assistant crowd's default. Plain Zigbee, no vendor cloud, no proprietary app requirement, and it is explicitly documented as working with Home Assistant, SmartThings and Hubitat.

Local control
10
Battery
8.5
Ecosystem
8
Install
8
Value
8.5

What it gets right

  • Joins any Zigbee coordinator — there is no manufacturer hub you are forced to buy
  • No vendor account, no cloud, nothing that can be discontinued out from under you
  • Widely documented in the Home Assistant community, which is where this category's real information lives

What it doesn't

  • Physically larger than the Aqara sensors — check narrow sashes before ordering
  • Assumes you already run a Zigbee stick or hub

What it costs to run

Replaceable cells. No subscription, no cloud account, no vendor in the path.

Skip this if…

…you have no Zigbee coordinator and no intention of running one. Plain Zigbee devices are wonderful inside a self-hosted setup and completely useless outside one.

$37.99on Amazon

Price last checked October 20, 2026. Prices move constantly — Amazon's at checkout is the one that counts.

#ad · we may earn a commission from this link to THIRDREALITY Zigbee Contact Sensor (2-pack)

02
Aqara Aqara Door and Window Sensor P2

Best door and window sensor

Aqara Door and Window Sensor P2

Matter over Thread1x CR2032Thread border router requiredLocal automations
Local, no cloudThread border router required
8.8/10

Thread, and that is the whole point. It joins a Matter fabric directly, so it reports to Apple Home, Google Home, SmartThings or Home Assistant without Aqara's cloud anywhere in the path.

Local control
9.5
Battery
9
Ecosystem
9
Install
9
Value
7.5

What it gets right

  • Matter over Thread means it is not tied to Aqara's app or servers — the sensor belongs to your smart home, not to a vendor
  • Local automations keep running when the internet is down, which is precisely when you want a door sensor to work
  • A single CR2032 in a device that only radios on state change is the best battery-life shape in home security

What it doesn't

  • Absolutely requires a Thread border router — this is not optional
  • More expensive per sensor than Zigbee alternatives

What it costs to run

1x CR2032. No hub subscription, no cloud account required for local automations.

Skip this if…

…you have no Thread border router. Without an Apple TV 4K, HomePod mini, Google Nest Hub (2nd gen), SmartThings Station or an equivalent, this sensor will not join anything — and nothing on the box or the listing tells you that clearly enough.

$27.99on Amazon

$29.997% off

Price last checked October 20, 2026. Prices move constantly — Amazon's at checkout is the one that counts.

#ad · we may earn a commission from this link to Aqara Door and Window Sensor P2

03
Aqara Aqara Zigbee Door and Window Sensor (3-pack)

Best value multi-pack

Aqara Zigbee Door and Window Sensor (3-pack)

Zigbee 3.01x CR1632Aqara hub requiredAmong the smallest sensors sold
Local via hubAqara hub required
8.6/10

The cheapest way to cover a whole house. Zigbee, tiny, and sold in threes — which matters because a real perimeter is six to twelve sensors, not one.

Local control
8.5
Battery
8.5
Ecosystem
7.5
Install
9
Value
9.5

What it gets right

  • Per-sensor cost is low enough that covering every ground-floor opening stops being a budget decision
  • Physically small enough to sit on a window sash without looking like an installation
  • Zigbee mesh through an Aqara hub runs locally, so automations survive an internet outage

What it doesn't

  • Needs an Aqara hub — this is a three-pack of endpoints, not a system
  • Zigbee rather than Thread, so it is bound to Aqara's hub rather than joining a Matter fabric directly

What it costs to run

1x CR1632 per sensor. No subscription.

Skip this if…

…you do not own and do not want an Aqara hub. These are Zigbee endpoints: on their own they connect to nothing, and the hub is a separate purchase.

$49.99on Amazon

Price last checked October 20, 2026. Prices move constantly — Amazon's at checkout is the one that counts.

#ad · we may earn a commission from this link to Aqara Zigbee Door and Window Sensor (3-pack)

04
SwitchBot SwitchBot Contact Sensor

Best standalone alarm sensor

SwitchBot Contact Sensor

Contact + motionBluetoothLocal audible alertHub for remote alerts
Works without a hubHub required for phone alerts
8.0/10

A contact sensor with a built-in motion detector and its own audible alert, so it does something useful before you have bought a hub or picked an ecosystem.

Local control
8
Battery
8
Ecosystem
7
Install
9
Value
8

What it gets right

  • Detects both the door opening and movement in front of it, which two separate devices would otherwise cover
  • Makes a noise on its own — useful on a garage side door where a phone notification is not enough
  • Cheapest route to a working alarm on a single door with nothing else installed

What it doesn't

  • Phone notifications and automations need a SwitchBot hub
  • Bluetooth range is a real constraint in a house with thick internal walls

What it costs to run

Replaceable cells. No subscription; the hub is hardware.

Skip this if…

…you want notifications on your phone while you are out. Without a SwitchBot hub this is a local noisemaker — it will not reach you at work.

$32.29on Amazon

$33.995% off

Price last checked October 20, 2026. Prices move constantly — Amazon's at checkout is the one that counts.

#ad · we may earn a commission from this link to SwitchBot Contact Sensor

Buy the coordinator first, and a router before you buy sensors

The mistake that makes people think Zigbee sensors are unreliable is a mesh with no mesh in it. Home Assistant's ZHA documentation draws the distinction in its own words: a Zigbee router device is “a hardware device that is always mains-powered (AC) such as outlets or fans,” while a Zigbee end device is “typically battery-powered (DC) such as remotes or motion sensors.” Battery sensors do not relay traffic for anyone. They talk to a router or to the coordinator and to nothing else. ZHA's own advice is to add mains-powered routers before battery devices, because a weak mesh can stop a device pairing at all and limits how many you can add.

In practice the order of purchase is: coordinator stick, then one or two mains-powered Zigbee devices positioned between the coordinator and the far doors, then the sensors. Home Assistant recommends its own Connect ZBT-2 for a new Zigbee setup, and for Z-Wave an 800-series adapter with firmware at 7.23.2 or later. If you are still picking the box that runs all of this, that decision is best smart home hubs for security, and the platform-level version of the same question is the best smart home ecosystem for security.

What decides the price

Not the sensor. The radio arrangement decides the price, and the spread is wide: plain Zigbee multi-packs sit at the bottom of the range, a single Thread sensor costs several times as much per opening, and a LoRa kit with its own hub is a different budget entirely because what you are buying is range rather than a contact. Count the openings first, multiply, and only then compare products. A whole-perimeter Zigbee install usually costs less than two Thread sensors, which is the arithmetic nobody does before buying the first one.

Running cost is a coin cell every year or two and nothing else. None of these sensors has a subscription, none of them should ever have one, and if a door sensor is ever sold to you on a monthly plan, the plan is charging for notifications you can generate yourself.

The mistake buyers make

Buying the sensor for the ecosystem they wish they had. The Thread sensor is the better long-term device and the wrong purchase if there is no border router in the house today, because it joins nothing at all until there is one. The cloud sensor is the wrong purchase if the automation it is for has to fire in under a second. And a three-pack of anything is the wrong purchase before you know how your mesh behaves at the far corner of the house. Buy one, pair it, look at the link quality, then order the rest.

Second mistake, specific to this device class: putting the radio half on the door rather than the frame. The magnet half goes on the moving slab and the radio half on the fixed frame, because the radio half is the one with the battery you will replace and the antenna whose orientation matters. On a metal frame, lift both halves onto a plastic or adhesive spacer — metal detunes a 2.4GHz antenna, and a sensor sitting two inches from a steel jamb can report a link quality the mesh cannot route.

What a door sensor unlocks once it is an entity

The point of putting the cheapest device in the house into Home Assistant is that it becomes a condition for everything else. A door opening is the trigger that turns on a light, starts a camera recording, announces itself on a speaker, or — the automation that actually earns its keep — fires a notification when a door has been open for ten minutes and nobody meant it to be. That left-open timer is the best argument for a local integration: a template counting minutes is only as reliable as the state updates feeding it, which is why a ten-minute cloud poll cannot do this job at all.

The lock side of the same house is ranked in the best smart locks for Home Assistant, the camera side in the best Home Assistant security cameras, and the rest of this category sits on the sensors hub. If what you actually want is a sensor that needs no coordinator at all rather than one wired into a platform, that is a different ranking: the best no-hub door sensors.

How we picked

Products we claim to have tested: 0

Everyone in this category says they tested a dozen locks on their own front door. We have not tested any, and we say so. Here is what we do instead: read the manufacturer's manual and spec sheet, record the published protocol, power and storage figures, check the published standard where one exists, compute what the device costs to keep running, and cite all of it so you can check the work. Prices come live from Amazon's API and disappear rather than go stale.

The scores above are judgments from that documented research — not bench measurements. The full rubric, including what disqualifies a product, is published in full.

Questions

Frequently asked

What is the best door sensor for Home Assistant?
The THIRDREALITY Zigbee Contact Sensor, because it joins a coordinator you already own through ZHA or Zigbee2MQTT with no vendor hub, account or cloud in the path. The Aqara Door and Window Sensor P2 is the better choice if you are building on Matter and already have a Thread border router and the Matter Server running.
Do I need a hub for door sensors in Home Assistant?
Not a manufacturer hub, but you do need a radio. Zigbee sensors need a Zigbee coordinator on the machine running Home Assistant, Z-Wave sensors need a Z-Wave controller stick, and Thread sensors need a Thread border router plus the Matter Server. The SwitchBot Contact Sensor is the exception here — Home Assistant's local SwitchBot integration states that a SwitchBot hub is not required, provided Bluetooth is working on the host and the sensor is in range.
Will my door sensors still work if the internet goes down?
On a local integration, yes. Zigbee, Z-Wave, Matter over Thread and local Bluetooth all run inside the house, so the state change and the automation both fire with the router unplugged. The YoLink integration is published as Cloud Push, so it does not report to Home Assistant during an outage — though its SpeakerHub still announces the opening locally.
Why do Aqara sensors keep dropping off Zigbee?
Zigbee2MQTT's own device documentation states that Xiaomi-family devices do not fully follow the Zigbee standard and may drop off the network, and it names specific router brands — Centralite, GE, Iris, Ledvance, Legrand, OSRAM, Sylvania, SmartThings and Securifi — that commonly cause it. Pair the sensor directly to the coordinator while standing next to it, check that link quality is above 20, and replace a cell that reads full but sags under the transmit pulse. The ordered diagnosis is in our sensor troubleshooting guide.
Is the SwitchBot Contact Sensor good with Home Assistant?
On the local Bluetooth integration, yes — it is Local Push, needs no hub, and reports open or closed, motion and battery. Through SwitchBot Cloud it is Cloud Polling at one status request every ten minutes unless you configure the webhook, which needs a publicly reachable URL or a Home Assistant Cloud subscription. For a door, use the Bluetooth path.
Can I use Ring or Wyze door sensors with Home Assistant?
Not meaningfully. Home Assistant's Ring integration lists doorbells, stick-up cams, chimes and intercoms — not Ring Alarm contact sensors — and states that all communication goes via the cloud. Wyze Entry Sensors require the Wyze Sense Hub and have no official integration. Both are fine inside their own apps, and neither belongs in a Home Assistant plan.

Keep reading

Receipts

Sources

We do not run a testing lab and we do not pretend to. Specifications come from the manufacturer's own published documents and from published standards; prices come from the live Amazon API. Where a figure is not published, the page says “not published” rather than guessing. Read the full method.