Trigger: Sensor with numeric Output (Power in W delivered by PV)
Target: A simple switch to get on or off dependent on the current power measure of the trigger.
Need something like:
if trigger_entity below x => Target off
if trigger_entity above y => Target on
Can I do this using this BluePrint?
If yes, how to configure the parameters?
If no, is there already another BluePrint fulfilling my goal?
Also just wanted to add, if anyone else happens to be looking for an elegant way to pair this automation with automated brightness control like I was: I’ve been using this blueprint along with the Adaptive Lighting integration (https://github.com/basnijholt/adaptive-lighting) and I’ve been super happy with the results. I don’t have to have numerous complex scripts/automations for each set of lights to handle it all. I just have this blueprint running per room/set of lights and those same lights together in an instance of Adaptive Lighting and it works fantastically together.
For some reason automation based on this blueprint stopped working. It turns the light off in a few seconds after turning it on. I believe there may be some changes in Home Assistant which caused such behavior. Please help
Are you sure something didn’t change with your triggers/sensors to cause that? Fwiw I have over a dozen automations using this blueprint and running latest HA and they are all still working just fine. Maybe the log of the target light can tell you what turned it off? If it is the automation then maybe a examining the trace?
Hello!
I would like to turn on bulbs ans switches but I read it cannot handle multiple target_entity.
Is the creation on 2 automations (one for bulbs and one for switches) a solution?
Thanks!
I figured this out myself in the meantime so I’m leaving this here in case someone else runs into this issue:
The helper I created in the UI is having a decimal value. (For example ‘10.0’)
I used a template to get the integer value for the input_numer and now it works.
Hi Kevin, I like what I see in your script here. I’m trying to figure out if I can tweak/modify it for use in such a manner as described below. If you know how to quickly tweak/support I’d greatly appreciate it.
Instead of motion sense triggering (since I don’t have motion sensors yet) I’d like just have the light switches trigger automation (e.g. light switch pressed once it will timeout after blueprint instantiation timeout or alternate timeouts during times of the day).
If the light switch is pressed on, then off, and back on within 3 seconds then I’d like to override the normal light off timeout with a different value (or no timeout)
I noticed your blueprint currently has a 3 second trigger that would probably need changed for #2 to work. Also, I tried making the light switch the trigger and the target and it didn’t seem to work for #1. Perhaps I need some other options in the blueprint for the light to turn off automatically after a timeout?
You can put anything into trigger. A motion sensor is just an entity which will turn itself off after it was on for some time.
Thus, you can create a helper entity to simulate a motion sensor. Just create a toggle entity in helper, then create an automation which will be triggered by the light state. In the condition, when the light state is changed to “on” (make sure the trigger is empty so that you know it’s not turned on by another automation), set the helper’s state to “on”, then set a delay, then set the state to “off”.
Now you can fill the helper entity to trigger. You can do the similar thing for your second requirement: create a helper, then create an automation to set this helper’s state based on your desired actions. Then fill this helper to the block entity of my automation.
Hi I seem to be having issues with the Trigger Timeout where I’m using an input text helper and I’ve tried entering 00:00:30 but the lights are not turning off after the timeout has elapsed. If I manually enter 30 or 00:00:30 in the automation it works fine.
Looking at the trace for the unsuccessful execution I see the following message:
error: offset input_text.trigger_timeout should be format ‘HH:MM’, ‘HH:MM:SS’ or ‘HH:MM:SS.F’
Hey there. I have fairly limited knowledge, but trying to get this to turn on/off a switch located in a bedroom when a group of other switches turn on/off. It used to work in an older version of HA, but i think something has changed, not sure what. I have updated to latest blueprint.
Awesome thanks for the reponse Kevin. This hasn’t been working for a good six months. Current HA version installed 2023.2.2. Could it be something wrong with the groups? The automation always turns the switch on when a another switch is turned on, but whereas it used to also turn the switch off, now the switch just stays on??
Stopped working with the old blueprint on an updated HA, just updated blueprint but still the same behaviour. This is the current test where switch.ah1 (is a switch group created in devices, Helpers Group, Switch group) and switch.2
In case anyone reads this, for me the blueprint did not accept an input text helper in the Trigger Timeout field (even though the dropdown menu implies that it should) and it only accepted hard coded text in this field in the automation.
For my own use case I edited the blueprint and reconfigured the Trigger Timeout to accept an input number helper and it’s now working for me.
This blueprint really is my “all in one” weapon for many things meanwhile, mostly light automations. Unfortunately, I can not implement this use-case:
Trigger entity (motion sensor) is at desired state
(Optional) Illuminance Below is also true
→ it got dark meanwhile, while people still constantly trigger the trigger entity which stays on)
Unfortunately, the target entity (light) stays off, as the decrease of illuminance is not discovered as trigger.
Using a dumb switch or living with annoyed people is not a (smart) option.
Any smart way to work around that? I want to solve this within one automation (ideally by being able to use the illuminance sensor as second trigger, but based on a range of values instead of a fixed on/off state), based on this blueprint.
I tried to set both the motion sensor and illuminance sensor as trigger entity (trigger_entity: binary_sensor.motion|sensor.illuminance) and use trigger_entity_state: true|5|4|3|2|1|0 - which gave an error and rendered the whole automation faulty.