forked from zachowj/hass-node-red
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconst.py
More file actions
77 lines (66 loc) · 2.03 KB
/
Copy pathconst.py
File metadata and controls
77 lines (66 loc) · 2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
"""Constants for Node-RED."""
from .version import __version__
VERSION = __version__
# Base component constants
DOMAIN = "nodered"
DOMAIN_DATA = f"{DOMAIN}_data"
WEBHOOKS = "webhooks"
ISSUE_URL = "https://github.com/zachowj/hass-node-red/issues"
# Home Assistant limits any state to 255 characters
HA_MAX_STATE_LENGTH = 255
# Configuration
CONF_ATTRIBUTES = "attributes"
CONF_AVAILABLE = "available"
CONF_BINARY_SENSOR = "binary_sensor"
CONF_BUTTON = "button"
CONF_COMPONENT = "component"
CONF_CONFIG = "config"
CONF_CONNECTION = "connection"
CONF_CONTRIB_VERSION = "contrib_version"
CONF_DATA = "data"
CONF_DEVICE_INFO = "device_info"
CONF_DEVICE_TRIGGER = "device_trigger"
CONF_ENABLED = "enabled"
CONF_ENTITY_PICTURE = "entity_picture"
CONF_LAST_RESET = "last_reset"
CONF_MESSAGE = "message"
CONF_NAME = "name"
CONF_NODE_ID = "node_id"
CONF_NUMBER = "number"
CONF_OPTIONS = "options"
CONF_OUTPUT_PATH = "output_path"
CONF_REMOVE = "remove"
CONF_SELECT = "select"
CONF_SENSOR = "sensor"
CONF_SERVER_ID = "server_id"
CONF_SKIP_CONDITION = "skip_condition"
CONF_STATE_CLASS = "state_class"
CONF_SUB_TYPE = "sub_type"
CONF_SWITCH = "switch"
CONF_TEXT = "text"
CONF_TIME = "time"
CONF_TRIGGER_ENTITY_ID = "trigger_entity_id"
CONF_VERSION = "version"
EVENT_VALUE_CHANGE = "value_change"
NODERED_DISCOVERY = "nodered_discovery"
NODERED_DISCOVERY_NEW = "nodered_discovery_new_{}"
NODERED_DISCOVERY_UPDATED = "nodered_discovery_updated_{}"
NODERED_ENTITY = "nodered_entity_{}_{}"
NODERED_CONFIG_UPDATE = "nodered_config_update_{}_{}"
SERVICE_TRIGGER = "trigger"
# Defaults
NAME = "Node-RED Companion"
NUMBER_ICON = "mdi:numeric"
SWITCH_ICON = "mdi:electric-switch-closed"
SELECT_ICON = "mdi:format-list-bulleted"
TEXT_ICON = "mdi:form-textbox"
TIME_ICON = "mdi:clock-time-three"
STARTUP_MESSAGE = f"""
-------------------------------------------------------------------
{NAME}
Version: {VERSION}
This is a custom integration!
If you have any issues with this you need to open an issue here:
{ISSUE_URL}
-------------------------------------------------------------------
"""