Ich habe probleme mit folgenden Code:
alias: SMGW Export mit Benachrichtigung
fields:
period:
selector:
select:
options: [yesterday, last_7_days, last_30_days, current_month, last_month]
sequence:
- action: smgw_han.export_period
data:
# device_id entfällt bei nur einem SMGW (wird automatisch erkannt).
# Mehrere SMGWs? Hier device_id: <deine-device-id> ergänzen.
period: "{{ period | default('last_month') }}"
download_cms: true
write_csv: true
write_xlsx: true
response_variable: result
- action: persistent_notification.create
data:
title: SMGW Export
message: >-
{{ result.reading_count }} Werte, {{ result.daily_summary | count }} Tage.
{% set f = result.files | default({}) %}
{% if f.cms %}[CMS]({{ f.cms }}) · {% endif %}
{% if f.csv %}[CSV]({{ f.csv }}) · {% endif %}
{% if f.xlsx %}[Excel]({{ f.xlsx }}){% endif %}
Es kommt beim Speichern die Fehlermeldung:
Message malformed: extra keys not allowed @ data[‘data’
Woran kann das liegen?