forked from home-assistant/core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add strict typing to Tractive integration (home-assistant#56948)
* Strict typing * Add few missing types * Run hassfest * Fix mypy errors * Use List instead of list
- Loading branch information
Showing
10 changed files
with
166 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,23 @@ | ||
"""Constants for the tractive integration.""" | ||
|
||
from datetime import timedelta | ||
from typing import Final | ||
|
||
DOMAIN = "tractive" | ||
DOMAIN: Final = "tractive" | ||
|
||
RECONNECT_INTERVAL = timedelta(seconds=10) | ||
RECONNECT_INTERVAL: Final = timedelta(seconds=10) | ||
|
||
ATTR_DAILY_GOAL = "daily_goal" | ||
ATTR_BUZZER = "buzzer" | ||
ATTR_LED = "led" | ||
ATTR_LIVE_TRACKING = "live_tracking" | ||
ATTR_MINUTES_ACTIVE = "minutes_active" | ||
ATTR_DAILY_GOAL: Final = "daily_goal" | ||
ATTR_BUZZER: Final = "buzzer" | ||
ATTR_LED: Final = "led" | ||
ATTR_LIVE_TRACKING: Final = "live_tracking" | ||
ATTR_MINUTES_ACTIVE: Final = "minutes_active" | ||
|
||
CLIENT = "client" | ||
TRACKABLES = "trackables" | ||
CLIENT: Final = "client" | ||
TRACKABLES: Final = "trackables" | ||
|
||
TRACKER_HARDWARE_STATUS_UPDATED = f"{DOMAIN}_tracker_hardware_status_updated" | ||
TRACKER_POSITION_UPDATED = f"{DOMAIN}_tracker_position_updated" | ||
TRACKER_ACTIVITY_STATUS_UPDATED = f"{DOMAIN}_tracker_activity_updated" | ||
TRACKER_HARDWARE_STATUS_UPDATED: Final = f"{DOMAIN}_tracker_hardware_status_updated" | ||
TRACKER_POSITION_UPDATED: Final = f"{DOMAIN}_tracker_position_updated" | ||
TRACKER_ACTIVITY_STATUS_UPDATED: Final = f"{DOMAIN}_tracker_activity_updated" | ||
|
||
SERVER_UNAVAILABLE = f"{DOMAIN}_server_unavailable" | ||
SERVER_UNAVAILABLE: Final = f"{DOMAIN}_server_unavailable" |
Oops, something went wrong.