mirror of
https://github.com/home-assistant/core.git
synced 2025-08-05 05:35:11 +02:00
Move definition back to init
This commit is contained in:
@@ -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):
|
||||
|
@@ -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()
|
||||
|
Reference in New Issue
Block a user