Skip to content

Commit c95169b

Browse files
committed
ruff fixes
1 parent 9a07828 commit c95169b

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

custom_components/plugwise_usb/coordinator.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
"""DataUpdateCoordinator for Plugwise USB-Stick."""
22

33
from collections import Counter
4+
from collections.abc import Callable
45
from datetime import timedelta
56
import logging
6-
from typing import Any, Callable
7+
from typing import Any
78

89
from plugwise_usb.api import PUSHING_FEATURES, NodeFeature, PlugwiseNode
910
from plugwise_usb.exceptions import NodeError, NodeTimeout, StickError, StickTimeout

custom_components/plugwise_usb/event.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
from plugwise_usb.api import NodeEvent, NodeFeature
1010

1111
from homeassistant.components.event import (
12-
EventDeviceClass,
13-
EventEntity,
12+
EventDeviceClass,
13+
EventEntity,
1414
EventEntityDescription,
1515
)
16-
from homeassistant.const import EntityCategory, Platform, UnitOfTime
16+
from homeassistant.const import Platform
1717
from homeassistant.core import HomeAssistant, callback
1818
from homeassistant.helpers.entity_platform import AddEntitiesCallback
1919

@@ -141,8 +141,8 @@ def _handle_coordinator_update(self) -> None:
141141
)
142142
return
143143
# SWITCH logic
144-
state_value = getattr(data, "state" )
145-
group_value = getattr(data, "group" )
144+
state_value = data.state
145+
group_value = data.group
146146
match self.entity_description.key:
147147
case "button_press_i_group_1":
148148
if state_value is True and group_value == 1:

0 commit comments

Comments
 (0)