I am trying to create an automation to trigger a night scene when both persons gone to bed. I do this based on the the phones are being charged using sensor provides Mobile App.
I also want to trigger the night scene if only one person is at home and going to bed, but I cant really figure out how to configure the trigger.
trigger:
- platform: state
entity_id: sensor.first_phone_battery_state
to: charging
- platform: state
entity_id: sensor.second_phone_battery_state
to: charging
- platform: state
entity_id: sensor.first_phone_battery_state
to: home
- platform: state
entity_id: sensor.second_phone_battery_state
to: home
condition:
…
action:
- scene: scene.YOURSCENE
I have not tried the suggested automation, but I understand that would trigger the action/scene when both phones are home and charging.
What I am trying to acheive is if one one person is home and going to bed (charging the phone) , the night-scene should be trigged. If we are both home, both phone must be in charging state in order for the action to happen.