Yep, I do it for my bathroom humidity automation using option 1 but you can use any option that works for you. The power of the bypass is normally overlooked.
Blacky
Yep, I do it for my bathroom humidity automation using option 1 but you can use any option that works for you. The power of the bypass is normally overlooked.
Blacky
Technical answer
The time delay is never ignored but if you put 0 then it moves to the next step instantly. The next step it to turn OFF everything. You will find something else is the delay of 20 seconds if you set it to 0.
Blacky
It will switch on and instantly switch off again. Weird thing is that this does not happen all the time. I do see from the traces that the automation is telling the light to switch off immediately.
Thank you for your answer, but I am not sure if I understand correctly.
So thereās no way to turn off the light immediately? Itās not network related in my case: turning off the zigbee light manually works without any noticable delay.
Thanks!
When you open the gate, its normal state is ON, which turns the lights ON. When you close the gate, its normal state is OFF, starting the time delay to turn the lights OFF.
The blueprint requires the state to change to ON to turn the light ON and to OFF to turn the light OFF.
Iām not sure what youāre asking it to do differently.
Blacky
The bypass is what you would use. Any of the three options will disable the automation⦠you just need to choose what happens when you turn the bypass ON.
ON = Automation disabled
OFF = Automation enabled
Blacky
The Sun Elevation will work at night⦠that is what it is designed to do. Sun Elevation Falling set point will enable the automation and Sun Elevation Rising will disable the automation.
Blacky
Are you using Ambient option?
Could you share the YAML code for your automation settings? This will allow me to better understand your settings and help troubleshoot the issue.
To do this:
</>
button in the toolbar.This ensures the formatting stays correct and makes it easier to analyze.
Blacky
Hello @Blacky
Hereās the code :
alias:%20Gestion%20lumi%C3%A8re%20de%20la%20SAM%0Adescription%3A%20Lumi%C3%A8re%20SAM%0Ause_blueprint%3A%0A%20%20path%3A%20Blackshome/sensor-light.yaml%0A%20%20input:%0A%20%20%20%20motion_trigger:%0A%20%20%20%20%20%20-%20binary_sensor.presence_sensor_fp2_918e_presence_sam%0A%20%20%20%20light_switch:%0A%20%20%20%20%20%20entity_id:%0A%20%20%20%20%20%20%20%20-%20light.ampoule_1_salle_a_manger%0A%20%20%20%20%20%20%20%20-%20light.ampoule_2_lumiere_salle_a_manger%0A%20%20%20%20%20%20%20%20-%20light.ampoule_3_lumiere_salle_a_manger%0A%20%20%20%20%20%20%20%20-%20light.ampoule_4_lumiere_salle_a_manger%0A%20%20%20%20time_delay:%200%0A%20%20%20%20include_sun:%20sun_disabled%0A%20%20%20%20include_ambient:%20ambient_enabled%0A%20%20%20%20ambient_light_sensor:%20sensor.light_sensor_level_salon%0A%20%20%20%20ambient_light_value:%2040%0A%20%20%20%20ambient_light_high_value:%20140%0A%20%20%20%20include_dynamic_lighting:%20enable_time_controled_colour_brightness%0A%20%20%20%20dynamic_lighting_max_lux:%20100%0A%20%20%20%20dynamic_lighting_max_colour_temp:%205500%0A%20%20%20%20dynamic_lighting_min_colour_temp:%202700%0A%20%20%20%20dynamic_lighting_heartbeat:%200.25%0A%20%20%20%20ambient_light_options:%20ambient_light_option_enabled%0A%20%20%20%20include_light_control:%0A%20%20%20%20%20%20-%20use_brightness%0A%20%20%20%20%20%20-%20use_transition%0A%20%20%20%20include_light_colour_control:%20use_colour_temperature%0A%20%20%20%20include_night_lights:%20night_lights_enabled%0A%20%20%20%20night_lights_after_time:%20%2200:22:00%22%0A%20%20%20%20night_lights_before_time:%20%2200:07:00%22%0A%20%20%20%20night_light_brightness:%201%0A%20%20%20%20include_night_light_colour_control:%20use_colour_temperature%0A%20%20%20%20night_light_colour_temperature:%202500%0A%20%20%20%20include_night_light_control:%0A%20%20%20%20%20%20-%20use_brightness%0A%20%20%20%20%20%20-%20use_transition%0A%20%20%20%20%20%20-%20if_lights_are_on_adjust_when_crossing_over%0A%20%20%20%20%20%20-%20manage_scripts_crossing_over%0A%20%20%20%20night_lights:%0A%20%20%20%20%20%20entity_id:%0A%20%20%20%20%20%20%20%20-%20light.ampoule_1_salle_a_manger%0A%20%20%20%20%20%20%20%20-%20light.ampoule_2_lumiere_salle_a_manger%0A%20%20%20%20%20%20%20%20-%20light.ampoule_3_lumiere_salle_a_manger%0A%20%20%20%20%20%20%20%20-%20light.ampoule_4_lumiere_salle_a_manger%0A%20%20%20%20night_time_delay:%201%0A%20%20%20%20night_lights_conditions:%0A%20%20%20%20%20%20-%20time_enabled%0A%20%20%20%20%20%20-%20entity_state_enabled%0A%20%20%20%20night_lights_entity_state:%0A%20%20%20%20%20%20-%20binary_sensor.do_not_disturb_2%0A%20%20%20%20dynamic_lighting_min_lux:%2040%0A%20%20%20%20dynamic_lighting_min_brightness:%200%0A%20%20%20%20dynamic_lighting_step_value:%204%0A%20%20%20%20sun_elevation:%20-1.5%0A%20%20%20%20dynamic_lighting_lux_sensor:%20sensor.light_sensor_level_salon%0A%20%20%20%20motion_bypass_lights_on:%20%5B%5D%0A%20%20%20%20include_bypass:%20%5B%5D%0A%20%20%20%20motion_bypass_lights_off:%20%5B%5D%0A%20%20%20%20include_time:%20time_disabled%0A%20%20%20%20before_time:%20%2223:59:59%22
I donāt know if itās well formatted ?
Thanks
What is strange is I didnāt change anything. It just stopped workingā¦
That code is not correct / formatted correctly. If that is how you see it then recreate the automation.
It should look something like this.
description: ""
use_blueprint:
path: Blackshome/sensor-light.yaml
input:
light_switch:
entity_id: scene.ik_ben_thuis
motion_trigger:
- schedule.verlichting
end_scenes:
- scene.alle_lampen_uit
include_ambient: ambient_enabled
ambient_light_sensor: sensor.bh1750_illuminance
time_delay: 0
Blacky
Yes, it currently works in that way but it sometimes happens that the gate is kept open and the turn off delay does not start. So my options are to add a feature for different door trigger entities logic (the turn off delay starts at every binary status changes) or to create a binary sensor that simulates 1/0 values from every single door status change. Have you ever handled that?
Iām experimenting with dynamic lighting option 2 (inverted brightness) and using the lux sensor from my personal weather station (pws-2000 Ambient network).
The weather station was reporting lux in watts per sq meter but I changed it to Lux, however in the Ambient dashboard itās showing a history of Lux values ranging from zero to 21,000
I can wait and see, maybe their charting is dumb and going forward the lux values will be more realistic.
But figured Iād comment in case there is a method to use w/m2 instead of lux.
@Blacky , all
I would be happy to get some inspiration
The situation:
Wanted behaviour:
I thought about the bee in the hive sensor, but it seems to me that itās more about the opposite scenario.
I see you would like it to go ON and OFF in X amount of time when the gate is opened or closed.
Thatās easy.
You will need to create a template trigger binary sensor and add it your your configuration.yaml
file.
I am assuming you know how to do this⦠if not look at my bee in the hive blueprint and you will see the step by step guide for adding a template trigger binary sensor⦠click here. It same but different code.
You will need to create a toggle helper and then use it as the trigger
This will be your code and you will need to replace your gate sensor and add the new toggle helper. This is set for 2 min but adjust as required. When you open the gate the new gate toggle helper will turn ON for 2 min and then turn OFF. When you close the gate the new gate toggle helper will turn ON for 2 min and then turn OFF.
- trigger:
- trigger: state
entity_id: input_boolean.your_door_contact_sensor_here
to: "on"
- trigger: state
entity_id: input_boolean.your_door_contact_sensor_here
to: "off"
action:
- action: input_boolean.turn_on
target:
entity_id: input_boolean.gate_toggle_helper_here
- delay: "00:02:00"
- action: input_boolean.turn_off
target:
entity_id: input_boolean.gate_toggle_helper_here
Hope this is what your after and it helps you.
Blacky
If your weather station reports lux in watts per square meter, you can use those values directly since theyāre just numbers. The key is finding a range that works for you. A larger range provides better control⦠for example, a scale of 1000 to 3000 watts offers more precision than 1 to 3 watts
Blacky
I think this would just be a normal out of the box trigger with an ambient condition.
Blacky
@Blacky thanks for your lightspeed response.
I canāt figure out how to incorporate the condition āas long their is motionā. The initial trigger to turn on the lights comes from the frontdoor sensor (āopenā). Then the frontdoor will be closed, but the lights should stay on until there is no motion anymore.
but in the situation that the door isnāt opened at all, a detected motion shall not change the state of the lights.
You will need to group your door sensor and the motion sensor and then use the group as the trigger. How to create a group sensor click here.
Blacky