home-assistant / home-assistant.io

:blue_book: Home Assistant User documentation
https://www.home-assistant.io
Other
4.84k stars 7.23k forks source link

doesn't work #30745

Closed CristianSto closed 6 months ago

CristianSto commented 9 months ago

Feedback

for automation:

  - alias: "MeteoAlarm Bucuresti"
    trigger:
      platform: state
      entity_id: binary_sensor.meteoalarm
      from: ‘off’
    action:
      - service: notify.notify
        data:
          title: "{{state_attr('binary_sensor.meteoalarm', 'headline')}}"
          message: "{{state_attr('binary_sensor.meteoalarm', 'description')}} is effective on {{state_attr('binary_sensor.meteoalarm', 'effective')}}"

i received error Message malformed: extra keys not allowed @ data['automation']

URL

https://www.home-assistant.io/integrations/meteoalarm/

Version

2024.1.2

Additional information

No response

home-assistant[bot] commented 9 months ago

Hey there @rolfberkenbosch, mind taking a look at this feedback as it has been labeled with an integration (meteoalarm) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `meteoalarm` can trigger bot actions by commenting: - `@home-assistant close` Closes the feedback. - `@home-assistant rename Awesome new title` Renames the feedback. - `@home-assistant reopen` Reopen the feedback. - `@home-assistant unassign meteoalarm` Removes the current integration label and assignees on the feedback, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information) to the feedback. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information) on the feedback.
tathamoddie commented 8 months ago

Where exactly have you put this YAML? Which file, and what else is around it?

This error is more about the automation YAML and the context that it is in, and nothing about the meteoalarm integration itself.

You might want to try creating this automation via the UI. HA > Settings > Automations > Create Automation. That will help guide you to success and avoid a lot of these very niggly YAML issues.


In your trigger section, the from line has malformed quotes. They are smart quotes (, ), not single quotes (').

I can see that this mistake comes from the documentation page, so I have queued a fix for that (https://github.com/home-assistant/home-assistant.io/pull/30795).

In the meantime, you should change this line:

from: ‘off’

to:

from: 'off'

While you're at it, you might want to consider triggering when binary_sensor.meteoalarm goes to on, rather than from off. That's because entities can have a third state: Unavailable. At the moment, if the MeteoAlarm service was unavailable, or your HA instance couldn't reach it, then your automation would try and run to send you a notification, even though there are no alarm details available.


Hope that helps a bit!

github-actions[bot] commented 6 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved. If this issue is still relevant, please let us know by leaving a comment 👍 This issue has now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.