How to achieve Home Assistant's human body sensor to automatically switch lights on and off? Matter, Zigbee human sensor, human presence sensor recommendation – Home Assistant step-by-step tutorial EP 7

The most sophisticated and dreamy thing about a smart home is "automation". Only situation settings and voice control cannot be called a true "smart home" 🤣. Please read this article for details:

[irp posts=”245″]

Today I’m going back to the basics to show you how to “automatically turn lights on and off” in Home Assistant. I also recommend a few Matter, Zigbee body sensors and human presence sensors that I use myself.

If you are not familiar with the "three major elements of automation: Trigger, Condition, and Action", you can read this article first:

[irp posts=”680″]

What human body sensors and human presence sensors do I use?

Regarding human body detection, I currently use several different sensors. Let’s go directly to the list:

Human movement sensor P1

  • Brand: Aqara
  • Connection method: Zigbee
  • Features: In addition to human body sensing, there is also light sensing, which has a wider range of applications. I am currently using it to sense outdoor brightness to determine whether to automatically turn on the lights.
  • Price: NT$990
  • Purchase link:https://tinyurl.com/29q9numh

VIZO Zigbee human body sensor

Aqara FP1 人存在傳感器
image credit: aliexpress

Aqara FP1 human presence sensor

JOSE Matter 人體存在傳感器
image credit: JOSE@taobao

JOSE Matter human presence sensor


How to choose human body and human presence sensors?

How to choose the connection method: Matter, Zigbee, Z-Wave, WiFi, Bluetooth?

If you are interested in the technical details of the connection method, you can search the information on Google. I will not explain specifically what "connection protocol", "standard", "network layer" and "application layer" are here (because I am not special about this part. Be professional, so you won’t mislead others🤣).

💡Choose Matter for the new cross-platform protocol💡

The current version of Home Assistant has native support for Matter devices. I recommend giving priority to Matter devices. What is troublesome at this stage is that there are relatively few choices of Matter devices and they are generally more expensive. The "JOSE Human Presence Sensor" mentioned above is what I Browsed through major e-commerce stores to find the products I recommend most.

💡At this stage, Zigbee is the most popular device choice💡

Zigbee is a long-established connection method for smart home devices. It is not just sensors, but also includes various smart home devices such as lamps, switches, sockets, etc. Various manufacturers have launched many products to choose from, whether it is topology or low power consumption. , stable connection... and other features are very suitable for smart home environments. If you want to use a communication method to connect the smart devices of the whole family, choose Zigbee at this stage!

🤔If you have special emotions, choose Z-Wave🤔

Z-Wave's topology, low power consumption... and other features are all available in Zigbee devices, but the selection of Z-Wave devices is relatively limited, so unless you have special feelings for Z-Wave, don't touch Z-Wave!

⚠️Don’t choose WiFi unless you have a great router⚠️

There are many WiFi smart home devices on the market, but it is recommended to first have a set of routers with a large number of simultaneous connections and stable connections, and then consider WiFi devices. If your home only uses ordinary routers provided by general telecommunications providers, then the smart home device will Use as few WiFi connected devices as possible.

Don't choose Bluetooth if you have nothing to do

Bluetooth is the least recommended smart home connection method. Anyone who has used Bluetooth headsets or keyboards and mice will surely know that Bluetooth devices have short connection distances and high power consumption. It is sincerely recommended that you try not to choose Bluetooth connected smart home devices.

What is the difference between human body sensor and human presence sensor? How to choose between different situations?

To put it simply, the "human presence sensor" is less sensitive, while the "human presence sensor" is more sensitive, but of course this is also reflected in the price. I will choose according to different situations, but if you are not price sensitive, then Just choose "Human Presence Sensor" first.

  1. Use the "Human Sensor" for the Passby situation: If you want to detect a situation where someone is "passing", such as when someone walks through the corridor, then using the "Human Sensor" is very suitable and sufficient.
  2. Use "occupancy sensor" in Occupancy situation: If you want to detect whether someone is "occupied" in the environment, it is more suitable to use "occupancy sensor", especially in toilets and kitchens. You don't want to squat on the toilet. The lights were turned off halfway through, right? 🤣

How to set the lights to turn on and off automatically in Home Assistant?

