velbus-aio 2023.12.0__py3-none-any.whl → 2024.4.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of velbus-aio might be problematic. Click here for more details.

Files changed (100) hide show
  1. {velbus_aio-2023.12.0.dist-info → velbus_aio-2024.4.1.dist-info}/METADATA +2 -1
  2. velbus_aio-2024.4.1.dist-info/RECORD +103 -0
  3. {velbus_aio-2023.12.0.dist-info → velbus_aio-2024.4.1.dist-info}/WHEEL +1 -1
  4. velbusaio/channels.py +7 -11
  5. velbusaio/command_registry.py +15 -1
  6. velbusaio/const.py +3 -1
  7. velbusaio/controller.py +39 -68
  8. velbusaio/handler.py +5 -61
  9. velbusaio/helpers.py +2 -1
  10. velbusaio/message.py +1 -1
  11. velbusaio/messages/__init__.py +1 -0
  12. velbusaio/messages/blind_status.py +1 -0
  13. velbusaio/messages/bus_active.py +1 -0
  14. velbusaio/messages/bus_error_counter_status.py +1 -0
  15. velbusaio/messages/bus_error_counter_status_request.py +1 -0
  16. velbusaio/messages/bus_off.py +1 -0
  17. velbusaio/messages/channel_name_part1.py +15 -0
  18. velbusaio/messages/channel_name_part2.py +14 -0
  19. velbusaio/messages/channel_name_part3.py +14 -0
  20. velbusaio/messages/channel_name_request.py +2 -1
  21. velbusaio/messages/clear_led.py +1 -0
  22. velbusaio/messages/counter_status.py +1 -0
  23. velbusaio/messages/counter_status_request.py +1 -0
  24. velbusaio/messages/cover_down.py +1 -0
  25. velbusaio/messages/cover_off.py +1 -2
  26. velbusaio/messages/cover_position.py +1 -2
  27. velbusaio/messages/cover_up.py +1 -0
  28. velbusaio/messages/dali_device_settings.py +2 -1
  29. velbusaio/messages/dali_device_settings_request.py +2 -1
  30. velbusaio/messages/dali_dim_value_status.py +2 -1
  31. velbusaio/messages/dimmer_channel_status.py +2 -1
  32. velbusaio/messages/dimmer_status.py +1 -0
  33. velbusaio/messages/edge_set_custom_color.py +1 -0
  34. velbusaio/messages/fast_blinking_led.py +1 -0
  35. velbusaio/messages/forced_off.py +1 -0
  36. velbusaio/messages/forced_on.py +1 -0
  37. velbusaio/messages/interface_status_request.py +1 -0
  38. velbusaio/messages/ir_receiver_status.py +1 -0
  39. velbusaio/messages/kwh_status.py +1 -0
  40. velbusaio/messages/light_value_request.py +1 -0
  41. velbusaio/messages/memo_text.py +1 -0
  42. velbusaio/messages/memory_data.py +1 -0
  43. velbusaio/messages/memory_data_block.py +1 -0
  44. velbusaio/messages/memory_dump_request.py +1 -0
  45. velbusaio/messages/module_status.py +12 -0
  46. velbusaio/messages/module_status_request.py +1 -0
  47. velbusaio/messages/module_subtype.py +1 -0
  48. velbusaio/messages/module_type.py +1 -0
  49. velbusaio/messages/module_type_request.py +1 -0
  50. velbusaio/messages/push_button_status.py +1 -0
  51. velbusaio/messages/raw.py +1 -0
  52. velbusaio/messages/read_data_block_from_memory.py +1 -0
  53. velbusaio/messages/read_data_from_memory.py +1 -0
  54. velbusaio/messages/realtime_clock_status_request.py +1 -0
  55. velbusaio/messages/receive_buffer_full.py +1 -0
  56. velbusaio/messages/receive_ready.py +1 -0
  57. velbusaio/messages/relay_status.py +1 -0
  58. velbusaio/messages/restore_dimmer.py +6 -2
  59. velbusaio/messages/select_program.py +1 -0
  60. velbusaio/messages/sensor_settings_request.py +1 -0
  61. velbusaio/messages/sensor_temp_request.py +1 -0
  62. velbusaio/messages/sensor_temperature.py +1 -0
  63. velbusaio/messages/set_date.py +5 -10
  64. velbusaio/messages/set_daylight_saving.py +3 -6
  65. velbusaio/messages/set_dimmer.py +6 -2
  66. velbusaio/messages/set_led.py +1 -0
  67. velbusaio/messages/set_realtime_clock.py +5 -10
  68. velbusaio/messages/set_temperature.py +1 -0
  69. velbusaio/messages/slider_status.py +5 -1
  70. velbusaio/messages/slow_blinking_led.py +1 -0
  71. velbusaio/messages/start_relay_blinking_timer.py +1 -0
  72. velbusaio/messages/start_relay_timer.py +1 -0
  73. velbusaio/messages/switch_relay_off.py +1 -0
  74. velbusaio/messages/switch_relay_on.py +1 -0
  75. velbusaio/messages/switch_to_comfort.py +1 -0
  76. velbusaio/messages/switch_to_day.py +1 -0
  77. velbusaio/messages/switch_to_night.py +1 -0
  78. velbusaio/messages/switch_to_safe.py +1 -0
  79. velbusaio/messages/temp_sensor_settings_part1.py +1 -0
  80. velbusaio/messages/temp_sensor_settings_part2.py +1 -0
  81. velbusaio/messages/temp_sensor_settings_part3.py +1 -0
  82. velbusaio/messages/temp_sensor_settings_part4.py +1 -0
  83. velbusaio/messages/temp_sensor_settings_request.py +1 -0
  84. velbusaio/messages/temp_sensor_status.py +1 -0
  85. velbusaio/messages/temp_set_cooling.py +1 -0
  86. velbusaio/messages/temp_set_heating.py +1 -0
  87. velbusaio/messages/update_led_status.py +1 -0
  88. velbusaio/messages/very_fast_blinking_led.py +1 -0
  89. velbusaio/messages/write_data_to_memory.py +1 -0
  90. velbusaio/messages/write_memory_block.py +1 -0
  91. velbusaio/messages/write_module_address_and_serial_number.py +1 -0
  92. velbusaio/module.py +44 -43
  93. velbusaio/protocol.json +10126 -0
  94. velbusaio/protocol.py +2 -2
  95. velbusaio/raw_message.py +6 -6
  96. velbusaio/util.py +4 -0
  97. velbus_aio-2023.12.0.dist-info/RECORD +0 -103
  98. velbusaio/moduleprotocol/protocol.json +0 -26507
  99. {velbus_aio-2023.12.0.dist-info → velbus_aio-2024.4.1.dist-info}/LICENSE +0 -0
  100. {velbus_aio-2023.12.0.dist-info → velbus_aio-2024.4.1.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Thomas Delaet <thomas@delaet.org>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  from velbusaio.command_registry import register
@@ -69,6 +70,20 @@ class ChannelNamePart1Message(Message):
69
70
  "VMBELPIR",
70
71
  "VMBDALI",
71
72
  "VMB4AN",
73
+ "VMB6PB-20",
74
+ "VMBEL1-20",
75
+ "VMBEL2-20",
76
+ "VMBEL4-20",
77
+ "VMBELO-20",
78
+ "VMBGP1-20",
79
+ "VMBGP2-20",
80
+ "VMBGP4-20",
81
+ "VMBGPO-20",
82
+ "VMBDALI-20",
83
+ "VMBEL4PIR-20",
84
+ "VMBGP4PIR-20",
85
+ "VMB4LEDPWM-20",
86
+ "VMB8DC-20",
72
87
  ],
