Skip to content

Commit

Permalink
chore(nexa): remove equal check in date comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
andersevenrud committed Feb 25, 2023
1 parent 7b3439d commit c2acd1a
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 @@ -58,10 +58,10 @@ def is_capable_of(node: NexaNode, items: list(str)) -> bool:


def is_newer_date(current: str, new: str) -> bool:
"""Check if given timestamp is newer or equal to the current"""
"""Check if given timestamp is newer to the current"""
current_time = dateutil.parser.isoparse(current)
new_time = dateutil.parser.isoparse(new)
return new_time >= current_time
return new_time > current_time


def values_from_events(node: NexaNodeData, legacy: bool) -> list[NexaNodeValue]:
Expand Down

0 comments on commit c2acd1a

Please sign in to comment.