Mode horloge
set_clock_mode
Set the clock mode of the device. Time is set automatically during connection via Bluetooth.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
style
|
int
|
The clock style (0-8). Defaults to 1. |
1
|
date
|
str
|
The date to display (DD/MM/YYYY). Defaults to today. |
''
|
show_date
|
bool
|
Whether to show the date. Defaults to True. |
True
|
format_24
|
bool
|
Whether to use 24-hour format. Defaults to True. |
True
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If any parameter is out of range or invalid. |
Source code in src/pypixelcolor/commands/set_clock_mode.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | |
set_time
Set the device time.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
hour
|
Optional[int]
|
Hour to set (0-23). If None, uses current hour. |
None
|
minute
|
Optional[int]
|
Minute to set (0-59). If None, uses current minute. |
None
|
second
|
Optional[int]
|
Second to set (0-59). If None, uses current second. |
None
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If any parameter is out of range. |
Note
Command is the same as get_device_info.
Source code in src/pypixelcolor/commands/set_time.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | |