I want to enter 2 numerical codes and use a button to pass the code to an esphome device that actuates … in my case the front door lock. The problem is the conditions in the automation are not applied and the script running the automation and just activates the lock
Automation yamll
‘’’
alias: lockFrontDoor
description: security door control actions
triggers:
- trigger: state
entity_id:- script.lock_front_door_2
to:
conditions:
- script.lock_front_door_2
- condition: and
conditions:- condition: state
entity_id: input_text.text1
attribute: pattern
state: ‘314159’ - condition: state
entity_id: input_text.text2
attribute: pattern
state: ‘2.718’
actions:
- condition: state
- type: turn_on
device_id: f757fad91cc2dd9857bd4c4c2ec1d4be
entity_id: 27bc859d73ffec574346acdc33cb9da9
domain: switch - action: notify.notify
metadata: {}
data:
message: Front Door accessed - delay:
hours: 0
minutes: 0
seconds: 10
milliseconds: 0 - data:
value: ‘“”’
target:
entity_id: input_text.text1
action: input_text.set_value - data:
value: ‘“”’
target:
entity_id: input_text.text2
action: input_text.set_value
mode: single
# and the script that uses a runs the automation from the actuation of a dash board switch
#**script yaml**
action: automation.trigger
target:
entity_id: automation.lockfrontdoor
data:
skip_condition: false