Bump aioshelly to version 6.1.0 (#104456)

* Bump aioshelly

* Use MODEL_* consts from aioshelly

* Add missing models to BATTERY_DEVICES_WITH_PERMANENT_CONNECTION
This commit is contained in:
Maciej Bieniek 2023-11-24 19:55:00 +01:00 committed by GitHub
parent 724352d55c
commit 2515dbeee1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 166 additions and 106 deletions

View file

@ -6,6 +6,7 @@ from dataclasses import dataclass
from typing import TYPE_CHECKING, Any, Final
from aioshelly.block_device import Block
from aioshelly.const import MODEL_I3
from homeassistant.components.event import (
DOMAIN as EVENT_DOMAIN,
@ -135,7 +136,7 @@ class ShellyBlockEvent(ShellyBlockEntity, EventEntity):
self.channel = channel = int(block.channel or 0) + 1
self._attr_unique_id = f"{super().unique_id}-{channel}"
if coordinator.model == "SHIX3-1":
if coordinator.model == MODEL_I3:
self._attr_event_types = list(SHIX3_1_INPUTS_EVENTS_TYPES)
else:
self._attr_event_types = list(BASIC_INPUTS_EVENTS_TYPES)