Hi,
I´m getting the Error “Invalid config for [automation]: (See /config/configuration.yaml, line 51).”
But i don´t know how can i fix this
What´s wrong???
Check your automation.yaml file?
I did not found an Error there…
- alias: Air Purifier mode change
trigger:
entity_id: input_select.xiaomi_airpurifier_mode
platform: state
action:
service: fan.set_speed
data_template:
entity_id: fan.xiaomi_miio_device
speed: '{{ states.input_select.xiaomi_airpurifier_mode.state }}'
id: bfd74fe9b0ba40ccb8c77e9d84877229
- alias: Air Purifier mode changed
trigger:
platform: state
entity_id: fan.xiaomi_miio_device
condition:
condition: and
conditions:
- condition: template
value_template: '{{ (state_attr(''fan.xiaomi_miio_device'', ''speed'') | string)
!= (states(''input_select.xiaomi_airpurifier_mode'') | string) }}'
action:
service: input_select.select_option
entity_id: input_select.xiaomi_airpurifier_mode
data_template:
option: '{{ states.fan.xiaomi_miio_device.attributes.speed }}'
id: 5ac76f7be2e24606ba55ce5bbaae8f2c
- alias: Air Purifier favorite level change
trigger:
entity_id: input_number.xiaomi_airpurifier_favorite_level
platform: state
action:
service: xiaomi_miio.fan_set_favorite_level
data_template:
entity_id: fan.xiaomi_miio_device
level: '{{ states.input_number.xiaomi_airpurifier_favorite_level.state | int
}}'
id: 2eff44c8ad2c4318993e788726dc5e72
- alias: Air Purifier favorite level changed
trigger:
platform: state
entity_id: fan.xiaomi_miio_device
condition:
condition: and
conditions:
- condition: template
value_template: '{{ (state_attr(''fan.xiaomi_miio_device'', ''favorite_level'')
| int) != (states(''input_number.xiaomi_airpurifier_favorite_level'') | int)
}}'
action:
service: input_number.set_value
entity_id: input_number.xiaomi_airpurifier_favorite_level
data_template:
value: '{{ states.fan.xiaomi_miio_device.attributes.favorite_level }}'
id: ed27f3d028a14377b9b3811d02fb1565
- alias: Air Purifier mode change Werkstatt
trigger:
entity_id: input_select.xiaomi_airpurifier_wohnzimmer_mode
platform: state
action:
service: fan.set_speed
data_template:
entity_id: fan.xiaomi_air_purifier_2h_wohnzimmer
speed: '{{ states.input_select.xiaomi_airpurifier_wohnzimmer_mode.state }}'
id: bfd74fe9b0ba40ccb8c77e9d848772292
- alias: Air Purifier mode changed Werkstatt
trigger:
platform: state
entity_id: fan.xiaomi_air_purifier_2h_wohnzimmer
condition:
condition: and
conditions:
- condition: template
value_template: '{{ (state_attr(''fan.xiaomi_air_purifier_2h_wohnzimmer'', ''speed'')
| string) != (states(''input_select.xiaomi_airpurifier_wohnzimmer_mode'')
| string) }}'
action:
service: input_select.select_option
entity_id: input_select.xiaomi_airpurifier_wohnzimmer_mode
data_template:
option: '{{ states.fan.xiaomi_air_purifier_2h_wohnzimmer.attributes.speed }}'
id: 5ac76f7be2e24606ba55ce5bbaae8f2c2
- alias: Air Purifier favorite level change Werkstatt
trigger:
entity_id: input_number.xiaomi_airpurifier_wohnzimmer_favorite_level
platform: state
action:
service: xiaomi_miio.fan_set_favorite_level
data_template:
entity_id: fan.xiaomi_air_purifier_2h_wohnzimmer
level: '{{ states.input_number.xiaomi_airpurifier_wohnzimmer_favorite_level.state
| int }}'
id: 2eff44c8ad2c4318993e788726dc5e722
- alias: Air Purifier favorite level changed Werkstatt
trigger:
platform: state
entity_id: fan.xiaomi_air_purifier_2h_wohnzimmer
condition:
condition: and
conditions:
- condition: template
value_template: '{{ (state_attr(''fan.xiaomi_air_purifier_2h_wohnzimmer'', ''favorite_level'')
| int) != (states(''input_number.xiaomi_airpurifier_wohnzimmer_favorite_level'')
| int) }}'
action:
service: input_number.set_value
entity_id: input_number.xiaomi_airpurifier_wohnzimmer_favorite_level
data_template:
value: '{{ states.fan.xiaomi_air_purifier_2h_wohnzimmer.attributes.favorite_level
}}'
id: ed27f3d028a14377b9b3811d02fb15652
- id: '1583158555692'
alias: mikepc abends aus
description: ''
trigger:
- below: 70
device_id: 7a490fe5e9b44db3a4e3fe9e2f623420
domain: sensor
entity_id: sensor.mikepc_sw_energy_power
for:
hours: 0
minutes: 0
seconds: 30
platform: device
type: power
condition: []
action:
- device_id: 7a490fe5e9b44db3a4e3fe9e2f623420
domain: switch
entity_id: switch.mikepc_sw
type: turn_off
- type: turn_off
device_id: 36bea4e6fe4011eab40c4390d17adf9e
entity_id: switch.switch_cutter
domain: switch
mode: single
- id: '1583222366012'
alias: microsoldering abends aus
description: ''
trigger:
- platform: time
at: '22:00'
condition: []
action:
- device_id: 76ee93a7d9314384acfeb838c5d3da5b
domain: switch
entity_id: switch.microsoldering
type: turn_off
- type: turn_off
device_id: 36bea4e6fe4011eab40c4390d17adf9e
entity_id: switch.switch_cutter
domain: switch
mode: single
- id: '1591215175480'
alias: hassio backup
description: ''
trigger:
- at: '23:00:00'
platform: time
condition: []
action:
- data:
addon: 15d21743_samba_backup
service: hassio.addon_start
- id: '1591686748490'
alias: Purge Database
description: ''
trigger:
- at: 03:00:00
platform: time
condition: []
action:
- data:
keep_days: 5
service: recorder.purge
- id: '1591974441272'
alias: Klima abends aus
description: ''
trigger:
- at: '21:00:00'
platform: time
condition: []
action:
- device_id: fb3c02813130406f866cff4544a6d9e2
domain: climate
entity_id: climate.daikinap48491
type: set_hvac_mode
hvac_mode: 'off'
mode: single
- id: '1594921037770'
alias: kasse an
description: ''
trigger:
- above: 10
device_id: 03457b7df4204bdb8d0545fd42c0765c
domain: sensor
entity_id: sensor.ds218_sw_energy_power
platform: device
type: power
condition: []
action:
- device_id: 3df967bb2d704ecc83a592e0d7079cd8
domain: switch
entity_id: switch.switch_kasse_slave
type: turn_on
- device_id: 3df967bb2d704ecc83a592e0d7079cd8
domain: switch
entity_id: switch.switch_kasse_slave_2
type: turn_on
- id: '1594921079922'
alias: kasse aus
description: ''
trigger:
- below: 9
device_id: 03457b7df4204bdb8d0545fd42c0765c
domain: sensor
entity_id: sensor.ds218_sw_energy_power
for:
hours: 0
minutes: 0
seconds: 0
platform: device
type: power
condition: []
action:
- device_id: 3df967bb2d704ecc83a592e0d7079cd8
domain: switch
entity_id: switch.switch_kasse_slave
type: turn_off
- device_id: 3df967bb2d704ecc83a592e0d7079cd8
domain: switch
entity_id: switch.switch_kasse_slave_2
type: turn_off
- id: '1599470171203'
alias: wireguard neustart
description: ''
trigger:
- entity_id: input_boolean.wireguard_neustart
from: 'off'
platform: state
to: 'on'
condition: []
action:
- device_id: 914bf8b3c0364a6b97e61c1fb8a8ba30
domain: switch
entity_id: switch.wireguard_sw
type: turn_off
- delay: 00:00:10
- device_id: 914bf8b3c0364a6b97e61c1fb8a8ba30
domain: switch
entity_id: switch.wireguard_sw
type: turn_on
- data: {}
entity_id: input_boolean.wireguard_neustart
service: homeassistant.turn_off
mode: single
- id: '1600337649060'
alias: klima aus
description: ''
trigger:
- device_id: f6dad804ca60483f9dcb14c9a83de9a0
domain: zha
platform: device
subtype: button_6
type: remote_button_alt_short_press
condition: []
action:
- device_id: fb3c02813130406f866cff4544a6d9e2
domain: climate
entity_id: climate.daikinap48491
hvac_mode: 'off'
type: set_hvac_mode
mode: single
- id: '1600337700604'
alias: klima an
description: ''
trigger:
- device_id: dc61b21355547ef9c842f5385d65eb56
domain: zha
platform: device
type: remote_button_alt_short_press
subtype: button_5
condition: []
action:
- device_id: fb3c02813130406f866cff4544a6d9e2
domain: climate
entity_id: climate.daikinap48491
hvac_mode: heat
type: set_hvac_mode
mode: single
- id: '1602659449126'
alias: wassersensor mail
description: ''
trigger:
- type: moist
platform: device
device_id: bdaf014089cd10880cbccce121310572
entity_id: binary_sensor.lumi_lumi_sensor_wleak_aq1_ias_zone
domain: binary_sensor
for:
hours: 0
minutes: 0
seconds: 10
condition: []
action:
- service: notify.mailfreiburg
data:
title: Wassersensor Freiburg
message: Boden ist nass
mode: single
- id: '1607415532073'
alias: klima aus
description: ''
trigger:
- device_id: dc61b21355547ef9c842f5385d65eb56
domain: zha
platform: device
type: remote_button_alt_short_press
subtype: button_6
condition: []
action:
- device_id: fb3c02813130406f866cff4544a6d9e2
domain: climate
entity_id: climate.daikinap48491
type: set_hvac_mode
hvac_mode: 'off'
mode: single
- id: '1607415721977'
alias: pc´s an
description: ''
trigger:
- device_id: 8fdc12b7e82d3920f7ef4e6f282d85b5
domain: zha
platform: device
type: remote_button_alt_short_press
subtype: button_1
condition: []
action:
- type: turn_on
device_id: 76ee93a7d9314384acfeb838c5d3da5b
entity_id: switch.microsoldering
domain: switch
- delay: 00:00:10
- type: turn_on
device_id: 36bea4e6fe4011eab40c4390d17adf9e
entity_id: switch.switch_cutter
domain: switch
mode: single
- id: '1608316576766'
alias: klima an
description: ''
trigger:
- device_id: 8fdc12b7e82d3920f7ef4e6f282d85b5
domain: zha
platform: device
type: remote_button_alt_short_press
subtype: button_5
condition: []
action:
- device_id: fb3c02813130406f866cff4544a6d9e2
domain: climate
entity_id: climate.daikinap48491
type: set_hvac_mode
hvac_mode: heat
mode: single
- id: '1608317875998'
alias: klima aus
description: ''
trigger:
- device_id: 8fdc12b7e82d3920f7ef4e6f282d85b5
domain: zha
platform: device
type: remote_button_alt_short_press
subtype: button_6
condition: []
action:
- device_id: fb3c02813130406f866cff4544a6d9e2
domain: climate
entity_id: climate.daikinap48491
type: set_hvac_mode
hvac_mode: 'off'
mode: single
- id: '1609406114001'
alias: kundenzähler
description: ''
trigger:
- platform: state
entity_id: binary_sensor.cam_aussen_line_crossing
from: 'off'
to: 'on'
condition: []
action:
- service: counter.increment
data: {}
entity_id: counter.kunden
mode: single
- id: '1609758857372'
alias: Kundezähler reset
description: ''
trigger:
- platform: time
at: 00:00:01
condition: []
action:
- service: counter.reset
data: {}
entity_id: counter.kunden
mode: single
Did it work before? Have you changed anything?
It could be as simple as indents.
You could also try and comment out everything first and start uncommenting bit by bit to find out the part that gives you issues.
OK, i will try with comment out.
Thanks
Btw: How can i comment out all?
That depends on the editor you use. If you do not know or you use the editor add-on, I would recommend renaming your original file automation.yaml and creating a new one and start moving pieces from one to another.
I could use notepad++
Or which Editor do you prefer?
i know in HTML i can use <!-- and --!>
I use Visual Studio Code. its easy and I have installed the Samba add-on so I can open the file directly without copying or moving first.
Ok,
i can use it too.
But how can i comment a block in Visual Studio Code?
Mark all lines and Ctrl K and then C. it will add a # in front of each line.
and to uncomment the same?
line by line… I am not aware of a mass uncomment.
If you have a lot of text, I would go with the new file approach.
Thanks.
Will try it
Found the Problem.
Thanks again for your Help!
just out of curiosity, what was it?
a double Entry
To uncomment you can use CTRL + K, U
You learn something new every day!