Automation tool selection

There are two main streams for setting up automation in Home Assistant:

  1. Native automation tools:
    • Advantages: It comes natively and does not require additional installation of plug-in, which is especially suitable for native control. Official updates will also improve functions from time to time.
    • Disadvantages: There is no visual interface, which is more difficult for people who need to think visually.
  2. Node-RED
    • Advantages: The visual interface setting is more intuitive. If you set a lot of complex automation, the entire page will look very powerful. Showing off to friends can satisfy your vanity (mistake) 🤣
    • Disadvantages: I have used it myself and found that there are quite a few settings that require more time to get familiar with, and are slightly less intuitive (for me) than the native settings.

Obviously, I now use Home Assistant’s native automation tools. If you are interested in Node-RED, you can Google it and learn about it! However, the ideas for automated settings are similar. You can also refer to the following sharing of automated settings!

Use presence sensors in the kitchen to determine if someone turns on the lights and no one turns them off

The settings for using the human presence sensor are relatively simple. You only need to trigger the switch when the occupation status of the human presence sensor changes!

Trigger (Trigger, in the HA Chinese interface is written "when...")

Select "Entity > State" as the trigger type, and then select your human presence sensor. The meaning of this trigger is: start this automation when the human presence sensor detects a change in state.

廚房人存在傳感器 Trigger 觸發設定

Action (Action, in the HA Chinese interface is written "then execute")

For the action type, select "Component > Selection":

  1. The first setting is to turn on the light when "occupancy of the human presence sensor is on (occupancy)"
  2. The second setting is to turn off the light when "occupancy of the human presence sensor is off (safe)"
廚房人存在傳感器 Action 動作設定

Use human body sensors in toilets to determine if someone turns on the lights and no one turns off the lights

Although it was said before that it is best to use human presence sensors in toilets, my guest toilet is still using human body sensors because the usage rate is not high🤣

So in order to avoid turning off the lights when squatting on the toilet as much as possible, I made a more complicated setting. The effect is okay (it is less likely that the lights will be turned off when squatting on the toilet), but it is not perfect yet. If friends have more Please feel free to give me advice on good practices!

Trigger (Trigger, in the HA Chinese interface is written "when...")

For the first Trigger trigger type, select "Entity > State", and then select your human sensor.

For the second Trigger, select "Device" as the trigger type, and select the switch or light bulb that controls the light. Here, set "on" and "last for 2 minutes". This is to start the automation to check the current situation when the light has been on for 2 minutes. Is there anyone else in the space?

廁所人體傳感器 Trigger 觸發設定

Action (Action, in the HA Chinese interface is written "then execute")

For the action type, select "Component > Selection":

  1. Turn on the light when the first setting is "human sensor occupation is on (triggered)"
  2. The second setting is to turn off the light when "occupancy of the human presence sensor is off (safe)" and "the light has been on for 2 minutes"

☝️The setting "Lights have been on for 2 minutes" is the key to avoid having the lights turned off while squatting in the toilet!

廁所人體傳感器 Action 動作設定

So the above is the sharing of using human body sensor and human presence sensor to automatically turn on and off the lights! Hope this helps everyone! If you have any questions or communication, please leave a message to me!

