In this guide
- Every automation is a trigger, conditions and actions
- Choosing the sensor: motion, microwave or door contact
- Timeouts, re-triggering and the "lights went off on me" problem
- Eight worked automations for a Hyderabad home
- Modes and manual override: stopping rules from fighting
- Where the logic runs, and what happens offline
- Seven mistakes that make automations annoying
- How Pert delivers it (designed, not DIY)
- FAQs
This article is part of our wider coverage of home automation in Hyderabad. It builds on two earlier guides: how to design home automation scenes, which covers what a room should look like when a button is pressed, and how a Zigbee mesh network works, which covers how the signals travel. This one covers what sits between them: the rules that decide when things happen without anyone pressing a button.
Every automation is a trigger, conditions and actions
Whatever app or system you use, every automation has the same three parts. Writing them out in this form before anything is programmed is the most useful habit in automation design, because most bad rules turn out to be missing a condition.
| Part | The question it answers | Common types | Example |
|---|---|---|---|
| Trigger | What event starts the rule? | Motion detected; a door opens or closes; a set time; sunrise or sunset (with an offset); a keypad press; a device changing state; the house changing mode | Motion in the passage |
| Conditions | Should it actually run right now? | Time window; before or after sunset; house mode (Home, Night, Away); another device's state; whether someone overrode it manually in the last few minutes | Only between 11pm and 6am, and only in Night mode |
| Actions | What happens, and for how long? | Run a scene; set a light's level and colour temperature; move a curtain; change the mode; send an alert; wait, then do something else | Passage step-lights to 10% warm white; off 90 seconds after the last motion |
Keep the difference between a scene and an automation clear. A scene is a saved set of states: cove at 30%, downlights off, sheers closed. It does nothing until something runs it. An automation decides when to run it. A well-organised system keeps these separate. Scenes are designed once per room, and automations and keypad buttons call them. When you want Relax to be a little brighter, you change it in one place and every button and rule that uses it follows.
A useful test: read the rule out loud as a sentence. "When the passage sees motion, if it is night and the house is in Night mode, then bring the step-lights to 10%, and switch them off 90 seconds after the last motion." If the sentence sounds wrong to the people who live in the house, the rule will feel wrong too.
Choosing the sensor: motion, microwave or door contact
A trigger is only as good as the sensor behind it. Each type detects something different and fails in a different way, so the choice depends on the room, not on which one is newest. Pert's range includes a motion sensor, a microwave sensor and a door sensor, and all of them join the same Zigbee system as the keypads, lighting and curtains.
| Sensor type | What it detects | Where it struggles | Best used for |
|---|---|---|---|
| PIR motion | Movement of warm bodies across its field of view | People sitting still (reading, working, on the toilet); movement straight towards the sensor; can be confused by sun-heated surfaces or a warm air stream in its view | Passages, staircases, foyers, utility and store rooms: spaces people walk through |
| Microwave | Small movements, by reflected radio waves; more sensitive than PIR | Can "see" through thin partitions, glass and doors, so it may react to movement in the next room or a swinging curtain; needs careful sensitivity setting | Bathrooms, walk-in wardrobes and enclosed areas where people make small movements; ceiling or concealed mounting |
| Door / window contact | Open or closed, using a magnet and a switch across the gap | Knows nothing about whether anyone is inside; only as good as its alignment on the frame | Main door, balcony doors, wardrobe doors, bathroom doors; security zones; "left open" alerts |
| Combined logic (contact + motion) | Occupancy: someone went in and the door has not opened since | Needs a slightly more careful rule | Bathrooms and powder rooms, where people are still for long periods behind a closed door |
Placement matters as much as type. For a PIR, mount it so people walk across its view, not straight at it: at the end of a passage, not facing down its length. Keep it out of direct afternoon sun, away from AC outlets blowing into its view, and out of sight lines to the balcony glass. For a microwave sensor, turn the sensitivity down until it stops reacting to the room next door. For a door contact, fix the magnet so the gap stays within its rated distance even when the door settles over a monsoon. Hyderabad's wooden doors swell and shrink, and a contact that was aligned in March can drift by August.
Battery sensors are Zigbee end devices: they sleep, and report events the instant they happen through a nearby mains-powered router. We always place them within easy reach of at least two routers so their messages arrive promptly. The Zigbee mesh guide explains why.
Timeouts, re-triggering and the "lights went off on me" problem
A motion sensor sees motion. It cannot see someone sitting still. So every "switch on when motion" rule also needs an "and switch off when…" part, and that part decides whether the automation is loved or disabled within a month.
Re-triggering timers
The timer should restart with every new motion event, not run from the first one. "Off 90 seconds after the last motion" keeps a passage lit while someone is walking up and down it. "Off 90 seconds after the first motion" plunges them into darkness halfway through a phone call.
Starting timeouts we use
| Space | Typical timeout after last motion | Notes |
|---|---|---|
| Passage or corridor (night path) | 60–120 seconds | Low level at night; don't touch the passage at full brightness during the evening |
| Staircase | 60–90 seconds | Sensors at both ends; see our staircase and corridor guide |
| Utility, store, shoe room | 3–5 minutes | People stand still while loading a washing machine or searching a shelf |
| Walk-in wardrobe | 5–10 minutes, or tied to the door | Door contact plus timeout works better than motion alone |
| Bathroom | Held while the door is closed; 5–10 minutes otherwise | Use the door-plus-motion occupancy rule below |
The bathroom occupancy rule
A bathroom is where motion-only rules fail most. The fix combines a door contact with a motion or microwave sensor. If the door closes and motion is seen after it closed, someone is inside, and the lights stay on until the door opens again, however still they are. If the door closes and no motion follows within 30 seconds or so, they left, and the lights go off. It is a rule a manufacturer's app rarely offers, and it is the one that stops the complaint.
Warn before you switch off
Before a timeout switches a light off, dim it to about 30% for 15–20 seconds. Someone still in the room waves or moves, the timer restarts, and the light comes back up. That is far less irritating than sudden darkness. It needs a dimmable load on a dimmable channel, one more reason sensor rules and the lighting design have to be planned together.
Occupancy vs vacancy
An occupancy rule switches on automatically and off automatically. A vacancy rule lets you switch on, with a keypad or scene, and only switches off automatically when the room has been empty for a while. Living rooms, bedrooms and home offices are nearly always better as vacancy rooms. You choose the mood with a scene; the system just makes sure nothing is left burning at 3am. Many homes that "hate motion sensors" actually hate occupancy rules in rooms that should have been vacancy rooms.
Eight worked automations for a Hyderabad home
These are the rules we write most often, in trigger / conditions / actions form. The numbers are starting points that are tuned at handover to the family's routine.
| Automation | Trigger | Conditions | Actions |
|---|---|---|---|
| 1. Night path | Motion in the bedroom passage | Night mode on (set by the Good Night button); between 11pm and 6am | Passage step-lights or cove to 10% at warm 2700K; off 90s after last motion. Never switches on bedroom lights. |
| 2. Bathroom at night | Bathroom door opens, or motion inside | If Night mode: night level; otherwise: day level | Night: mirror and ceiling light at 20% warm. Day: 100% neutral. Held while occupied (door-plus-motion rule). |
| 3. Wardrobe | Wardrobe door contact opens | None | Wardrobe profile lights on; off when the door closes; failsafe off after 10 minutes if the door is left open. |
| 4. Arriving after dark | Main door contact opens | After sunset; house in Home mode; no foyer light already on | Foyer and passage lights to 60%. Does not open curtains or run full scenes; the Arrive button on the keypad does that. |
| 5. Balcony door left open | Balcony door contact open for more than 5 minutes | Between April and June, or whenever the AC in that room is on | Send an alert to the family's phones: "Living balcony door open, AC on." Optionally flash the balcony light once. |
| 6. West-facing afternoon | Time: 2:30pm | Home mode; not in a Movie scene; March to June | Close the living room sheers on the west window; reopen at sunset minus 30 minutes so evening light is kept. See motorised curtains. |
| 7. Elderly parent's night safety | Motion in the parent's room | Night mode; after 11pm | Bed-to-bathroom path to 15%. If the bathroom stays occupied for more than 30 minutes at night, alert family members. See home automation for elderly parents. |
| 8. Intrusion while away | Main or balcony door contact opens, or motion in the living room | Away mode on | Security alert to phones; all lights to 100%; living room curtains open. See home security and our away mode guide. |
Notice what the list does not include. There is no "motion in the living room switches the living room on", no "sunrise opens the bedroom curtains every day", and no door contact that disarms security on its own. Each of those looks clever in a demo and becomes a nuisance, or a risk, in a real home. The living room is chosen with a scene. The bedroom curtains open with the Morning button or a weekday-only schedule the family agrees to. Security changes mode only by a deliberate action.
Modes and manual override: stopping rules from fighting
With one or two rules nothing conflicts. With twenty, rules start to overlap. The sunset rule closes the curtains the family has just opened, or the night path lights up the passage in the middle of a dinner party. Three design tools keep a home calm.
1. House modes as the master condition
Define a small set of modes (typically Home, Night, Away and sometimes Guest or Movie) and make them conditions on nearly every rule. Modes change only through deliberate actions: the Good Night button sets Night, the Leave button sets Away, Morning returns to Home. The night path then runs only in Night mode, so it cannot interrupt an evening with guests. The intrusion rule runs only in Away, so it cannot sound when the family is home.
2. Manual always wins
If someone presses a keypad button in a room, automations for that room should step back for a while: 30 minutes, or until the next mode change. The sunset rule should not re-close curtains someone opened five minutes ago. The rule we write is simple: "if this room was controlled manually in the last 30 minutes, skip." It is the difference between a house that helps and one that argues back.
3. One owner per load
Every light circuit or curtain should have one rule that "owns" its automatic behaviour, with keypads and scenes as the only other controls. When two rules can both switch the same load, sooner or later they will be triggered together in the wrong order. On paper, we draw a simple matrix of loads against rules before programming. Any load with two automatic owners gets redesigned.
Finally, avoid loops: a rule whose action is another rule's trigger ("curtain closed turns lights on" plus "lights on closes curtain"). They are easy to create by accident with many small rules, and they are why automation design should be done centrally rather than added one device at a time.
Where the logic runs, and what happens offline
An automation has to be evaluated somewhere: something has to hear the sensor, check the conditions and send the actions. That can happen in three places, and it is worth asking any installer which one each rule uses.
| Where the rule runs | Works without internet? | Suits |
|---|---|---|
| On the local gateway / hub | Yes: sensor, gateway and lights all talk over the home's own network | Everyday rules: night path, bathrooms, wardrobes, arrival lighting, timeouts |
| In a cloud service | No: the rule stops if the internet or the service is down | Rules that need outside information or reach outside the home |
| Via a voice assistant's routines | No | Convenience extras such as voice-triggered routines; not safety or everyday lighting |
The principle we design to: anything that affects whether you can see your way to the bathroom at night should not depend on the internet. Notifications to a phone, remote control from outside and voice commands genuinely need a connection, so they are designed as extras on top of local rules rather than as the rules themselves. In a Pert home the keypads, lighting, curtains and sensors work as one Zigbee system through the Pert gateway. We also put the gateway and the routers that sensors depend on on inverter-backed circuits, so the night path keeps working during a summer power cut. Do smart homes work during power cuts and internet outages? goes through each scenario.
Seven mistakes that make automations annoying
- Motion sensors in rooms where people sit still. Living rooms, bedrooms and offices should be vacancy rooms, not occupancy rooms.
- Timers that run from the first motion, not the last. The light goes off while someone is still moving about.
- No time or mode condition. A night path at 10% is lovely at 2am and absurd at 8pm with guests over.
- Full-brightness automatic lights at night. Night levels should be 10–20% and warm; a 100% bathroom at 3am ruins sleep.
- Automations that ignore manual control. A curtain that re-closes itself every time you open it is the fastest way to get a system switched off.
- Security that disarms itself. A door opening should never be the only thing that changes the security mode.
- Sensors placed for looks, not coverage. A PIR facing straight down the corridor, one in the afternoon sun, or one at the edge of the mesh with a single weak link.
How Pert delivers it — a designed solution, not a DIY kit
Sensor automations look simple in an app and are easy to get wrong in a home, because they depend on the room, the family's routine, the lighting channels and the network all at once. On every project our team walks through the family's day and night routines before choosing sensors. We decide room by room between occupancy, vacancy and keypad-only control. We mark each sensor's position and view on the drawings, clear of sun, AC outlets and glass, and within easy reach of the mesh. We write each rule in trigger / conditions / actions form with its timeout and mode conditions, and check the load-versus-rule matrix so nothing has two owners. We keep everyday rules working locally through the gateway. At handover we test each rule at night as well as by day, then tune timeouts and levels over the first few weeks as the family lives with them. When you add a room or change a routine later, we adjust the rules rather than leaving you to stack new ones on top. That is what separates a designed system from a kit.
If you are comparing who should design and install yours, best home automation companies in Hyderabad sets out what to ask, including how they write, test and hand over automations.
Want a Hyderabad home that responds to you without getting in your way? We will map your routines, choose the right sensor for each room and write automations that work quietly for years, alongside your keypads, lighting, curtains and security. Request a consultation →
Frequently asked questions
What is the difference between a scene and an automation?
A scene is a saved set of states, for example cove at 30%, downlights off and sheers closed. It does nothing until something runs it. An automation is a rule that decides when something happens: a trigger (a sensor event, a time, sunset or a keypad press), optional conditions (only after 11pm, only in Home mode) and actions (run a scene, set a light, move a curtain, send an alert). Scenes define how a room looks; automations decide when to apply them.
Why do motion-sensor lights switch off while I am still in the room?
Usually because a PIR motion sensor was used where people sit still. PIR detects moving heat, so someone reading or on the toilet becomes invisible after a minute or two and the timeout switches the light off. The fixes: use motion sensing mainly in transit spaces; combine a door contact with motion in bathrooms so the room counts as occupied while the door is closed; restart the timer on every motion; dim as a warning before switching off; and make living rooms and bedrooms vacancy rooms controlled by keypads and scenes.
Do sensor automations work without the internet?
They should, and it is worth asking where each rule runs. When everyday rules run on the local gateway, they keep working when the internet is down, because the sensor, the gateway and the lights talk over the home's own Zigbee network. Push notifications, remote control from outside and voice-assistant commands genuinely need the internet, so they are designed as extras on top of local rules, not as the thing the rules depend on.
Which rooms should have motion sensors in a Hyderabad apartment?
Transit and utility spaces benefit most: the passage, the staircase in a duplex, utility and store rooms, the walk-in wardrobe, the foyer and bathrooms (with a door sensor). Living rooms, bedrooms and home offices are usually better controlled by keypads and scenes, with sensors only switching things off after a long empty period or running a gentle night path. Door and window contacts belong on the main door, balcony doors and wardrobe doors.