73
88
  )
74
89
  class ChannelNamePart1Message2(ChannelNamePart1Message):
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Thomas Delaet <thomas@delaet.org>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  from velbusaio.command_registry import register
@@ -69,6 +70,19 @@ class ChannelNamePart2Message(Message):
69
70
  "VMBELPIR",
70
71
  "VMBDALI",
71
72
  "VMB4AN",
73
+ "VMB6PB-20",
74
+ "VMBEL1-20",
75
+ "VMBEL2-20",
76
+ "VMBEL4-20",
77
+ "VMBELO-20",
78
+ "VMBGP1-20",
79
+ "VMBGP2-20",
80
+ "VMBGP4-20",
81
+ "VMBGPO-20",
82
+ "VMBDALI-20",
83
+ "VMBEL4PIR-20",
84
+ "VMBGP4PIR-20",
85
+ "VMB8DC-20",
72
86
  ],
73
87
  )
74
88
  class ChannelNamePart2Message2(ChannelNamePart2Message):
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Thomas Delaet <thomas@delaet.org>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  from velbusaio.command_registry import register
@@ -69,6 +70,19 @@ class ChannelNamePart3Message(Message):
69
70
  "VMBELPIR",
70
71
  "VMBDALI",
71
72
  "VMB4AN",
73
+ "VMB6PB-20",
74
+ "VMBEL1-20",
75
+ "VMBEL2-20",
76
+ "VMBEL4-20",
77
+ "VMBELO-20",
78
+ "VMBGP1-20",
79
+ "VMBGP2-20",
80
+ "VMBGP4-20",
81
+ "VMBGPO-20",
82
+ "VMBDALI-20",
83
+ "VMBEL4PIR-20",
84
+ "VMBGP4PIR-20",
85
+ "VMB8DC-20",
72
86
  ],
