Yes it is duration sensor. Ok. I will try that option. Thanks.
Nope. It doesnât change anything. Entity_controller is blocked while entity_off script is running. That delay is showstopper. Well we tried.
@danny Iâm curious if this could be used in reverse⌠When a light is turned on manually, turn off after x time of inactivity on a sensor(s). Would be valuable to be able to utilize the night mode, and overrides.
I guess thatâs the block mode restriction⌠gonna test thisâŚ
I am new to this awesome component and have a hard time figuring out if the component supports turning on multiple individual lights with different service data simultaneously? or will this require me to create a template?
If possible, kindly provide an example
Thanks a lot!
@danny I posted a bug/error to Github - but wanted to follow up here for discussion. Iâm trying to set a light or group of lights in a way that if turned on automatically will turn off after a set time (using block_timeout
) but donât want to require that the sensor detect motion before the timer starts. I was assuming you could use the light/switch as a sensor for that purpose. Can you confirm that will work as Iâm expecting? Or could this be partially to blame for the error I am seeing (https://github.com/danobot/entity-controller/issues/47)?
The sensor must be triggered before the timer starts. That is how its currently implemented.
Thank you for this component.
As stated on wiki, overrides are used to:
You can define entities who block the motion light from turning on if those entities are in any defined
on
state.
I want to achieve the opposite effect - block the light from turning off when a sensor is at a given state. For example, I have a door sensor in my bathroom and would like not to turn off the light whenever the door is closed. It should override the timer set by the motion sensor which is also present.
Is it possible currently?
You can use custom state strings. Just set the override state string that is âonâ by default to âoffâ and set the one that is âoffâ by default to âonâ.
Read the docs to understand how to do this.
After upgrading to 0.92 get this error
2019-04-27 14:59:02 ERROR (MainThread) [homeassistant.setup] Error during setup of component entity_controller
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/homeassistant/setup.py", line 153, in _async_setup_component
hass, processed_config)
File "/config/custom_components/entity_controller/__init__.py", line 110, in async_setup
myconfig = config[DOMAIN][0]
KeyError: 0
try removing the [0]
My entity_controller are not working anymore, after updating to 4.0.0, for example the code below, when there is motion, at night or evening, the lights stays off.
I checked the new 4.0.0 version maybe I am missing something?
########################################################
# DINING ROOM MOTION THEN LIGHT ON
########################################################
dining_room_evening:
sensors:
- binary_sensor.pir_living_two
- binary_sensor.pir_stairs_up
- binary_sensor.pir_stairs_down
entities:
- light.chandelier_one
- light.chandelier_two
- light.chandelier_three
# service_data:
# brightness: 80
start_time: sunset
end_time: '23:59:59'
delay: 240
sensor_type_duration: True
overrides:
- input_boolean.motion_dining_evening
- input_boolean.dining_stop_off
# - binary_sensor.auto_lights_override
dining_room_night:
sensors:
- binary_sensor.pir_living_two
- binary_sensor.pir_stairs_up
- binary_sensor.pir_stairs_down
entity: light.chandelier_one
service_data:
brightness: 80
start_time: '00:00:01'
end_time: sunrise
delay: 65
sensor_type_duration: True
overrides:
- input_boolean.motion_dining_night
# - binary_sensor.auto_lights_override
I also want to do a similar thing. I have some existing automations that detect motion in a bathroom/powder room, and then turn on the small light in the exhaust fan fixture. This works out really great, especially in the evenings and at night as this lamp isnât too bright. My automation then turns off the lamp after so many seconds, as long as the âmainâ lights in the room have not turned on; this is an indication of some âmanual overrideâ. So Iâd like the state of some other entity to just cause the controller to skip right to idle
state when the time expires.
Now, I tried to use the overrides:
entities for this purpose, but they only seem to affect turning on the light. Itâd be great if they would also inhibit action from being taken when the timer expired.
I tried to understand how this applies:
and did some experiments, but it doesnât seem to apply to my use-case.
Another similar use-case is in my kitchen, where I have 3 individually switched lighting circuits. When the motion sensor fires, I turn on one of them, and then off after some period of time⌠but the âturn offâ automation is conditioned on none of the other 2 lighting circuits having been manually turned on, and indication of extended occupation of the room, probably sitting at the table eating (and not moving around very much). So an âinhibit expiration actionâ would also work well here.
I have another use-case, unrelated to these, where Iâd want to mix different types of sensors - I have 2 doors with sensors between the inside of the house and an enclosed porch. When the doors are opened, they may stay open. Thereâs also a motion sensor out there was well that just generated motion events. So Iâd be great if the type of motion sensor could be an attribute of the sensor, not the overall controllerâŚ
Gee, I sure ask for a lot! I was hoping to use this entity_controller thing to replace a number of ad-hoc automations, using timersâŚ
Just wanted to give some praise for a nice component. It has bugged me with both homeassistant and openhab to not have an easy compact way to add motion triggered lights. Itâs always with a bunch of extra timers and separate automations for on/off. Never nice and contained. Love it!
I tested this solution with âCustomising State Stringsâ. It allows me to change the state of the entity that overrides so that I can change that off state which actually launches the override, but still whenever I close my bathroom door and the entity controller gets the state âoverriddenâ (which is totally correct) then it turns off my light. I think the main problem is here that the override actions is always to turn off the light. I could set the action of âstate_states_onâ to off, but then the light wonât turn on at all.
I need functionality to define the action taken by override state on the controlled entity - not to turn it off, but in my case to keep it on.
Unless, I still donât understand something from the documentation, but I believe I read it carefully.
When the motion sensor activates a light for a specific time, the timer wonât get automatically extended during the motion. Only after the light goes off and a new motion is detected, it will be activated again.
Is there a way to prevent the light from going off but to auto extend it as long as there is motion?
Use duration sensor setting depending on your sensor type
Hi @danny
I installes yu app and I am fascinated. But I have a question. Using time constraints is not enough for my needs. Some days it is grey and dark than other days. My light automations are all based on luminance values to avoid consuming too much energy if not needed.
My question hterefore would be. how could I archieve that in your app? Letâs say:
Turn on light the day (start and entime configured) but only if luminance is lower than x? This is for example my stairs which are sometimes well light and sometiimes not⌠according to the weather and sun conditons around our house.
I use a binary sensor in this case to override the light.
When the luminance is too high the light wouldnât turn on.
sonne_tagsueber:
friendly_name: "Sonne tagsĂźber"
value_template: >-
{% if states.sensor.helligkeit.state == None or is_state('sensor.helligkeit', 'unknown') %}
False
{% else %}
{{ states.sensor.helligkeit.state | float > 20 }}
{% endif %}
bewegung_wohnzimmer:
friendly_name: "Bewegung Wohnzimmer"
sensor: binary_sensor.bewegungsmelder_wohnzimmer
entities:
- light.couch
delay: 60
overrides:
- binary_sensor.sonne_tagsueber
Thanks a lot! I currently use this:
sensors:
- binary_sensor.motion_upstairs
- binary_sensor.motion_downstairs
entity: light.spots_stairs # required, [entity,entities]
service_data:
brightness: 100
delay: 60
block_timeout: 160
start_time: '07:00:00'
end_time: '21:00:00'
overrides:
- binary_sensor.enough_bightness_downstairs
and this binary senso:
- platform: template
sensors:
enough_bightness_stairs:
friendly_name: "Enough Brightness Stairs"
value_template: "{{ states('sensor.luminance_downstairs')|float > 50 }}"
- platform: template
sensors:
enough_bightness_downstairs:
friendly_name: "Enough Brightness Downstairs"
value_template: "{{ states('sensor.luminance_entrance')|float > 80 }}"
I just adapted your example and will report back if it works well.