Vad är det för fel på denna Yaml koden
Get this when I try to save it Message malformed: extra keys not allowed @ data[‘0’]
- alias: ‘Turn off lights when both doors are closed’
trigger:- platform: state
entity_id:- c6175cb7120463acecdcb81c58944d4e
- d51dbb13f6819fc64734d7dda457c376
to: ‘off’
condition:
- condition: state
entity_id: c6175cb7120463acecdcb81c58944d4e
state: ‘off’ - condition: state
entity_id: d51dbb13f6819fc64734d7dda457c376
state: ‘off’
action: - choose:
- conditions:
- condition: state
entity_id: ‘0f849f2a7c688cc68d253b832070a35’
state: ‘on’
sequence: - service: light.turn_on
target:
entity_id: ‘abf49bac076e5986434aaa2f7e9ae6a8’
data:
brightness_pct: >
{% set other_lights = [states.light.andra_lampor] %}
{% set max_brightness = 0 %}
{% for lamp in other_lights %}
{% if lamp.state == ‘on’ %}
{% set level = lamp.attributes.brightness | int / 255 * 100 %}
{% if level > max_brightness %}
{% set max_brightness = level %}
{% endif %}
{% endif %}
{% endfor %}
{{ max_brightness }}
- condition: state
- default:
- service: light.turn_off
target:
entity_id: ‘abf49bac076e5986434aaa2f7e9ae6a8’
- service: light.turn_off
- conditions:
- platform: state