summaryrefslogtreecommitdiff
path: root/blueprints
diff options
context:
space:
mode:
Diffstat (limited to 'blueprints')
-rw-r--r--blueprints/automation/lights/light_switch.yaml4
-rw-r--r--blueprints/automation/motion/halabyan24.yaml8
2 files changed, 6 insertions, 6 deletions
diff --git a/blueprints/automation/lights/light_switch.yaml b/blueprints/automation/lights/light_switch.yaml
index b3a4f81..c50e603 100644
--- a/blueprints/automation/lights/light_switch.yaml
+++ b/blueprints/automation/lights/light_switch.yaml
@@ -106,9 +106,9 @@ action:
- "{{ trigger.entity_id == light_entity }}"
sequence:
- service: >
- {% if trigger.to_state.state == "on" %}
+ {% if trigger.from_state.state == "off" and trigger.to_state.state == "on" %}
switch.turn_on
- {% else %}
+ {% elif trigger.from_state.state == "on" and trigger.to_state.state == "off" %}
switch.turn_off
{% endif %}
target:
diff --git a/blueprints/automation/motion/halabyan24.yaml b/blueprints/automation/motion/halabyan24.yaml
index 03f4ff3..f665303 100644
--- a/blueprints/automation/motion/halabyan24.yaml
+++ b/blueprints/automation/motion/halabyan24.yaml
@@ -32,7 +32,7 @@ trigger:
- platform: state
id: around_home
entity_id:
- - device_tracker.lm_g810
+ - device_tracker.sm_s926b
from: not_home
to: HomeHalabyanExtended
for:
@@ -43,7 +43,7 @@ trigger:
- platform: state
id: around_home2
entity_id:
- - device_tracker.lm_g810
+ - device_tracker.sm_s926b
from: not_home
to: home
for:
@@ -55,7 +55,7 @@ trigger:
- platform: state
id: away_from_home
entity_id:
- - device_tracker.lm_g810
+ - device_tracker.sm_s926b
from: HomeHalabyanExtended
to: not_home
for:
@@ -66,7 +66,7 @@ trigger:
- platform: state
id: away_from_home2
entity_id:
- - device_tracker.lm_g810
+ - device_tracker.sm_s926b
from: home
to: not_home
for: