lifx-emulator-core 3.0.3__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 (73) hide show
  1. lifx_emulator_core-3.0.3/.gitignore +94 -0
  2. lifx_emulator_core-3.0.3/CHANGELOG.md +43 -0
  3. lifx_emulator_core-3.0.3/PKG-INFO +100 -0
  4. lifx_emulator_core-3.0.3/README.md +75 -0
  5. lifx_emulator_core-3.0.3/pyproject.toml +103 -0
  6. lifx_emulator_core-3.0.3/src/lifx_emulator/__init__.py +31 -0
  7. lifx_emulator_core-3.0.3/src/lifx_emulator/constants.py +33 -0
  8. lifx_emulator_core-3.0.3/src/lifx_emulator/devices/__init__.py +37 -0
  9. lifx_emulator_core-3.0.3/src/lifx_emulator/devices/device.py +395 -0
  10. lifx_emulator_core-3.0.3/src/lifx_emulator/devices/manager.py +256 -0
  11. lifx_emulator_core-3.0.3/src/lifx_emulator/devices/observers.py +139 -0
  12. lifx_emulator_core-3.0.3/src/lifx_emulator/devices/persistence.py +308 -0
  13. lifx_emulator_core-3.0.3/src/lifx_emulator/devices/state_restorer.py +259 -0
  14. lifx_emulator_core-3.0.3/src/lifx_emulator/devices/state_serializer.py +157 -0
  15. lifx_emulator_core-3.0.3/src/lifx_emulator/devices/states.py +381 -0
  16. lifx_emulator_core-3.0.3/src/lifx_emulator/factories/__init__.py +39 -0
  17. lifx_emulator_core-3.0.3/src/lifx_emulator/factories/builder.py +375 -0
  18. lifx_emulator_core-3.0.3/src/lifx_emulator/factories/default_config.py +158 -0
  19. lifx_emulator_core-3.0.3/src/lifx_emulator/factories/factory.py +252 -0
  20. lifx_emulator_core-3.0.3/src/lifx_emulator/factories/firmware_config.py +77 -0
  21. lifx_emulator_core-3.0.3/src/lifx_emulator/factories/serial_generator.py +82 -0
  22. lifx_emulator_core-3.0.3/src/lifx_emulator/handlers/__init__.py +39 -0
  23. lifx_emulator_core-3.0.3/src/lifx_emulator/handlers/base.py +49 -0
  24. lifx_emulator_core-3.0.3/src/lifx_emulator/handlers/device_handlers.py +322 -0
  25. lifx_emulator_core-3.0.3/src/lifx_emulator/handlers/light_handlers.py +503 -0
  26. lifx_emulator_core-3.0.3/src/lifx_emulator/handlers/multizone_handlers.py +249 -0
  27. lifx_emulator_core-3.0.3/src/lifx_emulator/handlers/registry.py +110 -0
  28. lifx_emulator_core-3.0.3/src/lifx_emulator/handlers/tile_handlers.py +488 -0
  29. lifx_emulator_core-3.0.3/src/lifx_emulator/products/__init__.py +28 -0
  30. lifx_emulator_core-3.0.3/src/lifx_emulator/products/generator.py +1079 -0
  31. lifx_emulator_core-3.0.3/src/lifx_emulator/products/registry.py +1530 -0
  32. lifx_emulator_core-3.0.3/src/lifx_emulator/products/specs.py +284 -0
  33. lifx_emulator_core-3.0.3/src/lifx_emulator/products/specs.yml +386 -0
  34. lifx_emulator_core-3.0.3/src/lifx_emulator/protocol/__init__.py +1 -0
  35. lifx_emulator_core-3.0.3/src/lifx_emulator/protocol/base.py +446 -0
  36. lifx_emulator_core-3.0.3/src/lifx_emulator/protocol/const.py +8 -0
  37. lifx_emulator_core-3.0.3/src/lifx_emulator/protocol/generator.py +1384 -0
  38. lifx_emulator_core-3.0.3/src/lifx_emulator/protocol/header.py +159 -0
  39. lifx_emulator_core-3.0.3/src/lifx_emulator/protocol/packets.py +1351 -0
  40. lifx_emulator_core-3.0.3/src/lifx_emulator/protocol/protocol_types.py +817 -0
  41. lifx_emulator_core-3.0.3/src/lifx_emulator/protocol/serializer.py +379 -0
  42. lifx_emulator_core-3.0.3/src/lifx_emulator/repositories/__init__.py +22 -0
  43. lifx_emulator_core-3.0.3/src/lifx_emulator/repositories/device_repository.py +155 -0
  44. lifx_emulator_core-3.0.3/src/lifx_emulator/repositories/storage_backend.py +107 -0
  45. lifx_emulator_core-3.0.3/src/lifx_emulator/scenarios/__init__.py +22 -0
  46. lifx_emulator_core-3.0.3/src/lifx_emulator/scenarios/manager.py +322 -0
  47. lifx_emulator_core-3.0.3/src/lifx_emulator/scenarios/models.py +112 -0
  48. lifx_emulator_core-3.0.3/src/lifx_emulator/scenarios/persistence.py +241 -0
  49. lifx_emulator_core-3.0.3/src/lifx_emulator/server.py +468 -0
  50. lifx_emulator_core-3.0.3/tests/conftest.py +238 -0
  51. lifx_emulator_core-3.0.3/tests/test_async_storage.py +245 -0
  52. lifx_emulator_core-3.0.3/tests/test_backwards_compatibility.py +943 -0
  53. lifx_emulator_core-3.0.3/tests/test_device.py +541 -0
  54. lifx_emulator_core-3.0.3/tests/test_device_edge_cases.py +231 -0
  55. lifx_emulator_core-3.0.3/tests/test_device_handlers_extended.py +723 -0
  56. lifx_emulator_core-3.0.3/tests/test_device_manager.py +287 -0
  57. lifx_emulator_core-3.0.3/tests/test_handler_registry.py +102 -0
  58. lifx_emulator_core-3.0.3/tests/test_integration.py +462 -0
  59. lifx_emulator_core-3.0.3/tests/test_light_handlers_extended.py +788 -0
  60. lifx_emulator_core-3.0.3/tests/test_multizone_handlers_extended.py +560 -0
  61. lifx_emulator_core-3.0.3/tests/test_observers.py +164 -0
  62. lifx_emulator_core-3.0.3/tests/test_products_generator.py +1119 -0
  63. lifx_emulator_core-3.0.3/tests/test_products_specs.py +366 -0
  64. lifx_emulator_core-3.0.3/tests/test_protocol_generator.py +815 -0
  65. lifx_emulator_core-3.0.3/tests/test_protocol_types_coverage.py +118 -0
  66. lifx_emulator_core-3.0.3/tests/test_repositories.py +130 -0
  67. lifx_emulator_core-3.0.3/tests/test_scenario_manager.py +431 -0
  68. lifx_emulator_core-3.0.3/tests/test_scenario_persistence.py +271 -0
  69. lifx_emulator_core-3.0.3/tests/test_serializer.py +459 -0
  70. lifx_emulator_core-3.0.3/tests/test_server.py +570 -0
  71. lifx_emulator_core-3.0.3/tests/test_state_restorer.py +270 -0
  72. lifx_emulator_core-3.0.3/tests/test_switch_devices.py +335 -0
  73. lifx_emulator_core-3.0.3/tests/test_tile_handlers_extended.py +1265 -0
