189 files
This commit is contained in:
@@ -16,6 +16,7 @@ DOMAIN = "maintenance_supporter"
|
||||
# at all (the #86 panel-flag desync came from exactly this literal-key class).
|
||||
NOTIFICATION_MANAGER_KEY = "_notification_manager"
|
||||
DOCUMENT_STORE_KEY = "_document_store"
|
||||
DOCUMENT_TEXT_INDEX_KEY = "_document_text_index"
|
||||
BUDGET_CACHE_KEY = "_budget_cache"
|
||||
EVENT_UNSUBS_KEY = "_event_unsubs"
|
||||
# TOP-LEVEL hass.data key (survives the DOMAIN pop on last-entry unload):
|
||||
@@ -173,6 +174,9 @@ CONF_OPERATOR_WRITE_ENABLED = "operator_write_enabled"
|
||||
# show. Selectable from KNOWN_OBJECT_TABLE_COLUMNS only — known object fields,
|
||||
# never arbitrary state attributes.
|
||||
CONF_OBJECTS_TABLE_COLUMNS = "objects_table_columns"
|
||||
# #169 follow-up: per-member avatar overrides {user_id: {initials, color}}
|
||||
# — shapes/palette in helpers/member_display.py.
|
||||
CONF_MEMBER_DISPLAY = "member_display"
|
||||
|
||||
# v2.21: template-gallery curation — ids of built-in templates the admin has
|
||||
# hidden from the "From template" pickers (panel gallery + config flow). The
|
||||
@@ -200,6 +204,7 @@ MAX_ADOPTED_NOTES = 100
|
||||
# these; the WS update handler drops anything outside this set.
|
||||
KNOWN_OBJECT_TABLE_COLUMNS = [
|
||||
"name",
|
||||
"ref_no", # #170 reference number — opt-in column
|
||||
"manufacturer",
|
||||
"model",
|
||||
"serial_number",
|
||||
@@ -273,6 +278,13 @@ CONF_NOTIFICATION_TITLE_STYLE = "notification_title_style"
|
||||
# MATCHING that view's task-selecting filters (label + responsible user) send
|
||||
# reminders. "" = no scope (all tasks). See helpers/saved_views.view_matches_task.
|
||||
CONF_NOTIFY_SCOPE_VIEW_ID = "notify_scope_view_id"
|
||||
# #165: your own notification rule — fire the event and send nothing
|
||||
# yourself (an automation routes), and/or merge template-rendered extra
|
||||
# keys into every notify payload's `data` (Ticker category, Pushover
|
||||
# priority, Telegram parse_mode …).
|
||||
CONF_NOTIFY_EVENT_ONLY = "notify_event_only"
|
||||
CONF_NOTIFY_EXTRA_DATA = "notify_extra_data"
|
||||
MAX_NOTIFY_EXTRA_DATA_LENGTH = 2000
|
||||
NOTIFICATION_TITLE_STYLES = ("default", "object_name", "task_name")
|
||||
|
||||
# --- Config Keys: Notification Actions ---
|
||||
@@ -373,6 +385,18 @@ BATTERY_FLEET_INCLUDED = "battery_fleet_included"
|
||||
# vacuums, smart rings — the #107 filter) in the roster as rechargeables, so
|
||||
# "needs a recharge" can notify like "needs a swap". Default off: #107 stays.
|
||||
BATTERY_FLEET_TRACK_SELF_CHARGING = "battery_fleet_track_self_charging"
|
||||
# D#162: a Battery Notes note WITHOUT a level sensor (only the type sensor,
|
||||
# the last-replaced timestamp and the "replaced" button exist) has no
|
||||
# reading that could ever fire the fleet task — the forecast is all there
|
||||
# is. Default ON: a passed predicted date on such a note counts as due
|
||||
# (low → task trigger). Stored as False to switch off; absent means on.
|
||||
BATTERY_FLEET_DUE_WITHOUT_SENSOR = "battery_fleet_due_without_sensor"
|
||||
# Bug review 2026-09-04: ``batt_<type>`` part ids the user DELETED. The
|
||||
# start-up reconcile re-minted them on every boot as long as the type was
|
||||
# still in the fleet, so a deleted type-part never stayed deleted. Written
|
||||
# by part/delete, honoured by the reconcile, cleared by an explicit
|
||||
# Battery-Fleet setup (the user asked for the full set again).
|
||||
BATTERY_FLEET_REMOVED_PARTS = "battery_fleet_removed_parts"
|
||||
# Task-side link: task["consumes_parts"] = [{"part_id", "quantity"}] — a
|
||||
# completion decrements each linked part's stock.
|
||||
CONF_TASK_CONSUMES_PARTS = "consumes_parts"
|
||||
@@ -402,6 +426,9 @@ CONF_TASK_NFC_TAG = "nfc_tag_id"
|
||||
# v2.20 (#83): display unit for `reading`-type tasks ("kWh", "m³", ...).
|
||||
CONF_TASK_READING_UNIT = "reading_unit"
|
||||
MAX_READING_UNIT_LENGTH = 32
|
||||
# #161 phase 2: named reading slots ([{id, name, unit}]) — several values per
|
||||
# completion; shapes/caps live in helpers/reading_slots.py.
|
||||
CONF_TASK_READINGS = "readings"
|
||||
MAX_NFC_TAG_LENGTH = 256
|
||||
CONF_TASK_INTERVAL_ANCHOR = "interval_anchor"
|
||||
CONF_TASK_SCHEDULE_TIME = "schedule_time"
|
||||
@@ -569,6 +596,9 @@ EVENT_TRIGGER_DEACTIVATED = f"{DOMAIN}_trigger_deactivated"
|
||||
# state mutation has persisted. Power users wire HA automations on these;
|
||||
# the integration's own action_listener also subscribes to the COMPLETED
|
||||
# event to dispatch the per-task on_complete_action service-call.
|
||||
# #165: one event per notification the integration is about to send —
|
||||
# the hook for user-written routing (see helpers/notify_hooks.py).
|
||||
EVENT_NOTIFICATION = f"{DOMAIN}_notification"
|
||||
EVENT_TASK_COMPLETED = f"{DOMAIN}_task_completed"
|
||||
EVENT_TASK_SKIPPED = f"{DOMAIN}_task_skipped"
|
||||
EVENT_TASK_RESET = f"{DOMAIN}_task_reset"
|
||||
|
||||
Reference in New Issue
Block a user