I have an Eyezon Uno alarm panel integrated into HA via the Eyezon_new integration under HACS. One of the alarm sensors is on the garage door. I want the kitchen lights to turn on when we arrive home at night so we don’t walk into a dark house. I accomplished that with two automations. The first is: Trigger when garage door opens; conditions 1. after sunset, 2 wife’s phone is in home zone, then do turn on kitchen lights. The second is the same but has my phone in the home zone as a condition. That way when either one us is in the home zone (which includes the driveway) and opens the garage door after sunset the lights will go on.
The problem is that we also open and close the garage door when we leave home so this would turn them on when we open the garage door to leave. Obviously I don’t want leave the lights burning while we are gone.
I thought of using two triggers: 1. when I leave home, 2. when wife leaves home, condition: garage door closed, then do turn off kitchen lights, but that won’t work because triggers are OR and not AND so that would turn off the lights if only one of us left and the other was still at home.
I thought of making the trigger garage door closed and the conditions being neither one of us are home, but in the drop down boxes for programming an automation under the Eyezon integration there is no condition for leaving home or not being at home, there is only a condition for being at home.
Can anyone help me solve this problem. Oh, and I don’t speak YAML so if it can be done with the UI drop down boxes that would help.
Thanks.
What does that even mean? Why would the garage door integration know anything about leaving home? I think you may be under the influence of Device triggers and conditions.
One option would be to use the State of your Home zone. The state of a zone is the number of People entities currently located in that zone. So the condition of no one being home can be represented as:
condition: state
entity_id: zone.home
state: "0"
or…
condition: numeric_state
entity_id: zone.home
below: 1
The same concept can be applied as triggers.
alias: When the first person comes home.
trigger: numeric_state
entity_id: zone.home
above: 0
alias: When the last person leaves home.
trigger: numeric_state
entity_id: zone.home
below: 1
YAML is the most efficient way for us to share information. Passing screenshots back and forth is slow and forces everyone to duplicate the same efforts… and it’s unnecessary. Everything that is shown in YAML for automations can be done in the UI. Most of the time you can literally copy/paste YAML config from here into the Automation editor. Occasionally, you might need to transcribe it manually by finding the appropriate field, clicking, and filling in information… which you would have to do anyway no matter what form the information was in.
Is there some sort of YAML primer somewhere. Like why is it numeric underscore state and not “number” or numeric.state and zone.home and not zone_home. I tried editing a YAML for something (I don’t recall what right now) and it wouldn’t let me do it. Here’s an example of something I would like to modify though. I have the front door light on at 50% in the evening but when I open the door it is supposed to go to 90%. When I close the door again I want it to go back to 50% but the drop down boxes won’t let me set a particular percentage; it just has “decrease brightness” which drives me crazy since it doesn’t say decrease to how much. The Yaml looks like this:
device_id: 5c68c05bf1a677055cd2090598ecce40
domain: light
entity_id: 6c41bae67b554d9de4a5c64478cc35a8
type: brightness_decrease
What would I do to make it go back to 50%?
http://thomasloven.com/blog/2018/08/YAML-For-Nonprogrammers/
And, there are YAML examples in nearly every page of the docs.
Because that’s how it was designed to be by the HA devs over the years.
Use an Entity action (specifically light.turn_on), not a Device action.
Technically, you can do it with Device action, but I think the source of some of your confusion is an over-reliance on device-based components. For the device action you would “Turn on Your light Name” action, then select the desired brightness. In YAML the Device version would look like:
domain: light
type: turn_on
device_id: 5c68c05bf1a677055cd2090598ecce40
entity_id: 6c41bae67b554d9de4a5c64478cc35a8
brightness_pct: 50
Thanks for the links.