Home Assistant Unofficial Reference 2024.12.1
const.py
Go to the documentation of this file.
1 """Constants for the Nice G.O. integration."""
2 
3 from datetime import timedelta
4 
5 from homeassistant.const import Platform
6 
7 DOMAIN = "nice_go"
8 
9 # Configuration
10 CONF_SITE_ID = "site_id"
11 CONF_DEVICE_ID = "device_id"
12 CONF_REFRESH_TOKEN = "refresh_token"
13 CONF_REFRESH_TOKEN_CREATION_TIME = "refresh_token_creation_time"
14 
15 REFRESH_TOKEN_EXPIRY_TIME = timedelta(days=30)
16 
17 SUPPORTED_DEVICE_TYPES = {
18  Platform.LIGHT: ["WallStation"],
19  Platform.SWITCH: ["WallStation"],
20 }
21 KNOWN_UNSUPPORTED_DEVICE_TYPES = {
22  Platform.LIGHT: ["Mms100"],
23  Platform.SWITCH: ["Mms100"],
24 }
25 
26 UNSUPPORTED_DEVICE_WARNING = (
27  "Device '%s' has unknown device type '%s', "
28  "which is not supported by this integration. "
29  "We try to support it with a cover and event entity, but nothing else. "
30  "Please create an issue with your device model in additional info"
31  " at https://github.com/home-assistant/core/issues/new"
32  "?assignees=&labels=&projects=&template=bug_report.yml"
33  "&title=New%%20Nice%%20G.O.%%20device%%20type%%20'%s'%%20found"
34 )