Skip to content

Commit

Permalink
Adjust code to HA 2024.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
elad-bar committed Dec 28, 2023
1 parent d618c06 commit 921facd
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## 3.0.6

_Minimum HA Version: 2024.1.0_

- Fix media browser when no snapshot available by @chemelli74 in https://github.com/elad-bar/ha-shinobi/pull/60
- Adjust code to 2024.1.0 - [Issue #62](https://github.com/elad-bar/ha-shinobi/issues/62)

## 3.0.5

- Fix missing camera when no snapshot available by @chemelli74 in https://github.com/elad-bar/ha-shinobi/pull/57
Expand Down
14 changes: 7 additions & 7 deletions custom_components/shinobi/common/entity_descriptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@
from .enums import MonitorMode


@dataclass(slots=True)
@dataclass(frozen=True, kw_only=True)
class IntegrationEntityDescription(EntityDescription):
platform: Platform | None = None
is_system: bool = False
filter: Callable[[MonitorData | None], bool] | None = lambda m: m is not None


@dataclass(slots=True)
@dataclass(frozen=True, kw_only=True)
class IntegrationBinarySensorEntityDescription(
BinarySensorEntityDescription, IntegrationEntityDescription
):
Expand All @@ -47,36 +47,36 @@ class IntegrationBinarySensorEntityDescription(
attributes: list[str] | None = None


@dataclass(slots=True)
@dataclass(frozen=True, kw_only=True)
class IntegrationCameraEntityDescription(
CameraEntityDescription, IntegrationEntityDescription
):
platform: Platform | None = Platform.CAMERA


@dataclass(slots=True)
@dataclass(frozen=True, kw_only=True)
class IntegrationSensorEntityDescription(
SensorEntityDescription, IntegrationEntityDescription
):
platform: Platform | None = Platform.SENSOR


@dataclass(slots=True)
@dataclass(frozen=True, kw_only=True)
class IntegrationSelectEntityDescription(
SelectEntityDescription, IntegrationEntityDescription
):
platform: Platform | None = Platform.SELECT


@dataclass(slots=True)
@dataclass(frozen=True, kw_only=True)
class IntegrationSwitchEntityDescription(
SwitchEntityDescription, IntegrationEntityDescription
):
platform: Platform | None = Platform.SWITCH
on_value: str | bool | None = None


@dataclass(slots=True)
@dataclass(frozen=True, kw_only=True)
class IntegrationNumberEntityDescription(
NumberEntityDescription, IntegrationEntityDescription
):
Expand Down
2 changes: 1 addition & 1 deletion custom_components/shinobi/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
"iot_class": "local_polling",
"issue_tracker": "https://github.com/elad-bar/ha-shinobi/issues",
"requirements": [],
"version": "3.0.5"
"version": "3.0.6"
}
2 changes: 1 addition & 1 deletion hacs.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "Shinobi Video NVR",
"iot_class": "Local Polling",
"homeassistant": "2023.7.0"
"homeassistant": "2024.1.0"
}

0 comments on commit 921facd

Please sign in to comment.