Switch to turn on light and disable motion sensor

Hi

I have motion activated lights throughout my house and I would like to create a switch that turns on the kitchen light and disables the kitchen motion sensor.

My motion sensor actions are set up outside of Home Assistant in a separate Hue app.

I feel like it should be easy. All I want is toggle switch that turns on the kitchen light and simultaneously disables the motion sensor. When the switch is toggled back it turns off the light and turns the motion sensor back on. The individual actions are simple but combining the 2 seems really difficult.

The potential solutions I have found seem to need an amendment to the motion sensor automation but I don’t have a motion sensor automation in HA because they are dealt with by the Hue app.

Cheers
Dan

It would probably help people if you could share the code for how you’d accomplish either of those actions. Also, how you would trigger an automation with your switch. With those specifics of your system in code, it should be relatively easy to help you create the automation you want.

If you don’t have the ability to control the Hue motion sensor automation from home assistant then what you want is not possible. Consider moving the automations to home assistant.

If you do have the possibility of disabling and enabling the Hue automations from home assistant then it should be easy enough to create a template switch to do what you want.

I have a Hue hub connected to my test HA system. From what I see, even if the motion sensor is installed via the Hue hub, the sensor should have a switch available in HA that can turn the motion sensor on and off.

If the Hue motion sensor is turned off via HA the Hue automation doesn’t execute.

HA Template Switch Actions

  • Turn ON -turns off the motion sensor and turns on the designated light.
  • Turn OFF -turns on the motion sensor and turns off the designated light.

Are you truly using a Hue automation for this or are you referring to a Hue Zone?

Test Switch

This is exactly what i am looking for? I think may be I have over complicated it with my explanation. I have a motion sensor in my kitchen that controls my kitchen lights. If i press a switch I want it to disable the motion sensor and turn on the light so the light stays on until I hit the switch again to turn off the light and re-enable the motion sensor. How do I set that up please?

this helped me figure it out by steering me to the templates section. It feels a bit disingenuous to say I figured it out. You gave me a massive clue and I did a bit of trial and error. It’s working and i got what I wanted and I couldn’t have done it without you, cheers :+1:

1 Like