mirror of
https://github.com/XiaoMi/ha_xiaomi_home.git
synced 2025-08-05 23:08:55 +08:00
fix: fix type error, wrong use of any and Any (#338)
* fix: fix type error, wrong use of any and Any * fix: wrong use of session close * fix: fix test_lan type error * fix: remove __del__ * feat: oauth, http add deinit_async
This commit is contained in:
@ -46,6 +46,7 @@ off Xiaomi or its affiliates' products.
|
||||
Event entities for Xiaomi Home.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
from typing import Any
|
||||
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.core import HomeAssistant
|
||||
@ -84,6 +85,6 @@ class Event(MIoTEventEntity, EventEntity):
|
||||
# Set device_class
|
||||
self._attr_device_class = spec.device_class
|
||||
|
||||
def on_event_occurred(self, name: str, arguments: list[dict[int, any]]):
|
||||
def on_event_occurred(self, name: str, arguments: list[dict[int, Any]]):
|
||||
"""An event is occurred."""
|
||||
self._trigger_event(event_type=name, event_attributes=arguments)
|
||||
|
Reference in New Issue
Block a user