Greetings HA community,
I’ve successfully created a automation which disarms my alarm with an offset of 10min before sunrise. I than attempted to redact the pin within the specific automations yaml using !secret as described in the docs here
Here is my automation code that works, with pin and device id changed for obvious reasons:
alias: Alarm - Disarm at Sunrise
description: Disarm the alarm ten minutes before sunrise
trigger:
- platform: sun
event: sunrise
offset: "-00:10"
condition:
- condition: device
device_id: 00000000000000000000000000
domain: alarm_control_panel
entity_id: alarm_control_panel.alarmo
type: is_armed_home
action:
- service: alarm_control_panel.alarm_disarm
data:
code: "00000"
target:
entity_id: alarm_control_panel.alarmo
mode: single
when creating a !secret within secrets.yaml person_pin: “00000” and using it as follows:
action:
- service: alarm_control_panel.alarm_disarm
data:
code: !secret person_pin
target:
entity_id: alarm_control_panel.alarmo
mode: single
The yaml checker goes from blue to red, and when saved as such going back in the code has changed to:
action:
- service: alarm_control_panel.alarm_disarm
data:
code: null
target:
entity_id: alarm_control_panel.alarmo
mode: single
I’ve also tried searching older threads for relevance such as here
New to HA and hoping I’m not being a noob here, but any help on how to do this would be very much appreciated.