[alarm] Better default actions inference in alarm.edit.

This commit is contained in:
Fabio Manganiello 2023-12-17 17:53:08 +01:00
parent b0feb8ed8f
commit 430a111303
Signed by: blacklight
GPG key ID: D90FBA7F76362774

View file

@ -403,7 +403,7 @@ class AlarmPlugin(RunnablePlugin, EntityManager):
when=when or alarm.when,
media=media or alarm.media,
media_plugin=media_plugin or alarm.media_plugin or self.media_plugin,
actions=actions or alarm.actions or [],
actions=actions if actions is not None else (alarm.actions or []),
name=new_name or name,
enabled=enabled if enabled is not None else alarm.is_enabled(),
audio_volume=audio_volume