73
87
  )
74
88
  class ChannelNamePart3Message2(ChannelNamePart3Message):
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Thomas Delaet <thomas@delaet.org> and Maikel Punie <maikel.punie@gmail.com>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  from velbusaio.command_registry import register
@@ -70,7 +71,7 @@ class ChannelNameRequestMessage2(ChannelNameRequestMessage):
70
71
  return bytes([COMMAND_CODE, tmp])
71
72
 
72
73
 
73
- @register(COMMAND_CODE, ["VMBDALI"])
74
+ @register(COMMAND_CODE, ["VMBDALI", "VMBDALI-20"])
74
75
  class ChannelNameRequestMessage3(ChannelNameRequestMessage):
75
76
  """
76
77
  send by:
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Thomas Delaet <thomas@delaet.org>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  from velbusaio.command_registry import register
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Maikel Punie <maikel.punie@gmail.com>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  from velbusaio.command_registry import register
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Maikel Punie <maikel.punie@gmail.com>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  from velbusaio.command_registry import register
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Tom Dupré <gitd8400@gmail.com>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  import struct
@@ -1,9 +1,8 @@
1
1
  """
2
2
  :author: Tom Dupré <gitd8400@gmail.com>
3
3
  """
4
- from __future__ import annotations
5
4
 
6
- import struct
5
+ from __future__ import annotations
7
6
 
8
7
  from velbusaio.command_registry import register
9
8
  from velbusaio.message import Message
@@ -1,9 +1,8 @@
1
1
  """
2
2
  :author: Maikel Punie <maikel.punie@gmail.com>
3
3
  """
4
- from __future__ import annotations
5
4
 
6
- import struct
5
+ from __future__ import annotations
7
6
 
8
7
  from velbusaio.command_registry import register
9
8
  from velbusaio.message import Message
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Tom Dupré <gitd8400@gmail.com>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  import struct
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Niels Laukens
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  import dataclasses
@@ -12,7 +13,7 @@ from velbusaio.message import Message
12
13
  COMMAND_CODE = 0xE8
13
14
 
14
15
 
15
- @register(COMMAND_CODE, ["VMBDALI"])
16
+ @register(COMMAND_CODE, ["VMBDALI", "VMBDALI-20"])
16
17
  class DaliDeviceSettingMsg(Message):
17
18
  """
18
19
  send by: VMBDALI
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Niels Laukens
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  import enum
@@ -17,7 +18,7 @@ class DataSource(enum.Enum):
17
18
  FromDaliDevice = 1
18
19
 
19
20
 
20
- @register(COMMAND_CODE, ["VMBDALI"])
21
+ @register(COMMAND_CODE, ["VMBDALI", "VMBDALI-20"])
21
22
  class DaliDeviceSettingsRequest(Message):
22
23
  """
23
24
  send by:
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Niels Laukens
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  from velbusaio.command_registry import register
@@ -9,7 +10,7 @@ from velbusaio.message import Message
9
10
  COMMAND_CODE = 0xA5
10
11
 
11
12
 
12
- @register(COMMAND_CODE, ["VMBDALI"])
13
+ @register(COMMAND_CODE, ["VMBDALI", "VMBDALI-20"])
13
14
  class DimValueStatus(Message):
14
15
  """
15
16
  send by: VMBDALI
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Frank van Breugel
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  import struct
@@ -21,7 +22,7 @@ LED_FAST_BLINKING = 1 << 5
21
22
  LED_VERY_FAST_BLINKING = 1 << 4
22
23
 
23
24
 
