Move definition back to init

This commit is contained in:
epenet 2022-06-28 07:24:04 +00:00
parent c4e17bfd98
commit 8c10d0a4b1
2 changed files with 3 additions and 3 deletions

View file

@ -1,4 +1,6 @@
"""Support for Rflink devices."""
from __future__ import annotations
import asyncio
from collections import defaultdict
import logging
@ -315,6 +317,7 @@ class RflinkDevice(Entity):
"""
platform = None
_state: bool | None = None
_available = True
def __init__(
@ -344,7 +347,6 @@ class RflinkDevice(Entity):
self._nogroup_aliases = nogroup_aliases
self._should_fire_event = fire_event
self._signal_repetitions = signal_repetitions
self._state = None
@callback
def handle_event_callback(self, event):

View file

@ -125,8 +125,6 @@ async def async_setup_platform(
class RflinkCover(RflinkCommand, CoverEntity, RestoreEntity):
"""Rflink entity which can switch on/stop/off (eg: cover)."""
_state: bool | None
async def async_added_to_hass(self) -> None:
"""Restore RFLink cover state (OPEN/CLOSE)."""
await super().async_added_to_hass()