ucapi 0.5.1__tar.gz → 0.5.2__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.
- {ucapi-0.5.1 → ucapi-0.5.2}/CHANGELOG.md +5 -0
- {ucapi-0.5.1/ucapi.egg-info → ucapi-0.5.2}/PKG-INFO +1 -1
- {ucapi-0.5.1 → ucapi-0.5.2}/examples/hello_integration.py +1 -0
- {ucapi-0.5.1 → ucapi-0.5.2}/examples/remote.py +1 -0
- {ucapi-0.5.1 → ucapi-0.5.2}/examples/setup_flow.py +1 -0
- {ucapi-0.5.1 → ucapi-0.5.2}/ucapi/__init__.py +1 -0
- {ucapi-0.5.1 → ucapi-0.5.2}/ucapi/_version.py +3 -3
- {ucapi-0.5.1 → ucapi-0.5.2}/ucapi/entity.py +1 -0
- ucapi-0.5.2/ucapi/ir_emitter.py +93 -0
- ucapi-0.5.2/ucapi/select.py +88 -0
- {ucapi-0.5.1 → ucapi-0.5.2/ucapi.egg-info}/PKG-INFO +1 -1
- {ucapi-0.5.1 → ucapi-0.5.2}/ucapi.egg-info/SOURCES.txt +2 -0
- {ucapi-0.5.1 → ucapi-0.5.2}/CONTRIBUTING.md +0 -0
- {ucapi-0.5.1 → ucapi-0.5.2}/LICENSE +0 -0
- {ucapi-0.5.1 → ucapi-0.5.2}/README.md +0 -0
- {ucapi-0.5.1 → ucapi-0.5.2}/docs/code_guidelines.md +0 -0
- {ucapi-0.5.1 → ucapi-0.5.2}/docs/setup.md +0 -0
- {ucapi-0.5.1 → ucapi-0.5.2}/examples/README.md +0 -0
- {ucapi-0.5.1 → ucapi-0.5.2}/examples/hello_integration.json +0 -0
- {ucapi-0.5.1 → ucapi-0.5.2}/examples/remote.json +0 -0
- {ucapi-0.5.1 → ucapi-0.5.2}/examples/remote_ui_page.json +0 -0
- {ucapi-0.5.1 → ucapi-0.5.2}/examples/setup_flow.json +0 -0
- {ucapi-0.5.1 → ucapi-0.5.2}/examples/voice.json +0 -0
- {ucapi-0.5.1 → ucapi-0.5.2}/examples/voice.py +0 -0
- {ucapi-0.5.1 → ucapi-0.5.2}/pyproject.toml +0 -0
- {ucapi-0.5.1 → ucapi-0.5.2}/requirements.txt +0 -0
- {ucapi-0.5.1 → ucapi-0.5.2}/scripts/compile_protos.py +0 -0
- {ucapi-0.5.1 → ucapi-0.5.2}/setup.cfg +0 -0
- {ucapi-0.5.1 → ucapi-0.5.2}/test-requirements.txt +0 -0
- {ucapi-0.5.1 → ucapi-0.5.2}/tests/test_api.py +0 -0
- {ucapi-0.5.1 → ucapi-0.5.2}/tests/test_voice_assistant.py +0 -0
- {ucapi-0.5.1 → ucapi-0.5.2}/ucapi/api.py +0 -0
- {ucapi-0.5.1 → ucapi-0.5.2}/ucapi/api_definitions.py +0 -0
- {ucapi-0.5.1 → ucapi-0.5.2}/ucapi/button.py +0 -0
- {ucapi-0.5.1 → ucapi-0.5.2}/ucapi/climate.py +0 -0
- {ucapi-0.5.1 → ucapi-0.5.2}/ucapi/cover.py +0 -0
- {ucapi-0.5.1 → ucapi-0.5.2}/ucapi/entities.py +0 -0
- {ucapi-0.5.1 → ucapi-0.5.2}/ucapi/light.py +0 -0
- {ucapi-0.5.1 → ucapi-0.5.2}/ucapi/media_player.py +0 -0
- {ucapi-0.5.1 → ucapi-0.5.2}/ucapi/proto/__init__.py +0 -0
- {ucapi-0.5.1 → ucapi-0.5.2}/ucapi/proto/ucr_integration_voice.proto +0 -0
- {ucapi-0.5.1 → ucapi-0.5.2}/ucapi/proto/ucr_integration_voice_pb2.py +0 -0
- {ucapi-0.5.1 → ucapi-0.5.2}/ucapi/proto/ucr_integration_voice_pb2.pyi +0 -0
- {ucapi-0.5.1 → ucapi-0.5.2}/ucapi/remote.py +0 -0
- {ucapi-0.5.1 → ucapi-0.5.2}/ucapi/sensor.py +0 -0
- {ucapi-0.5.1 → ucapi-0.5.2}/ucapi/switch.py +0 -0
- {ucapi-0.5.1 → ucapi-0.5.2}/ucapi/ui.py +0 -0
- {ucapi-0.5.1 → ucapi-0.5.2}/ucapi/voice_assistant.py +0 -0
- {ucapi-0.5.1 → ucapi-0.5.2}/ucapi/voice_stream.py +0 -0
- {ucapi-0.5.1 → ucapi-0.5.2}/ucapi.egg-info/dependency_links.txt +0 -0
- {ucapi-0.5.1 → ucapi-0.5.2}/ucapi.egg-info/requires.txt +0 -0
- {ucapi-0.5.1 → ucapi-0.5.2}/ucapi.egg-info/top_level.txt +0 -0
|
@@ -11,6 +11,11 @@ _Changes in the next release_
|
|
|
11
11
|
|
|
12
12
|
---
|
|
13
13
|
|
|
14
|
+
## v0.5.2 - 2026-01-30
|
|
15
|
+
### Added
|
|
16
|
+
- Add Select Entity support by @JackJPowell ([#44](https://github.com/unfoldedcircle/integration-python-library/pull/44)).
|
|
17
|
+
- Add IR Emitter Entity support by @JackJPowell ([#45](https://github.com/unfoldedcircle/integration-python-library/pull/45)).
|
|
18
|
+
|
|
14
19
|
## v0.5.1 - 2025-12-19
|
|
15
20
|
### Added
|
|
16
21
|
- Add binary sensor device class and common entity states enum ([#40](https://github.com/unfoldedcircle/integration-python-library/pull/40)).
|
|
@@ -44,6 +44,7 @@ from .cover import Cover # noqa: F401
|
|
|
44
44
|
from .light import Light # noqa: F401
|
|
45
45
|
from .media_player import MediaPlayer # noqa: F401
|
|
46
46
|
from .remote import Remote # noqa: F401
|
|
47
|
+
from .select import Select # noqa: F401
|
|
47
48
|
from .sensor import Sensor # noqa: F401
|
|
48
49
|
from .switch import Switch # noqa: F401
|
|
49
50
|
from .voice_assistant import VoiceAssistant # noqa: F401
|
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '0.5.
|
|
32
|
-
__version_tuple__ = version_tuple = (0, 5,
|
|
31
|
+
__version__ = version = '0.5.2'
|
|
32
|
+
__version_tuple__ = version_tuple = (0, 5, 2)
|
|
33
33
|
|
|
34
|
-
__commit_id__ = commit_id = '
|
|
34
|
+
__commit_id__ = commit_id = 'g08c18e023'
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"""
|
|
2
|
+
IR Emitter entity definitions.
|
|
3
|
+
|
|
4
|
+
:copyright: (c) 2023 by Unfolded Circle ApS.
|
|
5
|
+
:license: MPL-2.0, see LICENSE for more details.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from enum import Enum
|
|
9
|
+
from typing import Any
|
|
10
|
+
|
|
11
|
+
from .api_definitions import CommandHandler
|
|
12
|
+
from .entity import Entity, EntityTypes
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class States(str, Enum):
|
|
16
|
+
"""IR Emitter entity states."""
|
|
17
|
+
|
|
18
|
+
UNAVAILABLE = "UNAVAILABLE"
|
|
19
|
+
UNKNOWN = "UNKNOWN"
|
|
20
|
+
ON = "ON"
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class Features(str, Enum):
|
|
24
|
+
"""IR Emitter entity features."""
|
|
25
|
+
|
|
26
|
+
SEND_IR = "send_ir"
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class Attributes(str, Enum):
|
|
30
|
+
"""IR Emitter entity attributes."""
|
|
31
|
+
|
|
32
|
+
STATE = "state"
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class Commands(str, Enum):
|
|
36
|
+
"""IR Emitter entity commands."""
|
|
37
|
+
|
|
38
|
+
SEND_IR = "send_ir"
|
|
39
|
+
STOP_IR = "stop_ir"
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class DeviceClasses(str, Enum):
|
|
43
|
+
"""IR Emitter entity device classes."""
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
class Options(str, Enum):
|
|
47
|
+
"""IR Emitter entity options."""
|
|
48
|
+
|
|
49
|
+
PORTS = "ports"
|
|
50
|
+
IR_FORMATS = "ir_formats"
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
class IREmitter(Entity):
|
|
54
|
+
"""
|
|
55
|
+
IR Emitter entity class.
|
|
56
|
+
|
|
57
|
+
See https://github.com/unfoldedcircle/core-api/blob/main/doc/entities/entity_ir_emitter.md
|
|
58
|
+
for more information.
|
|
59
|
+
"""
|
|
60
|
+
|
|
61
|
+
# pylint: disable=R0917
|
|
62
|
+
def __init__(
|
|
63
|
+
self,
|
|
64
|
+
identifier: str,
|
|
65
|
+
name: str | dict[str, str],
|
|
66
|
+
features: list[Features],
|
|
67
|
+
attributes: dict[str, Any],
|
|
68
|
+
*,
|
|
69
|
+
options: dict[str, Any] | None = None,
|
|
70
|
+
area: str | None = None,
|
|
71
|
+
cmd_handler: CommandHandler = None,
|
|
72
|
+
):
|
|
73
|
+
"""
|
|
74
|
+
Create IR Emitter instance.
|
|
75
|
+
|
|
76
|
+
:param identifier: entity identifier
|
|
77
|
+
:param name: friendly name
|
|
78
|
+
:param features: IR Emitter features
|
|
79
|
+
:param attributes: IR Emitter attributes
|
|
80
|
+
:param options: IR Emitter options
|
|
81
|
+
:param area: optional area
|
|
82
|
+
:param cmd_handler: handler for entity commands
|
|
83
|
+
"""
|
|
84
|
+
super().__init__(
|
|
85
|
+
identifier,
|
|
86
|
+
name,
|
|
87
|
+
EntityTypes.IR_EMITTER,
|
|
88
|
+
features,
|
|
89
|
+
attributes,
|
|
90
|
+
options=options,
|
|
91
|
+
area=area,
|
|
92
|
+
cmd_handler=cmd_handler,
|
|
93
|
+
)
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Switch entity definitions.
|
|
3
|
+
|
|
4
|
+
:copyright: (c) 2023 by Unfolded Circle ApS.
|
|
5
|
+
:license: MPL-2.0, see LICENSE for more details.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from enum import Enum
|
|
9
|
+
from typing import Any
|
|
10
|
+
|
|
11
|
+
from .api_definitions import CommandHandler
|
|
12
|
+
from .entity import Entity, EntityTypes
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class States(str, Enum):
|
|
16
|
+
"""Select entity states."""
|
|
17
|
+
|
|
18
|
+
UNAVAILABLE = "UNAVAILABLE"
|
|
19
|
+
UNKNOWN = "UNKNOWN"
|
|
20
|
+
ON = "ON"
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class Features(str, Enum):
|
|
24
|
+
"""Select entity features."""
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class Attributes(str, Enum):
|
|
28
|
+
"""Select entity attributes."""
|
|
29
|
+
|
|
30
|
+
STATE = "state"
|
|
31
|
+
CURRENT_OPTION = "current_option"
|
|
32
|
+
OPTIONS = "options"
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class Commands(str, Enum):
|
|
36
|
+
"""Select entity commands."""
|
|
37
|
+
|
|
38
|
+
SELECT_OPTION = "select_option"
|
|
39
|
+
SELECT_FIRST = "select_first"
|
|
40
|
+
SELECT_LAST = "select_last"
|
|
41
|
+
SELECT_NEXT = "select_next"
|
|
42
|
+
SELECT_PREVIOUS = "select_previous"
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class DeviceClasses(str, Enum):
|
|
46
|
+
"""Select entity device classes."""
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
class Options(str, Enum):
|
|
50
|
+
"""Select entity options."""
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
class Select(Entity):
|
|
54
|
+
"""
|
|
55
|
+
Select entity class.
|
|
56
|
+
|
|
57
|
+
See https://github.com/unfoldedcircle/core-api/blob/main/doc/entities/entity_select.md
|
|
58
|
+
for more information.
|
|
59
|
+
"""
|
|
60
|
+
|
|
61
|
+
# pylint: disable=R0917
|
|
62
|
+
def __init__(
|
|
63
|
+
self,
|
|
64
|
+
identifier: str,
|
|
65
|
+
name: str | dict[str, str],
|
|
66
|
+
attributes: dict[str, Any],
|
|
67
|
+
*,
|
|
68
|
+
area: str | None = None,
|
|
69
|
+
cmd_handler: CommandHandler = None,
|
|
70
|
+
):
|
|
71
|
+
"""
|
|
72
|
+
Create select-entity instance.
|
|
73
|
+
|
|
74
|
+
:param identifier: entity identifier
|
|
75
|
+
:param name: friendly name
|
|
76
|
+
:param attributes: select attributes
|
|
77
|
+
:param area: optional area
|
|
78
|
+
:param cmd_handler: handler for entity commands
|
|
79
|
+
"""
|
|
80
|
+
super().__init__(
|
|
81
|
+
identifier,
|
|
82
|
+
name,
|
|
83
|
+
EntityTypes.SELECT,
|
|
84
|
+
[],
|
|
85
|
+
attributes,
|
|
86
|
+
area=area,
|
|
87
|
+
cmd_handler=cmd_handler,
|
|
88
|
+
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|