24
- @register(COMMAND_CODE, ["VMB4DC", "VMBDMI", "VMBDMI-R"])
25
+ @register(COMMAND_CODE, ["VMB4DC", "VMBDMI", "VMBDMI-R", "VMB8DC-20"])
25
26
  class DimmerChannelStatusMessage(Message):
26
27
  """
27
28
  sent by: VMB4DC
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Frank van Breugel
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  import struct
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Maikel Punie <maikel.punie@gmail.com>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  from velbusaio.command_registry import register
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Thomas Delaet <thomas@delaet.org>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  from velbusaio.command_registry import register
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Maikel Punie <maikel.punie@gmail.com>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  from velbusaio.command_registry import register
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Maikel Punie <maikel.punie@gmail.com>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  from velbusaio.command_registry import register
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Thomas Delaet <thomas@delaet.org>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  from velbusaio.command_registry import register
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: David Danssaert <david.danssaert@gmail.com>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  from velbusaio.command_registry import register
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Maikel Punie <maikel.punie@gmail.com>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  from velbusaio.command_registry import register
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Maikel Punie <maikel.punie@gmail.com>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  from velbusaio.command_registry import register
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Maikel Punie <maikel.punie@gmail.com>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  from velbusaio.command_registry import register
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Thomas Delaet <thomas@delaet.org>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  from velbusaio.command_registry import register
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Thomas Delaet <thomas@delaet.org>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  from velbusaio.command_registry import register
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Thomas Delaet <thomas@delaet.org>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  from velbusaio.command_registry import register
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Thomas Delaet <thomas@delaet.org>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  from velbusaio.command_registry import register
@@ -75,6 +76,17 @@ class ModuleStatusMessage(Message):
75
76
  "VMBGPOD-2",
76
77
  "VMBELO",
77
78
  "VMB7IN",
79
+ "VMB6PB-20",
80
+ "VMBEL1-20",
81
+ "VMBEL2-20",
82
+ "VMBEL4-20",
83
+ "VMBELO-20",
84
+ "VMBGP1-20",
85
+ "VMBGP2-20",
86
+ "VMBGP4-20",
87
+ "VMBGPO-20",
88
+ "VMBEL4PIR-20",
89
+ "VMBGP4PIR-20",
78
90
  ],
79
91
  )
80
92
  class ModuleStatusMessage2(Message):
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Thomas Delaet <thomas@delaet.org>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  from velbusaio.command_registry import register
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Thomas Delaet <thomas@delaet.org>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  import struct
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Thomas Delaet <thomas@delaet.org>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  import struct
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Thomas Delaet <thomas@delaet.org>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  from velbusaio.message import Message
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Thomas Delaet <thomas@delaet.org>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  from velbusaio.command_registry import register
velbusaio/messages/raw.py CHANGED
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Maikel Punie <maikel.punie@gmail.com>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  from velbusaio.command_registry import register
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Thomas Delaet <thomas@delaet.org>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  from velbusaio.command_registry import register
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Thomas Delaet <thomas@delaet.org>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  from velbusaio.command_registry import register
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Maikel Punie <maikel.punie@gmail.com>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  from velbusaio.command_registry import register
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Thomas Delaet <thomas@delaet.org>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  from velbusaio.command_registry import register
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Thomas Delaet <thomas@delaet.org>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  from velbusaio.command_registry import register
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Thomas Delaet <thomas@delaet.org>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  import struct
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Frank van Breugel
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  from velbusaio.command_registry import register
@@ -9,7 +10,10 @@ from velbusaio.message import Message
9
10
  COMMAND_CODE = 0x11
10
11
 
11
12
 
12
- @register(COMMAND_CODE, ["VMB1DM", "VMBDME", "VMBDMI-R", "VMBDMI", "VMB1LED", "VMB4DC"])
13
+ @register(
14
+ COMMAND_CODE,
15
+ ["VMB1DM", "VMBDME", "VMBDMI-R", "VMBDMI", "VMB1LED", "VMB4DC", "VMB8DC-20"],
16
+ )
13
17
  class RestoreDimmerMessage(Message):
14
18
  """
15
19
  send by:
@@ -53,7 +57,7 @@ class RestoreDimmerMessage(Message):
53
57
  ) + self.dimmer_transitiontime.to_bytes(2, byteorder="big", signed=False)
54
58
 
55
59
 
56
- @register(COMMAND_CODE, ["VMBDALI"])
60
+ @register(COMMAND_CODE, ["VMBDALI", "VMBDALI-20"])
57
61
  class RestoreDimmerMessage2(RestoreDimmerMessage):
