#everybody
1 messages · Page 1 of 1 (latest)
Then you want a state trigger for each person entity
trigger:
- platform: state
entity_id:
- person.one
- person.two
to: 'home'
Your service call will be for switch.turn_on and the switch entity of the SmartThing switch
And it will be in action section ?
There are three sections to an automation:
trigger: When any one of these becomes true the automation starts processing. Only one trigger is ever responsible for starting an automation, if you make aconditionthat checks for more than one having started the automation then the condition can never be true.condition: These are checked after atriggerstarts the processing, and must be true for the automation to continue.action: This is the part that does something, and can also include further conditions.
You can build all this in the UI editor
Ok, i think i figured out and let me know if i wrong, i set in the UI and the config look like this alias: Familly Home
description: Familly Home
trigger:
- platform: state
entity_id:- device_tracker.alexandre_fraser
to: home
condition: []
action:
- device_tracker.alexandre_fraser
- service: switch.turn_on
data: {}
target:
device_id: 9752f5d2d36886b465f19572dba07019
mode: single
@rough saffron When using Discord's Reply feature it defaults to pinging the person you reply to, which can get frustrating for the target. Use Shift + click on the Reply option, or click @ ON to @ OFF to stop this - on the right side of the compose bar.
You have to change this every time (thank the Discord devs for that).
The answer is ... try it and see 😉
To test an automation there's three stages you can follow. Testing the action, the condition and action, and the whole automation:
- Use Configuration -> Automations to find the automation and then push Run Actions. If this fails your problem is in the
action:section, and details should be found in your log file - Use Developer tools -> Services and call
automation.triggeron the automation withskip_condition: false. If the first passes but this fails then the problem is in yourcondition:block - Use Developer tools -> States to find the trigger entity, click the name, then change the state (at the top) to something that'll trigger the automation before pushing Set State. If this fails then the problem is with your
trigger:section, or the automation is turned off (you can check that in Developer tools -> States).
You can also see this section in the docs and with HA 2021.4 onwards debug automations.
fraz — Aujourd’hui à 16:03
Look like works fine ! If i want to set off my switch i need to use Away instead Home for life360 ?
@rough saffron you don't
@rough saffron need to
@rough saffron tag me
As I already mentioned before
Oups sorry
Ok and can we set a pooling time for automation or is set live by default ?
Use a time condition
Its look like a fixed time.
If I want when I arrive or I leave the house it executes the automation ?
Well, that's #1067163520657010821 message
I've no idea what "pooling time" means though
OK sorry, i just want to trigger a switchto on on smarthing when im arrive to home and switch off when im leaving with homeassistant. I not sure how to create that in the automation part in home assistant
Which part?
You've got the switch on already
description: Familly away
trigger:
- platform: state
entity_id:
- device_tracker.alexandre_fraser
to: not_home
condition: []
action:
- service: switch.turn_off
data: {}
target:
device_id: 9752f5d2d36886b465f19572dba07019
mode: single
That'll do it for you leaving
If you want to do it so that it only turns it on when the last person leaves, that's different
Ok so when another one will arrive or leave the trigger will execute automatically. I dont need to worry for the first time of last trigger run ?
You will have to add other entities to the trigger
But, that will fire when anybody leaves, even if somebody is still home
Hence
If you want to do it so that it only turns it on when the last person leaves, that's different
Perfect !
If you want when the last person leaves that'd be more like
trigger:
- platform: numeric_state
entity_id: zone.home
below: 1
Does home assistant are able to read a event into ios or outlook calendar and trigger something about that ?
Like holiday days
There are calendar integrations
There's also that
https://www.home-assistant.io/integrations is a useful list to read
Nice, i was searching something to trigger a event into my calendar when kids have no school on specific date
Mmmm i did 2 routine one home one not home only for me. I try to run seperate and my switch turn on for home, and when i run the not home one my switch turn off. Is it normal !?
Is what normal?
That the automations are doing what they're written to do?
i just want to trigger a switchto on on smarthing when im arrive to home and switch off when im leaving
You said that earlier
That's what the automations are doing
Well, it's using the person entity, and whatever you have associated with it
im using the device tracker instead like this ?
alias: Alex not home
description: Alex not home
trigger:
- platform: state
entity_id:- device_tracker.alexandre_fraser
to: not_Home
condition: []
action:
- device_tracker.alexandre_fraser
- service: switch.turn_off
data: {}
target:
device_id: ac9ed05d08238043a60c75680c8b76b1
mode: single
Well, not_Home isn't valid
Oh ! there is a way to know the exact value ?
yes
Sorry maybe i dont understand a principle here. Im home right now. if i run manually the not home automation. My switch should not switch off
right
If you manually run it, it runs the actions
So... yes, it turns off the switch
you told it to
Ooooh ! he doesnt look the condition !
- There's no condition
- It still doesn't apply
Thanks ! now i understand !
To test an automation there's three stages you can follow. Testing the action, the condition and action, and the whole automation:
- Use Configuration -> Automations to find the automation and then push Run Actions. If this fails your problem is in the
action:section, and details should be found in your log file - Use Developer tools -> Services and call
automation.triggeron the automation withskip_condition: false. If the first passes but this fails then the problem is in yourcondition:block - Use Developer tools -> States to find the trigger entity, click the name, then change the state (at the top) to something that'll trigger the automation before pushing Set State. If this fails then the problem is with your
trigger:section, or the automation is turned off (you can check that in Developer tools -> States).
You can also see this section in the docs and with HA 2021.4 onwards debug automations.
but i dont know how to do my IF
@rough saffron To format your text as code, enter three backticks on the first line, press Shift+Enter for a new line, paste your code, press Enter again for another new line, and lastly three more backticks.
```yaml
example: here
```
Don't forget you can edit your post rather than repeatedly posting the same thing.
description: ""
trigger:
- platform: calendar
event: start
entity_id: calendar.travail
- platform: calendar
event: end
entity_id: calendar.travail
condition:
- condition: template
value_template: "{{ 'Enfants pas ecole' in trigger.calendar_event.summary }}"
action:
- if:
- condition: template
value_template: "{{ trigger.event == 'start' }}"
then:
- service: input_boolean.turn_on
target:
entity_id: input_boolean.switch_pasecole
data: {}
else:
- service: input_boolean.turn_off
target:
entity_id: input_boolean.switch_pasecole
data: {}
mode: single
