nielsfaber/alarmo

Error while test/modify nofification action: "extra keys not allowed @ data['entity_id']. Got None"

Closed this issue Β· 24 comments

Checklist

  • I am using the latest version of Alarmo (latest version can be found here)
  • I checked for similar existing requests (both open and closed) before posting.

Alarmo Version

v1.10.6 / v1.10.5 / v1.10.4

HA Version

2024.10.3

Bug description

While testing an existing notification I'm getting following error message:

extra keys not allowed @ data['entity_id']. Got None

YAML code of existing notification:

service: notify.mobile_app_all
entity_id: null
data:
  message: >-
    Der Alarm konnte im Moment nicht scharfgeschaltet werden, aufgrund von:
    {{open_sensors|lang=de}}.
  title: Alarmo - Scharfschaltung fehlgeschlagen

Expecting that 'entity_id: null' is the reason for this. Deleting the line and saving creates the following error message:

Something went wrong!
Message format incorrect: string value is None for dictionary value @ data['actions'][0]['entity_id']

Response error: 400

Please report the bug.

Steps to reproduce

  1. Create a new notification and before you save it try to send test notification -> test message will be send
  2. Check YAML code -> No 'entity_id: null' visible
  3. Save the notification
  4. Reopen saved notification and try to test sending a test message -> Error message appears
  5. Check YAML code -> 'entity_id: null' is added

Additional remarks:

  • Initially expecting that the issue was related to new released v1.10.6. But with rollback to v1.10.5 and v1.10.4 same behaviour.
  • If the notification is triggered by alarmo itself message is send without issues.

Relevant log output

2024-10-23 22:50:35.423 ERROR (MainThread) [homeassistant.helpers.script.websocket_api_script] websocket_api script: Error executing script. Invalid data for call_service at pos 1: extra keys not allowed @ data['entity_id']

Exact same issue here

Same here

Temporary workaround if you need to modify your Alarmo notifications is to change the target to different one, and then change it back again to what it should be before clicking on "Save".

Also seeing this issue. @aheath70 's workaround worked for me as well, thanks!

Unfortunately this seems to make it impossible to create any non-standard actions, e.g. for sending notifications on Android.

Exact same issue here

I can confirm this issue. Its due to a change I made in the last release (v1.10.6).
However, this only affects the testing function. The notification should still work fine after saving.
I will make sure this is addressed in the next release. In the mean time I suggest to use the workaround of @aheath70.

@nielsfaber
The issue does affect the yaml configuration as well. As soon as I hit the yaml button i cannot modify/Save the entry anymore.
I initially intended to make the notifications critical on iOS.

same. Though irl when the actions are actually triggered I get some of the notifications on my iPhone but some I don't get. I think something is wrong in general. It somehow adds entity_id: null to the YAML code. Even I delete it it is added back

Same

Same for me. I'm on HA version 2024.11.2

I can confirm this issue. Its due to a change I made in the last release (v1.10.6). However, this only affects the testing function. The notification should still work fine after saving. I will make sure this is addressed in the next release. In the mean time I suggest to use the workaround of @aheath70.

@nielsfaber Hi - the workaround only works till HA is re-started. After a restart it doesn't work anymore and have to go through the process again.
Any idea when the next version (which fixes the issues) will be released?

Thanks.

Hello.
I suppose this issue can be closed since it was fixed in version 1.10.7.
Is it true?

@iz8mbw i hope so.
@hanshanderson can you confirm the new release solved the issue for you?

No sorry ... still get this after just trying to edit the name of the action:

Message format incorrect: string value is None for dictionary value @ data['actions'][0]['entity_id']
Response error: 400

@tackin try to reboot HA and retry.

For me version 1.10.7 solved the issue.

HA asks to reboot after upgrading a HACS integration. So it was of course rebootet also after updating Alarmo to 1.10.7

edit: tried a second reboot: No change.

@tackin the version number is displayed in the top right corner in the alarmo configuration pages. If this one is up to date, maybe there is still an issue that needs to be tackled.
However I need a bit more insight in what you configured and try to do when it fails, since I (and some others) don’t experience any problems.
Screen capture videos are the best way to demonstrate a bug.

Yea ,,, works now!!!!
I needed to delete all Browser-Cache and reload HA-Webpage. Strange, because I swichted on this computer after having upgraded Alarmo via my mobile.

@iz8mbw i hope so. @hanshanderson can you confirm the new release solved the issue for you?

@nielsfaber : I have tested the new release (v1.10.7) and for me all is working fine now. Thank you for fixing the issue.

Thanks all for the prompt responses, this issue can be closed πŸ‘

Thank you Niels for your great work. I love this integration also for the prompt communication, maintenance of issues and reports.

Thank you @nielsfaber !!!

Thank you !