Turn Light When Motion Detected
My walk-in closet is a little bit dark even in the daytime. To automatically become bright when I walk in, I use a Philips Hue Go and a motion sensor, and create an automation in Home Assistant with
- Name: Closet Light
- Description: Turn on light when motion detected
- Triggers
- Type: State
- Entity: select the motion sensor, which is a binary sensor
- From: off
- To: on
- Conditions
- Type: Time
- After: 8:00:00
- Before: 22:00:00
- Actions
- Type: Device
- Device: select the Philips Hue Go
- Action: Turn on
- Brightness: 50 (a value between 0 and 255; 255 means the brightest level)
In the above automation, I (optionally) set a time condition so that the automation is only enabled during the specified period.
Now, once motion is detected, the Philips Hue Go will turn on. To turn it off when motion is no longer detected, I create another automation with From set to on and To set to off in the Triggers, and Action changed to Turn off.
Turn Off Air Conditioner According to Temperature
I often feel cold in the midmight and need to wake up to turn off my dumb air conditioner manually. This has negative impact on my sleep quality. With a universal remote and a temperature sensor placed in the master room, I am able to automatically turn off the air conditioner when the room temperature is below certain threshold, again by creating an automation in Home Assistant.
- Name: Turn off Aircon at Midnight
- Description: Turn off air conditioner in the master room when temperature is below 26.5C
- Triggers
- Type: Numeric state
- Entity: select the temperature sensor
- Below: 26.5
- Conditions
- Type: Time -> Fixed time
- After: 00:00:00
- Before: 08:00:00
- Actions
- Type: Call service
- Service: switch.turn_off
- Targets: select the switch of the air conditioner
The time condition is make sure that the automation is only activated during the specified period.