Entity Controller Mega Thread (Motion Lighting Controller)

my bad… we resolved that issue related to latency. Can you check no other entitties are controlling the lamp? Maybe something is triggered by the lamp changing state. Enable debug logs to understand what is causing it to go into blocked.

I have no other entities that are controlling that light, only entity controller

Check your logs, it will tell you exactly what is triggering it

Sorry, but quite new to this.
How would I enable debug log for Entity Controller?
I assume I set it in the config file?

Hmm.
I think I might bee seeing a bug.
If the light is turned on by EC and I turn it off again manually before the sensor has sent off, it will turn on the lights again.

entity_controller:
  motion_light_office: # serves as a name
    sensor: binary_sensor.office_multisensor_contact # required, [sensors]
    entities:
      - light.kontor
    service_data:
      brightness_pct: 100
    delay: 300
    sensor_type: duration
    sensor_resets_timer: True
    block_timeout: 3600

I use the confuguration above. Nothing fancy I would assume…
Also see picture below.
In short what happens:

Update:
I see that I missed the instructions in the documentation on how to enable debug. Will enable that and return with re results.

Ok. So I did a investigation of the logs.
And this is the log entries when the light turns on by itself after I turn if off manually. Any idea what is happening here?

… Update:

Ok,
So I have done as suggested by @danny in the github comment. I have drastically simplified the setup.
Seams to me as it is a issue related to the duration config. Debug output is pasted below. Behaviour is the same as with the more detailed configuration.
I use a z-wave sensor and 1 hue light. Zwave is used with zwave2mqtt.

