Files
greenhousino/irrigation/homeassistant/greenhousino/const.py
Stefan Ostermann 884182e1f7 Add Home Assistant custom integration and ESP availability tracking
- 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
2026-07-19 15:25:04 +02:00

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"