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