Move cls attribute

This commit is contained in:
Edgar P. Burkhart 2024-12-09 15:56:30 +01:00
parent c77e04f508
commit 9a295a7569
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227

View file

@ -10,6 +10,8 @@ logger = logging.getLogger(__name__)
class Selector: class Selector:
default_data = {"temperature": None, "mode": None, "switch": None}
def __init__(self, send_data: Callable[[dict[str, Any]], Any]): def __init__(self, send_data: Callable[[dict[str, Any]], Any]):
self.stick = SenseHat().stick self.stick = SenseHat().stick
self.temperature: float | None = None self.temperature: float | None = None
@ -18,7 +20,6 @@ class Selector:
self.preset_modes: list[str] = [] self.preset_modes: list[str] = []
self.send_data = send_data self.send_data = send_data
self.switch_held = False self.switch_held = False
self.default_data = {"temperature": None, "mode": None, "switch": None}
self.stick.direction_middle = self.toggle self.stick.direction_middle = self.toggle