Hi
I want to turn a lamp on when somebody walks in the room. I was thinking about getting Phillips Hue Motion Sensor however didn’t want to get a Phillips Hue Bridge since isn’t that what HA does??
I have a couple of Wemo switches and Sonoff, did not want to have another flavour of technology.
Thoughts?
The Hue sensors will work with deconz, as will many other flavours of Zigbee sensors. The downside is that many aren’t controllable, so you can’t tune their sensitivity, or on time, or anything else.
Alternatively have a look at Z-Wave sensors.
Whatever you do, I’d suggest getting a multi-sensor that reports motion and light levels so you only turn on the light when needed.
I think it is possible to tune the duration of motion sensors
To use the Philips Hue Motion sensors, you would need either a Hue Bridge (which you’ve said you don’t want), or a zigbee interface (like the Conbee). I have these throughout my home for motion-activated lights and I do like them, and would recommend them.
You’ve said that you don’t want to invest in another flavour of technology, so perhaps you don’t want to go down the zigbee path (the technology used by Philips Hue). The zigbee integration in HA is still very new. Having said that, Deconz works very well with Philips Hue.
Regardless, if you do consider these, here’s what I think of them:
- They’re well-built and compact (I’ve even used them outdoors, under an eaves, successfully)
- They use inexpensive AAA batteries, which last a long time.
- Are easily repositioned because of their magnetic mounts
- They react quickly (very quick with the Conbee - under a second, slightly less quick using a Hue Bridge)
- And have light and temperature sensors built-in
I migrated from SmartThings, and these Hue Motion sensors are some of the few devices that made the transition to HA successfully and have been rock-solid. The downside is that they do rely on another technology, so you’ll have to decide whether it’s worth it to you.
I use Aeotec z-wave sensors. The are multisensors with: Motion, temperature, humidity and light level (lux). They have been working very well for over a year. What I like about having everything in one sensor is that for each room I can have an automated motion based light triggered on both the sunset and the light level in that room. ie: the light will turn on with motion either at night or if it is too dark in the room (blinds closed / lots of cloud cover).
Can you give an example automation?
kitchen_light_auto_on.yaml
alias: Kitchen light auto ON motion
initial_state: 'on'
trigger:
- platform: state
entity_id: binary_sensor.kitchen_multi_sensor_sensor
to: 'on'
condition:
condition: or
conditions:
- condition: sun
after: sunset
after_offset: '-00:10:00'
- condition: sun
before: sunrise
before_offset: '-01:00:00'
- condition: template
value_template: '{{ states.sensor.kitchen_multi_sensor_luminance.state | int < 10 }}'
action:
service: light.turn_on
data_template:
entity_id: light.kitchen_light_level
brightness: >
{%- if now().strftime('%H')| int >= 21 %}
25
{%- elif now().strftime('%H')| int < 5 %}
25
{%- elif now().strftime('%H')| int >= 5 %}
255
{%- endif %}
kitchen_light_auto_off.yaml
alias: Kitchen light OFF after 2mins
initial_state: 'on'
trigger:
- platform: state
entity_id: binary_sensor.kitchen_multi_sensor_sensor
to: 'off'
for:
minutes: 2
action:
- service: homeassistant.turn_off
entity_id: light.kitchen_light_level
I use Xiaomi buttons to control my lights. In the kitchen I have the following modes selected by the switch: Auto (as per above), ON and OFF. I I select ON, then the above automations are disabled and the light is turned on, likewise if OFF mode is selected but the the light is obviously turned off in this case. It works really well so I have used the same principle in other rooms as well.
kitchen_remote_button_1.yaml
alias: Kitchen Remote Button 1
initial_state: 'on'
trigger:
- platform: event
event_type: click
event_data:
entity_id: binary_sensor.switch_158d0002241b37
click_type: single
- platform: event
event_type: click
event_data:
entity_id: binary_sensor.switch_158d0002241b37
click_type: double
- platform: event
event_type: click
event_data:
entity_id: binary_sensor.switch_158d0002241b37
click_type: long_click_press
action:
- service: script.toggle_to_max
data_template:
entity_id: '{% if trigger.event.data.click_type == "single" %} light.kitchen_light_level {% endif %}'
- service: automation.turn_off
data_template:
entity_id: '{% if trigger.event.data.click_type == "single" %} automation.kitchen_light_auto_on_motion {% endif %}'
- service: automation.turn_off
data_template:
entity_id: '{% if trigger.event.data.click_type == "single" %} automation.kitchen_light_off_after_2mins {% endif %}'
- service: light.turn_off
data_template:
entity_id: '{% if trigger.event.data.click_type == "double" %} light.kitchen_light_level {% endif %}'
- service: automation.turn_off
data_template:
entity_id: '{% if trigger.event.data.click_type == "double" %} automation.kitchen_light_auto_on_motion {% endif %}'
- service: automation.turn_off
data_template:
entity_id: '{% if trigger.event.data.click_type == "double" %} automation.kitchen_light_off_after_2mins {% endif %}'
light.kitchen_light_level {% endif %}'
- service: automation.turn_on
data_template:
entity_id: '{% if trigger.event.data.click_type == "long_click_press" %} automation.kitchen_light_auto_on_motion {% endif %}'
- service: automation.turn_on
data_template:
entity_id: '{% if trigger.event.data.click_type == "long_click_press" %} automation.kitchen_light_off_after_2mins {% endif %}'
Thanks, I do similar, using EcoLink PIR but without the light level.
If auto-on due to PIR then it will auto-off after 5 minutes of no motion.
If manual on (by switch, another automation, or Alexa); then it stays on until bedtime or nobody home mode is triggered; or a manual off.
I like your automation though and might use it to clean up my logic.
I’m actually planning to move my action logic into scripts so that the modes can be called by voice.