2020-12-26 13:34:16 INFO (MainThread) [custom_components.entity_controller.motion_light_office] Service data set up
2020-12-26 13:34:16 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] Ignoring events (state changes) caused by the following entities): []
2020-12-26 13:34:16 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] Ignoring state changes on the following attributes: []
2020-12-26 13:34:16 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] --------------------------------------------------
2020-12-26 13:34:16 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office]        C O N F I G U R A T I O N   D U M P        
2020-12-26 13:34:16 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] --------------------------------------------------
2020-12-26 13:34:16 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] Entity Controller       motion_light_office
2020-12-26 13:34:16 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] Sensor Entities         ['binary_sensor.office_multisensor_contact']
2020-12-26 13:34:16 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] Control Entities:       ['light.kontor_1']
2020-12-26 13:34:16 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] State Entities:         ['light.kontor_1']
2020-12-26 13:34:16 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] Activate Trigger E.:    []
2020-12-26 13:34:16 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] Deactivate Trigger E.:  []
2020-12-26 13:34:16 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] Ignored state attrs:    []
2020-12-26 13:34:16 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] Light params:           {}
2020-12-26 13:34:16 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office]         -------        Time        -------        
2020-12-26 13:34:16 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] Start time:             None
2020-12-26 13:34:16 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] End time:               None
2020-12-26 13:34:16 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] DT Now:                 2020-12-26 13:34:16.162286+01:00
2020-12-26 13:34:16 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] datetime Now:           2020-12-26 13:34:16.162805
2020-12-26 13:34:16 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] Next Sunrise:           2020-12-27 09:16:13+01:00
2020-12-26 13:34:16 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] Next Sunset:            2020-12-27 15:41:08+01:00
2020-12-26 13:34:16 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office]         -------        Sun         -------        
2020-12-26 13:34:16 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] Sunrise:                2020-12-26 09:16:13+01:00
2020-12-26 13:34:16 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] Sunset:                 2020-12-26 15:41:08+01:00
2020-12-26 13:34:16 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] Sunset Diff (to now): 2:06:51.836550
2020-12-26 13:34:16 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] Sunrise Diff(to now): 2:06:51.836454
2020-12-26 13:34:16 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] Transition Behaviours: {'on_enter_idle': 'off', 'on_exit_idle': 'ignore', 'on_enter_active': 'on', 'on_exit_active': 'ignore', 'on_enter_overridden': 'ignore', 'on_exit_overridden': 'ignore', 'on_enter_constrained': 'ignore', 'on_exit_constrained': 'ignore', 'on_enter_blocked': 'ignore', 'on_exit_blocked': 'ignore'}
2020-12-26 13:34:16 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] --------------------------------------------------
2020-12-26 13:34:16 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] Using DAY MODE parameters: {'delay': 120, 'service_data': None, 'service_data_off': None}
2020-12-26 13:34:24 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] sensor_state_change :: 'binary_sensor.office_multisensor_contact' Sensor state change to: unavailable
2020-12-26 13:34:24 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] sensor_state_change :: state: 'idle'
2020-12-26 13:34:26 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] sensor_state_change :: 'binary_sensor.office_multisensor_contact' Sensor state change to: off
2020-12-26 13:34:26 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] sensor_state_change :: state: 'idle'
2020-12-26 13:43:48 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] sensor_state_change :: 'binary_sensor.office_multisensor_contact' Sensor state change to: off
2020-12-26 13:43:48 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] sensor_state_change :: state: 'idle'
2020-12-26 13:43:48 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] sensor_state_change :: 'binary_sensor.office_multisensor_contact' Sensor state change to: on
2020-12-26 13:43:48 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] sensor_state_change :: state: 'idle'
2020-12-26 13:43:48 INFO (MainThread) [custom_components.entity_controller.motion_light_office] <state light.kontor_1=off; friendly_name=Spot skrivebord, icon=mdi:spotlight-beam, supported_features=41 @ 2020-12-26T13:34:15.421394+01:00>
2020-12-26 13:43:48 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] State entities are OFF.
2020-12-26 13:43:48 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] Exiting idle
2020-12-26 13:43:48 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] on_exit_idle | Performing Transition Behaviour
2020-12-26 13:43:48 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] on_exit_idle | Action - ignore
2020-12-26 13:43:48 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] Entering active
2020-12-26 13:43:48 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] Using DAY MODE parameters: {'delay': 120, 'service_data': None, 'service_data_off': None}
2020-12-26 13:43:48 INFO (MainThread) [custom_components.entity_controller.motion_light_office] _start_timer :: Light params: {'delay': 120, 'service_data': None, 'service_data_off': None}
2020-12-26 13:43:48 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] on_enter_active :: light params before turning on: {'delay': 120, 'service_data': None, 'service_data_off': None}
2020-12-26 13:43:48 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] on_enter_active | Performing Transition Behaviour
2020-12-26 13:43:48 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] on_enter_active | Action - on
2020-12-26 13:43:48 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] on_enter_active | Performing Action - Turning on
2020-12-26 13:43:48 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] turn_on_control_entities :: Turning on light.kontor_1 (no parameters passed to service call)
2020-12-26 13:43:48 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] call_service :: Calling service turn_on on light.kontor_1
2020-12-26 13:43:48 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] state_entity_state_change :: [ Entity: light.kontor_1, Context: Context(user_id=None, parent_id='20792cc5efad1d888de44da99eb138a2', id='ec_f96453_1133b3950d34572151c94cd4d6') ]
	Old state: <state light.kontor_1=off; friendly_name=Spot skrivebord, icon=mdi:spotlight-beam, supported_features=41 @ 2020-12-26T13:34:15.421394+01:00>
	New State: <state light.kontor_1=on; brightness=255, friendly_name=Spot skrivebord, icon=mdi:spotlight-beam, supported_features=41 @ 2020-12-26T13:43:48.375746+01:00>
2020-12-26 13:43:48 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] state_entity_state_change :: Ignoring this state change because it came from ec_f96453_1133b3950d34572151c94cd4d6
2020-12-26 13:44:05 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] state_entity_state_change :: [ Entity: light.kontor_1, Context: Context(user_id='2c326c03f99c48f3bcb4a9ce3fc5ba22', parent_id=None, id='0eb3570de3f0369c054971ea448fb7c2') ]
	Old state: <state light.kontor_1=on; brightness=255, friendly_name=Spot skrivebord, icon=mdi:spotlight-beam, supported_features=41 @ 2020-12-26T13:43:48.375746+01:00>
	New State: <state light.kontor_1=off; friendly_name=Spot skrivebord, icon=mdi:spotlight-beam, supported_features=41 @ 2020-12-26T13:44:05.108518+01:00>
