From aff02e0732e32398b1140fb1027750e3fca8e909 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Mon, 18 Dec 2023 01:13:46 +0100 Subject: [PATCH] [alarm] Include `type='alarm'` in `Alarm.to_dict()`. This is for compatibility with other backend/frontend components who expect valid entities on events or responses, and hence may break if `type` is not specified. --- platypush/plugins/alarm/_model.py | 1 + 1 file changed, 1 insertion(+) diff --git a/platypush/plugins/alarm/_model.py b/platypush/plugins/alarm/_model.py index d2af21265..406b0c058 100644 --- a/platypush/plugins/alarm/_model.py +++ b/platypush/plugins/alarm/_model.py @@ -329,6 +329,7 @@ class Alarm: def to_dict(self) -> dict: return { 'id': self.name, + 'type': 'alarm', 'name': self.name, 'when': self.when, 'next_run': self.get_next(),