hass-core/homeassistant/components/tractive/const.py
Maciej Bieniek 09b872d51f
Add sensor platform for Tractive integration ()
* Add sensor platform

* Add extra_state_attributes

* Add more constants

* Add sensor.py to .coveragerc file

* Use native value

* Suggested change

* Move SENSOR_TYPES to sensor platform

* Add domain as prefix to the signal

* Use TractiveEntity class

* Add model.py to .coveragerc file

* Clean up files

* Add entity_class attribute to TractiveSensorEntityDescription class

* TractiveEntity inherits from Entity

* Suggested change

* Define _attr_icon as class attribute

Co-authored-by: Daniel Hjelseth Høyer <mail@dahoiv.net>
2021-08-24 00:20:28 +02:00

16 lines
481 B
Python

"""Constants for the tractive integration."""
from datetime import timedelta
DOMAIN = "tractive"
RECONNECT_INTERVAL = timedelta(seconds=10)
ATTR_DAILY_GOAL = "daily_goal"
ATTR_MINUTES_ACTIVE = "minutes_active"
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"
SERVER_UNAVAILABLE = f"{DOMAIN}_server_unavailable"