I have read the installation instructions here, have restarted HACs and HA (twice) but cannot find the EC in the integrations tab. Haven’t seen this called out as an issue, so would seem to be a PICNIC (problem in chair not in computer) - can anyone assist?
thanks in advance
The integration is yaml controlled. You need to add the config entry’s to configuration.yaml.
Did you ever get this working?
I have struggled with this also, the documentation is is very vague.
As I have many similar light automations, I’m looking into EC to clean/simplify up my HA configuration.
I think it is clear for me how to make the entities itself, but I’m missing step 1 in this…
What is the best way to define and call the entities? I presume I should not just define them in the configuration.yaml file? Is it best practice to create a new file (for instance EC.yaml) and refer/include that file in the configuration.yaml file? Sorry for this beginner question, but I’m looking into how to start this.
I have an override for an entity controller. This override is a binary sensor (binary_sensor.sun_elevation_above_15) which is on, when the sun’s angle is above 15°.
I enter the bathroom when the angle is 12°, and I leave the bathroom when the angle is 16°.
The bathroom light will not turn off anymore.
Why do I have the override in the first place? I wanted to avoid that the light comes on automatically when the sun’s angle is above 15°.
entity_controller:
badkamer_bad:
sensor:
- binary_sensor.motion_badkamer_douche_sensor
- binary_sensor.motion_badkamer_sensor
- binary_sensor.qbus_virtueel_motion_badkamer
sensor_type_duration: True
sensor_resets_timer: True
entity: light.qbus_v1_badkamer_bad
delay: 60
block_timeout: 600
overrides:
- binary_sensor.sun_elevation_above_15
How can I fix this without an extra automation?
i’ve been seeing an error in the logs that i cannot figure out how to fix. I have several entity controllers configured just like this one
motion_office:
sensor: binary_sensor.office_motion_sensor_home_security_motion_detection
sensor_type: duration
sensor_resets_timer: True
entity: light.office_light
delay: 300
backoff: true
backoff_factor: 1.2
backoff_max: 900
service_data:
brightness_pct: 100
start_time: sunset - 00:30:00
end_time: sunrise + 00:30:00
night_mode:
delay: 120
backoff_factor: 1.2
backoff_max: 900
service_data:
brightness_pct: 20
service_data_off:
brightness_pct: 100
start_time: '20:00:00'
end_time: sunrise + 00:30:00
they seem to work ok, except two things: (1) the end time seems to not be enforced and (2) the brightness never returns to full via the service_data_off
call. I see these errors in the log, leading me to believe that the service_data_off
is having some issues:
Logger: homeassistant
Source: core.py:1581
First occurred: May 8, 2022, 10:06:26 PM (8 occurrences)
Last logged: 6:30:50 AM
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/core.py", line 1581, in async_call
processed_data: dict[str, Any] = handler.schema(service_data)
File "/usr/local/lib/python3.9/site-packages/voluptuous/validators.py", line 232, in __call__
return self._exec((Schema(val) for val in self.validators), v)
File "/usr/local/lib/python3.9/site-packages/voluptuous/validators.py", line 355, in _exec
raise e if self.msg is None else AllInvalid(self.msg, path=path)
File "/usr/local/lib/python3.9/site-packages/voluptuous/validators.py", line 351, in _exec
v = func(v)
File "/usr/local/lib/python3.9/site-packages/voluptuous/schema_builder.py", line 272, in __call__
return self._compiled([], data)
File "/usr/local/lib/python3.9/site-packages/voluptuous/schema_builder.py", line 818, in validate_callable
return schema(data)
File "/usr/local/lib/python3.9/site-packages/voluptuous/schema_builder.py", line 272, in __call__
return self._compiled([], data)
File "/usr/local/lib/python3.9/site-packages/voluptuous/validators.py", line 229, in _run
return self._exec(self._compiled, value, path)
File "/usr/local/lib/python3.9/site-packages/voluptuous/validators.py", line 355, in _exec
raise e if self.msg is None else AllInvalid(self.msg, path=path)
File "/usr/local/lib/python3.9/site-packages/voluptuous/validators.py", line 353, in _exec
v = func(path, v)
File "/usr/local/lib/python3.9/site-packages/voluptuous/schema_builder.py", line 818, in validate_callable
return schema(data)
File "/usr/local/lib/python3.9/site-packages/voluptuous/schema_builder.py", line 272, in __call__
return self._compiled([], data)
File "/usr/local/lib/python3.9/site-packages/voluptuous/schema_builder.py", line 595, in validate_dict
return base_validate(path, iteritems(data), out)
File "/usr/local/lib/python3.9/site-packages/voluptuous/schema_builder.py", line 433, in validate_mapping
raise er.MultipleInvalid(errors)
voluptuous.error.MultipleInvalid: extra keys not allowed @ data['brightness_pct']
anyone have any ideas? i’ve tried moving the service_data_off
to the main block instead of the night_mode
block and it still has the same issue.
is entity controller
maintained any longer?
Hello, I have a question about using door sensors and motion sensors at the same time. Is there any way to mix multiple sensor types for a single entity controller instance?
I would like to use a duration sensor for my motion sensors, since they stay on while motion is detected and turn off only when there is no more motion. However, I want most of my door sensors to be event sensors, which only trigger on opening or closing a door.
Can I use both of these at the same time to control a light?
I’ve just submitted a PR to add an entity_controller.activate
service, which I’m finding very useful so far: Add an "activate" service to manually activate an entity controller by ndbroadbent · Pull Request #268 · danobot/entity-controller · GitHub
I use this to activate an entity controller at a scheduled time, like turning on a heater at 6am, while still using the timer to turn it off a delay. Let me know if you have any feedback or suggestions. If you want, you can try it out by adding my repo to HACS: GitHub - ndbroadbent/entity-controller: Entity and lighting controller for managing devices via timers, scripts, and sun-based time restrictions.
I’m also going to work on a disable_block
option for the configuration, because there are literally zero cases where I want one of my controllers to get into a blocked state. It’s actually the opposite - If I switch something on manually, then I always want that to start a timer that will turn it off automatically.
UPDATE: I finished the disable_block
PR as well: Added 'disable_block' option to disable the blocked state by ndbroadbent · Pull Request #269 · danobot/entity-controller · GitHub
Hi,
First of all, thanks for all the great work @danny. I finally found a component that I can use to migrate my motion script from Fibaro to Hass
Question: is it possible to have multiple time slots to determine different service data? Now it seems that only night_mode is supported? Use case: I want the lights in my kitchen to have full brightness during breakfast and also dinner time, but to be more dimmed during the day and even more dimmed at night. I also use different delays within these timeslots. Would this be possible?
Thanks in advance!
Anyone have service_data_off
working? i have it on most of my entity controllers, but the brightness is always at the last state.
Hello,
Could anybody help me with this please.
What I am trying to achieve is have two durations when the entity controller is enabled / active, sunrise +1h to +3hr then sunset -1hr to sunset +1.30hr
motion_utility:
sensor: binary_sensor.utility_room_motion_sensor
entities:
- light.relay_tx_t4eu1c
delay: 120
start_time: 'sunrise + 01:00:00'
end_time: 'sunrise + 03:00:00'
night_mode:
delay: 60
start_time: 'sunset - 01:00:00' # required
end_time: 'sunset + 01:30:00' # required
This does not appear to work for night mode?
Regards,
Hi everyone,
Thanks very much for this integration!
I am having an issue with triggering based on light level using this integration. I’m trying to only trigger lights once it gets dark.
I have an override set with a binary sensor
- name: hallway_is_bright
state: "{{ states('sensor.hallway_light_level') | float > 10 }}"
device_class: light
Trouble is when its 9 lux in the hallway, the lights go on then the lux is 12 and the override triggers and the lights don’t shut off.
I don’t see anyone else having this issue, so I think I’m doing something wrong.
hallway_light_motion_controller:
sensor:
- binary_sensor.hallway_motion_sensor
overrides:
- input_boolean.hallway_motion_sensor_disabled
- binary_sensor.hallway_is_bright
entity: light.hallway_lights
delay: 10
block_timeout: 240
state_attributes_ignore:
- brightness
sensor_type: duration
sensor_resets_timer: True
service_data:
brightness: 30
night_mode:
delay: 4
service_data:
brightness: 10
start_time: '22:00:00'
end_time: '05:49:00'
Hi All,
I’ve just discovered this integration and it would have saved me some hours in setting up and bug testing motion activated strip lighting with timer delays.
Quick question before I move over to this:
I’ve got a script which creates a scene, plays an animation then restores the scene for my strip lighting, so I can use it to notify of a few things around the house.
In my current automation, I use the following action so that any action to turn on or turn off the light is held until the notification is finished. This avoid either the light staying on, not turning off, or the notification being interrupted.
- if:
- condition: state
entity_id: script.led_notify_and_restore_scene
state: "on"
then:
- wait_for_trigger:
- platform: state
entity_id:
- script.led_notify_and_restore_scene
to: "off"
alias: if light is doing a notification, then wait
Is there a way that I can do the same based on the state of this script using EC?
Hello, is it possible to define delay: not with a digit but with a template?
For example: "delay: {{ state(‘input_number.motion_light_duration’) }}
Greetings,
Eckart
Hello All
Big shout out to @danny for this awesome hack!
Just discovered the integration too and enjoying so far although I am struggling with the entity getting in blocked mode when the light is controlled by another automation and not a “manual” action - is there a solution workaround for this?
Second, while the time constraint exists, what is everybody else using to constrain by light level rather than time? Currently, have the motion and lux level wrapped in a template sensor - is that the way to go?
Hi, how would you deal with the following problem that I currently have:
I automatically turn on some lights via motions sensors at full brightness, but at night (from 10pm to 6am) only at 10 percent brightness. After 6am I disable the automation for some hours using an override switch that gets set via a schedule.
This works pretty good so far, but: When I want to turn on the light manually after 6am, it only turns on at 10 percent brightness because that was the last value it had. Is there a way to control this via entity controller?
If it matters: I use a shelly dimmer 2 flashed with ESPHome.
Hi, is it possible to implement inferred occupancy?
Let’s say my floor plan looks like this:
Dining Room → Entry to Kitchen → Kitchen (no exit other than main entry)
and I have presence sensors in Dining Room and Kitchen Entry, but not in Kitchen itself.
Right now, I am using “sensor_type: duration” in Kitchen Entry area to turn the lights in the kitchen, but if I stay there too long, the light goes off.
I would like to implement following logic:
- When presence in dining room is on, followed presence in kitchen entry on, turn the kitchen light on.
- After #1 is triggered, when presence in kitchen entry is on, followed by presence in dining room is on, turn kitchen light off.
Is it possible to implement something like this?
Thanks,
Maxim
same. While debugging, I can’t find a reason why the EC is being blocked with zero external changes.
I’m looking for an answer to this question too. Has anyone found a way to do this?