58
62
  def byte_to_channels(self, byte: int) -> list[int]:
59
63
  return [byte]
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Danny De Gaspari
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  from velbusaio.command_registry import register
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Maikel Punie <maikel.punie@gmail.com>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  from velbusaio.command_registry import register
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Maikel Punie <maikel.punie@gmail.com>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  from velbusaio.command_registry import register
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Maikel Punie <maikel.punie@gmail.com>
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  from velbusaio.command_registry import register
@@ -1,9 +1,8 @@
1
1
  """
2
2
  :author: Maikel Punie <maikel.punie@gmail.com>
3
3
  """
4
- from __future__ import annotations
5
4
 
6
- import time
5
+ from __future__ import annotations
7
6
 
8
7
  from velbusaio.command_registry import register
9
8
  from velbusaio.message import Message
@@ -17,11 +16,11 @@ class SetDate(Message):
17
16
  received by all modules
18
17
  """
19
18
 
20
- def __init__(self, address=0x00) -> None:
19
+ def __init__(self, address=0x00, day=None, mon=None, year=None) -> None:
21
20
  Message.__init__(self)
22
- self._day = None
23
- self._mon = None
24
- self._year = None
21
+ self._day = day
22
+ self._mon = mon
23
+ self._year = year
25
24
  self.set_defaults(address)
26
25
 
27
26
  def set_defaults(self, address) -> None:
@@ -29,10 +28,6 @@ class SetDate(Message):
29
28
  self.set_address(address)
30
29
  self.set_low_priority()
31
30
  self.set_no_rtr()
32
- lclt = time.localtime()
33
- self._day = lclt[2]
34
- self._mon = lclt[1]
35
- self._year = lclt[0]
36
31
 
37
32
  def populate(self, priority, address, rtr, data) -> None:
38
33
  """
@@ -1,9 +1,8 @@
1
1
  """
2
2
  :author: Maikel Punie <maikel.punie@gmail.com>
3
3
  """
4
- from __future__ import annotations
5
4
 
6
- import time
5
+ from __future__ import annotations
7
6
 
8
7
  from velbusaio.command_registry import register
9
8
  from velbusaio.message import Message
@@ -17,9 +16,9 @@ class SetDaylightSaving(Message):
17
16
  received by all modules
18
17
  """
19
18
 
20
- def __init__(self, address=0x00) -> None:
19
+ def __init__(self, address=0x00, ds=None) -> None:
21
20
  Message.__init__(self)
22
- self._ds = None
21
+ self._ds = ds
23
22
  self.set_defaults(address)
24
23
 
25
24
  def set_defaults(self, address) -> None:
@@ -27,8 +26,6 @@ class SetDaylightSaving(Message):
27
26
  self.set_address(address)
28
27
  self.set_low_priority()
29
28
  self.set_no_rtr()
30
- lclt = time.localtime()
31
- self._ds = not lclt[8]
32
29
 
33
30
  def populate(self, priority, address, rtr, data) -> None:
34
31
  """
@@ -1,6 +1,7 @@
1
1
  """
2
2
  :author: Frank van Breugel
3
3
  """
4
+
4
5
  from __future__ import annotations
5
6
 
6
7
  from velbusaio.command_registry import register
@@ -9,7 +10,10 @@ from velbusaio.message import Message
9
10
  COMMAND_CODE = 0x07
10
11
 
11
12
 
12
- @register(COMMAND_CODE, ["VMB1DM", "VMBDME", "VMB4DC", "VMBDMI", "VMBDMI-R", "VMB1LED"])
13
+ @register(
14
+ COMMAND_CODE,
15
+ ["VMB1DM", "VMBDME", "VMB4DC", "VMBDMI", "VMBDMI-R", "VMB1LED", "VMB8DC-20"],
16
+ )
13
17
  class SetDimmerMessage(Message):
14
18
  """
15
19
  send by:
@@ -56,7 +60,7 @@ class SetDimmerMessage(Message):
56
60
  ) + self.dimmer_transitiontime.to_bytes(2, byteorder="big", signed=False)
57
61
 
58
62
 
59
- @register(COMMAND_CODE, ["VMBDALI"])
63
+ @register(COMMAND_CODE, ["VMBDALI", "VMBDALI-20"])
60
64
  class SetDimmerMessage2(SetDimmerMessage):
61
65
  """
62
66
  send by: