i would like to use secrets in automations like this:
service: alarm_control_panel.alarm_arm_home
target:
entity_id: alarm_control_panel.alarm_myhome
data:
code: !secret alarm_code
how can i do that? i read something about edititng manually an automation but it can’t be edited via UI no more…
tom_l
July 11, 2022, 2:12am
4
Click the yaml mode button in the automation editor.
freginedevices:
!secret alarm_code
i did that but after saving, it changes in:
service: alarm_control_panel.alarm_arm_home
target:
entity_id: alarm_control_panel.alarm_myhome
data:
code: null
This is still an issue.
If you use the UI, even in yaml mode, the !secret is corrupted it seems
123
(Taras)
September 28, 2022, 3:17pm
7
The Automation Editor has several known limitations and bugs, some of which occur when toggling between Visual/YAML modes.
Here’s a post from over a year ago that reports the inability to correctly handle !secret
OK. I found what the issue was. I have a manual alarm with an automation that disarms it when I return home. I used the code from this site: Disarming a manual alarm control panel in automation with a code
Here’s what I have in my automations.yaml file for this:
- id: disarm_when_brian_returns_home
alias: "Disarm when Brian returns home"
trigger:
- platform: state
entity_id: device_tracker.brians_iphone_12_pro
from: not_home
to: home
action:
service: alarm_contr…
The problem was reported in the GitHub Frontend repository (earlier this year) but the Issue was never addressed:
opened 06:43PM - 26 Mar 22 UTC
closed 12:02PM - 25 Nov 23 UTC
stale
### Checklist
- [X] I have updated to the latest available Home Assistant versi… on.
- [X] I have cleared the cache of my browser.
- [X] I have tried a different browser to see if it is related to my browser.
### Describe the issue you are experiencing
The UI editor is locking up and give me an Response error: 500 when trying to save changes.
This is when I use " !include exempel.yaml " .
I can't put it in via UI or UI yaml. I use an other editor for putting it in.
Same goes for if I manipulerar script yaml in other editors.
But if I undo what I did in an other editor I can save in UI aging.
### Describe the behavior you expected
Super green. Just played whit HA 5 month.
### Steps to reproduce the issue
1. build a tts script in UI
2. include a yaml file for dynamic message " !include exempel.yaml "
3. Or edit an script in Atom.
...
Now get a "Response error: 500" when you try to save back in UI.
### What version of Home Assistant Core has the issue?
core-2022.3.7
### What was the last working version of Home Assistant Core?
core-2022.3.7
### In which browser are you experiencing the issue with?
Chrome
### Which operating system are you using to run this browser?
windows 10
### State of relevant entities
_No response_
### Problem-relevant frontend configuration
_No response_
### Javascript errors shown in your browser console/inspector
_No response_
### Additional information
_No response_
All this to say that !secret
is supported in automations, but mishandled by the Automation Editor.
+1 from me on this.
I just changed over from yaml to be able to use UI and yaml, and to be able to use category, label and so on which is new.
But secrets is a problem because i like to share my automations and use secrets to not risk sending an ID of some kind by accident.