rf-protocols 3.3.0__tar.gz → 4.0.1__tar.gz

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.
Files changed (28) hide show
  1. {rf_protocols-3.3.0 → rf_protocols-4.0.1}/PKG-INFO +1 -1
  2. {rf_protocols-3.3.0 → rf_protocols-4.0.1}/pyproject.toml +1 -1
  3. {rf_protocols-3.3.0 → rf_protocols-4.0.1}/rf_protocols/commands/pt2262.py +7 -6
  4. {rf_protocols-3.3.0 → rf_protocols-4.0.1}/rf_protocols.egg-info/PKG-INFO +1 -1
  5. {rf_protocols-3.3.0 → rf_protocols-4.0.1}/LICENSE +0 -0
  6. {rf_protocols-3.3.0 → rf_protocols-4.0.1}/README.md +0 -0
  7. {rf_protocols-3.3.0 → rf_protocols-4.0.1}/rf_protocols/__init__.py +0 -0
  8. {rf_protocols-3.3.0 → rf_protocols-4.0.1}/rf_protocols/codes/honeywell/string_lights/__init__.py +0 -0
  9. {rf_protocols-3.3.0 → rf_protocols-4.0.1}/rf_protocols/codes/honeywell/string_lights/turn_off.sub +0 -0
  10. {rf_protocols-3.3.0 → rf_protocols-4.0.1}/rf_protocols/codes/honeywell/string_lights/turn_on.sub +0 -0
  11. {rf_protocols-3.3.0 → rf_protocols-4.0.1}/rf_protocols/codes/novy/cooker_hood/__init__.py +0 -0
  12. {rf_protocols-3.3.0 → rf_protocols-4.0.1}/rf_protocols/codes/somfy/rts/__init__.py +0 -0
  13. {rf_protocols-3.3.0 → rf_protocols-4.0.1}/rf_protocols/commands/__init__.py +0 -0
  14. {rf_protocols-3.3.0 → rf_protocols-4.0.1}/rf_protocols/commands/ev1527.py +0 -0
  15. {rf_protocols-3.3.0 → rf_protocols-4.0.1}/rf_protocols/commands/kaku.py +0 -0
  16. {rf_protocols-3.3.0 → rf_protocols-4.0.1}/rf_protocols/commands/novy.py +0 -0
  17. {rf_protocols-3.3.0 → rf_protocols-4.0.1}/rf_protocols/commands/ook.py +0 -0
  18. {rf_protocols-3.3.0 → rf_protocols-4.0.1}/rf_protocols/commands/pilota_casa.py +0 -0
  19. {rf_protocols-3.3.0 → rf_protocols-4.0.1}/rf_protocols/commands/somfy_rts.py +0 -0
  20. {rf_protocols-3.3.0 → rf_protocols-4.0.1}/rf_protocols/loader.py +0 -0
  21. {rf_protocols-3.3.0 → rf_protocols-4.0.1}/rf_protocols/parser.py +0 -0
  22. {rf_protocols-3.3.0 → rf_protocols-4.0.1}/rf_protocols.egg-info/SOURCES.txt +0 -0
  23. {rf_protocols-3.3.0 → rf_protocols-4.0.1}/rf_protocols.egg-info/dependency_links.txt +0 -0
  24. {rf_protocols-3.3.0 → rf_protocols-4.0.1}/rf_protocols.egg-info/requires.txt +0 -0
  25. {rf_protocols-3.3.0 → rf_protocols-4.0.1}/rf_protocols.egg-info/top_level.txt +0 -0
  26. {rf_protocols-3.3.0 → rf_protocols-4.0.1}/setup.cfg +0 -0
  27. {rf_protocols-3.3.0 → rf_protocols-4.0.1}/tests/test_loader.py +0 -0
  28. {rf_protocols-3.3.0 → rf_protocols-4.0.1}/tests/test_parser.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rf-protocols
3
- Version: 3.3.0
3
+ Version: 4.0.1
4
4
  Summary: Library to decode and encode radio frequency signals.
5
5
  License-Expression: MIT
6
6
  Project-URL: Homepage, https://github.com/home-assistant-libs/rf-protocols
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "rf-protocols"
7
- version = "3.3.0"
7
+ version = "4.0.1"
8
8
  license = "MIT"
9
9
  description = "Library to decode and encode radio frequency signals."
10
10
  readme = "README.md"
@@ -51,7 +51,7 @@ from typing import override
51
51
 
52
52
  from . import ModulationType, RadioFrequencyCommand
53
53
 
54
- _VALID_SYMBOLS = frozenset("01F")
54
+ _VALID_SYMBOLS = frozenset("01FX")
55
55
 
56
56
 
57
57
  class PT2262Command(RadioFrequencyCommand):
@@ -64,7 +64,7 @@ class PT2262Command(RadioFrequencyCommand):
64
64
  self,
65
65
  *,
66
66
  data: str,
67
- timebase_us: int = 350,
67
+ timebase_us: int = 350, # length of a short pulse
68
68
  frequency: int = 433_920_000,
69
69
  repeat_count: int = 5,
70
70
  ) -> None:
@@ -73,7 +73,7 @@ class PT2262Command(RadioFrequencyCommand):
73
73
  if len(normalized_data) != 12:
74
74
  raise ValueError("data must be exactly 12 characters long")
75
75
  if not set(normalized_data).issubset(_VALID_SYMBOLS):
76
- raise ValueError("data must contain only symbols '0', '1', and 'F'")
76
+ raise ValueError("data must contain only symbols '0', '1', 'F', and 'X'")
77
77
 
78
78
  super().__init__(
79
79
  frequency=frequency,
@@ -86,13 +86,14 @@ class PT2262Command(RadioFrequencyCommand):
86
86
  @override
87
87
  def get_raw_timings(self) -> list[int]:
88
88
  """Compute the PT2262 frame timings followed by the sync symbol."""
89
- short_us = 4 * self.timebase_us
90
- long_us = 12 * self.timebase_us
91
- sync_low_us = 124 * self.timebase_us
89
+ short_us = self.timebase_us
90
+ long_us = 3 * self.timebase_us
91
+ sync_low_us = 31 * self.timebase_us
92
92
  symbols = {
93
93
  "0": [short_us, -long_us, short_us, -long_us],
94
94
  "1": [long_us, -short_us, long_us, -short_us],
95
95
  "F": [short_us, -long_us, long_us, -short_us],
96
+ "X": [short_us, -long_us, short_us, -short_us],
96
97
  }
97
98
 
98
99
  timings: list[int] = []
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rf-protocols
3
- Version: 3.3.0
3
+ Version: 4.0.1
4
4
  Summary: Library to decode and encode radio frequency signals.
5
5
  License-Expression: MIT
6
6
  Project-URL: Homepage, https://github.com/home-assistant-libs/rf-protocols
File without changes
File without changes
File without changes