Skip to content

Commit 459f6bf

Browse files
Remove deprecated EventType, bump HA version, update python version
1 parent abfceef commit 459f6bf

File tree

5 files changed

+7
-9
lines changed

5 files changed

+7
-9
lines changed

.devcontainer/integration/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "BN Integration",
3-
"image": "mcr.microsoft.com/vscode/devcontainers/python:0-3.11-bullseye",
3+
"image": "mcr.microsoft.com/vscode/devcontainers/python:3.12-bullseye",
44
"postCreateCommand": "scripts/setup",
55
"runArgs": [
66
"--network=host"

custom_components/battery_notes/binary_sensor.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@
5050
async_track_entity_registry_updated_event,
5151
)
5252
from homeassistant.helpers.reload import async_setup_reload_service
53-
from homeassistant.helpers.typing import EventType
5453

5554
from homeassistant.const import (
5655
CONF_NAME,
@@ -242,7 +241,7 @@ def _default_update(self, result: str | TemplateError) -> None:
242241
@callback
243242
def handle_result(
244243
self,
245-
event: EventType[EventStateChangedData] | None,
244+
event: Event[EventStateChangedData] | None,
246245
template: Template,
247246
last_result: str | None | TemplateError,
248247
result: str | TemplateError,
@@ -423,7 +422,7 @@ def _async_template_startup(
423422
@callback
424423
def _handle_results(
425424
self,
426-
event: EventType[EventStateChangedData] | None,
425+
event: Event[EventStateChangedData] | None,
427426
updates: list[TrackTemplateResult],
428427
) -> None:
429428
"""Call back the results to the attributes."""

custom_components/battery_notes/sensor.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
CoordinatorEntity,
3939
)
4040
from homeassistant.helpers.reload import async_setup_reload_service
41-
from homeassistant.helpers.typing import EventType
4241

4342
from homeassistant.helpers.entity_registry import (
4443
EVENT_ENTITY_REGISTRY_UPDATED,
@@ -310,7 +309,7 @@ def __init__(
310309

311310
@callback
312311
async def async_state_changed_listener(
313-
self, event: EventType[EventStateChangedData] | None = None
312+
self, event: Event[EventStateChangedData] | None = None
314313
) -> None:
315314
# pylint: disable=unused-argument
316315
"""Handle child updates."""
@@ -410,7 +409,7 @@ async def async_added_to_hass(self) -> None:
410409

411410
@callback
412411
async def _async_state_changed_listener(
413-
event: EventType[EventStateChangedData] | None = None,
412+
event: Event[EventStateChangedData] | None = None,
414413
) -> None:
415414
"""Handle child updates."""
416415
await self.async_state_changed_listener(event)

hacs.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "Battery Notes",
33
"filename": "battery_notes.zip",
44
"hide_default_branch": true,
5-
"homeassistant": "2023.11.0",
5+
"homeassistant": "2024.1.0",
66
"render_readme": true,
77
"zip_release": true,
88
"persistent_directory": "data"

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
colorlog>=6.8.2,<7.0
2-
homeassistant>=2023.11.0
2+
homeassistant>=2024.1.0
33
ruff>=0.3.2,<0.5

0 commit comments

Comments
 (0)