Unless I’ve misunderstood something, it wouldn’t trigger on sensor B, and you’d need a second automation to trigger on sensor B then check the condition of sensor A.
Since nuurban implied that they’d prefer to use one automation, this seemed preferable.
This works… I don’t really like the redundancy… but since the trigger section can’t do an AND there’s not really a nicer way to do this in one automation I guess. Thanks for help!
I was looking at this the other day as I wanted to include an AND for my bathroom exhaust fan trigger to compensate for outside humidity. I found that you can put logic into template triggers. Example below.
yes, that probably would work as well… didn’t know about groups when i was working on this. which is one of the main challenges with learning to use HA. it can be difficult to find the best method to solve a particular problem, unless someone has already posted a similar use case.
I was looking for the way of using AND (Events Trigger), I tried solutions above but it’s not worked. Please help.
I have Sonoff RF 3 buttons, Sonoff RF bridge and using Sonoff Lan to integrated to Home Assistant.
There’s no such thing as an AND trigger, especially for events. The two events will never happen at the same time there will always be a small delay between them.
You could create input_booleans that get turned on when the event happens, but to be honest this will get very complex and tricky.
I have 3 RF buttons can trigger 3 automations by events through Sonoff RF bridge (Sonoff Lan). I want to press button 1, and after 2s press button 2 (or other scenario of buttons press combination) to trigger other automation. Any solution without buy more buttons. Thanks.
Is it possible to combine :
at sunset + 30mn
OR
at sunset if temp < 1°
I’m not sure about the mix between triggers, conditions and or/and
Thank you for your tips
Thank you for your suggestion.
I started implementing it when I realized that multiple triggers are OR by default according to the first messages of this thread.
And this is exactly what I need. I’m not sure why I didn’t try that 5 months ago
Anyways, here is my yaml which I will watch in the coming days to make sure it does what I intend
alias: 'Blinds : close downstairs 50mn after sunset or if temp below 5'
description: >-
Close the downstairs blinds 50 minutes after sunset
trigger:
- platform: sun
event: sunset
offset: '00:50:00'
- platform: numeric_state
entity_id: weather.bry_sur_marne
attribute: temperature
below: '5'
action:
- device_id: 8d429a48fde411ea9755eb6a665b17b6
domain: cover
entity_id: cover.living_room_blind
type: close
- device_id: 8d423ac4fde411eaadf487945d441678
domain: cover
entity_id: cover.study_blind
type: close
- device_id: 8d427234fde411ea8129e33251c2b884
domain: cover
entity_id: cover.kitchen_blind
type: close
- service: notify.mobile_app_nokia_7_plus
data:
message: Downstairs blinds are closing
mode: single