Hue motion sensor time

Hello all,

I am danny and am enthausiast regarding home assistant.
It’s trial and error but I’ve come a long way thanks to you, the community.

Now I have a question regarding the hue motion sensor.

I only have a raspberry pi with home assistant on it. No mqtt stick or conbee, nothing like that.

Is it possible to temporarily disable my hue motion sensor at a certain time?
I get up very early and when I walk from my bedroom to the bathroom 1 lamp comes on dimmed and sometimes my daughter wakes up from the lamp.

Is it possible to temporarily disable the hue motion sensor between 5am and 05:45am?

If so, how should I implement this? I don’t have a node red.

Thank you in advance for helping and thinking along.

The sensor itself cannot be deactivated but you could set your automation is such a way that it does not trigger between certain hours. Regular automation-gui should be OK for that

I believe you can disable the HUE motion sensor by switching the entity:
switch.motionsensor_“yourname”_motion (e.g. switch.motionsensor_bedroom_motion) to off ?

You probably have set up an automation with the hue sensor triggering the light. Add a condition to that automation to not trigger the light between 5 and 5.45.

Ah Thank you. I will try that.

Follow up question, where should I add that condition.
Should I put it in the configuration.yaml file or somewhere else?

Ok correction,

I did not configure the hue sensor in home assistant. I do see the sensor come by in the integrations but I haven’t done anything with it.
I badly “configured” it in my hue app.

So I should add the sensor in the configuration.yaml file and then add another condition to it? Is this somewhat correct if I understand it correctly?

You don’t need to touch your config.yaml. When you see it in the integrations HA has the hue sensor as entity available so you should be able to create an automation with it. The automation can be set up through settings → automations and scenes.

Create a new automation. As ‘trigger’ use your hue sensor as device type. As ‘condition’ use time and specify before 5 am and after 5.45am. As ‘action’ use the corresponding light as device.

You need another automation if you want the light to turn off when no movement is detected after xxx amount of time.

Thank you for your reply.
I will try this out tonight.

I have tried all kinds of things but it seems that Home Assistant is not saving the automation.

I click on new automation at the bottom right
-start with an empty automation
-name: Hue sensor off
-mode: single(default)
Triggers:
-device
-device = up
-up started with motion detection
-duration: 300
conditions:
-condition type: time
-after: fixed time 5:45 am
-before: fixed time 5:00 am
-weekdays: ma tue wed thu
Actions:
action type: device
-device: top (it is the name of the light bulb)
action: turn off top

Then I click save and nothing happens.

When I go back to automations and scenes the new automation doesn’t appear in the list. I’ve allready reboot Home Assistant, unplugged my Raspberry PI but the new automation won’t show up.

I did this but it won’t work.

I’ve set up as you describe but the sensor still works at that time.

I see that the code is written in the automations.yaml.

I put the automation: !include automations.yaml in the configuration.yaml.

Any ideas?