Take sopine ac adapter into account for kiosk screen automation

This commit is contained in:
KemoNine 2019-05-07 02:17:19 +00:00
parent 9b635ca1a3
commit 30951f16a2
1 changed files with 3 additions and 1 deletions

View File

@ -4,11 +4,13 @@
trigger:
- platform: state
entity_id: !secret tracked_device_1
- platform: state
entity_id: sensor.sopine_ac_present
action:
- service: shell_command.lightdm
data_template:
action: >-
{% if trigger.to_state.state == 'home' %}
{% if trigger.to_state.state == 'home' and is_state('sensor.sopine_ac_present', 'True') %}
start
{% else %}
stop