Skip to content

Commit

Permalink
fix: use old-style typing (for now)
Browse files Browse the repository at this point in the history
  • Loading branch information
swistakm committed Apr 16, 2024
1 parent 58ac898 commit 52d4e89
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions blebox_uniapi/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ def many_from_config(cls, product, box_type_config, extended_state):
class BaseSensor(Feature):
_unit: str
_device_class: str
_native_value: float | int | str
_sensor_type: str | None
_native_value: Union[float, int, str]
_sensor_type: Optional[str]

def __init__(
self, product: "Box", alias: str, methods: dict, sensor_type: str = None
Expand Down Expand Up @@ -146,7 +146,7 @@ def __init__(
sensor_type: str,
unit: str,
scale: float = 1,
precision: int | None = None,
precision: Optional[int] = None,
):
super().__init__(product, alias, methods)
self._unit = unit
Expand Down

0 comments on commit 52d4e89

Please sign in to comment.