-
-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dim lights before switching them off #10
Comments
as some kind of "warning" to move or the lights will switch off? That could indeed be useful! |
I like how it is implemented for Deconz. Sadly, this cannot be re-used in home assistant yet. |
To be honest, something like this looks not really useful to me. It looks nice, but I am not sure if it has real value. |
My intention was to point out where I got the idea from, not to ask for that specific implementation. |
So lets think about how this could be implemented (one dimming stage before switching off for now, thats easier to talk about for now)... Currently an absolut time value (in seconds probably) which dimms to 80% (or 50%?) before switching off seems reasonable to me. What would you (and maybe others reading this :)) prefer? Sure, it would be possible to implement every possible way listed above, but that would add really much complexity. |
Yeah, let's start with what's most simple. For the use case of "I'll warn you that I am being turned off soon", I would like to see
Also, if new motion is detected, the dim stage should be aborted. |
Was going to issues to ask if this was possible. This would be an amazing for bathrooms. |
It'll be nice to have a "Fade Rate" feature, or Fade On, Fade Off separately. (In Insteon, it's called Ramp Rate). fade_rate: 5
daytimes:
- { starttime: "02:00", name: late_night, light: 50 }
- { starttime: "08:30", name: day, light: 100 } |
Would it be possible to mimic the deconz feature by defining a list of delay/value pairs for the daytimes/light parameter? daytimes:
- starttime: "02:00"
name: late_night
light:
- 100
- delay: 60
value: "FadeOutScene"
- delay: 120
value: 0
- { starttime: "08:30", name: day, light: 100 } This would give you the flexibility of deconz, but keeps the simple configuration style if you just want to have a two-step fade-out. |
I was also thinking about this feature and find it really helpful as my lights turn off completely but sometimes it's just nice having a dimmed mode.... maybe with timer before turning off completely or the possibility to deactivate turn off and let it dimmed? |
Just looking into this, I like the idea of being able to specify scenes for the intermediate state as it gives the flexibility of perhaps turning a light a different colour rather than dimming it. |
Any chance this will get implemented (since request was from januari)? I still have a lot of lights with all motion sensors on Hue because of this missing feature in Home Assistant. Hue natively dims the lights for 10 seconds or so before turning off the lights when triggered by motion. I love it because it indeed acts as a warning that the lights go off triggering you to move :) |
With the new restart mode in HA, I created the following automation directly in HA to turn on the kitchen lights when motion is detected and when the motion sensor turns back to idle while the lights are still on, it will first dim the lights, then turn them off after one minute. - alias: Kitchen: Motion detected
mode: restart
trigger:
- type: motion
platform: device
domain: binary_sensor
device_id: 56754e39c3874eb39d7181dfd3d682ae
entity_id: binary_sensor.motionsensor_kitchen
condition:
- condition: numeric_state
entity_id: sun.sun
value_template: '{{ state.attributes.elevation }}'
below: '8.5'
action:
- service: light.turn_on
entity_id: light.group_kitchen
data:
brightness_pct: 100
transition: 2
- wait_template: '{{ is_state(trigger.entity_id, ''off'') }}'
- condition: device
domain: light
device_id: ae538670194e4fd18ce4c721eb0faa9f
entity_id: light.group_kitchen
type: is_on
- service: light.turn_on
entity_id: light.group_kitchen
data:
brightness_pct: 50
transition: 2
- delay: 00:01:00
- service: light.turn_off
entity_id: light.group_kitchen
data:
transition: 2 |
sorry, I am in the last weeks of my thesis currently and have no real time for open source projects :/ |
Nice! Thanks for sharing. I'm still a newbie so will try and work this out for my setup. Your motion sensor does not have a light sensor since you are using the sun elevation? How do I know which device id I have? Do you also by any chance have something like this for hue dimmer switches? I have some directly on deconz now but you loose the functionality to tap the on button multiple times to change between different scenes/light settings. |
Totally understandable. Thank you for your quick response and good luck with your thesis ;) |
I would also love to see this! Very much like the original Hue bridge does it. Dimm it down over 5-10 seconds or so to give you the chance to move enough. Hope your thesis is going alright! |
it works but probably has some bugs... do not use it if you need reliable lights ;) |
Will try and report :) |
Will test when I am back at home from work on Thursday :) |
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
{page:WordSection1;}
-->Can we havea config example for this feature? Gesendet von Mail für Windows 10 Von: Paul-Vincent RollGesendet: Montag, 23. November 2020 18:06An: benleb/ad-automoliCc: ThUnD3r|Gr33n; CommentBetreff: Re: [benleb/ad-automoli] Dim lights before switching them off (#10) That was fast! Will Test when I am back at home from work on Thursday :)—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or unsubscribe.
|
ah sorry 😅 but expect it to slightly change until officially released and documented ;) transition stylestarts diningroom:
module: automoli
class: AutoMoLi
disable_switch_entities: [input_boolean.automoli]
disable_hue_groups: true
room: esszimmer
delay: 300
dim:
method: transition
seconds_before: 10 step styledims the lights by bedroom:
module: automoli
class: AutoMoLi
disable_switch_entities: [input_boolean.automoli]
disable_hue_groups: true
room: schlafzimmer
delay: 180
dim:
method: step
brightness_step_pct: -30
seconds_before: 20 |
Installed it :) Is it correct that the dimming parameters are not shown yet in the summary log of ad yet? dim:
method: transition
seconds_before: 10 |
The last commits seem to have fixed the canceling but it only worked until I updated to |
ah yes, thanks, fixed in c4add6c
Hm sounds as you have a problem with your lights? I don't think thats an automoli issue as automoli relies on the state-informations from home assistant and cannot work as it should when this info is wrong. |
I also have the impression that starting with Homeassistent 2020.12.0, something is off with automoli, as well. The humidity-controlled bathroom light is no longer respecting the humidity sensor value and just turns off. Any idea how to debug that? @benleb |
I don’t think it’s the lights as they were fine before the Home assistant update. But again I also don’t really can image it being automoli. Seems more like a home assistant bug. |
Ok so we have problems since 2020.12...
Anything else? If you have other info which could be useable, tell me ;) I will try to reproduce this and find the bug over the weekend ✌️ As automoli does not change the state directly, just via the home assistant services, I expect that if lights have a wrong state in home assistant, it must be something else... But will investigate this too! |
lets move to the new issue here to keep things separate. As the feature requested here is implemented, I will close here and release this weekend :) |
Would it be possible to dim lights to some level for some time before switching them off?
The text was updated successfully, but these errors were encountered: