Skip to content

Commit 6bff1ea

Browse files
authored
Merge pull request #21 from unfoldedcircle/feat/media_position_updated_at
feat: new media-player attribute media_position_updated_at
2 parents 8cbe528 + a8d9d38 commit 6bff1ea

File tree

10 files changed

+24
-10
lines changed

10 files changed

+24
-10
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
_Changes in the next release_
1111

12+
### Added
13+
- New media-player attribute MEDIA_POSITION_UPDATED_AT ([feature-and-bug-tracker#443](https://github.com/unfoldedcircle/feature-and-bug-tracker/issues/443)).
14+
1215
---
1316

1417
## v0.2.0 - 2024-04-28

ucapi/api.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616
import websockets
1717
from pyee.asyncio import AsyncIOEventEmitter
1818

19+
# Note: websockets ~v15 doesn't have websockets.server anymore
20+
from websockets import serve
21+
1922
# workaround for pylint error: E0611: No name 'ConnectionClosedOK' in module 'websockets' (no-name-in-module) # noqa
2023
from websockets.exceptions import ConnectionClosedOK
21-
22-
# workaround for pylint error: E1101: Module 'websockets' has no 'serve' member (no-member) # noqa
23-
from websockets.server import serve
2424
from zeroconf import IPVersion
2525
from zeroconf.asyncio import AsyncServiceInfo, AsyncZeroconf
2626

@@ -210,6 +210,7 @@ async def _send_error_result(
210210
"""
211211
await self._send_ws_response(websocket, req_id, "result", msg_data, status_code)
212212

213+
# pylint: disable=R0917
213214
async def _send_ws_response(
214215
self,
215216
websocket,
@@ -635,6 +636,7 @@ async def driver_setup_progress(self, websocket) -> None:
635636
websocket, uc.WsMsgEvents.DRIVER_SETUP_CHANGE, data, uc.EventCategory.DEVICE
636637
)
637638

639+
# pylint: disable=R0917
638640
async def request_driver_setup_user_confirmation(
639641
self,
640642
websocket,

ucapi/climate.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,9 @@ class Climate(Entity):
7979
8080
See https://github.com/unfoldedcircle/core-api/blob/main/doc/entities/entity_climate.md
8181
for more information.
82-
""" # noqa
82+
"""
8383

84+
# pylint: disable=R0917
8485
def __init__(
8586
self,
8687
identifier: str,

ucapi/cover.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,9 @@ class Cover(Entity):
7878
7979
See https://github.com/unfoldedcircle/core-api/blob/main/doc/entities/entity_cover.md
8080
for more information.
81-
""" # noqa
81+
"""
8282

83+
# pylint: disable=R0917
8384
def __init__(
8485
self,
8586
identifier: str,

ucapi/entity.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ class Entity:
3636
for more information.
3737
"""
3838

39+
# pylint: disable=R0917
3940
def __init__(
4041
self,
4142
identifier: str,

ucapi/light.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,9 @@ class Light(Entity):
6565
6666
See https://github.com/unfoldedcircle/core-api/blob/main/doc/entities/entity_light.md
6767
for more information.
68-
""" # noqa
68+
"""
6969

70+
# pylint: disable=R0917
7071
def __init__(
7172
self,
7273
identifier: str,

ucapi/media_player.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ class Attributes(str, Enum):
7878
MUTED = "muted"
7979
MEDIA_DURATION = "media_duration"
8080
MEDIA_POSITION = "media_position"
81+
MEDIA_POSITION_UPDATED_AT = "media_position_updated_at"
8182
MEDIA_TYPE = "media_type"
8283
MEDIA_IMAGE_URL = "media_image_url"
8384
MEDIA_TITLE = "media_title"
@@ -193,8 +194,9 @@ class MediaPlayer(Entity):
193194
194195
See https://github.com/unfoldedcircle/core-api/blob/main/doc/entities/entity_media_player.md
195196
for more information.
196-
""" # noqa
197+
"""
197198

199+
# pylint: disable=R0917
198200
def __init__(
199201
self,
200202
identifier: str,

ucapi/remote.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,9 @@ class Remote(Entity):
119119
120120
See https://github.com/unfoldedcircle/core-api/blob/main/doc/entities/entity_remote.md
121121
for more information.
122-
""" # noqa
122+
"""
123123

124+
# pylint: disable=R0917
124125
def __init__(
125126
self,
126127
identifier: str,

ucapi/sensor.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,9 @@ class Sensor(Entity):
6464
6565
See https://github.com/unfoldedcircle/core-api/blob/main/doc/entities/entity_sensor.md
6666
for more information.
67-
""" # noqa
67+
"""
6868

69+
# pylint: disable=R0917
6970
def __init__(
7071
self,
7172
identifier: str,

ucapi/switch.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,9 @@ class Switch(Entity):
6161
6262
See https://github.com/unfoldedcircle/core-api/blob/main/doc/entities/entity_switch.md
6363
for more information.
64-
""" # noqa
64+
"""
6565

66+
# pylint: disable=R0917
6667
def __init__(
6768
self,
6869
identifier: str,

0 commit comments

Comments
 (0)