forked from platypush/platypush
[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.
This commit is contained in:
parent
29f65371d8
commit
aff02e0732
1 changed files with 1 additions and 0 deletions
|
@ -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(),
|
||||
|
|
Loading…
Reference in a new issue