mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 12:55:22 +00:00
Added clock notifications for elapsed time.
Added notifications to default `clock` module to broadcast: - `CLOCK_SECOND` for a clock second, and - `CLOCK_MINUTE` for a clock minute having elapsed. Each notification is broadcasted with the corresponding value i.e. `CLOCK_SECOND` -> `30` and `CLOCK_MINUTE` -> `5` .
This commit is contained in:
@@ -44,3 +44,14 @@ The following properties can be configured:
|
||||
| `analogPlacement` | **Specific to the analog clock. _(requires displayType set to `'both'`)_** Specifies where the analog clock is in relation to the digital clock <br><br> **Possible values:** `top`, `right`, `bottom`, or `left` <br> **Default value:** `bottom`
|
||||
| `analogShowDate` | **Specific to the analog clock.** If the clock is used as a separate module and set to analog only, this configures whether a date is also displayed with the clock. <br><br> **Possible values:** `false`, `top`, or `bottom` <br> **Default value:** `top`
|
||||
| `timezone` | Specific a timezone to show clock. <br><br> **Possible examples values:** `America/New_York`, `America/Santiago`, `Etc/GMT+10` <br> **Default value:** `none`. See more informations about configuration value [here](https://momentjs.com/timezone/docs/#/data-formats/packed-format/)
|
||||
|
||||
## Notifications
|
||||
|
||||
The clock makes use of the built-in [Notification Mechanism](https://github.com/michMich/MagicMirror/wiki/notifications) to relay notifications to all modules.
|
||||
|
||||
Current notifications are:
|
||||
|
||||
| Notification | Description
|
||||
| ----------------- | -----------
|
||||
| `CLOCK_SECOND` | A second has elapsed. <br> *Parameter*: second value
|
||||
| `CLOCK_MINUTE` | A minute has elapsed <br> *Parameter*: minute value
|
Reference in New Issue
Block a user