14 COMMENTS

  1. Hi Neil
    Is the JOSE Matter human presence sensor connected to HA through the Z2M gateway? Or through other gateways?
    I would like to ask if the Z2M gateway is installed on a Raspberry Pi and placed next to the dining table. Is the signal coverage sufficient, especially on the balcony and bathroom? Is it necessary to install more than two Z2M gateways?

    • Hi Ben Ben,
      1. JOSE Matter human presence sensor directly connects to HA through Matter without going through a gateway
      2. Regarding Z2M gateway configuration: Zigbee itself has mesh topology characteristics. Most Zigbee devices that are always powered on (plugged in) can be Routers (signal relays) in the Zigbee network, so if most of your homes use For Zigbee devices, you don’t have to worry about gateway coverage. In most cases, one is enough, unless your home is so big that there are too many devices for one gateway to handle.

      • Hi Neil
        1. I would like to ask for further advice. I searched online and found that Matter is not a wireless communication protocol and still requires the use of wireless hardware technology. Therefore, the JOSE Matter human presence sensor directly connects to the HA through Matter. It should still need to pass through Wifi, Zigbee or Thread wireless communication protocol, I guess it uses Wifi.
        2. I saw your video and wanted to install something in vain. Is it necessary to set up a UniFi family bucket? This equipment is also quite expensive.
        Thank you very much Neil for his systematic organization and selfless response. It is really the driftwood of the HA system.

      • Hi Ben Ben,
        1. It should be through WiFi, yes, but I don’t have an IT background, so I’m not sure about the technical details.
        2. The WiFi equipment mainly depends on the layout of the home. My house is about 30 square meters with 3 rooms and a rectangular layout. I can cover the whole house with WiFi with just one router (of course it is a mid-to-high-end model at the time). If your house is not particularly big, In fact, you don’t necessarily need UniFi or Mesh WiFi, you can save some money

  2. It’s hard to find the setup and installation instructions for Jose Matter. How do I set it up if I want to directly join HomeKit?

  3. Hello, may I ask if I have a JOSE Matter human presence sensor in the bathroom?
    But when I turn on the heater, there will be misjudgment,
    I don't know if you have any way to avoid it?

    • The heater does cause the sensor to misjudge. The situation at my home is the same. You can try adjusting the sensor detection angle to see if you can avoid the heater.

      • I understand. Then you have to think about it. Because it is installed after the installation, there will be electrical problems.

  4. Hi~ Brother Neil,

    I saw the JOSE Matter human presence sensor in your kitchen from a YouTube video. I would like to ask how big is your kitchen? I can't find the sensing range of this one.
    Thank you~

    • Hi Claire,
      275cm x 368cm, aisle 135×368
      I placed the human presence sensor at the end of the kitchen, and it is 368cm from the door.
      For your reference~

LEAVE A REPLY

Please enter your comment!
Please enter your name here

