Hi everyone, this is my first post again after being away for a few years from HA.
I love the new changes and am busy with the blueprints.
Iāve started using Sensor Light and canāt seem to get it to act the way i want it to⦠Hereās my scenario:
I have a light in the bathroom that i want to be turned on by an occupancy sensor in that same bathroom. It should turn on with brightness at 100% and at a color of 6500k.
Between 10pm and 6am i want it to turn on at 10% brightness at a color of 2000k. This is all working perfectly so far. The thing i want to add is a bypassā¦
When i press the light switch in the bathroom (which is detached and functions as a button only) i want the light to go on, regardless of itās current state at maximum brightness and at 6500k. So basically identical to the times when the night light option isnāt activeā¦
At the moment the night light function works. But when i press the bypass button it only turns on the light as defined in night lightā¦
So if i press the button between 10pm and 6am the lights go on at 10% at 2000k. and outside that time window it goes at full brightness 6500kā¦
I want the button to overrule everything and just turn on the light at 6500k max
The components i use are:
Philips Wiz Light
Sonoff SNZB-06P occupancy sensor
Sonoff ZBM5 single gang zigbee switch
Sonoff Zigbee Dongle Max
In sensor light the trigger is the occupancy sensor.
in Light i have the wiz light
Light Control i have āUse Brightnessā set at 100% and āUse color temperatureā set at 6500k
Under Bypass i have option 1 only. Turn the lights on
The Bypass switch is the sonoff switch
I have enabled night light settings: enable night light options, enable time option (10pm for start, 6am for stop)
Under night light i have selected the wiz light again
night light control is Use Brightness set at 1% and color control at 2000k
Yes that is correct, when you switch OFF a bypass (all must be OFF if you have more than one) it will then check the site conditions and turn the light ON if motion is detected.
This blueprint must be triggered by an ON / OFF state. Your state āviolatedā or ānormalā and is a sensor not a binary sensor. Not sure if you can convert your sensors to binary sensors as binary sensors will have an ON / OFF state. Failing that you will need to create the binary sensors or if you have a simple automation (not using all the added features in this blueprint) you could just create an automation that will be triggered on your current states.
Remove your Scenes & Scripts - Toggle Helper, your not using a scene or script. Your using a light.
Remove your Scenes - Scripts To Turn OFF, your not using a scene or script. Your using a light.
Disable Sun Elevation or Dynamic Lighting as your have conflicts to when the light can turn ON in your sun elevation. Your dynamic lighting min deg is 15 and sun elevation is -1.5.
I would need your YAML of your settings to confirm this but my bet is you have enabled night glow option and that will turn the light ON when night lights is active.
You must have a input in **Lights - Switches - Scenes - Scripts **. If you just want one option then add you light into **Lights - Switches - Scenes - Scripts **. Disable night lights and use your night time entity in State Control. Then it will work.
With 50% ādim before offā percentage and your actual light % is 80% then it should dime to 40% and go back to 80%. I just tested this set up and it works on V8.5.
You could have the day at 100% and then make night lights do your 100% + night glow of 75%⦠then when you would like your 1% night glow you will need another automation using this blueprint Smart Light - Entity - Sun Elevation - Ambient & Time Triggers. Trigger it to come on at 1% for the time period (both blueprint automation must be set up so there are no conflicts for this period) and then in night lights use your motion sensor as the state option and in night light control make sure you select Use cross over time delay from night lights to normal lights and If lights are ON, adjust the lights when crossing over.
First I would try disabling dynamic lighting and see if that helps. If that is okay then enable dynamic lighting but you have a 1% brightness level for DL - Min Brightness Value and some lights donāt like that low so maybe increase it to higher value. In dynamic lighting you also have a Dead Zone of 0 and I would recommend something in there like the default of 7. Also so a step value of 1% should be increased, try the default of 4.
Yep Home Assistant made this change in a update, it been reported to them but I donāt think they care about it. It still works you just have the red error message.
Yes that is correct if night lights is enabled and active and you turn the bypass ON it will apply your night light settings.
What you could try and do is keep the bypass as is in this blueprint automation but create another custom automation so when you turn ON the bypass it sets the light to 100% - 6500K. Then the blueprint will turn it OFF for you.
Because HA changed things again you canāt just paste it into the input so to do this now copy your input helper entity ID, go into your automation, make sure you enter in a any trigger, then top right 3 dots, select Edit in YAML, then look for this in your settings (see below code), you will have something different to input_boolean.testing_motion_sensor but replace this with your entity ID of your input_boolean. Save and your done.
Hey trying to setup the Garage Auto Off template. but i think the problem i have is the entity is set as Open/Closed instead of on/off. How to i convert it to on/off or whatever i need to get the automation to trigger. I have a plan to use the garage door open/closed sensor, a door sensor, and camera person detection. iām not sure yet how im going to make it work. i put a motion sensor in and its not quite responding or reading well enough for what i want.
template:
- trigger:
- trigger: state
entity_id: cover.door_1
to: "open"
binary_sensor:
- name: "Garage Door Auto Off"
device_class: garage_door
icon: mdi:garage-open-variant
auto_off:
minutes: 5
state: "true"
Iām using this blueprint with for about 1 year and itās a very nice blueprint! Works like a charm.
But Iāve one question: iām controlling Philips Hue with this blueprint (all my lights in house are Hue).
Sometimes I want to browse through the Hue app to select a new scene (also Hue updates these scenes regulary).
How can I automatically disable the Blueprint for for example 3 hours when Iāve selected a manual scene in the Hue app?
I know I can use overrides in the blueprint, but I donāt think I can ādetectā Hue app usage as an override in the sensor blueprint.
EDIT: Please ignore this - I now see youāre supposed to provide (or create) a binary helper to track when the lights have been auto-dimmed. Did that and it works well now.
HI @Blacky - the issue seems to be that it is trying to restore the brightness when it doesnāt need to. For example, I have the āturn off timerā set to 10 mins, and the ādim before offā duration set to 30 sec. Iām assuming it should work like this:
* Motion detected - lights on @ 80% brightness * 9min 30s of no motion - lights dimmed by 50% - so 40% brightness * Motion within 30s - lights restored back to 80% brightness
Looking at the trace though, the automation is trying to restore brightness when motion is detected before the ādimā period. I walked into the room and lights turned on. I walked back in after 2-3 mins (so well before the 9min 30sec deadline) and the lights changed to 100%.
The trace shows that this condition was executed:
alias: If dim before OFF is selected - Restore Lights
conditions:
- condition: template
value_template: '{{ include_dim_before_off == ''dim_before_off_enabled'' }}'
- condition: state
entity_id: []
state: 'on'
sequence:
- repeat:
for_each: '{{ light_entities }}'
sequence:
- variables:
restore_bri: >
{% set bri = state_attr(repeat.item, 'brightness') %} {% if bri in
[None, 0] %}
{{ 0 }}
{% else %}
{% set bri_pct = bri / 255 * 100 %}
{% set restored = bri_pct / dim_before_off_factor %}
{{ [restored | round(0), 100] | min }}
{% endif %}
restore_light_data: >-
{% set light = namespace(data={}) %} {% if 'use_transition' in
include_light_control %}
{% set light.data = dict(light.data, **{ 'transition': light_transition_on }) %}
{% endif %} {% set light.data = dict(light.data, **{
'brightness_pct': restore_bri }) %} {{ light.data }}
- action: light.turn_on
target:
entity_id: '{{ repeat.item }}'
data: '{{ restore_light_data }}'
- action: input_boolean.turn_off
target:
entity_id: []
However there was no need to restore the lights at that point. Should the condition template check that ādim before offā is enabled AND that weāre in the dimming period?