Homey Pro Philips hue motion sensor and switch

Hi,

Hi all,

I have a hue motion sensor and a hue light switch v3, is there a way I can tell the lights to turn off after 5 mins if no motion detected as long as the lights turning on was not initiated from the switch, if activated from switch leave lights on…. Ty.

I’ve tried but nothing works, do I need new switches that can report back they are in the off or on state?

1 Like

This should get you started

Interesting flow. I think my wife will appreciate it if I finally get this working properly.

–Edit
Great inspiration: I’ve recreated the flow with mostly “standard” Athom components right now. The only additional app I’m using is sun events (hopefully with the right offsets).

Below the Athom JSON, save as any_name_you_like.homeyadvflow and import it in flows while pressing ALT

{"type":"advanced","name":"Hal boven","cards":{"62866e27-96a7-4941-b75c-4d76c4b5d482":{"ownerUri":"homey:zone:cbad1fb0-2abc-4237-8966-6cceff057af0","id":"homey:zone:cbad1fb0-2abc-4237-8966-6cceff057af0:active","type":"trigger","x":40,"y":100,"outputSuccess":["976b680b-722e-477c-8188-6fa494ecd5cb"]},"63d66c27-f5e2-4720-8f13-f88045e7da81":{"ownerUri":"homey:device:5fdf3ad2-0ad9-4d84-800b-1ad901a3887f","id":"homey:device:5fdf3ad2-0ad9-4d84-800b-1ad901a3887f:on","type":"condition","x":580,"y":160,"outputTrue":["fa6a6808-e36a-4f49-b306-06fd82e70633"],"inverted":true},"49d971d1-9b56-4b64-86f2-dc722d7741a2":{"ownerUri":"homey:app:com.cyclone-software.sunevents","id":"homey:app:com.cyclone-software.sunevents:cond_sun_event_between","args":{"eventA":{"name":"Zonsopgang","id":"sunrise"},"offsetA":30,"eventB":{"name":"Zonsondergang","id":"sunset"},"offsetB":-30},"type":"condition","x":1860,"y":140,"outputFalse":["789573de-6782-4e14-82ce-b7302f5b8e04"],"outputTrue":["90107192-ad4f-486d-96a9-e95217581c6c"]},"e5c51128-81f3-49ae-a73d-32c5ce547016":{"ownerUri":"homey:device:5fdf3ad2-0ad9-4d84-800b-1ad901a3887f","id":"homey:device:5fdf3ad2-0ad9-4d84-800b-1ad901a3887f:on","type":"action","x":1460,"y":160,"outputSuccess":["49d971d1-9b56-4b64-86f2-dc722d7741a2"]},"738a6eba-0801-4181-b0a7-67a20139d4c4":{"ownerUri":"homey:device:a092a151-1392-45f3-9da1-605c9b339b67","id":"homey:device:a092a151-1392-45f3-9da1-605c9b339b67:dimmerswitch_button_pressed","type":"trigger","x":40,"y":300,"outputSuccess":["976b680b-722e-477c-8188-6fa494ecd5cb","8a075d73-e13f-4b7e-b956-5560ea2aadf1"],"args":{"button":"on"}},"976b680b-722e-477c-8188-6fa494ecd5cb":{"type":"any","x":440,"y":160,"outputSuccess":["63d66c27-f5e2-4720-8f13-f88045e7da81"]},"8a075d73-e13f-4b7e-b956-5560ea2aadf1":{"ownerUri":"homey:manager:logic","id":"homey:manager:logic:variable_set_boolean","args":{"variable":{"id":"8f8f9947-9d10-420a-b430-287f61e9d082","name":"HalBovenManual"},"value":true},"type":"action","x":500,"y":300},"c19aacb4-e72b-4481-b57f-d3f88bc52633":{"ownerUri":"homey:zone:cbad1fb0-2abc-4237-8966-6cceff057af0","id":"homey:zone:cbad1fb0-2abc-4237-8966-6cceff057af0:inactive_for","type":"trigger","x":40,"y":460,"outputSuccess":["6bdd3e75-dfb8-4724-a639-b97195f4545f"],"args":{"minutes":1}},"a278c4f5-9e07-4865-9e2d-61d23e4fd938":{"ownerUri":"homey:device:5fdf3ad2-0ad9-4d84-800b-1ad901a3887f","id":"homey:device:5fdf3ad2-0ad9-4d84-800b-1ad901a3887f:on","type":"condition","x":920,"y":460,"outputTrue":["9573020d-ef4d-4226-a0e1-0d1f10bf6015"]},"6bdd3e75-dfb8-4724-a639-b97195f4545f":{"ownerUri":"homey:manager:logic","id":"homey:manager:logic:equal_boolean","droptoken":"homey:manager:logic|8f8f9947-9d10-420a-b430-287f61e9d082","type":"condition","x":500,"y":460,"outputFalse":["a278c4f5-9e07-4865-9e2d-61d23e4fd938"]},"9573020d-ef4d-4226-a0e1-0d1f10bf6015":{"ownerUri":"homey:device:5fdf3ad2-0ad9-4d84-800b-1ad901a3887f","id":"homey:device:5fdf3ad2-0ad9-4d84-800b-1ad901a3887f:off","type":"action","x":1340,"y":600},"b5a25f9e-c3da-4b5c-885c-5f1922aad65f":{"ownerUri":"homey:device:a092a151-1392-45f3-9da1-605c9b339b67","id":"homey:device:a092a151-1392-45f3-9da1-605c9b339b67:dimmerswitch_button_pressed","type":"trigger","x":40,"y":600,"outputSuccess":["d339db39-63b5-4d0a-9f4e-a998f09919fe"],"args":{"button":"off"}},"d339db39-63b5-4d0a-9f4e-a998f09919fe":{"ownerUri":"homey:manager:logic","id":"homey:manager:logic:variable_set_boolean","args":{"variable":{"id":"8f8f9947-9d10-420a-b430-287f61e9d082","name":"HalBovenManual"},"value":false},"type":"action","x":500,"y":600,"outputSuccess":["9573020d-ef4d-4226-a0e1-0d1f10bf6015"]},"789573de-6782-4e14-82ce-b7302f5b8e04":{"ownerUri":"homey:device:5fdf3ad2-0ad9-4d84-800b-1ad901a3887f","id":"homey:device:5fdf3ad2-0ad9-4d84-800b-1ad901a3887f:dim","args":{"dim":0.5},"type":"action","x":2280,"y":220},"90107192-ad4f-486d-96a9-e95217581c6c":{"ownerUri":"homey:device:5fdf3ad2-0ad9-4d84-800b-1ad901a3887f","id":"homey:device:5fdf3ad2-0ad9-4d84-800b-1ad901a3887f:dim","args":{"dim":1},"type":"action","x":2280,"y":120},"b47021ca-0ee7-48c4-993b-b3e5b04d5e06":{"ownerUri":"homey:device:a092a151-1392-45f3-9da1-605c9b339b67","id":"homey:device:a092a151-1392-45f3-9da1-605c9b339b67:dimmerswitch_button_pressed","type":"trigger","x":40,"y":760,"outputSuccess":["9cb0e0c5-12b1-4bfd-af92-512ca7386fee"],"args":{"button":"increase_brightness"}},"9cb0e0c5-12b1-4bfd-af92-512ca7386fee":{"ownerUri":"homey:manager:logic","id":"homey:manager:logic:equal_boolean","droptoken":"homey:manager:logic|8f8f9947-9d10-420a-b430-287f61e9d082","type":"condition","x":500,"y":780,"outputFalse":[],"outputTrue":["5536bcd2-2823-44c5-828d-78fdcabd97e3"]},"7e5de831-a85f-4cf0-ba06-6f41160a619d":{"ownerUri":"homey:device:a092a151-1392-45f3-9da1-605c9b339b67","id":"homey:device:a092a151-1392-45f3-9da1-605c9b339b67:dimmerswitch_button_pressed","type":"trigger","x":40,"y":920,"outputSuccess":["47c157b6-b05b-43e4-b784-12e21ca9f2df"],"args":{"button":"decrease_brightness"}},"5536bcd2-2823-44c5-828d-78fdcabd97e3":{"ownerUri":"homey:device:5fdf3ad2-0ad9-4d84-800b-1ad901a3887f","id":"homey:device:5fdf3ad2-0ad9-4d84-800b-1ad901a3887f:dim_relative","type":"action","x":960,"y":780,"args":{"dim":0.1}},"47c157b6-b05b-43e4-b784-12e21ca9f2df":{"ownerUri":"homey:manager:logic","id":"homey:manager:logic:equal_boolean","droptoken":"homey:manager:logic|8f8f9947-9d10-420a-b430-287f61e9d082","type":"condition","x":500,"y":940,"outputFalse":[],"outputTrue":["33cce59c-c425-4738-b2f9-10fbec70b034"]},"33cce59c-c425-4738-b2f9-10fbec70b034":{"ownerUri":"homey:device:5fdf3ad2-0ad9-4d84-800b-1ad901a3887f","id":"homey:device:5fdf3ad2-0ad9-4d84-800b-1ad901a3887f:dim_relative","type":"action","x":960,"y":920,"args":{"dim":-0.1}},"fa6a6808-e36a-4f49-b306-06fd82e70633":{"ownerUri":"homey:manager:logic","id":"homey:manager:logic:gt","droptoken":"homey:device:1a6c289c-7581-4ea2-bab8-e39d74ed7112|measure_luminance","args":{"comparator":50},"type":"condition","x":1000,"y":160,"outputFalse":["e5c51128-81f3-49ae-a73d-32c5ce547016"]}}}

Edit: Altered the relative to negative for lowering brightness in JSON (Thanks @Peter_Kawa)

any_name_you_like.homeyadvflow.json

.


Set relative dim level to -10% to lower the dim level

That would have been better (for most users), but homey uses those two extensions:

Thanks for spotting the wrong relative dim. Probably a mistake after creating, duplicating and replacing a card. Might not be the right way for me to create flows.