majbom
October 2, 2021, 9:59am
1
Hi there.
I just created a simple automation through the GUI, but it’s nowhere to be seen in automations.yaml - it’s working fine though
While I was looking in the file, I added som line breaks between each automation to make the file more manageable. Afterwards, I wasn’t able to edit the new automation through the GUI; I got the message “Only automations in automations.yaml are editable”. I tried to restart HA, but now I got af lot of automations with this message - none of these automations can be found in automations.yaml.
I’m pretty sure I have never made automations anywhere else than in that file or through the GUI.
What’s going on?
Thanks!
123
(Taras)
October 2, 2021, 12:21pm
2
It sounds like your modifications to the file might be responsible for the problem.
Execute the following command Configuration > Server Controls > Check Configuration and confirm it reports no errors (also check Configuration > Logs).
majbom
October 2, 2021, 7:15pm
3
Sorry, I forgot to mention “Check configuration” do not report any errors.
I don’t see any related errors in the log, only 2 deconz errors and a nmap_tracker error.
123
(Taras)
October 2, 2021, 7:37pm
4
Either manually undo the modifications you made, to automations.yaml
, or restore from a backup created prior to the modifications.
majbom
October 2, 2021, 8:02pm
5
Crap!
I tried undoing the changes without any luck.
I’ll try the backup - thanks!
majbom
October 3, 2021, 5:21am
6
I still think it’s weird that the newly created automation doesn’t exist in the file, but works fine.
Are these ghosts automation survive between restarts? o believe that they are created as entities in memory but weren’t stored into file and they will disappear after restart.
majbom
October 3, 2021, 6:59am
8
The one I created using the GUI that wasn’t in the file was completely gone after a restart. But I have a lot in the automations list that are “greyed out”, I can’t edit, run or toggle them active/inactive and their “Last triggered” says “never”, even though some of them have been triggered within the last week.
Last triggered was not stored in db between restarts, if it has not changed recently, so it should be normal
majbom
October 3, 2021, 7:49am
10
Okay, but where is the rest of the info from, when the automations are not in the file?
How do I clean up when I can’t edit through GUI nor find find them in the file?
sjee
October 3, 2021, 7:55am
11
Show the file, without it we can only guess. And what is in your configuration.yaml?
majbom
October 3, 2021, 8:23am
12
Sorry, I have been answering from my phone the last few times.
Should I paste the contents here, or should I use pastebin or similar?
majbom
October 3, 2021, 10:39am
13
configuration.yaml
# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:
homeassistant:
customize: !include customize.yaml
http:
use_x_forwarded_for: true
trusted_proxies:
- 192.168.0.13
# Text to speech
tts:
- platform: google_translate
language: "da"
intent_script:
whereIsMikkel:
speech:
text: Mikkel er hjemme
google_assistant:
project_id: tpv-home-assistant
service_account: !include SERVICE_ACCOUNT.json
report_state: true
expose_by_default: false
entity_config: !include ga.entities.yaml
logger:
default: error
logs:
homeassistant.components.zwave: debug
# homeassistant.core: debug
mqtt:
broker: 192.168.0.13
username: ha
password: !secret mqtt_pass
climate wavinAhc9000: !include wavin.yaml
device_tracker:
- platform: nmap_tracker
track_new_devices: yes
scan_options: -p80 -host-timeout 5s
consider_home: 180
hosts: 192.168.0.50-55
sensor places_mikkel:
- platform: places
name: mikkel
devicetracker_id: device_tracker.life360_mikkel
options: zone,place,street
map_provider: google
map_zoom: 19
home_zone: zone.home
api_key: !secret email_morten
- platform: places
name: morten
devicetracker_id: device_tracker.life360_morten
options: zone,place,street
map_provider: google
map_zoom: 19
home_zone: zone.home
api_key: !secret email_morten
media_player:
- platform: squeezebox
host: 192.168.0.12
port: 9000
sensor:
- platform: mqtt
name: "pCP Rack temperature"
state_topic: "pcp/rack/temp"
- platform: mqtt
name: "pCP Rack fan"
state_topic: "pcp/rack/fan"
light:
- platform: switch
name: Køkkenbord
entity_id: switch.kitchen_table
light groups: !include group.light.yaml
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
zone: !include zone.yaml
input_boolean: !include input.boolean.yaml
input_number: !include input.number.yaml
input_select: !include input.select.yaml
automations.yaml
- id: '1610309985063'
alias: Toggle lys, repos, nat, x1
description: ''
trigger:
- platform: event
event_type: zwave_js_value_notification
event_data:
node_id: 6
command_class: 43
value: 26
condition: []
action:
- service: light.turn_off
target:
entity_id:
- light.repos_middle
- light.repos_window
- service: light.toggle
data:
brightness_pct: 5
target:
entity_id: light.repos_night
mode: single
- id: '1612859207202'
alias: Skru ned, medieafspiller
description: ''
trigger:
- platform: event
event_type: deconz_event
event_data:
id: remote_kontor
event: 3002
condition: []
action:
- service: script.vol_down_media_player
data_template:
trigger: '{{trigger.event.data.id}}'
mode: single
- id: '1612859377451'
alias: Skru op, medieafspiller
description: ''
trigger:
- platform: event
event_type: deconz_event
event_data:
id: remote_kontor
event: 2002
condition: []
action:
- service: script.vol_up_media_player
data_template:
trigger: '{{trigger.event.data.id}}'
mode: single
- id: '1612870710959'
alias: Næste, medieafspiller
description: ''
trigger:
- platform: event
event_type: deconz_event
event_data:
id: remote_kontor
event: 5002
condition: []
action:
- service: script.radio_change_stream
data_template:
direction: next
trigger: '{{trigger.event.data.id}}'
mode: single
- id: '1612871032442'
alias: Forrige, medieafspiller
description: ''
trigger:
- platform: event
event_type: deconz_event
event_data:
id: remote_kontor
event: 4002
condition: []
action:
- service: script.radio_change_stream
data_template:
direction: previous
trigger: '{{trigger.event.data.id}}'
mode: single
- id: '1613683945279'
alias: Tænd/sluk medieafspiller
description: ''
trigger:
- platform: event
event_type: deconz_event
event_data:
id: remote_kontor
event: 1002
condition: []
action:
- service: script.toggle_media_player_power
data_template:
trigger: '{{trigger.event.data.id}}'
mode: single
- id: '1614259489413'
alias: Dørklokke
description: ''
trigger:
- platform: event
event_type: deconz_event
event_data:
id: friends_of_hue_switch
event: 2002
condition: []
action:
- service: script.doorbell
data: {}
mode: single
- id: '1616162977903'
alias: Toggle lys, repos, nat, x2
description: ''
trigger:
- platform: event
event_type: zwave_js_value_notification
event_data:
node_id: 6
command_class: 43
value: 24
condition: []
action:
- service: light.toggle
data:
brightness_pct: 100
target:
entity_id: light.repos_night
mode: single
- id: '1616163790685'
alias: Toggle lys, repos, nat, x3
description: ''
trigger:
- platform: event
event_type: zwave_js_value_notification
event_data:
node_id: 6
command_class: 43
value: 25
condition: []
action:
- service: light.toggle
data:
brightness_pct: 100
target:
entity_id: light.repos
mode: single
- alias: Dæmper, repos, start
initial_state: true
trigger:
- platform: event
event_type: zwave_js_event
event_data:
node_id: 6
command_class: 43
value: 22
action:
- service: script.turn_on
target:
entity_id: script.repos_light
data:
variables:
light: light.repos_stairs_1
id: a5bdd8b0097342e982eb926e8dd4d838
- alias: Dæmper, repos, stop
initial_state: true
trigger:
- platform: event
event_type: zwave_js_event
event_data:
node_id: 6
command_class: 43
value: 23
action:
- service: script.turn_off
target:
entity_id: script.repos_light
- service: input_select.select_next
target:
entity_id: input_select.dim_repos_direction
id: 98a1b63df0ff4ab4bbb27ace75ddc314
- alias: Dæmper, tv, start
initial_state: true
trigger:
- platform: event
event_type: deconz_event
event_data:
id: "friends_of_hue_switch"
event: 1001
action:
- service: script.turn_on
target:
entity_id: script.tv_light
data:
variables:
light: light.tv
- alias: Dæmper, tv, stop
initial_state: true
trigger:
- platform: event
event_type: deconz_event
event_data:
id: "friends_of_hue_switch"
event: 1003
action:
- service: script.turn_off
target:
entity_id: script.tv_light
- service: input_select.select_next
target:
entity_id: input_select.dim_tv_direction
- id: '1616699140636'
alias: Toggle lys, spisebord
description: ''
trigger:
- platform: event
event_type: deconz_event
event_data:
id: tradfri_shortcut_button
event: 1001
condition: []
action:
- service: light.toggle
data:
brightness_pct: 100
target:
entity_id: light.spisebord
mode: single
- id: '1617822594761'
alias: Sluk TV, stue
description: ''
trigger:
- platform: state
entity_id: media_player.sony_bravia_tv
from: 'on'
to: 'off'
for: 00:02:00
condition: []
action:
- service: light.turn_off
target:
entity_id: light.tv
mode: single
- id: '1617878265943'
alias: Sluk lys, repos, sol op
description: ''
trigger:
- platform: sun
event: sunrise
offset: -01:00:00
condition: []
action:
- service: light.turn_off
target:
area_id: repos
mode: single
- id: '1617967890476'
alias: Toggle lys, køkkenborde
description: ''
trigger:
- platform: event
event_type: deconz_event
event_data:
id: tradfri_shortcut_button
event: 1002
condition: []
action:
- service: switch.toggle
target:
entity_id: switch.kokkenbord_current_value
mode: single
- id: '1618942965043'
alias: Toggle lys TV
description: ''
trigger:
- platform: event
event_type: deconz_event
event_data:
id: friends_of_hue_switch
event: 1002
condition: []
action:
- service: light.toggle
target:
entity_id: light.tv
data:
brightness_pct: 30
mode: single
i am not able to see anything weird here, @sjee might help
majbom
October 4, 2021, 10:40am
15
Okay, thanks for your time.
My automations list looks like this:
Does it make sense if HA is using an older version of automations.yaml ? I can see that some of the automations are using a node id of a replaced z-wave relay and I also have another automation that looks like and older version of itself.
sjee
October 4, 2021, 11:15am
16
You have automations with and without and ID in your automations.yaml Better remove the automations you’ve created manually and add somehting like this to your configuration.yaml This way you can keep automations created manually and through the UI separately which I expect is the cause of your issues.
majbom
October 4, 2021, 11:36am
17
I’m also pretty sure that it’s because I’ve been fiddling around in the file.
I’ll seperate the automations as per your link, thanks.
But how do I get rid of the “unknown” automations in my list?
123
(Taras)
October 4, 2021, 12:04pm
18
Click the automation’s information icon, then click Remove Entity.
majbom
October 5, 2021, 8:20am
20
Just to try to figure out what happened after I (apparently) broke the automations.yaml