In some cases when your lights turn ON your ambient light sensor is affected increasing its LUX value. This can cause the lights to go OFF prematurely. You now have the option to set the âAmbient Light Sensor - Site Conditionsâ.
YES - My Ambient Light Sensor is affected by the Lights
NO - My Ambient Light Sensor is not affected by the Lights
I was drunk when i was doing thisâ:joy:. Now i have to drink again to get into the modeâ:rofl:. My physical switch is a toggle if thats the correct way to name it? I can easily remove the spring behind the button then i have a on and off but then i will lose the possibility of dimming which is used very frequently. But how about using a cheap smart switch behind a wall switch ( a different wall switch) and then make the new smart switch as a trigger to the lights without dimming option and also use it as the by pass switch. Or does it have to be physically connected to the lights?
In other words the new smart switch will be used in an automation to trigger the lights on and offđ. I hope this makes sense and not just a hungover brainđ”âđ«đ”âđ«
First go into developer tools / states / select the entity you are using. Then look at the state see if it goes ON and OFF when you toggle it.
If you use the same switch for the light and the by-pass it will only work when the light is ON (switch is ON) and you must manually turn it on before the automation does. So if your switch is connected to the lights and you have it selected in the by-pass and you manually turn on the light with the switch the light will remain ON until you turn the light OFF. The by-pass will not work if you would like to keep the lights OFF. This is why it says next to the by-pass selection that the switch must not be included in the lights selection.
So if you would like a by-pass for ON and OFF you will have to have a separate independent switch for your by-pass or you can create a helper in HA and you will have to use the HA to turn the by-pass ON and OFF.
If you would like to have a by-pass that will only ever keep the light ON then you can use the same switch in the by-pass selection, but remember you must turn the light ON before the automation turns the lights on, or you will have to turn the light OFF manually and then turn the light back ON manually.
First in order for HA to know your computer is ON or OFF. The best way I have found is to have a smart plug that will measure your power in watts. Then plug your computer into the smart plug. Add the smart plug to HA devices.
Then you will have to create a switch that has a ON and OFF state when your computer turns ON and OFF. To do this you will need to add this into your âconfiguration.yamlâ file
binary_sensor:
- platform: template
sensors:
computer:
friendly_name: "my computer"
device_class: power
icon_template: mdi:laptop
value_template: >-
{% if states('sensor.your_computer_power_sensor_here')|float < 85 %}
on
{% else %}
off
{% endif %}
Now you will need to add this binary sensor into the by-pass selection.
So now when your computer is OFF the binary sensor will be ON and thus the by-pass will be ON deactivating the motion sensor. When you turn your computer ON the by-pass will be OFF and the motion will be active.
Some Notes:
This part in the code; âsensor.your_computer_power_sensor_hereâ you will need to change to suit your power (smart plug watts) entity ID. They normally read watts so the â85â will need to be adjusted to your computer watts. Example if your computer watts when ON reads 100W and OFF reads 5W then 85 will be ok. But just adjust that works best for you.
so the Helper works flawlessly. I was wondering if one could use on of those ikea Zigbee buttons like the coffee maker button. Seeing that the helper works I thought the Ikea button could workđ.
I really thank you for the time you put into our commentsđ
@fakorte Can you please confirm if you are just using only scenes? (no individual light selection) If so I will do a FAQ for this on how to resolve it.
If youâve only selected scenes or script in the Lights - Switches - Scenes - Scripts or Night Lights sections, please continue reading. If youâve chosen an entity in these sections, the automation should work as expected.
Sometimes, when setting the Ambient Light Sensor - Site Conditions to YES, the lights may not stay on, giving the impression that this option isnât functioning. This issue often occurs when no entity has been selected in the âLights - Switches - Scenesâ or âNight Lightsâ sections.
To resolve this, ensure you add a toggle helper to the Scenes & Scripts - Toggle Helper section. This will help ensure the smooth operation of the automation.
Below is where you should add the toggle helper to ensure smooth operation of the automation:
Is it possible to adapt this for check to see if known people are at home?
I have pets and theyâre forever triggering these types of things, so I need a way to stop this from running if no-one is at home. I have the zone.home to check against as well as a person group.
@fakorte So close It canât be a device. It must be a entity with a ON / OFF state. This is what we are looking for. Drill into the device and just add the entity your turning ON and OFF or just select a separate light or switch.