you might like
recent discussions
  • Jerry 2025/04/14Thank you very much Neil for your selfless sharing. The websites you provided are of great help to me. I will save it first and digest it slowly^^ I also look forward to Neil's industry news and teaching articles in the futureHome Assistant Floor plan A new experience in smart home control with visual floor plan! – Home Assistant step-by-step tutorial EP 6
  • Neil 2025/04/13Hi Jerry, I usually get information about HA from these places: Website: – Home Assistant official Release notes – Automata – Home Automation Community – Weijia Home Intelligence FB Group: – Taiwan Home Assistant enthusiasts exchange – Home Assistant YouTube channel: – Smart Home Solver – Everything Smart Home – Home Assistant Programming language: Strictly speaking, YAML is not really a programming language (let me make this clear in case some people mind 🤣), but if we include these data formats or style languages that “look like” programming languages, and sort them by depth of use in HA (the deeper the bottom, the deeper the bottom): – YAML (data format): a language for configuration files used in many places in the HA environment. – CSS (style language): used to adjust the interface style (font size, color, image, position, etc.). – JSON (data format): If you use Node-RED, you will probably come across it. – Jinja2 (Python template syntax): You may encounter it when you explore automation or Dashboard in depth. ※ But in fact, even if HA does not know the above, it can still make a smart home complete. You don’t have to put so much pressure on yourself, but if you are interested, it is also good to know more. It is actually difficult to generalize about the support of devices. Now, even if the home appliances themselves do not support it, there are still many different ways to connect traditional home appliances to HA. In addition, cases like Haier do require in-depth research. What I usually do is to crawl a lot of information on the Internet, and usually find attempts made by others. It just so happens that when I was looking up other information recently, I saw someone sharing how Haier water heaters were connected to HA. But it is indeed like what you said, if you get involved for a while, you will understand these details more and more. 🤣Home Assistant Floor plan A new experience in smart home control with visual floor plan! – Home Assistant step-by-step tutorial EP 6
  • Jerry 2025/04/10Hello Neil: After observing for 1 or 2 days, everything seems to be normal. Maybe it’s because the system was not stable during the initial setup period!? The more I play, the deeper I feel. I also find that I still have many shortcomings. I wonder if Neil can share and teach everyone how to fish? For example, recommend good websites, forums, FB groups, youtube videos, or give some guidance. In addition to the YAML language, would it be helpful to know some CSS syntax? Do I need to know other languages? I can even start a new teaching direction. When I see non-big-name products that claim to support APP (such as products from mainland China), I can teach everyone how to identify whether they can be connected to HA and how to ask customer service? Where can I see supported articles or platforms? This kind of experience sharing, I think, will be very helpful to everyone. I am currently looking to buy a heat pump water heater from Haier. Haier is a big manufacturer in the world and has its own APP. I have also found Haier's kit from HACS, but it does not seem to support heat pump water heaters. Does that mean it cannot be connected to HA? Or is there any channel to check it? There are also many flat panel lights and fan function lamps on the other side of the strait, which also claim to support APP connection, but they are all small manufacturers and it is difficult to tell whether they can be connected to HA. These are the problems I am facing now. If the home appliances I buy are different from what Neil shared, I don’t know where to start. Maybe I'm still too inexperienced. If I play for a few more months, maybe the above problems won't be a problem anymore, haha^^Home Assistant Floor plan A new experience in smart home control with visual floor plan! – Home Assistant step-by-step tutorial EP 6
  • Neil 2025/04/09Hi Jerry, I tested it myself and it was fine, but please note that because it is controlled through the cloud, there is an extra layer of brand mediation, so it is not suitable for fast switching. I tested it myself and it took about 1 second to complete the synchronization after clicking. Remember to put the entity in entities, otherwise the status display may have problemsHome Assistant Floor plan A new experience in smart home control with visual floor plan! – Home Assistant step-by-step tutorial EP 6
  • Jerry 2025/04/07Thanks Neil for clarifying this. I tested it later and found that when using the "button panel" to control the switch of the Electrolux air conditioner (the same model as Neil), the device will respond to turning on or off in about 1 second, but the "status icon" for turning on is much slower, and it takes about 30 seconds. The "status icon" for turning off is normal, and the "status icons" of other negative ion switches and the "status icons" of the monitoring light switch are also normal, which made me think there was a problem with the synchronization. I'll test it again, maybe it's caused by the wrong setting.Home Assistant Floor plan A new experience in smart home control with visual floor plan! – Home Assistant step-by-step tutorial EP 6
  • Neil 2025/04/07Hi Jerry, 1. This method is through cloud integration, which is actually using HA to call Xiaomi/Electrolux to control the device. 2. It is not normal. If this happens, you may need to check whether the entity you display on the floor plan can truly represent the status of the device. If not, you may need to try other entities of the same device.Home Assistant Floor plan A new experience in smart home control with visual floor plan! – Home Assistant step-by-step tutorial EP 6
  • Jerry 2025/04/07The problem is solved. Thanks again to Neil for his help^^ I have two more questions about concepts. Neil, do I have any misunderstandings? 1. I connected Xiaomi and Electrolux devices to HA through HACS. Is it still connected through WiFi? Before connecting, you need to obtain API key and Access Token from the official. This means that the communication between HA and the device still needs to go through the official. It’s just that the official APP can be replaced and all integrated into the HA APP for control? 2. After testing, when controlling the device through physical operation or the original official APP, the HA app cannot know the status of the device synchronously, but it can know the opposite. Is this normal? For example, the Xiaomi electric fan at home was turned on by someone physically before going out, but when the person is outside, he cannot know through the HA app that the device was forgotten to be turned off. He has to connect to the Xiaomi app to know!?Home Assistant Floor plan A new experience in smart home control with visual floor plan! – Home Assistant step-by-step tutorial EP 6
  • Ghost 2025/04/07Xiaomi Home currently does not support Taiwan. For now, you can only use Xiaomi Miot Auto. As for Xiaomi Cloud Map Extractor, I currently have a 2FA problem. There seems to be no simple solution. I haven’t tried it successfully yet.Home Assistant must-install HACS plug-in installation steps detailed explanation – Home Assistant step-by-step tutorial EP 17
  • Neil 2025/04/07Jerry, it seems that the click action cannot penetrate the part where the picture changes because of the overlapping pictures. Try adding pointer-events: none to the style.Home Assistant Floor plan A new experience in smart home control with visual floor plan! – Home Assistant step-by-step tutorial EP 6
you might like