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

View File

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