ucapi-framework 1.9.0b1__tar.gz → 1.9.0b3__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_framework-1.9.0b1 → ucapi_framework-1.9.0b3}/PKG-INFO +1 -1
- {ucapi_framework-1.9.0b1 → ucapi_framework-1.9.0b3}/pyproject.toml +1 -1
- {ucapi_framework-1.9.0b1 → ucapi_framework-1.9.0b3}/ucapi_framework/device.py +20 -0
- {ucapi_framework-1.9.0b1 → ucapi_framework-1.9.0b3}/ucapi_framework.egg-info/PKG-INFO +1 -1
- {ucapi_framework-1.9.0b1 → ucapi_framework-1.9.0b3}/README.md +0 -0
- {ucapi_framework-1.9.0b1 → ucapi_framework-1.9.0b3}/setup.cfg +0 -0
- {ucapi_framework-1.9.0b1 → ucapi_framework-1.9.0b3}/tests/test_button_entity.py +0 -0
- {ucapi_framework-1.9.0b1 → ucapi_framework-1.9.0b3}/tests/test_climate_entity.py +0 -0
- {ucapi_framework-1.9.0b1 → ucapi_framework-1.9.0b3}/tests/test_config.py +0 -0
- {ucapi_framework-1.9.0b1 → ucapi_framework-1.9.0b3}/tests/test_cover_entity.py +0 -0
- {ucapi_framework-1.9.0b1 → ucapi_framework-1.9.0b3}/tests/test_device.py +0 -0
- {ucapi_framework-1.9.0b1 → ucapi_framework-1.9.0b3}/tests/test_discovery.py +0 -0
- {ucapi_framework-1.9.0b1 → ucapi_framework-1.9.0b3}/tests/test_driver.py +0 -0
- {ucapi_framework-1.9.0b1 → ucapi_framework-1.9.0b3}/tests/test_entity.py +0 -0
- {ucapi_framework-1.9.0b1 → ucapi_framework-1.9.0b3}/tests/test_factory_pattern.py +0 -0
- {ucapi_framework-1.9.0b1 → ucapi_framework-1.9.0b3}/tests/test_helpers.py +0 -0
- {ucapi_framework-1.9.0b1 → ucapi_framework-1.9.0b3}/tests/test_ir_emitter_entity.py +0 -0
- {ucapi_framework-1.9.0b1 → ucapi_framework-1.9.0b3}/tests/test_light_entity.py +0 -0
- {ucapi_framework-1.9.0b1 → ucapi_framework-1.9.0b3}/tests/test_media_player_entity.py +0 -0
- {ucapi_framework-1.9.0b1 → ucapi_framework-1.9.0b3}/tests/test_migration.py +0 -0
- {ucapi_framework-1.9.0b1 → ucapi_framework-1.9.0b3}/tests/test_remote_entity.py +0 -0
- {ucapi_framework-1.9.0b1 → ucapi_framework-1.9.0b3}/tests/test_select_entity.py +0 -0
- {ucapi_framework-1.9.0b1 → ucapi_framework-1.9.0b3}/tests/test_sensor_entity.py +0 -0
- {ucapi_framework-1.9.0b1 → ucapi_framework-1.9.0b3}/tests/test_setup.py +0 -0
- {ucapi_framework-1.9.0b1 → ucapi_framework-1.9.0b3}/tests/test_switch_entity.py +0 -0
- {ucapi_framework-1.9.0b1 → ucapi_framework-1.9.0b3}/tests/test_voice_assistant_entity.py +0 -0
- {ucapi_framework-1.9.0b1 → ucapi_framework-1.9.0b3}/ucapi_framework/__init__.py +0 -0
- {ucapi_framework-1.9.0b1 → ucapi_framework-1.9.0b3}/ucapi_framework/config.py +0 -0
- {ucapi_framework-1.9.0b1 → ucapi_framework-1.9.0b3}/ucapi_framework/discovery.py +0 -0
- {ucapi_framework-1.9.0b1 → ucapi_framework-1.9.0b3}/ucapi_framework/driver.py +0 -0
- {ucapi_framework-1.9.0b1 → ucapi_framework-1.9.0b3}/ucapi_framework/entities/__init__.py +0 -0
- {ucapi_framework-1.9.0b1 → ucapi_framework-1.9.0b3}/ucapi_framework/entities/button.py +0 -0
- {ucapi_framework-1.9.0b1 → ucapi_framework-1.9.0b3}/ucapi_framework/entities/climate.py +0 -0
- {ucapi_framework-1.9.0b1 → ucapi_framework-1.9.0b3}/ucapi_framework/entities/cover.py +0 -0
- {ucapi_framework-1.9.0b1 → ucapi_framework-1.9.0b3}/ucapi_framework/entities/ir_emitter.py +0 -0
- {ucapi_framework-1.9.0b1 → ucapi_framework-1.9.0b3}/ucapi_framework/entities/light.py +0 -0
- {ucapi_framework-1.9.0b1 → ucapi_framework-1.9.0b3}/ucapi_framework/entities/media_player.py +0 -0
- {ucapi_framework-1.9.0b1 → ucapi_framework-1.9.0b3}/ucapi_framework/entities/remote.py +0 -0
- {ucapi_framework-1.9.0b1 → ucapi_framework-1.9.0b3}/ucapi_framework/entities/select.py +0 -0
- {ucapi_framework-1.9.0b1 → ucapi_framework-1.9.0b3}/ucapi_framework/entities/sensor.py +0 -0
- {ucapi_framework-1.9.0b1 → ucapi_framework-1.9.0b3}/ucapi_framework/entities/switch.py +0 -0
- {ucapi_framework-1.9.0b1 → ucapi_framework-1.9.0b3}/ucapi_framework/entities/voice_assistant.py +0 -0
- {ucapi_framework-1.9.0b1 → ucapi_framework-1.9.0b3}/ucapi_framework/entity.py +0 -0
- {ucapi_framework-1.9.0b1 → ucapi_framework-1.9.0b3}/ucapi_framework/helpers.py +0 -0
- {ucapi_framework-1.9.0b1 → ucapi_framework-1.9.0b3}/ucapi_framework/migration.py +0 -0
- {ucapi_framework-1.9.0b1 → ucapi_framework-1.9.0b3}/ucapi_framework/setup.py +0 -0
- {ucapi_framework-1.9.0b1 → ucapi_framework-1.9.0b3}/ucapi_framework.egg-info/SOURCES.txt +0 -0
- {ucapi_framework-1.9.0b1 → ucapi_framework-1.9.0b3}/ucapi_framework.egg-info/dependency_links.txt +0 -0
- {ucapi_framework-1.9.0b1 → ucapi_framework-1.9.0b3}/ucapi_framework.egg-info/requires.txt +0 -0
- {ucapi_framework-1.9.0b1 → ucapi_framework-1.9.0b3}/ucapi_framework.egg-info/top_level.txt +0 -0
|
@@ -119,6 +119,26 @@ class BaseDeviceInterface(ABC):
|
|
|
119
119
|
"""
|
|
120
120
|
return self._driver
|
|
121
121
|
|
|
122
|
+
def push_update(self) -> None:
|
|
123
|
+
"""
|
|
124
|
+
Notify the framework that this device's state has changed.
|
|
125
|
+
|
|
126
|
+
Emits ``DeviceEvents.UPDATE`` with no payload. Any entity that has called
|
|
127
|
+
``subscribe_to_device()`` will have its ``sync_state()`` method invoked
|
|
128
|
+
automatically in response.
|
|
129
|
+
|
|
130
|
+
This is the recommended way to trigger state propagation when using the
|
|
131
|
+
coordinator pattern::
|
|
132
|
+
|
|
133
|
+
async def _poll(self):
|
|
134
|
+
self.volume = await self._fetch_volume()
|
|
135
|
+
self.push_update()
|
|
136
|
+
|
|
137
|
+
For the legacy attribute-routing pattern, emit ``DeviceEvents.UPDATE``
|
|
138
|
+
directly with ``entity_id`` and an ``update`` dict instead.
|
|
139
|
+
"""
|
|
140
|
+
self.events.emit(DeviceEvents.UPDATE)
|
|
141
|
+
|
|
122
142
|
def update_config(self, **kwargs) -> bool:
|
|
123
143
|
"""
|
|
124
144
|
Update device configuration attributes and persist 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
|
{ucapi_framework-1.9.0b1 → ucapi_framework-1.9.0b3}/ucapi_framework/entities/media_player.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ucapi_framework-1.9.0b1 → ucapi_framework-1.9.0b3}/ucapi_framework/entities/voice_assistant.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ucapi_framework-1.9.0b1 → ucapi_framework-1.9.0b3}/ucapi_framework.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|