@@ -0,0 +1,94 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ *.so
6
+ .Python
7
+
8
+ # Distribution / packaging
9
+ build/
10
+ develop-eggs/
11
+ dist/
12
+ downloads/
13
+ eggs/
14
+ .eggs/
15
+ lib/
16
+ lib64/
17
+ parts/
18
+ sdist/
19
+ var/
20
+ wheels/
21
+ pip-wheel-metadata/
22
+ share/python-wheels/
23
+ *.egg-info/
24
+ .installed.cfg
25
+ *.egg
26
+ MANIFEST
27
+
28
+ # Virtual Environments
29
+ .env
30
+ .venv
31
+ env/
32
+ venv/
33
+ ENV/
34
+ env.bak/
35
+ venv.bak/
36
+ .python-version
37
+
38
+ # IDEs
39
+ .vscode/
40
+ .idea/
41
+ *.swp
42
+ *.swo
43
+ *~
44
+ .DS_Store
45
+
46
+ # Testing
47
+ .pytest_cache/
48
+ .coverage
49
+ .coverage.*
50
+ htmlcov/
51
+ .tox/
52
+ .nox/
53
+ coverage.xml
54
+ *.cover
55
+ .hypothesis/
56
+ junit.xml
57
+
58
+ # Type checking
59
+ .mypy_cache/
60
+ .dmypy.json
61
+ dmypy.json
62
+ .pytype/
63
+ pyrightconfig.json
64
+
65
+ # Ruff
66
+ .ruff_cache/
67
+
68
+ # Jupyter Notebook
69
+ .ipynb_checkpoints
70
+ *.ipynb
71
+
72
+ # Documentation
73
+ docs/_build/
74
+ site/
75
+
76
+ # Build artifacts
77
+ *.prof
78
+ *.lprof
79
+
80
+ # OS
81
+ .DS_Store
82
+ Thumbs.db
83
+ .Spotlight-V100
84
+ .Trashes
85
+
86
+ # Temporary files
87
+ *.tmp
88
+ *.bak
89
+ *.log
90
+ .cache/
91
+
92
+ # Local storage
93
+ .notes/
94
+ .claude/settings.local.json
@@ -0,0 +1,43 @@
1
+ # CHANGELOG
2
+
3
+ <!-- version list -->
4
+
5
+ ## v3.0.3 (2025-11-27)
6
+
7
+ ### Bug Fixes
8
+
9
+ - **core**: Update device port to match server port when adding devices
10
+ ([`db68eef`](https://github.com/Djelibeybi/lifx-emulator/commit/db68eefa764d8c98054ada19eabd6e06440f886b))
11
+
12
+
13
+ ## v3.0.2 (2025-11-27)
14
+
15
+ ### Bug Fixes
16
+
17
+ - **core**: Add missing pydantic dependency to lifx-emulator-core
18
+ ([`7cd2309`](https://github.com/Djelibeybi/lifx-emulator/commit/7cd230948285706c3d31ed5478e2e271ed134033))
19
+
20
+
21
+ ## v3.0.1 (2025-11-26)
22
+
23
+ ### Bug Fixes
24
+
25
+ - Adjust uv build for new monorepo layout
26
+ ([`a0d5b7c`](https://github.com/Djelibeybi/lifx-emulator/commit/a0d5b7c1c1ab5659acc8554931f6c441654add05))
27
+
28
+
29
+ ## v3.0.0 (2025-11-26)
30
+
31
+ ### Refactoring
32
+
33
+ - Split into monorepo with separate library and CLI packages
34
+ ([`402fe6e`](https://github.com/Djelibeybi/lifx-emulator/commit/402fe6e6c42e4fb730d076cd4dd0bfe7743b2c57))
35
+
36
+ ### Breaking Changes
37
+
38
+ - The project is now split into two packages:
39
+
40
+
41
+ ## v2.4.0 (2025-11-26)
42
+
43
+ - Initial Release
@@ -0,0 +1,100 @@
1
+ Metadata-Version: 2.4
2
+ Name: lifx-emulator-core
3
+ Version: 3.0.3
4
+ Summary: Core LIFX Emulator library for testing LIFX LAN protocol libraries
5
+ Author-email: Avi Miller <me@dje.li>
6
+ Maintainer-email: Avi Miller <me@dje.li>
7
+ License-Expression: UPL-1.0
8
+ Classifier: Framework :: AsyncIO
9
+ Classifier: Framework :: Pytest
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Natural Language :: English
12
+ Classifier: Operating System :: OS Independent
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: 3.13
16
+ Classifier: Programming Language :: Python :: 3.14
17
+ Classifier: Topic :: Software Development :: Libraries
18
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
19
+ Classifier: Topic :: Software Development :: Testing
20
+ Classifier: Typing :: Typed
21
+ Requires-Python: >=3.11
22
+ Requires-Dist: pydantic>=2.0.0
23
+ Requires-Dist: pyyaml>=6.0.3
24
+ Description-Content-Type: text/markdown
25
+
26
+ # lifx-emulator-core
27
+
28
+ Core Python library for emulating LIFX devices using the LAN protocol.
29
+
30
+ This package provides the embeddable library for creating virtual LIFX devices in your own projects. It implements the binary UDP protocol from the [LIFX LAN Protocol](https://lan.developer.lifx.com) specification.
31
+
32
+ ## Installation
33
+
34
+ ```bash
35
+ pip install lifx-emulator-core
36
+ ```
37
+
38
+ ## Quick Start
39
+
40
+ ```python
41
+ import asyncio
42
+ from lifx_emulator import EmulatedLifxServer, DeviceManager
43
+ from lifx_emulator.factories import create_color_light
44
+ from lifx_emulator.repositories import DeviceRepository
45
+
46
+ async def main():
47
+ # Create devices
48
+ devices = [
49
+ create_color_light(serial="d073d5000001"),
50
+ create_color_light(serial="d073d5000002"),
51
+ ]
52
+
53
+ # Create repository and manager
54
+ repository = DeviceRepository()
55
+ manager = DeviceManager(repository)
56
+
57
+ # Start the emulator server
58
+ server = EmulatedLifxServer(
59
+ devices=devices,
60
+ device_manager=manager,
61
+ bind_address="127.0.0.1",
62
+ port=56700,
63
+ )
64
+
65
+ await server.start()
66
+ print("LIFX Emulator running on 127.0.0.1:56700")
67
+
68
+ # Keep running until interrupted
69
+ try:
70
+ await asyncio.Event().wait()
71
+ finally:
72
+ await server.stop()
73
+
74
+ asyncio.run(main())
75
+ ```
76
+
77
+ ## Features
78
+
79
+ - Emulate color lights, multizone strips, tiles, infrared, HEV, and switch devices
80
+ - Full LIFX LAN protocol implementation
81
+ - Persistent device state storage
82
+ - Testing scenarios for simulating edge cases
83
+ - Product registry with 137+ official LIFX products
84
+
85
+ ## Documentation
86
+
87
+ Full documentation is available at: **https://djelibeybi.github.io/lifx-emulator**
88
+
89
+ - [Installation Guide](https://djelibeybi.github.io/lifx-emulator/getting-started/installation/)
90
+ - [Quick Start](https://djelibeybi.github.io/lifx-emulator/getting-started/quickstart/)
91
+ - [API Reference](https://djelibeybi.github.io/lifx-emulator/library/)
92
+ - [Architecture](https://djelibeybi.github.io/lifx-emulator/architecture/)
93
+
94
+ ## Related Packages
95
+
96
+ - **[lifx-emulator](https://pypi.org/project/lifx-emulator/)**: Standalone CLI tool and HTTP management API built on this library
97
+
98
+ ## License
99
+
100
+ [UPL-1.0](https://opensource.org/licenses/UPL)
@@ -0,0 +1,75 @@
1
+ # lifx-emulator-core
2
+
3
+ Core Python library for emulating LIFX devices using the LAN protocol.
4
+
5
+ This package provides the embeddable library for creating virtual LIFX devices in your own projects. It implements the binary UDP protocol from the [LIFX LAN Protocol](https://lan.developer.lifx.com) specification.
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ pip install lifx-emulator-core
11
+ ```
12
+
13
+ ## Quick Start
14
+
15
+ ```python
16
+ import asyncio
17
+ from lifx_emulator import EmulatedLifxServer, DeviceManager
18
+ from lifx_emulator.factories import create_color_light
19
+ from lifx_emulator.repositories import DeviceRepository
20
+
21
+ async def main():
22
+ # Create devices
23
+ devices = [
24
+ create_color_light(serial="d073d5000001"),
25
+ create_color_light(serial="d073d5000002"),
26
+ ]
27
+
28
+ # Create repository and manager
29
+ repository = DeviceRepository()
30
+ manager = DeviceManager(repository)
31
+
32
+ # Start the emulator server
33
+ server = EmulatedLifxServer(
34
+ devices=devices,
35
+ device_manager=manager,
36
+ bind_address="127.0.0.1",
37
+ port=56700,
38
+ )
39
+
40
+ await server.start()
41
+ print("LIFX Emulator running on 127.0.0.1:56700")
42
+
43
+ # Keep running until interrupted
44
+ try:
45
+ await asyncio.Event().wait()
46
+ finally:
47
+ await server.stop()
48
+
49
+ asyncio.run(main())
50
+ ```
51
+
52
+ ## Features
53
+
54
+ - Emulate color lights, multizone strips, tiles, infrared, HEV, and switch devices
55
+ - Full LIFX LAN protocol implementation
56
+ - Persistent device state storage
57
+ - Testing scenarios for simulating edge cases
58
+ - Product registry with 137+ official LIFX products
59
+
60
+ ## Documentation
61
+
62
+ Full documentation is available at: **https://djelibeybi.github.io/lifx-emulator**
63
+
64
+ - [Installation Guide](https://djelibeybi.github.io/lifx-emulator/getting-started/installation/)
65
+ - [Quick Start](https://djelibeybi.github.io/lifx-emulator/getting-started/quickstart/)
66
+ - [API Reference](https://djelibeybi.github.io/lifx-emulator/library/)
67
+ - [Architecture](https://djelibeybi.github.io/lifx-emulator/architecture/)
68
+
69
+ ## Related Packages
70
+
71
+ - **[lifx-emulator](https://pypi.org/project/lifx-emulator/)**: Standalone CLI tool and HTTP management API built on this library
72
+
73
+ ## License
74
+
75
+ [UPL-1.0](https://opensource.org/licenses/UPL)
@@ -0,0 +1,103 @@
1
+ [project]
2
+ name = "lifx-emulator-core"
3
+ version = "3.0.3"
4
+ description = "Core LIFX Emulator library for testing LIFX LAN protocol libraries"
5
+ readme = "README.md"
6
+ requires-python = ">=3.11"
7
+ dependencies = [
8
+ "pydantic>=2.0.0",
9
+ "pyyaml>=6.0.3",
10
+ ]
11
+ license = "UPL-1.0"
12
+ license-files = ["LICENSE"]
13
+ authors = [
14
+ {name = "Avi Miller", email = "me@dje.li"}
15
+ ]
16
+ maintainers = [
17
+ {name = "Avi Miller", email = "me@dje.li"}
18
+ ]
19
+ classifiers = [
20
+ "Framework :: AsyncIO",
21
+ "Framework :: Pytest",
22
+ "Intended Audience :: Developers",
23
+ "Natural Language :: English",
24
+ "Operating System :: OS Independent",
25
+ "Programming Language :: Python :: 3.11",
26
+ "Programming Language :: Python :: 3.12",
27
+ "Programming Language :: Python :: 3.13",
28
+ "Programming Language :: Python :: 3.14",
29
+ "Topic :: Software Development :: Libraries",
30
+ "Topic :: Software Development :: Libraries :: Python Modules",
31
+ "Topic :: Software Development :: Testing",
32
+ "Typing :: Typed"
33
+ ]
34
+
35
+ [build-system]
36
+ requires = ["hatchling"]
37
+ build-backend = "hatchling.build"
38
+
39
+ [tool.hatch.build.targets.wheel]
40
+ packages = ["src/lifx_emulator"]
41
+
42
+ [tool.pyright]
43
+ typeCheckingMode = "standard"
44
+ pythonVersion = "3.11"
45
+ include = ["src"]
46
+ exclude = ["**/__pycache__"]
47
+
48
+ [tool.pytest.ini_options]
49
+ testpaths = ["tests"]
50
+ pythonpath = ["src"]
51
+ python_files = ["test_*.py"]
52
+ python_classes = ["Test*"]
53
+ python_functions = ["test_*"]
54
+ asyncio_mode = "auto"
55
+ asyncio_default_fixture_loop_scope = "function"
56
+
57
+ [tool.semantic_release]
58
+ commit_parser = "conventional-monorepo"
59
+ commit_message = """\
60
+ chore(release): lifx-emulator-core@{version}
61
+
62
+ Automatically generated by python-semantic-release
63
+ """
64
+ tag_format = "core-v{version}"
65
+ version_toml = ["pyproject.toml:project.version"]
66
+ build_command = """
67
+ uv lock --upgrade-package "$PACKAGE_NAME"
68
+ git add ../../uv.lock
69
+ uv build --package lifx-emulator-core --out-dir dist/
70
+ """
71
+
72
+ [tool.semantic_release.commit_parser_options]
73
+ path_filters = ["."]
74
+ scope_prefix = "core-"
75
+
76
+ [tool.semantic_release.branches.main]
77
+ match = "main"
78
+ prerelease = false
79
+
80
+ [tool.semantic_release.branches.dev]
81
+ match = "(?!main$).*"
82
+ prerelease = true
83
+ prerelease_token = "dev"
84
+
85
+ [tool.semantic_release.changelog]
86
+ # Recommended patterns for conventional commits parser that is scope aware
87
+ exclude_commit_patterns = [
88
+ '''chore(?:\([^)]*?\))?: .+''',
89
+ '''ci(?:\([^)]*?\))?: .+''',
90
+ '''refactor(?:\([^)]*?\))?: .+''',
91
+ '''style(?:\([^)]*?\))?: .+''',
92
+ '''test(?:\([^)]*?\))?: .+''',
93
+ '''build\((?!deps\): .+)''',
94
+ '''Initial [Cc]ommit.*''',
95
+ ]
96
+
97
+
98
+ [tool.semantic_release.changelog.default_templates]
99
+ changelog_file = "CHANGELOG.md"
100
+ output_format = "md"
101
+
102
+ [tool.semantic_release.remote]
103
+ ignore_token_for_push = true
@@ -0,0 +1,31 @@
1
+ """LIFX Emulator
2
+
3
+ A comprehensive LIFX emulator for testing LIFX LAN protocol libraries.
4
+ Implements the binary UDP protocol documented at https://lan.developer.lifx.com
5
+ """
6
+
7
+ from importlib.metadata import version as get_version
8
+
9
+ from lifx_emulator.devices import EmulatedLifxDevice
10
+ from lifx_emulator.factories import (
11
+ create_color_light,
12
+ create_color_temperature_light,
13
+ create_hev_light,
14
+ create_infrared_light,
15
+ create_multizone_light,
16
+ create_tile_device,
17
+ )
18
+ from lifx_emulator.server import EmulatedLifxServer
19
+
20
+ __version__ = get_version("lifx-emulator-core")
21
+
22
+ __all__ = [
23
+ "EmulatedLifxServer",
24
+ "EmulatedLifxDevice",
25
+ "create_color_light",
26
+ "create_color_temperature_light",
27
+ "create_hev_light",
28
+ "create_infrared_light",
29
+ "create_multizone_light",
30
+ "create_tile_device",
31
+ ]
@@ -0,0 +1,33 @@
1
+ """Protocol constants for LIFX LAN Protocol"""
2
+
3
+ from typing import Final
4
+
5
+ # ============================================================================
6
+ # Network Constants
7
+ # ============================================================================
8
+
9
+ # LIFX UDP port for device communication
10
+ LIFX_UDP_PORT: Final[int] = 56700
11
+
12
+ # LIFX Protocol version
13
+ LIFX_PROTOCOL_VERSION: Final[int] = 1024
14
+
15
+ # Header size in bytes
16
+ LIFX_HEADER_SIZE: Final[int] = 36
17
+
18
+ # Backward compatibility alias
19
+ HEADER_SIZE = LIFX_HEADER_SIZE
20
+
21
+ # ============================================================================
22
+ # Official LIFX Repository URLs
23
+ # ============================================================================
24
+
25
+ # Official LIFX protocol specification URL
26
+ PROTOCOL_URL: Final[str] = (
27
+ "https://raw.githubusercontent.com/LIFX/public-protocol/refs/heads/main/protocol.yml"
28
+ )
29
+
30
+ # Official LIFX products specification URL
31
+ PRODUCTS_URL: Final[str] = (
32
+ "https://raw.githubusercontent.com/LIFX/products/refs/heads/master/products.json"
33
+ )
@@ -0,0 +1,37 @@
1
+ """Device management module for LIFX emulator.
2
+
3
+ This module contains all device-related functionality including:
4
+ - Device core (EmulatedLifxDevice)
5
+ - Device manager (DeviceManager, IDeviceManager)
6
+ - Device states (DeviceState and related dataclasses)
7
+ - Device persistence (async file storage)
8
+ - State restoration and serialization
9
+ - Device state observers (ActivityObserver, ActivityLogger, PacketEvent, NullObserver)
10
+ """
11
+
12
+ from lifx_emulator.devices.device import EmulatedLifxDevice
13
+ from lifx_emulator.devices.manager import DeviceManager, IDeviceManager
14
+ from lifx_emulator.devices.observers import (
15
+ ActivityLogger,
16
+ ActivityObserver,
17
+ NullObserver,
18
+ PacketEvent,
19
+ )
20
+ from lifx_emulator.devices.persistence import (
21
+ DEFAULT_STORAGE_DIR,
22
+ DevicePersistenceAsyncFile,
23
+ )
24
+ from lifx_emulator.devices.states import DeviceState
25
+
26
+ __all__ = [
27
+ "EmulatedLifxDevice",
28
+ "DeviceManager",
29
+ "IDeviceManager",
30
+ "DeviceState",
31
+ "DevicePersistenceAsyncFile",
32
+ "DEFAULT_STORAGE_DIR",
33
+ "ActivityObserver",
34
+ "ActivityLogger",
35
+ "PacketEvent",
36
+ "NullObserver",
37
+ ]