2020-12-26 13:44:05 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] state_entity_state_change :: We are in active timer and the state of observed state entities changed.
2020-12-26 13:44:05 INFO (MainThread) [custom_components.entity_controller.motion_light_office] <state light.kontor_1=off; friendly_name=Spot skrivebord, icon=mdi:spotlight-beam, supported_features=41 @ 2020-12-26T13:44:05.108518+01:00>
2020-12-26 13:44:05 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] State entities are OFF.
2020-12-26 13:44:05 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] Exiting active
2020-12-26 13:44:05 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] on_exit_active :: Turning off entities, cancelling timer
2020-12-26 13:44:05 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] on_exit_active | Performing Transition Behaviour
2020-12-26 13:44:05 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] on_exit_active | Action - ignore
2020-12-26 13:44:05 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] Entering idle
2020-12-26 13:44:05 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] on_enter_idle | Performing Transition Behaviour
2020-12-26 13:44:05 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] on_enter_idle | Action - off
2020-12-26 13:44:05 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] on_enter_idle | Performing Action - Turning off
2020-12-26 13:44:05 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] turn_off_control_entities :: Turning off light.kontor_1
2020-12-26 13:44:05 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] call_service :: Calling service turn_off on light.kontor_1
2020-12-26 13:44:18 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] sensor_state_change :: 'binary_sensor.office_multisensor_contact' Sensor state change to: on
2020-12-26 13:44:18 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] sensor_state_change :: state: 'idle'
2020-12-26 13:44:18 INFO (MainThread) [custom_components.entity_controller.motion_light_office] <state light.kontor_1=off; friendly_name=Spot skrivebord, icon=mdi:spotlight-beam, supported_features=41 @ 2020-12-26T13:44:05.108518+01:00>
2020-12-26 13:44:18 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] State entities are OFF.
2020-12-26 13:44:18 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] Exiting idle
2020-12-26 13:44:18 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] on_exit_idle | Performing Transition Behaviour
2020-12-26 13:44:18 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] on_exit_idle | Action - ignore
2020-12-26 13:44:18 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] Entering active
2020-12-26 13:44:18 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] Using DAY MODE parameters: {'delay': 120, 'service_data': None, 'service_data_off': None}
2020-12-26 13:44:18 INFO (MainThread) [custom_components.entity_controller.motion_light_office] _start_timer :: Light params: {'delay': 120, 'service_data': None, 'service_data_off': None}
2020-12-26 13:44:18 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] on_enter_active :: light params before turning on: {'delay': 120, 'service_data': None, 'service_data_off': None}
2020-12-26 13:44:18 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] on_enter_active | Performing Transition Behaviour
2020-12-26 13:44:18 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] on_enter_active | Action - on
2020-12-26 13:44:18 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] on_enter_active | Performing Action - Turning on
2020-12-26 13:44:18 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] turn_on_control_entities :: Turning on light.kontor_1 (no parameters passed to service call)
2020-12-26 13:44:18 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] call_service :: Calling service turn_on on light.kontor_1
2020-12-26 13:44:18 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] sensor_state_change :: 'binary_sensor.office_multisensor_contact' Sensor state change to: off
2020-12-26 13:44:18 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] sensor_state_change :: state: 'active_timer'
2020-12-26 13:44:18 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] sensor_state_change :: CONF_SENSOR_RESETS_TIMER - normal
2020-12-26 13:44:18 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] state_entity_state_change :: [ Entity: light.kontor_1, Context: Context(user_id=None, parent_id='9edd811e9669c0f347a5131770413974', id='ec_f96453_5a62397bb94d0b5e17feb634cd') ]
	Old state: <state light.kontor_1=off; friendly_name=Spot skrivebord, icon=mdi:spotlight-beam, supported_features=41 @ 2020-12-26T13:44:05.108518+01:00>
	New State: <state light.kontor_1=on; brightness=255, friendly_name=Spot skrivebord, icon=mdi:spotlight-beam, supported_features=41 @ 2020-12-26T13:44:18.934108+01:00>
