Files
Dejvino 8eba7fa24c Add MeshCore Agent HACS integration: todo module with reminders
Custom HA integration (domain meshcore_agent) that lets MeshCore nodes
manage a todo list over mesh messages:

- todo / todo list, todo add, todo done, todo uncheck, todo remove
- remind <n> <when> / remind off <n> (relative, clock, weekday, absolute)
- replies via meshcore.send_message / send_channel_message
- reminders scheduled with async_track_point_in_time and delivered to
  the sender who set them
- todo list also exposed as a HA todo entity
- config flow with sender allowlist, allow-all toggle, reply length cap
- pure-Python core (core/) covered by pytest; adapter flow tested with
  stubbed hass
2026-12-01 19:15:05 +01:00

31 lines
1.0 KiB
Python

"""Constants for the MeshCore Agent integration."""
DOMAIN = "meshcore_agent"
MESH_CORE_DOMAIN = "meshcore" # domain of the meshcore-dev/meshcore-ha integration
# MeshCore integration (meshcore-dev/meshcore-ha) event and service names.
EVENT_MESHCORE_MESSAGE = "meshcore_message"
SERVICE_MESHCORE_SEND_MESSAGE = "send_message"
SERVICE_MESHCORE_SEND_CHANNEL_MESSAGE = "send_channel_message"
# Config entry / options keys.
CONF_ALLOWLIST = "allowlist" # comma/newline separated pubkey prefixes or names
CONF_ALLOW_ALL = "allow_all"
CONF_MAX_REPLY = "max_reply"
DEFAULT_ALLOWLIST = ""
DEFAULT_ALLOW_ALL = False
DEFAULT_MAX_REPLY = 200
# Signal fired after the store changes so the todo entity can refresh.
SIGNAL_STORE_UPDATED = "meshcore_agent_store_updated_{entry_id}"
# Event data keys of meshcore_message used by the adapter.
ATTR_MESSAGE = "message"
ATTR_OUTGOING = "outgoing"
ATTR_MESSAGE_TYPE = "message_type"
ATTR_SENDER_NAME = "sender_name"
ATTR_PUBKEY_PREFIX = "pubkey_prefix"
ATTR_CHANNEL_IDX = "channel_idx"
ATTR_ENTRY_ID = "entry_id"