Commit Graph

18 Commits

Author SHA1 Message Date
Fabio Manganiello 59c693d6a0
[#394] All `manifest.yaml` converted to `manifest.json`.
YAML isn't part of the Python standard library, while JSON is.

If we want `setup.py` to dynamically parse the available integration
manifest files in order to populate the extra dependencies, then it's
better to rely on a JSON format for manifest files - the parser is part
of the standard library and it doesn't require the user to install
`pyyaml` before `platypush`.
2024-05-17 02:21:57 +02:00
Fabio Manganiello cfc7a5a6a0
[alarm] Added `media_repeat` configuration.
continuous-integration/drone/push Build is failing Details
2023-12-18 13:46:45 +01:00
Fabio Manganiello 52fd64a162
[alarm] Added `dismiss_interval` configuration. 2023-12-18 03:01:27 +01:00
Fabio Manganiello aff02e0732
[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.
2023-12-18 01:13:46 +01:00
Fabio Manganiello e617a9fe82
[alarm] Added `alarm.delete`. 2023-12-18 00:05:34 +01:00
Fabio Manganiello 430a111303
[alarm] Better default actions inference in `alarm.edit`. 2023-12-17 17:53:08 +01:00
Fabio Manganiello 6edb8c8318
[#340] s/datetime.fromisoformat/dateutil.parser.isoparse/
We may receive JavaScript timestamps with non-standard `Z` suffix too.
2023-12-11 22:24:55 +01:00
Fabio Manganiello b4be56ec2c
[#340] Added `condition_type` field to alarm objects. 2023-12-10 21:52:50 +01:00
Fabio Manganiello 03c167d6b7
[#340] Added `Alarm.is_cron` property. 2023-12-10 20:58:13 +01:00
Fabio Manganiello 2d8f6102c1
[#340] Added `alarm.edit` action. 2023-12-10 20:39:06 +01:00
Fabio Manganiello 8ddd9879f2
[#340] Alarm model enhancements.
- Allow initialization of alarm actions from `Procedure` objects too.

- Force `state=WAITING` when an alarm is disabled.
2023-12-10 17:56:47 +01:00
Fabio Manganiello 42574d054a
[#340] Ironed out some bugs in the `alarm` integration.
- The alarm ID should be randomly generated - auto-increment IDs are
  subject to race conditions when alarms are created in separate
  processes.

- Clean up alarms that are not static and have been removed from the db.

- Better alarm shut down detection logic.
2023-12-10 15:30:19 +01:00
Fabio Manganiello f27e7bb7e2
[#340] Better state management for alarms.
- Added `AlarmEnabledEvent` and `AlarmDisabledEvent`.
- Added `snooze_interval` configurable both at plugin level and alarm
  level.
2023-12-09 17:12:20 +01:00
Fabio Manganiello 4b578c38c8
[#340] Better state management for alarms. 2023-12-09 14:25:18 +01:00
Fabio Manganiello 9d5c755188
[#340] Alarm integration improvements.
- Emit `EntityDeleteEvent` when an alarm is expired and removed so
  clients can properly synchronize their state.

- `croniter.get_next()` should be timezone-aware.
2023-12-09 13:33:42 +01:00
Fabio Manganiello fcb6b621ab
[#340] Added persistence of alarm entities. 2023-12-09 01:25:12 +01:00
Fabio Manganiello 5ad1a62293
[#340] Merged `alarm` backend into the `alarm` plugin.
Closes: #340
2023-12-06 19:23:19 +01:00
Fabio Manganiello 3bfc5b83ef Moved to manifest files for describing plugins and backends and their dependencies 2021-09-16 17:53:40 +02:00