- Add custom HA integration (config flow, switch, water_for service) - Add MQTT Last Will & Testament for offline detection - Publish 'online' on successful MQTT connect - Update README with integration docs
26 lines
604 B
Python
26 lines
604 B
Python
"""Constants for Greenhousino Irrigation integration."""
|
|
|
|
DOMAIN = "greenhousino"
|
|
MANUFACTURER = "Greenhousino"
|
|
MODEL = "Irrigation Controller"
|
|
|
|
# Defaults
|
|
DEFAULT_NAME = "Greenhousino Irrigation"
|
|
DEFAULT_COMMAND_TOPIC = "greenhousino/pump"
|
|
DEFAULT_STATE_TOPIC = "greenhousino/pumpstate"
|
|
DEFAULT_PAYLOAD_ON = "on"
|
|
DEFAULT_PAYLOAD_OFF = "off"
|
|
|
|
# Config flow keys
|
|
CONF_COMMAND_TOPIC = "command_topic"
|
|
CONF_STATE_TOPIC = "state_topic"
|
|
CONF_HOST = "host"
|
|
|
|
# Service
|
|
SERVICE_WATER_FOR = "water_for"
|
|
SERVICE_DATA_DURATION = "duration"
|
|
|
|
# State
|
|
ATTR_DURATION_MS = "duration_ms"
|
|
ATTR_PUMP_ACTIVE = "pump_active"
|