Skip to content

Commit

Permalink
refactor(nexa): use old style union in typing
Browse files Browse the repository at this point in the history
Adds compatability with Python <= 3.9

Fixes #29
  • Loading branch information
andersevenrud committed Oct 5, 2023
1 parent 7418359 commit c0a8d81
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/nexa_bridge_x/nexa.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from __future__ import annotations
from functools import reduce
from datetime import timedelta
from typing import cast, Any
from typing import cast, Any, Union
from homeassistant.helpers.httpx_client import get_async_client
from homeassistant.exceptions import ConfigEntryAuthFailed
from homeassistant.config_entries import ConfigEntry
Expand Down Expand Up @@ -41,7 +41,7 @@
_LOGGER = logging.getLogger(__name__)

# TODO: Add correct typing
NexaNodeValueType = str | int | float | bool
NexaNodeValueType = Union[str, int, float, bool]
NexaEnergyData = Any
NexaLegacyEnergyData = Any
NexaEnergyNodeData = Any
Expand Down

0 comments on commit c0a8d81

Please sign in to comment.