2020-12-26 13:44:18 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] state_entity_state_change :: Ignoring this state change because it came from ec_f96453_5a62397bb94d0b5e17feb634cd
2020-12-26 13:46:18 DEBUG (Thread-98) [custom_components.entity_controller.motion_light_office] timer_expire :: Timer expired
2020-12-26 13:46:18 DEBUG (Thread-98) [custom_components.entity_controller.motion_light_office] Sensor entities are OFF.
2020-12-26 13:46:18 DEBUG (Thread-98) [custom_components.entity_controller.motion_light_office] timer_expire :: Trigger timer_expires event
2020-12-26 13:46:18 DEBUG (Thread-98) [custom_components.entity_controller.motion_light_office] Sensor entities are OFF.
2020-12-26 13:46:18 DEBUG (Thread-98) [custom_components.entity_controller.motion_light_office] Exiting active
2020-12-26 13:46:18 DEBUG (Thread-98) [custom_components.entity_controller.motion_light_office] on_exit_active :: Turning off entities, cancelling timer
2020-12-26 13:46:18 DEBUG (Thread-98) [custom_components.entity_controller.motion_light_office] on_exit_active | Performing Transition Behaviour
2020-12-26 13:46:18 DEBUG (Thread-98) [custom_components.entity_controller.motion_light_office] on_exit_active | Action - ignore
2020-12-26 13:46:18 DEBUG (Thread-98) [custom_components.entity_controller.motion_light_office] Entering idle
2020-12-26 13:46:18 DEBUG (Thread-98) [custom_components.entity_controller.motion_light_office] on_enter_idle | Performing Transition Behaviour
2020-12-26 13:46:18 DEBUG (Thread-98) [custom_components.entity_controller.motion_light_office] on_enter_idle | Action - off
2020-12-26 13:46:18 DEBUG (Thread-98) [custom_components.entity_controller.motion_light_office] on_enter_idle | Performing Action - Turning off
2020-12-26 13:46:18 DEBUG (Thread-98) [custom_components.entity_controller.motion_light_office] turn_off_control_entities :: Turning off light.kontor_1
2020-12-26 13:46:18 DEBUG (Thread-98) [custom_components.entity_controller.motion_light_office] call_service :: Calling service turn_off on light.kontor_1
2020-12-26 13:46:19 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] state_entity_state_change :: [ Entity: light.kontor_1, Context: Context(user_id=None, parent_id=None, id='ec_f96453_97884d51fc767d5606780a04c5') ]
	Old state: <state light.kontor_1=on; brightness=255, friendly_name=Spot skrivebord, icon=mdi:spotlight-beam, supported_features=41 @ 2020-12-26T13:44:18.934108+01:00>
	New State: <state light.kontor_1=off; friendly_name=Spot skrivebord, icon=mdi:spotlight-beam, supported_features=41 @ 2020-12-26T13:46:19.088896+01:00>
2020-12-26 13:46:19 DEBUG (MainThread) [custom_components.entity_controller.motion_light_office] state_entity_state_change :: Ignoring this state change because it came from ec_f96453_97884d51fc767d5606780a04c5

What is your simplified config?
When was it working last? (which EC version worked for you?)

Thanks for getting back to me.
Simplified config is as follows:

#Office
  motion_light_office:
    sensor: binary_sensor.office_multisensor_contact
    entity: light.skrivebord
    sensor_type: duration
    delay: 120

I am not 100% sure what version I was running when it was working. But I belive it apeared after I updated last time, so probably last version. So I azume last working version was 9.1.0 or 9.0.2.

One thing I have discovered since yesterday is that if I create a input boolean device and use that as sensor it is working as intended.
Config for that is:

 #Office
  motion_light_office:
    sensor: input_boolean.office_dummy_sensor
    entity: light.skrivebord
    sensor_type: duration
    delay: 120

So you could add an automation to tie the binary sensor to the input boolean

alias: Motion Light Automation 
description: 'office multi sensor toggle boolean switch'
trigger:
  - platform: state
    entity_id: binary_sensor.office_multisensor_contact
condition: []
action:
  - service: input_boolean.toggle
    data: {}
    entity_id: input_boolean.office_dummy_sensor
mode: single

Yes. I assume I could do a kind of work around. But I would prefer not having to…

EDIT: Removed my question as I have already found a solution. I wanted to have a way to reset the EC timer whenever a door was opened/closed. Solved it for now by creating a new service in entity-controller and calling it from an automation to reset the timer. Still testing but it’s working great so far.

This way I can run long delays with “back_off” enabled on my entities but whenever someone leaves the room the timer will get reset to around 30s

I have many PIR-sensors that controls a light, if any of them are on, the light is on. For some reason this sooner or later makes entity controller goes into “blocked” state. I really don’t want the automatic “blocked” functionality. Is there a way to just disable this?

@danny - I’m having a similar issue where the controller is blocked by the light it is controlling, even if it is the one to have turned it on. I suspect this has to do with latency / polling of my sub-optimal z-wave dimmer switch where it may need to refresh a few times as it is toggled. I seem to have come up with ‘workaround’ by setting ‘block_timeout’ to ‘5’ seconds, even if my delay is much higher. Wondering if there are any better resolutions you can suggest without using block_timeout?

2 Likes

@Danny I am having the same issue with a z-wave dimmer blocking the controller. This dimmer is an entity in the entity controller that is being blocked. I believe this is due to the dimmer having a previously set dim value. When entity controller issues an on command, the dimmer returns to this previously set dim value and then reports the dim value and not a pure on value. This tricks entity controller into thinking someone physically set the dim value and blocks the controller. Apologize if my terminology is incorrect, new to home assistant.

Using block_timeout: 5 appears to have resolved the issue.

I am also using the new Z-Wave JS integration.

I’m also seeing certain light getting blocked mysteriously without clear reason. The entity information says it’s blocked by itself, which I’m not sure makes any sense: blocked_by: light.bedroom_floor_light. After turning off the light, its controlled just fine for a few hours, after which it gets blocked.

The only thing controlling the light is entity controller, so there should be no interference from anywhere else.

I have three Zigbee based motion sensors, one Aqara and two Sonoffs. Sonoffs seem not to cause blocking, only Aqara does.

1 Like

Yeah, my “blocked” problem is continuing as well for no apparent reason. As mentioned I whish there was a “diable blocking”-flag or something for the each control entity. It seems like a smoother solution than playing around with timeouts.

1 Like

Hi

I just wondered how do people handle setting the state of an entity controller after a restarted or where you maybe have automations for modes that set overrides for the entity controllers?

In my setup I have some general modes that cover all lights to handle things like “Night” (stops most motion triggers from turning lights on), “Day” (allows a sub-set of motion triggers to turn lights on), “Evening” (enables all motion triggers). These essentially control an override boolean toggle for each entity controller and I have automations that transition these states based on sunrise and sunset.

The problem I’m noticing is if an entity controller is in say a constrained or overridden or active_timer state when a transition occurs or home assistant is restarted, it doesn’t seem to update the entity controller state as expected.

I notice there is a way to clear a blocking state with “service: entity_controller.clear_block”, but I’m unsure how best to ensure when an automation transitions or the system is restarted, to clear the entity controllers and then subsequently set them to the desired state. For example would clear block help if a controller is in active timer or override state and if not how can I force a state to where it should be?

Any examples would be much appreciated :slight_smile:

Hello,
I want to know, what you do, if light ist Low, and EC turned on. While Light is on, the binary sensor turned into true, and you leave the room. The light will be on, until it is dark, because state is override?

The light is turned off when the state of EC turns to overridden. So when the light is on and the binary sensors turns on as well the light is turned off.

entity_controller:
  bewegung_wohnzimmer:
    friendly_name: "Bewegung Wohnzimmer"
    sensor: binary_sensor.bewegungsmelder_wohnzimmer
    entities: light.couch
    delay: 60
    behaviours:
      on_enter_overridden: 'off'
    overrides:
      - binary_sensor.sonne_tagsueber  

Hi

I just wondered if there is a way to get an entity controller to go in to constrained state when an override is toggled, when the entity controller is in active_timer, without turning the light off first?

For example take the following entity controller:

snug_light_controller:
  friendly_name: "Snug Light Controller"
  sensors: 
    - binary_sensor.snug_motion
  overrides:
    - input_boolean.snug_light_constrained
  entities:
    - light.snug
  delay: 120
  backoff: true
  backoff_factor: 1.5
  backoff_max: 600
  block_timeout: 900

If the entity controller is in active_timer and the override is currently false (not constrained). Is there a way when I toggle “input_boolean.snug_light_constrained” to true, that I can also force the entity controller to transition to constrained without turning the light off first?

I’ve noticed it only seems to set the entity to constrained when the override is set to true, if the entity controller is already in idle state.

I’d guess the ideal scenario would be to allow any active timers to expire before transitioning that entity controller, but I’m not sure how you could achieve that. I have set times of day when I constrain certain entity controllers, but don’t necessarily want to have to turn all the lights off first if possible.

Many thanks

Andy