197 files
This commit is contained in:
1 parent
89d9f5e49b
commit
383e9ed04e
197 files changed
+4386
-1837
No files matched your search
+1
-1
@@ -1 +1 @@
|
|||||||
{"pid": 70, "version": 1, "ha_version": "2026.8.2", "start_ts": 1787246176.3005776}
|
{"pid": 72, "version": 1, "ha_version": "2026.8.2", "start_ts": 1787338100.2662094}
|
||||||
@@ -315,7 +315,7 @@
|
|||||||
"type": "module"
|
"type": "module"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "ba07e776ada54bb899ab0dfd6f6f2dbd",
|
"id": "3dc0faac727c4411b93fbf34ae873574",
|
||||||
"url": "/climate_scheduler/static/climate-scheduler-card.js?v=1.15.1",
|
"url": "/climate_scheduler/static/climate-scheduler-card.js?v=1.15.1",
|
||||||
"type": "module"
|
"type": "module"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,6 +53,14 @@ class _OptionsFlowBase(TriggerConfigMixin, OptionsFlow):
|
|||||||
def _save_new_task(self) -> ConfigFlowResult:
|
def _save_new_task(self) -> ConfigFlowResult:
|
||||||
"""Save the current task and return to init."""
|
"""Save the current task and return to init."""
|
||||||
from .config_flow_schedule import build_new_task_record
|
from .config_flow_schedule import build_new_task_record
|
||||||
|
from .const import MAX_TASKS_PER_OBJECT
|
||||||
|
|
||||||
|
# Same bound the WS create chokepoint enforces (drift audit 2026-08:
|
||||||
|
# this options-flow copy had no cap, so the flow could inflate
|
||||||
|
# ConfigEntry.data past the limit the API refuses).
|
||||||
|
if len(self.config_entry.data.get(CONF_TASKS, {})) >= MAX_TASKS_PER_OBJECT:
|
||||||
|
self._current_task = {}
|
||||||
|
return self._show_init_menu()
|
||||||
|
|
||||||
task_id = uuid4().hex
|
task_id = uuid4().hex
|
||||||
task_data = build_new_task_record(
|
task_data = build_new_task_record(
|
||||||
|
|||||||
@@ -681,6 +681,9 @@ class TriggerConfigMixin:
|
|||||||
if to_state:
|
if to_state:
|
||||||
tc[CONF_TRIGGER_TO_STATE] = to_state
|
tc[CONF_TRIGGER_TO_STATE] = to_state
|
||||||
tc[CONF_TRIGGER_TARGET_CHANGES] = user_input.get(CONF_TRIGGER_TARGET_CHANGES, 1)
|
tc[CONF_TRIGGER_TARGET_CHANGES] = user_input.get(CONF_TRIGGER_TARGET_CHANGES, 1)
|
||||||
|
# #136: the new state must HOLD this long before a change counts
|
||||||
|
# (0 = count immediately — some sensors pulse only briefly).
|
||||||
|
tc[CONF_TRIGGER_FOR_MINUTES] = user_input.get(CONF_TRIGGER_FOR_MINUTES, 0)
|
||||||
_apply_recovery_flag(tc, user_input)
|
_apply_recovery_flag(tc, user_input)
|
||||||
_apply_combinator(tc, user_input)
|
_apply_combinator(tc, user_input)
|
||||||
|
|
||||||
@@ -711,6 +714,9 @@ class TriggerConfigMixin:
|
|||||||
mode=selector.NumberSelectorMode.BOX,
|
mode=selector.NumberSelectorMode.BOX,
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
vol.Optional(CONF_TRIGGER_FOR_MINUTES, default=0): selector.NumberSelector(
|
||||||
|
selector.NumberSelectorConfig(min=0, max=1440, step=1, mode=selector.NumberSelectorMode.BOX)
|
||||||
|
),
|
||||||
**_recovery_field(self._current_task.get("trigger_config")),
|
**_recovery_field(self._current_task.get("trigger_config")),
|
||||||
}
|
}
|
||||||
schema_fields.update(_entity_logic_field(self._current_task.get("trigger_config", {}).get("entity_ids", [])))
|
schema_fields.update(_entity_logic_field(self._current_task.get("trigger_config", {}).get("entity_ids", [])))
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ from __future__ import annotations
|
|||||||
import re
|
import re
|
||||||
from enum import StrEnum
|
from enum import StrEnum
|
||||||
|
|
||||||
from homeassistant.const import Platform
|
from homeassistant.const import STATE_UNAVAILABLE, STATE_UNKNOWN, Platform
|
||||||
|
|
||||||
DOMAIN = "maintenance_supporter"
|
DOMAIN = "maintenance_supporter"
|
||||||
|
|
||||||
@@ -341,11 +341,18 @@ CONF_PARTS = "parts"
|
|||||||
# string literals in four files; find_fleet_entry, setup, the WS response
|
# string literals in four files; find_fleet_entry, setup, the WS response
|
||||||
# and the fleet exclusion all key on them).
|
# and the fleet exclusion all key on them).
|
||||||
BATTERY_FLEET_OBJECT_FLAG = "battery_fleet"
|
BATTERY_FLEET_OBJECT_FLAG = "battery_fleet"
|
||||||
|
# Marks the fleet's single aggregate task (detail view renders the battery
|
||||||
|
# section). Canonical home; helpers/battery_fleet_setup re-exports as TASK_FLAG.
|
||||||
|
BATTERY_FLEET_TASK_FLAG = "battery_fleet_task"
|
||||||
BATTERY_FLEET_EXCLUDED = "battery_fleet_excluded"
|
BATTERY_FLEET_EXCLUDED = "battery_fleet_excluded"
|
||||||
# #135: entity_ids manually ADDED to the fleet — batteries the discovery
|
# #135: entity_ids manually ADDED to the fleet — batteries the discovery
|
||||||
# heuristics miss (no device_class, odd naming, self-charging filter). An
|
# heuristics miss (no device_class, odd naming, self-charging filter). An
|
||||||
# include bypasses the heuristic and #107 filters, never the dedupe.
|
# include bypasses the heuristic and #107 filters, never the dedupe.
|
||||||
BATTERY_FLEET_INCLUDED = "battery_fleet_included"
|
BATTERY_FLEET_INCLUDED = "battery_fleet_included"
|
||||||
|
# #135 follow-up: fleet-wide opt-in that keeps self-charging devices (phones,
|
||||||
|
# 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"
|
||||||
# Task-side link: task["consumes_parts"] = [{"part_id", "quantity"}] — a
|
# Task-side link: task["consumes_parts"] = [{"part_id", "quantity"}] — a
|
||||||
# completion decrements each linked part's stock.
|
# completion decrements each linked part's stock.
|
||||||
CONF_TASK_CONSUMES_PARTS = "consumes_parts"
|
CONF_TASK_CONSUMES_PARTS = "consumes_parts"
|
||||||
@@ -375,6 +382,7 @@ CONF_TASK_NFC_TAG = "nfc_tag_id"
|
|||||||
# v2.20 (#83): display unit for `reading`-type tasks ("kWh", "m³", ...).
|
# v2.20 (#83): display unit for `reading`-type tasks ("kWh", "m³", ...).
|
||||||
CONF_TASK_READING_UNIT = "reading_unit"
|
CONF_TASK_READING_UNIT = "reading_unit"
|
||||||
MAX_READING_UNIT_LENGTH = 32
|
MAX_READING_UNIT_LENGTH = 32
|
||||||
|
MAX_NFC_TAG_LENGTH = 256
|
||||||
CONF_TASK_INTERVAL_ANCHOR = "interval_anchor"
|
CONF_TASK_INTERVAL_ANCHOR = "interval_anchor"
|
||||||
CONF_TASK_SCHEDULE_TIME = "schedule_time"
|
CONF_TASK_SCHEDULE_TIME = "schedule_time"
|
||||||
CONF_TASK_PRIORITY = "priority"
|
CONF_TASK_PRIORITY = "priority"
|
||||||
@@ -704,6 +712,11 @@ MAX_GROUP_TASK_REFS = 200
|
|||||||
MAX_ID_LENGTH = 64 # entry_id, task_id, group_id (uuid hex = 32)
|
MAX_ID_LENGTH = 64 # entry_id, task_id, group_id (uuid hex = 32)
|
||||||
MAX_DATE_LENGTH = 20 # ISO 8601 date strings (e.g. 2026-04-21)
|
MAX_DATE_LENGTH = 20 # ISO 8601 date strings (e.g. 2026-04-21)
|
||||||
MAX_ENTITY_ID_LENGTH = 255 # HA entity_id max
|
MAX_ENTITY_ID_LENGTH = 255 # HA entity_id max
|
||||||
|
|
||||||
|
# "No usable reading" state pair — 13 call sites hand-typed the tuple before
|
||||||
|
# the 2026-08 drift audit. Built from HA's own constants so it can never
|
||||||
|
# drift from core.
|
||||||
|
UNAVAILABLE_STATES = (STATE_UNAVAILABLE, STATE_UNKNOWN)
|
||||||
MAX_ENTITY_SLUG_LENGTH = 64 # task entity_slug
|
MAX_ENTITY_SLUG_LENGTH = 64 # task entity_slug
|
||||||
MAX_INTERVAL_DAYS = 3650 # 10 years — caps date arithmetic overflow
|
MAX_INTERVAL_DAYS = 3650 # 10 years — caps date arithmetic overflow
|
||||||
# Import payload byte caps. CSV is flat (one row per task) so 1 MB is ample;
|
# Import payload byte caps. CSV is flat (one row per task) so 1 MB is ample;
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ from .const import (
|
|||||||
SIGNAL_TASK_RESET,
|
SIGNAL_TASK_RESET,
|
||||||
STARTUP_GRACE_PERIOD_SECONDS,
|
STARTUP_GRACE_PERIOD_SECONDS,
|
||||||
TRIGGER_COMPLETION_COOLDOWN_SECONDS,
|
TRIGGER_COMPLETION_COOLDOWN_SECONDS,
|
||||||
|
UNAVAILABLE_STATES,
|
||||||
HistoryEntryType,
|
HistoryEntryType,
|
||||||
MaintenanceStatus,
|
MaintenanceStatus,
|
||||||
ScheduleType,
|
ScheduleType,
|
||||||
@@ -518,7 +519,7 @@ class MaintenanceCoordinator(DataUpdateCoordinator[dict[str, Any]]):
|
|||||||
issue_id = f"missing_trigger_{self.entry.entry_id}_{task_id}_{trigger_entity_id}"
|
issue_id = f"missing_trigger_{self.entry.entry_id}_{task_id}_{trigger_entity_id}"
|
||||||
state = self.hass.states.get(trigger_entity_id)
|
state = self.hass.states.get(trigger_entity_id)
|
||||||
|
|
||||||
if state is not None and state.state not in ("unavailable", "unknown"):
|
if state is not None and state.state not in UNAVAILABLE_STATES:
|
||||||
# Entity exists and is available
|
# Entity exists and is available
|
||||||
self._entity_missing_refresh_count.pop(entity_key, None)
|
self._entity_missing_refresh_count.pop(entity_key, None)
|
||||||
self._entity_unavailable_logged.pop(entity_key, None)
|
self._entity_unavailable_logged.pop(entity_key, None)
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ from .const import (
|
|||||||
CONF_TASKS,
|
CONF_TASKS,
|
||||||
DOMAIN,
|
DOMAIN,
|
||||||
GLOBAL_UNIQUE_ID,
|
GLOBAL_UNIQUE_ID,
|
||||||
|
UNAVAILABLE_STATES,
|
||||||
MaintenanceStatus,
|
MaintenanceStatus,
|
||||||
TriggerEntityState,
|
TriggerEntityState,
|
||||||
)
|
)
|
||||||
@@ -178,7 +179,7 @@ def _check_trigger_status(hass: HomeAssistant, data: Mapping[str, Any]) -> list[
|
|||||||
|
|
||||||
if state is None:
|
if state is None:
|
||||||
entity_health = TriggerEntityState.MISSING
|
entity_health = TriggerEntityState.MISSING
|
||||||
elif state.state in ("unavailable", "unknown"):
|
elif state.state in UNAVAILABLE_STATES:
|
||||||
entity_health = TriggerEntityState.UNAVAILABLE
|
entity_health = TriggerEntityState.UNAVAILABLE
|
||||||
else:
|
else:
|
||||||
entity_health = TriggerEntityState.AVAILABLE
|
entity_health = TriggerEntityState.AVAILABLE
|
||||||
|
|||||||
@@ -103,6 +103,11 @@ def _inject_per_entity_state(config: dict[str, Any], entity_state: dict[str, Any
|
|||||||
elif trigger_type == TriggerType.STATE_CHANGE:
|
elif trigger_type == TriggerType.STATE_CHANGE:
|
||||||
if "change_count" in entity_state:
|
if "change_count" in entity_state:
|
||||||
config["trigger_change_count"] = entity_state["change_count"]
|
config["trigger_change_count"] = entity_state["change_count"]
|
||||||
|
# #136: a hold window that was open when HA went down.
|
||||||
|
if "pending_since" in entity_state:
|
||||||
|
config["trigger_state_pending_since"] = entity_state["pending_since"]
|
||||||
|
if "pending_state" in entity_state:
|
||||||
|
config["trigger_state_pending_state"] = entity_state["pending_state"]
|
||||||
elif trigger_type == TriggerType.THRESHOLD:
|
elif trigger_type == TriggerType.THRESHOLD:
|
||||||
tes = entity_state.get("threshold_exceeded_since")
|
tes = entity_state.get("threshold_exceeded_since")
|
||||||
if tes:
|
if tes:
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ if TYPE_CHECKING:
|
|||||||
from ...const import (
|
from ...const import (
|
||||||
EVENT_TRIGGER_ACTIVATED,
|
EVENT_TRIGGER_ACTIVATED,
|
||||||
EVENT_TRIGGER_DEACTIVATED,
|
EVENT_TRIGGER_DEACTIVATED,
|
||||||
|
UNAVAILABLE_STATES,
|
||||||
)
|
)
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
@@ -80,7 +81,7 @@ class BaseTrigger(ABC):
|
|||||||
self._unsub_listener = async_track_state_change_event(self.hass, [self.entity_id], self._handle_state_change_event)
|
self._unsub_listener = async_track_state_change_event(self.hass, [self.entity_id], self._handle_state_change_event)
|
||||||
|
|
||||||
# If state is unknown/unavailable, schedule a retry
|
# If state is unknown/unavailable, schedule a retry
|
||||||
if state.state in ("unavailable", "unknown"):
|
if state.state in UNAVAILABLE_STATES:
|
||||||
_LOGGER.info(
|
_LOGGER.info(
|
||||||
"Trigger entity %s is '%s' — will retry evaluation in 30s",
|
"Trigger entity %s is '%s' — will retry evaluation in 30s",
|
||||||
self.entity_id,
|
self.entity_id,
|
||||||
@@ -115,7 +116,7 @@ class BaseTrigger(ABC):
|
|||||||
"""Re-check entity state after a delay."""
|
"""Re-check entity state after a delay."""
|
||||||
self._unsub_retry = None
|
self._unsub_retry = None
|
||||||
state = self.hass.states.get(self.entity_id)
|
state = self.hass.states.get(self.entity_id)
|
||||||
if state is None or state.state in ("unavailable", "unknown"):
|
if state is None or state.state in UNAVAILABLE_STATES:
|
||||||
_LOGGER.debug(
|
_LOGGER.debug(
|
||||||
"Trigger entity %s still %s after retry",
|
"Trigger entity %s still %s after retry",
|
||||||
self.entity_id,
|
self.entity_id,
|
||||||
@@ -176,7 +177,7 @@ class BaseTrigger(ABC):
|
|||||||
# trigger entity is surfaced via the missing_trigger_entity repair
|
# trigger entity is surfaced via the missing_trigger_entity repair
|
||||||
# flow instead. (Numeric-only triggers: any non-numeric value below
|
# flow instead. (Numeric-only triggers: any non-numeric value below
|
||||||
# is likewise ignored via the _get_numeric_value None check.)
|
# is likewise ignored via the _get_numeric_value None check.)
|
||||||
if new_state.state in ("unavailable", "unknown"):
|
if new_state.state in UNAVAILABLE_STATES:
|
||||||
if not self._logged_unavailable:
|
if not self._logged_unavailable:
|
||||||
_LOGGER.warning(
|
_LOGGER.warning(
|
||||||
"Trigger entity %s became %s — keeping last trigger state",
|
"Trigger entity %s became %s — keeping last trigger state",
|
||||||
|
|||||||
@@ -24,6 +24,8 @@ from homeassistant.helpers.event import (
|
|||||||
async_track_time_interval,
|
async_track_time_interval,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
from ...const import UNAVAILABLE_STATES
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from ...sensor import MaintenanceSensor
|
from ...sensor import MaintenanceSensor
|
||||||
from homeassistant.util import dt as dt_util
|
from homeassistant.util import dt as dt_util
|
||||||
@@ -57,15 +59,15 @@ class RuntimeTrigger(BaseTrigger):
|
|||||||
self._target_hours: float = trigger_config.get("trigger_runtime_hours", 100.0)
|
self._target_hours: float = trigger_config.get("trigger_runtime_hours", 100.0)
|
||||||
self._accumulated_seconds: float = trigger_config.get("trigger_accumulated_seconds", 0.0)
|
self._accumulated_seconds: float = trigger_config.get("trigger_accumulated_seconds", 0.0)
|
||||||
|
|
||||||
# Restore on_since timestamp for restart recovery
|
# Restore on_since timestamp for restart recovery. parse_persisted_utc
|
||||||
|
# coerces a naive legacy payload to UTC — dt_util.parse_datetime kept
|
||||||
|
# it naive here, and `utcnow() - naive` raises TypeError in the
|
||||||
|
# elapsed math (drift audit 2026-08; the sibling triggers coerced).
|
||||||
|
from ...helpers.dates import parse_persisted_utc
|
||||||
|
|
||||||
on_since_str = trigger_config.get("trigger_on_since")
|
on_since_str = trigger_config.get("trigger_on_since")
|
||||||
self._on_since: str | None = None # ISO string stored for persistence
|
self._on_since_dt: datetime | None = parse_persisted_utc(on_since_str)
|
||||||
self._on_since_dt: datetime | None = None # parsed datetime for calculation
|
self._on_since: str | None = on_since_str if self._on_since_dt is not None else None
|
||||||
if on_since_str:
|
|
||||||
parsed = dt_util.parse_datetime(on_since_str)
|
|
||||||
if parsed:
|
|
||||||
self._on_since = on_since_str
|
|
||||||
self._on_since_dt = parsed
|
|
||||||
|
|
||||||
# Custom ON states (default: on, 1, true)
|
# Custom ON states (default: on, 1, true)
|
||||||
custom_on = trigger_config.get("trigger_on_states")
|
custom_on = trigger_config.get("trigger_on_states")
|
||||||
@@ -79,7 +81,7 @@ class RuntimeTrigger(BaseTrigger):
|
|||||||
async def async_setup(self) -> None:
|
async def async_setup(self) -> None:
|
||||||
"""Set up runtime trigger with state restoration."""
|
"""Set up runtime trigger with state restoration."""
|
||||||
state = self.hass.states.get(self.entity_id)
|
state = self.hass.states.get(self.entity_id)
|
||||||
if state is None or state.state in ("unavailable", "unknown"):
|
if state is None or state.state in UNAVAILABLE_STATES:
|
||||||
# No USABLE state yet (#131 family): "unavailable" must not read
|
# No USABLE state yet (#131 family): "unavailable" must not read
|
||||||
# as OFF — a running device whose sensor merely connects late
|
# as OFF — a running device whose sensor merely connects late
|
||||||
# would lose its restored on_since anchor and undercount. Keep
|
# would lose its restored on_since anchor and undercount. Keep
|
||||||
@@ -189,7 +191,7 @@ class RuntimeTrigger(BaseTrigger):
|
|||||||
old_val = self._tracked_value(old_state)
|
old_val = self._tracked_value(old_state)
|
||||||
|
|
||||||
# Handle unavailable/unknown — pause accumulation
|
# Handle unavailable/unknown — pause accumulation
|
||||||
if raw_state in ("unavailable", "unknown"):
|
if raw_state in UNAVAILABLE_STATES:
|
||||||
if self._on_since_dt is not None:
|
if self._on_since_dt is not None:
|
||||||
self._accumulate_elapsed()
|
self._accumulate_elapsed()
|
||||||
self._on_since_dt = None
|
self._on_since_dt = None
|
||||||
|
|||||||
@@ -3,13 +3,18 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
from datetime import datetime
|
||||||
from typing import TYPE_CHECKING, Any
|
from typing import TYPE_CHECKING, Any
|
||||||
|
|
||||||
from homeassistant.core import Event, HomeAssistant, callback
|
from homeassistant.core import CALLBACK_TYPE, Event, HomeAssistant, callback
|
||||||
from homeassistant.helpers.event import (
|
from homeassistant.helpers.event import (
|
||||||
EventStateChangedData,
|
EventStateChangedData,
|
||||||
|
async_call_later,
|
||||||
async_track_state_change_event,
|
async_track_state_change_event,
|
||||||
)
|
)
|
||||||
|
from homeassistant.util import dt as dt_util
|
||||||
|
|
||||||
|
from ...const import UNAVAILABLE_STATES
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from ...sensor import MaintenanceSensor
|
from ...sensor import MaintenanceSensor
|
||||||
@@ -34,6 +39,12 @@ class StateChangeTrigger(BaseTrigger):
|
|||||||
# Setup saw no usable state -> reconcile on the first real one (#131).
|
# Setup saw no usable state -> reconcile on the first real one (#131).
|
||||||
# Class default so hand-built test instances inherit it.
|
# Class default so hand-built test instances inherit it.
|
||||||
_needs_latch_reconcile: bool = False
|
_needs_latch_reconcile: bool = False
|
||||||
|
# #136 hold-window state — class defaults for the same reason.
|
||||||
|
_for_minutes: int = 0
|
||||||
|
_pending_state: str | None = None
|
||||||
|
_pending_since: str | None = None
|
||||||
|
_interrupted_pending: str | None = None
|
||||||
|
_timer_cancel: CALLBACK_TYPE | None = None
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@@ -58,6 +69,29 @@ class StateChangeTrigger(BaseTrigger):
|
|||||||
self._last_state: str | None = None
|
self._last_state: str | None = None
|
||||||
self._needs_latch_reconcile = False
|
self._needs_latch_reconcile = False
|
||||||
|
|
||||||
|
# #136: a transition only counts once the NEW state has HELD for this
|
||||||
|
# long. 0 (the default) counts immediately — deliberately, because some
|
||||||
|
# sensors express a real event only as a brief pulse; the filter is an
|
||||||
|
# opt-in for the flappy ones. Applies to BOTH modes: the single-shot
|
||||||
|
# alarm latch (target_changes == 1, the reporter's vacuum problem
|
||||||
|
# sensors glitching for seconds at night) and the cycle counter
|
||||||
|
# (a flicker is not a wash cycle).
|
||||||
|
self._for_minutes: int = int(trigger_config.get("trigger_for_minutes", 0) or 0)
|
||||||
|
self._timer_cancel: CALLBACK_TYPE | None = None
|
||||||
|
# A window cut short by an unavailability blip — the only case that
|
||||||
|
# may re-open on recovery (see _handle_state_transition).
|
||||||
|
self._interrupted_pending: str | None = None
|
||||||
|
# The state currently waiting out the hold window (None = no window).
|
||||||
|
self._pending_state: str | None = None
|
||||||
|
self._pending_since: str | None = None
|
||||||
|
# Persisted pending window from before a restart (consumed in setup).
|
||||||
|
from ...helpers.dates import parse_persisted_utc
|
||||||
|
|
||||||
|
self._restored_pending_state: str | None = trigger_config.get("trigger_state_pending_state")
|
||||||
|
self._restored_pending_dt: datetime | None = parse_persisted_utc(trigger_config.get("trigger_state_pending_since"))
|
||||||
|
if self._restored_pending_dt is None:
|
||||||
|
self._restored_pending_state = None
|
||||||
|
|
||||||
async def async_setup(self) -> None:
|
async def async_setup(self) -> None:
|
||||||
"""Set up state change trigger.
|
"""Set up state change trigger.
|
||||||
|
|
||||||
@@ -66,7 +100,7 @@ class StateChangeTrigger(BaseTrigger):
|
|||||||
appears (old_state=None), so the trigger will self-heal automatically.
|
appears (old_state=None), so the trigger will self-heal automatically.
|
||||||
"""
|
"""
|
||||||
state = self.hass.states.get(self.entity_id)
|
state = self.hass.states.get(self.entity_id)
|
||||||
if state is None or state.state in ("unavailable", "unknown"):
|
if state is None or state.state in UNAVAILABLE_STATES:
|
||||||
# No USABLE state yet — the #131 family: trigger setup races both
|
# No USABLE state yet — the #131 family: trigger setup races both
|
||||||
# the entity's registration AND its device readiness (a Zigbee /
|
# the entity's registration AND its device readiness (a Zigbee /
|
||||||
# Z-Wave problem sensor restores as unavailable long before it
|
# Z-Wave problem sensor restores as unavailable long before it
|
||||||
@@ -85,6 +119,7 @@ class StateChangeTrigger(BaseTrigger):
|
|||||||
|
|
||||||
self._last_state = state.state
|
self._last_state = state.state
|
||||||
self._reconcile_persisted_latch(state.state)
|
self._reconcile_persisted_latch(state.state)
|
||||||
|
self._resume_pending_window(state.state)
|
||||||
|
|
||||||
# Register state change listener (override base: we handle events differently)
|
# Register state change listener (override base: we handle events differently)
|
||||||
self._unsub_listener = async_track_state_change_event(self.hass, [self.entity_id], self._handle_state_transition)
|
self._unsub_listener = async_track_state_change_event(self.hass, [self.entity_id], self._handle_state_transition)
|
||||||
@@ -119,8 +154,7 @@ class StateChangeTrigger(BaseTrigger):
|
|||||||
self._change_count = 0
|
self._change_count = 0
|
||||||
self._current_value = 0.0
|
self._current_value = 0.0
|
||||||
self._triggered = False
|
self._triggered = False
|
||||||
if self.hass.is_running:
|
self._persist_runtime_soon()
|
||||||
self.hass.async_create_task(self._persist_change_count())
|
|
||||||
self.entity.async_update_trigger_state(
|
self.entity.async_update_trigger_state(
|
||||||
is_triggered=False,
|
is_triggered=False,
|
||||||
current_value=0.0,
|
current_value=0.0,
|
||||||
@@ -134,6 +168,113 @@ class StateChangeTrigger(BaseTrigger):
|
|||||||
trigger_entity_id=self.entity_id,
|
trigger_entity_id=self.entity_id,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def _resume_pending_window(self, live_state: str) -> None:
|
||||||
|
"""Resume (or discard) a hold window persisted before a restart (#136).
|
||||||
|
|
||||||
|
Mirrors the threshold trigger's exceeded-since recovery: the wall-clock
|
||||||
|
anchor survives the restart, so a state that kept holding through the
|
||||||
|
downtime commits immediately once the window has fully elapsed, and
|
||||||
|
otherwise the timer resumes with the remaining duration. A live state
|
||||||
|
that no longer matches the anchored one discards the window.
|
||||||
|
"""
|
||||||
|
restored_state, restored_dt = self._restored_pending_state, self._restored_pending_dt
|
||||||
|
self._restored_pending_state = None
|
||||||
|
self._restored_pending_dt = None
|
||||||
|
if self._for_minutes <= 0 or restored_dt is None or restored_state is None or self._triggered:
|
||||||
|
return
|
||||||
|
if _norm_state(live_state) != _norm_state(restored_state):
|
||||||
|
self._persist_runtime_soon()
|
||||||
|
return
|
||||||
|
elapsed = (dt_util.utcnow() - restored_dt).total_seconds()
|
||||||
|
if elapsed >= self._for_minutes * 60:
|
||||||
|
_LOGGER.debug(
|
||||||
|
"State hold recovery: elapsed %.0fs >= %ds, committing immediately: %s",
|
||||||
|
elapsed,
|
||||||
|
self._for_minutes * 60,
|
||||||
|
self.entity_id,
|
||||||
|
)
|
||||||
|
self._commit_transition(live_state, None)
|
||||||
|
return
|
||||||
|
self._pending_state = restored_state
|
||||||
|
self._pending_since = restored_dt.isoformat()
|
||||||
|
remaining = max(self._for_minutes * 60 - elapsed, 0)
|
||||||
|
_LOGGER.debug("State hold recovery: %.0fs remaining: %s", remaining, self.entity_id)
|
||||||
|
self._start_hold_timer(remaining_seconds=remaining)
|
||||||
|
|
||||||
|
def _start_pending(self, new_val: str) -> None:
|
||||||
|
"""(Re)open the hold window for *new_val* — commits when the timer fires."""
|
||||||
|
self._cancel_timer()
|
||||||
|
self._pending_state = new_val
|
||||||
|
self._pending_since = dt_util.utcnow().isoformat()
|
||||||
|
self._persist_runtime_soon()
|
||||||
|
self._start_hold_timer()
|
||||||
|
|
||||||
|
def _start_hold_timer(self, remaining_seconds: float | None = None) -> None:
|
||||||
|
self._cancel_timer()
|
||||||
|
duration = remaining_seconds if remaining_seconds is not None else self._for_minutes * 60
|
||||||
|
|
||||||
|
@callback
|
||||||
|
def _timer_fired(_now: datetime) -> None:
|
||||||
|
pending = self._pending_state
|
||||||
|
self._pending_state = None
|
||||||
|
self._pending_since = None
|
||||||
|
self._timer_cancel = None
|
||||||
|
if pending is None:
|
||||||
|
return
|
||||||
|
# Safety net: only commit while the state still holds.
|
||||||
|
live = self.hass.states.get(self.entity_id)
|
||||||
|
if live is None or _norm_state(live.state) != _norm_state(pending):
|
||||||
|
self._persist_runtime_soon()
|
||||||
|
return
|
||||||
|
_LOGGER.debug(
|
||||||
|
"State hold timer fired: %s held %r for %d min",
|
||||||
|
self.entity_id,
|
||||||
|
pending,
|
||||||
|
self._for_minutes,
|
||||||
|
)
|
||||||
|
self._commit_transition(pending, None)
|
||||||
|
|
||||||
|
self._timer_cancel = async_call_later(self.hass, duration, _timer_fired)
|
||||||
|
|
||||||
|
def _clear_pending(self) -> None:
|
||||||
|
"""Abandon the hold window (state moved on before it elapsed)."""
|
||||||
|
if self._pending_state is None and self._timer_cancel is None:
|
||||||
|
return
|
||||||
|
self._cancel_timer()
|
||||||
|
self._pending_state = None
|
||||||
|
self._pending_since = None
|
||||||
|
self._persist_runtime_soon()
|
||||||
|
|
||||||
|
def _cancel_timer(self) -> None:
|
||||||
|
if self._timer_cancel is not None:
|
||||||
|
self._timer_cancel()
|
||||||
|
self._timer_cancel = None
|
||||||
|
|
||||||
|
def _commit_transition(self, new_val: str, old_val: str | None) -> None:
|
||||||
|
"""Count one matching transition (immediately, or after its hold)."""
|
||||||
|
self._pending_state = None
|
||||||
|
self._pending_since = None
|
||||||
|
self._change_count += 1
|
||||||
|
self._current_value = float(self._change_count)
|
||||||
|
self._persist_runtime_soon()
|
||||||
|
_LOGGER.debug(
|
||||||
|
"State change counted: %s (%s -> %s) count=%d/%d",
|
||||||
|
self.entity_id,
|
||||||
|
old_val if old_val is not None else "<held>",
|
||||||
|
new_val,
|
||||||
|
self._change_count,
|
||||||
|
self._target_changes,
|
||||||
|
)
|
||||||
|
|
||||||
|
was_triggered = self._triggered
|
||||||
|
is_triggered = self._change_count >= self._target_changes
|
||||||
|
self._triggered = is_triggered
|
||||||
|
|
||||||
|
if is_triggered and not was_triggered:
|
||||||
|
self._on_trigger_activated(float(self._change_count))
|
||||||
|
elif not is_triggered and was_triggered:
|
||||||
|
self._on_trigger_deactivated(float(self._change_count))
|
||||||
|
|
||||||
@callback
|
@callback
|
||||||
def _handle_state_transition(self, event: Event[EventStateChangedData]) -> None:
|
def _handle_state_transition(self, event: Event[EventStateChangedData]) -> None:
|
||||||
"""Handle state transition and count matching changes."""
|
"""Handle state transition and count matching changes."""
|
||||||
@@ -158,7 +299,7 @@ class StateChangeTrigger(BaseTrigger):
|
|||||||
# reconcile the persisted latch against it (issue #131): when the
|
# reconcile the persisted latch against it (issue #131): when the
|
||||||
# entity restores AFTER our setup, this appearance is the first
|
# entity restores AFTER our setup, this appearance is the first
|
||||||
# moment the latch can be checked against reality.
|
# moment the latch can be checked against reality.
|
||||||
if new_val not in ("unavailable", "unknown"):
|
if new_val not in UNAVAILABLE_STATES:
|
||||||
self._needs_latch_reconcile = False
|
self._needs_latch_reconcile = False
|
||||||
self._last_state = new_val
|
self._last_state = new_val
|
||||||
self._reconcile_persisted_latch(new_val)
|
self._reconcile_persisted_latch(new_val)
|
||||||
@@ -167,7 +308,14 @@ class StateChangeTrigger(BaseTrigger):
|
|||||||
old_val = old_state.state
|
old_val = old_state.state
|
||||||
|
|
||||||
# Handle unavailable/unknown with log-once pattern
|
# Handle unavailable/unknown with log-once pattern
|
||||||
if new_val in ("unavailable", "unknown"):
|
if new_val in UNAVAILABLE_STATES:
|
||||||
|
# #136: an unavailability blip is not "the state held" — abandon
|
||||||
|
# the hold window, but REMEMBER it: only a window that was
|
||||||
|
# actually running may re-open when the entity comes back (else a
|
||||||
|
# blip on a long-settled state would count a phantom transition).
|
||||||
|
if self._pending_state is not None:
|
||||||
|
self._interrupted_pending = self._pending_state
|
||||||
|
self._clear_pending()
|
||||||
if not self._logged_unavailable:
|
if not self._logged_unavailable:
|
||||||
_LOGGER.warning(
|
_LOGGER.warning(
|
||||||
"Trigger entity %s became %s",
|
"Trigger entity %s became %s",
|
||||||
@@ -185,6 +333,19 @@ class StateChangeTrigger(BaseTrigger):
|
|||||||
new_val,
|
new_val,
|
||||||
)
|
)
|
||||||
self._logged_unavailable = False
|
self._logged_unavailable = False
|
||||||
|
# #136: a window was running when the blip hit and the state came
|
||||||
|
# back unchanged — restart it (fresh clock; the normal transition
|
||||||
|
# path below cannot, because effective_old equals new_val here).
|
||||||
|
interrupted = self._interrupted_pending
|
||||||
|
self._interrupted_pending = None
|
||||||
|
if (
|
||||||
|
self._for_minutes > 0
|
||||||
|
and not self._triggered
|
||||||
|
and self._pending_state is None
|
||||||
|
and interrupted is not None
|
||||||
|
and _norm_state(new_val) == _norm_state(interrupted)
|
||||||
|
):
|
||||||
|
self._start_pending(new_val)
|
||||||
|
|
||||||
# First REAL state after a setup that saw none/unavailable (#131
|
# First REAL state after a setup that saw none/unavailable (#131
|
||||||
# family): reconcile the persisted latch against it instead of
|
# family): reconcile the persisted latch against it instead of
|
||||||
@@ -199,9 +360,16 @@ class StateChangeTrigger(BaseTrigger):
|
|||||||
|
|
||||||
# Use _last_state as fallback when old_val is unavailable/unknown
|
# Use _last_state as fallback when old_val is unavailable/unknown
|
||||||
effective_old = old_val
|
effective_old = old_val
|
||||||
if old_val in ("unavailable", "unknown") and self._last_state is not None:
|
if old_val in UNAVAILABLE_STATES and self._last_state is not None:
|
||||||
effective_old = self._last_state
|
effective_old = self._last_state
|
||||||
|
|
||||||
|
# #136: any real state movement means the previous state did NOT hold
|
||||||
|
# — abandon a running hold window (a matching transition right below
|
||||||
|
# opens a fresh one) and invalidate a blip-interruption marker.
|
||||||
|
if effective_old != new_val:
|
||||||
|
self._interrupted_pending = None
|
||||||
|
self._clear_pending()
|
||||||
|
|
||||||
# Check if transition matches pattern
|
# Check if transition matches pattern
|
||||||
matches = True
|
matches = True
|
||||||
if self._from_state is not None and _norm_state(effective_old) != self._from_state:
|
if self._from_state is not None and _norm_state(effective_old) != self._from_state:
|
||||||
@@ -210,28 +378,11 @@ class StateChangeTrigger(BaseTrigger):
|
|||||||
matches = False
|
matches = False
|
||||||
|
|
||||||
if matches and effective_old != new_val:
|
if matches and effective_old != new_val:
|
||||||
self._change_count += 1
|
if self._for_minutes > 0:
|
||||||
self._current_value = float(self._change_count)
|
# #136: the transition only counts once new_val has held.
|
||||||
# Persist change count to survive restarts
|
self._start_pending(new_val)
|
||||||
if self.hass.is_running:
|
else:
|
||||||
self.hass.async_create_task(self._persist_change_count())
|
self._commit_transition(new_val, old_val)
|
||||||
_LOGGER.debug(
|
|
||||||
"State change counted: %s (%s -> %s) count=%d/%d",
|
|
||||||
self.entity_id,
|
|
||||||
old_val,
|
|
||||||
new_val,
|
|
||||||
self._change_count,
|
|
||||||
self._target_changes,
|
|
||||||
)
|
|
||||||
|
|
||||||
was_triggered = self._triggered
|
|
||||||
is_triggered = self._change_count >= self._target_changes
|
|
||||||
self._triggered = is_triggered
|
|
||||||
|
|
||||||
if is_triggered and not was_triggered:
|
|
||||||
self._on_trigger_activated(float(self._change_count))
|
|
||||||
elif not is_triggered and was_triggered:
|
|
||||||
self._on_trigger_deactivated(float(self._change_count))
|
|
||||||
|
|
||||||
# Latch recovery: a single-shot state alarm (target_changes == 1 — an
|
# Latch recovery: a single-shot state alarm (target_changes == 1 — an
|
||||||
# adopted problem sensor or an appliance event) clears when the entity
|
# adopted problem sensor or an appliance event) clears when the entity
|
||||||
@@ -247,8 +398,7 @@ class StateChangeTrigger(BaseTrigger):
|
|||||||
):
|
):
|
||||||
self._change_count = 0
|
self._change_count = 0
|
||||||
self._current_value = 0.0
|
self._current_value = 0.0
|
||||||
if self.hass.is_running:
|
self._persist_runtime_soon()
|
||||||
self.hass.async_create_task(self._persist_change_count())
|
|
||||||
self._triggered = False
|
self._triggered = False
|
||||||
self._on_trigger_deactivated(0.0)
|
self._on_trigger_deactivated(0.0)
|
||||||
|
|
||||||
@@ -268,19 +418,39 @@ class StateChangeTrigger(BaseTrigger):
|
|||||||
"""Reset the change counter (after maintenance)."""
|
"""Reset the change counter (after maintenance)."""
|
||||||
self._change_count = 0
|
self._change_count = 0
|
||||||
self._current_value = 0.0
|
self._current_value = 0.0
|
||||||
if self.hass.is_running:
|
self._persist_runtime_soon()
|
||||||
self.hass.async_create_task(self._persist_change_count())
|
|
||||||
_LOGGER.debug("State change counter reset: %s", self.entity_id)
|
_LOGGER.debug("State change counter reset: %s", self.entity_id)
|
||||||
|
|
||||||
async def _persist_change_count(self) -> None:
|
def _persist_runtime_soon(self) -> None:
|
||||||
"""Persist change count to the Store for survival across restarts."""
|
if self.hass.is_running:
|
||||||
|
self.hass.async_create_task(self._persist_runtime())
|
||||||
|
|
||||||
|
async def _persist_runtime(self) -> None:
|
||||||
|
"""Persist the full runtime dict (count + hold window) to the Store.
|
||||||
|
|
||||||
|
Always the COMPLETE dict: set_trigger_runtime replaces per-entity
|
||||||
|
state wholesale, so a partial write would drop the other half.
|
||||||
|
"""
|
||||||
|
data: dict[str, Any] = {"change_count": self._change_count}
|
||||||
|
if self._pending_since is not None and self._pending_state is not None:
|
||||||
|
data["pending_since"] = self._pending_since
|
||||||
|
data["pending_state"] = self._pending_state
|
||||||
await self._coordinator.async_persist_trigger_runtime(
|
await self._coordinator.async_persist_trigger_runtime(
|
||||||
self._task_id,
|
self._task_id,
|
||||||
{"change_count": self._change_count},
|
data,
|
||||||
entity_id=self.entity_id,
|
entity_id=self.entity_id,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
async def async_teardown(self) -> None:
|
||||||
|
"""Clean up the hold timer on teardown."""
|
||||||
|
self._cancel_timer()
|
||||||
|
await super().async_teardown()
|
||||||
|
|
||||||
def reset(self) -> None:
|
def reset(self) -> None:
|
||||||
"""Reset trigger and counter."""
|
"""Reset trigger, counter and any running hold window."""
|
||||||
super().reset()
|
super().reset()
|
||||||
|
self._cancel_timer()
|
||||||
|
self._pending_state = None
|
||||||
|
self._pending_since = None
|
||||||
|
self._interrupted_pending = None
|
||||||
self.reset_count()
|
self.reset_count()
|
||||||
@@ -48,22 +48,11 @@ class ThresholdTrigger(BaseTrigger):
|
|||||||
self._timer_cancel: CALLBACK_TYPE | None = None
|
self._timer_cancel: CALLBACK_TYPE | None = None
|
||||||
|
|
||||||
# Restore persisted exceeded-since timestamp (survives HA restarts)
|
# Restore persisted exceeded-since timestamp (survives HA restarts)
|
||||||
exceeded_since = trigger_config.get("trigger_threshold_exceeded_since")
|
from ...helpers.dates import parse_persisted_utc
|
||||||
self._exceeded_since: str | None = None
|
|
||||||
self._exceeded_since_dt: datetime | None = None
|
|
||||||
if exceeded_since:
|
|
||||||
try:
|
|
||||||
parsed = datetime.fromisoformat(exceeded_since)
|
|
||||||
# Older payloads may be naive — assume UTC since live writes
|
|
||||||
# use dt_util.utcnow().isoformat() (TZ-aware).
|
|
||||||
if parsed.tzinfo is None:
|
|
||||||
from datetime import UTC
|
|
||||||
|
|
||||||
parsed = parsed.replace(tzinfo=UTC)
|
exceeded_since = trigger_config.get("trigger_threshold_exceeded_since")
|
||||||
self._exceeded_since_dt = parsed
|
self._exceeded_since_dt: datetime | None = parse_persisted_utc(exceeded_since)
|
||||||
self._exceeded_since = exceeded_since
|
self._exceeded_since: str | None = exceeded_since if self._exceeded_since_dt is not None else None
|
||||||
except (ValueError, TypeError):
|
|
||||||
pass
|
|
||||||
|
|
||||||
def _value_exceeds_threshold(self, value: float) -> bool:
|
def _value_exceeds_threshold(self, value: float) -> bool:
|
||||||
"""Check if the value exceeds configured thresholds."""
|
"""Check if the value exceeds configured thresholds."""
|
||||||
|
|||||||
+32
@@ -62,3 +62,35 @@ describe("adopt-problem-sensors dialog: suggested part", () => {
|
|||||||
expect(byId["binary_sensor.pump_problem"].part_id).to.equal(undefined);
|
expect(byId["binary_sensor.pump_problem"].part_id).to.equal(undefined);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe("adopt-problem-sensors dialog: flicker filter (#136)", () => {
|
||||||
|
it("defaults to 0 and then omits for_minutes from the payload", async () => {
|
||||||
|
const { el, sent } = await mountOpen();
|
||||||
|
const input = el.shadowRoot!.querySelector<HTMLInputElement>(".for-input")!;
|
||||||
|
expect(input, "the for-minutes field renders").to.exist;
|
||||||
|
expect(input.value).to.equal("0");
|
||||||
|
el.shadowRoot!.querySelectorAll<HTMLElement>("ha-button")[1].click();
|
||||||
|
await el.updateComplete;
|
||||||
|
await new Promise((r) => setTimeout(r, 0));
|
||||||
|
const adopt = sent.find((m) => m.type === "maintenance_supporter/problem_sensors/adopt")! as {
|
||||||
|
selections: Array<{ for_minutes?: number }>;
|
||||||
|
};
|
||||||
|
expect(adopt.selections.every((s) => s.for_minutes === undefined)).to.equal(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("forwards the entered minutes on every selection", async () => {
|
||||||
|
const { el, sent } = await mountOpen();
|
||||||
|
const input = el.shadowRoot!.querySelector<HTMLInputElement>(".for-input")!;
|
||||||
|
input.value = "10";
|
||||||
|
input.dispatchEvent(new Event("input"));
|
||||||
|
await el.updateComplete;
|
||||||
|
el.shadowRoot!.querySelectorAll<HTMLElement>("ha-button")[1].click();
|
||||||
|
await el.updateComplete;
|
||||||
|
await new Promise((r) => setTimeout(r, 0));
|
||||||
|
const adopt = sent.find((m) => m.type === "maintenance_supporter/problem_sensors/adopt")! as {
|
||||||
|
selections: Array<{ for_minutes?: number }>;
|
||||||
|
};
|
||||||
|
expect(adopt.selections.length).to.be.greaterThan(0);
|
||||||
|
expect(adopt.selections.every((s) => s.for_minutes === 10)).to.equal(true);
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
* the no-fetch fast paths of ensureLocale/isLocaleLoaded.
|
* the no-fetch fast paths of ensureLocale/isLocaleLoaded.
|
||||||
*/
|
*/
|
||||||
import { expect } from "@open-wc/testing";
|
import { expect } from "@open-wc/testing";
|
||||||
import { t, isLocaleLoaded, ensureLocale } from "../styles";
|
import { t, isLocaleLoaded, ensureLocale, seedEnglish } from "../styles";
|
||||||
|
|
||||||
describe("i18n runtime loader", () => {
|
describe("i18n runtime loader", () => {
|
||||||
it("serves bundled English synchronously", () => {
|
it("serves bundled English synchronously", () => {
|
||||||
@@ -60,4 +60,25 @@ describe("i18n runtime loader", () => {
|
|||||||
delete g!.store.pt;
|
delete g!.store.pt;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("seedEnglish MERGES so a stale first-loader cannot shadow newer keys (#135 regression)", () => {
|
||||||
|
// After an update, a cached app shell can load an OLD card bundle first;
|
||||||
|
// its EN table lacks every key the fresh panel introduced. First-wins
|
||||||
|
// seeding froze that stale table and the panel rendered raw keys
|
||||||
|
// ("BATTERY_FLEET_ADD"). The merge keeps existing entries (steady state
|
||||||
|
// unchanged) but lets every bundle contribute the keys it knows.
|
||||||
|
const g = (window as unknown as {
|
||||||
|
__msLocales: { store: Record<string, Record<string, string>> };
|
||||||
|
}).__msLocales;
|
||||||
|
const original = g.store.en;
|
||||||
|
try {
|
||||||
|
// Simulate the stale bundle having seeded first with a tiny old table.
|
||||||
|
g.store.en = { loading: "Old loading text" };
|
||||||
|
seedEnglish({ loading: "Fresh loading text", brand_new_key: "New feature label" });
|
||||||
|
expect(t("loading", "en"), "existing entries win conflicts").to.equal("Old loading text");
|
||||||
|
expect(t("brand_new_key", "en"), "newer keys are contributed, never raw").to.equal("New feature label");
|
||||||
|
} finally {
|
||||||
|
g.store.en = original;
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
+17
@@ -162,6 +162,23 @@ describe("task-dialog trigger_config roundtrip closure (#103 class)", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("state_change: the hold filter (for_minutes, #136) survives the roundtrip", async () => {
|
||||||
|
const tc = await saveRoundtrip({
|
||||||
|
type: "state_change",
|
||||||
|
entity_id: "binary_sensor.vacuum_problem",
|
||||||
|
entity_ids: ["binary_sensor.vacuum_problem"],
|
||||||
|
trigger_to_state: "on",
|
||||||
|
trigger_target_changes: 1,
|
||||||
|
trigger_for_minutes: 10,
|
||||||
|
auto_complete_on_recovery: true,
|
||||||
|
});
|
||||||
|
expect(tc).to.deep.include({
|
||||||
|
type: "state_change",
|
||||||
|
trigger_to_state: "on",
|
||||||
|
trigger_for_minutes: 10,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
it("compound: per-condition attribute/baseline/entity_logic survive via carry", async () => {
|
it("compound: per-condition attribute/baseline/entity_logic survive via carry", async () => {
|
||||||
const tc = await saveRoundtrip({
|
const tc = await saveRoundtrip({
|
||||||
type: "compound",
|
type: "compound",
|
||||||
|
|||||||
@@ -122,6 +122,22 @@ describe("task-documents", () => {
|
|||||||
window.open = orig;
|
window.open = orig;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("refuses to window.open a non-http(s) weblink (defense-in-depth, XSS)", async () => {
|
||||||
|
const EVIL = { id: "d4", kind: "weblink", title: "Evil", url: "javascript:alert(document.cookie)", tags: [], task_ids: ["t1"] };
|
||||||
|
const orig = window.open;
|
||||||
|
let opened = "NOT_CALLED";
|
||||||
|
window.open = ((u: string) => { opened = u; return null; }) as typeof window.open;
|
||||||
|
try {
|
||||||
|
const { el } = await mount(true, [EVIL]);
|
||||||
|
const info = el.shadowRoot!.querySelector<HTMLElement>(".tdoc-row .tdoc-info")!;
|
||||||
|
info.click();
|
||||||
|
await el.updateComplete;
|
||||||
|
expect(opened, "a javascript: weblink must never reach window.open").to.equal("NOT_CALLED");
|
||||||
|
} finally {
|
||||||
|
window.open = orig;
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// ── part mode (v2.26): same component, linking via part_ids ─────────────────
|
// ── part mode (v2.26): same component, linking via part_ids ─────────────────
|
||||||
|
|||||||
+35
@@ -50,6 +50,9 @@ export class MaintenanceAdoptProblemSensorsDialog extends LitElement {
|
|||||||
@state() private _selected: Set<string> = new Set();
|
@state() private _selected: Set<string> = new Set();
|
||||||
@state() private _users: HAUser[] = [];
|
@state() private _users: HAUser[] = [];
|
||||||
@state() private _responsible = "";
|
@state() private _responsible = "";
|
||||||
|
// #136: minutes the problem must persist before the created task triggers
|
||||||
|
// (one field applied to every selection). "0" = react to the first flicker.
|
||||||
|
@state() private _forMinutes = "0";
|
||||||
|
|
||||||
private _localeReady = false;
|
private _localeReady = false;
|
||||||
private _userService: UserService | null = null;
|
private _userService: UserService | null = null;
|
||||||
@@ -72,6 +75,7 @@ export class MaintenanceAdoptProblemSensorsDialog extends LitElement {
|
|||||||
this._sensors = [];
|
this._sensors = [];
|
||||||
this._selected = new Set();
|
this._selected = new Set();
|
||||||
this._responsible = "";
|
this._responsible = "";
|
||||||
|
this._forMinutes = "0";
|
||||||
try {
|
try {
|
||||||
if (!this._userService) this._userService = new UserService(this.hass);
|
if (!this._userService) this._userService = new UserService(this.hass);
|
||||||
else this._userService.updateHass(this.hass);
|
else this._userService.updateHass(this.hass);
|
||||||
@@ -126,6 +130,7 @@ export class MaintenanceAdoptProblemSensorsDialog extends LitElement {
|
|||||||
device_id: s.device_id ?? undefined,
|
device_id: s.device_id ?? undefined,
|
||||||
part_id: s.suggested_part_id ?? undefined,
|
part_id: s.suggested_part_id ?? undefined,
|
||||||
responsible_user_id: this._responsible || undefined,
|
responsible_user_id: this._responsible || undefined,
|
||||||
|
for_minutes: parseInt(this._forMinutes, 10) > 0 ? parseInt(this._forMinutes, 10) : undefined,
|
||||||
}));
|
}));
|
||||||
const result = await this.hass.connection.sendMessagePromise<AdoptResponse>({
|
const result = await this.hass.connection.sendMessagePromise<AdoptResponse>({
|
||||||
type: "maintenance_supporter/problem_sensors/adopt",
|
type: "maintenance_supporter/problem_sensors/adopt",
|
||||||
@@ -214,6 +219,23 @@ export class MaintenanceAdoptProblemSensorsDialog extends LitElement {
|
|||||||
</div>
|
</div>
|
||||||
`}
|
`}
|
||||||
|
|
||||||
|
${!this._loading && this._sensors.length > 0
|
||||||
|
? html`
|
||||||
|
<label class="responsible">
|
||||||
|
<span>${t("for_at_least_minutes", L)}</span>
|
||||||
|
<input
|
||||||
|
class="for-input"
|
||||||
|
type="number"
|
||||||
|
min="0"
|
||||||
|
max="1440"
|
||||||
|
.value=${this._forMinutes}
|
||||||
|
@input=${(e: Event) => (this._forMinutes = (e.target as HTMLInputElement).value)}
|
||||||
|
/>
|
||||||
|
</label>
|
||||||
|
<div class="for-hint">${t("adopt_for_minutes_hint", L)}</div>
|
||||||
|
`
|
||||||
|
: nothing}
|
||||||
|
|
||||||
${!this._loading && this._sensors.length > 0 && this._users.length > 0
|
${!this._loading && this._sensors.length > 0 && this._users.length > 0
|
||||||
? html`
|
? html`
|
||||||
<label class="responsible">
|
<label class="responsible">
|
||||||
@@ -382,6 +404,19 @@ export class MaintenanceAdoptProblemSensorsDialog extends LitElement {
|
|||||||
color: var(--secondary-text-color);
|
color: var(--secondary-text-color);
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
}
|
}
|
||||||
|
.for-input {
|
||||||
|
width: 70px;
|
||||||
|
background: var(--card-background-color);
|
||||||
|
color: var(--primary-text-color);
|
||||||
|
border: 1px solid var(--divider-color);
|
||||||
|
border-radius: 4px;
|
||||||
|
padding: 4px 6px;
|
||||||
|
}
|
||||||
|
.for-hint {
|
||||||
|
font-size: 11px;
|
||||||
|
color: var(--secondary-text-color);
|
||||||
|
margin: -4px 0 2px;
|
||||||
|
}
|
||||||
.responsible select {
|
.responsible select {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
min-width: 140px;
|
min-width: 140px;
|
||||||
|
|||||||
+145
-8
@@ -66,11 +66,17 @@ interface Overview {
|
|||||||
needs_soon: Record<string, number>;
|
needs_soon: Record<string, number>;
|
||||||
types: string[];
|
types: string[];
|
||||||
excluded?: { entity_id: string; device_name: string }[];
|
excluded?: { entity_id: string; device_name: string }[];
|
||||||
|
// #135 follow-up: fleet-wide "track self-charging devices" opt-in.
|
||||||
|
track_self_charging?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class MaintenanceBatteryFleetSection extends LitElement {
|
export class MaintenanceBatteryFleetSection extends LitElement {
|
||||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||||
|
|
||||||
|
/** Flat mode drops the section's own card chrome (border/background) —
|
||||||
|
* set by the Lovelace card wrapper, whose ha-card provides the chrome. */
|
||||||
|
@property({ type: Boolean }) public flat = false;
|
||||||
|
|
||||||
@state() private _ov: Overview | null = null;
|
@state() private _ov: Overview | null = null;
|
||||||
@state() private _loading = false;
|
@state() private _loading = false;
|
||||||
@state() private _marking = false;
|
@state() private _marking = false;
|
||||||
@@ -198,6 +204,26 @@ export class MaintenanceBatteryFleetSection extends LitElement {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// #135 follow-up: fleet-wide opt-in that keeps self-charging devices
|
||||||
|
// (phones, vacuums, smart rings) in the roster as rechargeables.
|
||||||
|
private async _setTrackSelf(e: Event): Promise<void> {
|
||||||
|
const enabled = (e.target as HTMLInputElement).checked;
|
||||||
|
if (this._marking) return;
|
||||||
|
this._marking = true;
|
||||||
|
this._error = "";
|
||||||
|
try {
|
||||||
|
await this.hass.connection.sendMessagePromise({
|
||||||
|
type: "maintenance_supporter/battery_fleet/set_track_self_charging",
|
||||||
|
enabled,
|
||||||
|
});
|
||||||
|
await this._load();
|
||||||
|
} catch (e2) {
|
||||||
|
this._error = describeWsError(e2, this._lang);
|
||||||
|
} finally {
|
||||||
|
this._marking = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/** Lazy: the recorder-backed history is fetched once, when the roster is
|
/** Lazy: the recorder-backed history is fetched once, when the roster is
|
||||||
* first expanded — most panel visits never open it. */
|
* first expanded — most panel visits never open it. */
|
||||||
private _loadHistory = async (e: Event): Promise<void> => {
|
private _loadHistory = async (e: Event): Promise<void> => {
|
||||||
@@ -517,6 +543,16 @@ export class MaintenanceBatteryFleetSection extends LitElement {
|
|||||||
></ha-selector>
|
></ha-selector>
|
||||||
<div class="bf-roster-hint">${t("battery_fleet_add_hint", L)}</div>
|
<div class="bf-roster-hint">${t("battery_fleet_add_hint", L)}</div>
|
||||||
</div>
|
</div>
|
||||||
|
<label class="bf-track-self">
|
||||||
|
<input
|
||||||
|
type="checkbox"
|
||||||
|
.checked=${!!ov.track_self_charging}
|
||||||
|
.disabled=${this._marking}
|
||||||
|
@change=${this._setTrackSelf}
|
||||||
|
/>
|
||||||
|
${t("battery_fleet_track_self", L)}
|
||||||
|
</label>
|
||||||
|
<div class="bf-roster-hint">${t("battery_fleet_track_self_hint", L)}</div>
|
||||||
</details>
|
</details>
|
||||||
`
|
`
|
||||||
: nothing}
|
: nothing}
|
||||||
@@ -558,6 +594,13 @@ export class MaintenanceBatteryFleetSection extends LitElement {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
}
|
}
|
||||||
|
:host([flat]) .bf-card {
|
||||||
|
background: transparent;
|
||||||
|
border: none;
|
||||||
|
border-radius: 0;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
.bf-head {
|
.bf-head {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -614,22 +657,69 @@ export class MaintenanceBatteryFleetSection extends LitElement {
|
|||||||
.bf-list {
|
.bf-list {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
/* Cross-row column alignment (same subgrid pattern as the task table,
|
||||||
|
* issue 66): the LIST owns one column template, every row spans it via
|
||||||
|
* subgrid, and each element is PINNED to its column below - so an
|
||||||
|
* optional element (sparkline, percentage, forecast date) leaves its
|
||||||
|
* column empty instead of letting the rest of the row drift. max-content
|
||||||
|
* columns collapse to 0 when a whole list never fills them (the low list
|
||||||
|
* has no status chip, no sparkline, no date). */
|
||||||
.bf-rows {
|
.bf-rows {
|
||||||
display: flex;
|
display: grid;
|
||||||
flex-direction: column;
|
grid-template-columns: minmax(0, 1fr) repeat(9, max-content);
|
||||||
gap: 4px;
|
column-gap: 8px;
|
||||||
}
|
}
|
||||||
.bf-row {
|
.bf-row {
|
||||||
display: flex;
|
display: grid;
|
||||||
|
grid-template-columns: subgrid;
|
||||||
|
grid-column: 1 / -1;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 10px;
|
|
||||||
padding: 6px 0;
|
padding: 6px 0;
|
||||||
border-bottom: 1px solid var(--divider-color);
|
border-bottom: 1px solid var(--divider-color);
|
||||||
}
|
}
|
||||||
|
/* Column pinning: 1 name, 2 status/offline chip, 3 type, 4 charging
|
||||||
|
* icon, 5 sparkline, 6 level bar, 7 percentage, 8 row action
|
||||||
|
* (mark-one / record-swap), 9 forecast date, 10 exclude eye. */
|
||||||
.bf-dev {
|
.bf-dev {
|
||||||
flex: 1;
|
grid-column: 1;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
}
|
}
|
||||||
|
.bf-offline,
|
||||||
|
.bf-status {
|
||||||
|
grid-column: 2;
|
||||||
|
justify-self: end;
|
||||||
|
}
|
||||||
|
.bf-type {
|
||||||
|
grid-column: 3;
|
||||||
|
}
|
||||||
|
.bf-recharge {
|
||||||
|
grid-column: 4;
|
||||||
|
}
|
||||||
|
.bf-spark {
|
||||||
|
grid-column: 5;
|
||||||
|
}
|
||||||
|
.bf-bar {
|
||||||
|
grid-column: 6;
|
||||||
|
}
|
||||||
|
.bf-level {
|
||||||
|
grid-column: 7;
|
||||||
|
justify-self: end;
|
||||||
|
}
|
||||||
|
.bf-row .bf-mark {
|
||||||
|
grid-column: 8;
|
||||||
|
}
|
||||||
|
.bf-predicted {
|
||||||
|
grid-column: 9;
|
||||||
|
justify-self: end;
|
||||||
|
}
|
||||||
|
.bf-row .bf-mark.bf-exclude {
|
||||||
|
grid-column: 10;
|
||||||
|
}
|
||||||
|
.bf-offline {
|
||||||
|
color: var(--secondary-text-color);
|
||||||
|
font-size: 12px;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
.bf-type {
|
.bf-type {
|
||||||
color: var(--secondary-text-color);
|
color: var(--secondary-text-color);
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
@@ -648,13 +738,48 @@ export class MaintenanceBatteryFleetSection extends LitElement {
|
|||||||
flex: 0 0 auto;
|
flex: 0 0 auto;
|
||||||
cursor: help;
|
cursor: help;
|
||||||
}
|
}
|
||||||
/* On phones the row cannot fit name + chips + curve + bar + date: the
|
/* On phones the row cannot fit name + chips + curve + bar + date in ONE
|
||||||
* decorations yield (the percentage still carries the number). */
|
* line: the decorations yield (the percentage still carries the number)
|
||||||
|
* and the row wraps to two lines - the name spans the full width, the
|
||||||
|
* status chip moves under it (left, into the name column) and the rest
|
||||||
|
* keeps its pinned subgrid column, so type / percentage / date / eye
|
||||||
|
* stay aligned across rows. Without this the fixed max-content columns
|
||||||
|
* overflowed 400 px and the chips overlapped the wrapped names. */
|
||||||
@media (max-width: 640px) {
|
@media (max-width: 640px) {
|
||||||
.bf-spark,
|
.bf-spark,
|
||||||
.bf-bar {
|
.bf-bar {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
.bf-row {
|
||||||
|
row-gap: 2px;
|
||||||
|
}
|
||||||
|
.bf-dev {
|
||||||
|
grid-column: 1 / 9;
|
||||||
|
grid-row: 1;
|
||||||
|
}
|
||||||
|
.bf-offline,
|
||||||
|
.bf-status {
|
||||||
|
/* Line 1, RIGHT - over the date+eye columns, which are wide enough
|
||||||
|
* for any chip. Pinning the chip into the 1fr rest column instead
|
||||||
|
* overlapped the type text (the rest column shrinks below chip
|
||||||
|
* width, and a span onto an fr track never grows fixed tracks). */
|
||||||
|
grid-column: 9 / 11;
|
||||||
|
grid-row: 1;
|
||||||
|
justify-self: end;
|
||||||
|
}
|
||||||
|
.bf-type {
|
||||||
|
grid-row: 2;
|
||||||
|
max-width: 44vw;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
.bf-recharge,
|
||||||
|
.bf-level,
|
||||||
|
.bf-predicted,
|
||||||
|
.bf-row .bf-mark {
|
||||||
|
grid-row: 2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.bf-spark-line {
|
.bf-spark-line {
|
||||||
fill: none;
|
fill: none;
|
||||||
@@ -834,6 +959,18 @@ export class MaintenanceBatteryFleetSection extends LitElement {
|
|||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
padding: 1px 4px 1px 10px;
|
padding: 1px 4px 1px 10px;
|
||||||
}
|
}
|
||||||
|
.bf-track-self {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
margin-top: 12px;
|
||||||
|
font-size: 13px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.bf-track-self input {
|
||||||
|
accent-color: var(--primary-color);
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
import { LitElement, html, css, nothing } from "lit";
|
import { LitElement, html, css, nothing } from "lit";
|
||||||
import { property, state } from "lit/decorators.js";
|
import { property, state } from "lit/decorators.js";
|
||||||
import type { HomeAssistant } from "../types";
|
import type { HomeAssistant } from "../types";
|
||||||
import { t, nativeFieldStyles } from "../styles";
|
import { langOf, t, nativeFieldStyles } from "../styles";
|
||||||
|
|
||||||
export interface ConfirmOptions {
|
export interface ConfirmOptions {
|
||||||
title: string;
|
title: string;
|
||||||
@@ -90,7 +90,7 @@ export class MaintenanceConfirmDialog extends LitElement {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
if (!this._open) return nothing;
|
if (!this._open) return nothing;
|
||||||
const lang = this.hass?.language || "en";
|
const lang = langOf(this.hass);
|
||||||
return html`
|
return html`
|
||||||
<ha-dialog open @closed=${this._cancel}>
|
<ha-dialog open @closed=${this._cancel}>
|
||||||
<div class="dialog-title">${this._title}</div>
|
<div class="dialog-title">${this._title}</div>
|
||||||
|
|||||||
+3
-3
@@ -15,7 +15,7 @@ import { describeWsError } from "../ws-errors";
|
|||||||
import { downloadUrl } from "../helpers/download";
|
import { downloadUrl } from "../helpers/download";
|
||||||
import { downloadSignedDocument, openSignedDocument, signDocumentPath } from "../helpers/document-url";
|
import { downloadSignedDocument, openSignedDocument, signDocumentPath } from "../helpers/document-url";
|
||||||
import { formatBytes } from "../helpers/format-bytes";
|
import { formatBytes } from "../helpers/format-bytes";
|
||||||
import { CATEGORIES, CATEGORY_ICONS } from "../helpers/document-categories";
|
import { docDisplayName, CATEGORIES, CATEGORY_ICONS } from "../helpers/document-categories";
|
||||||
import type { HomeAssistant } from "../types";
|
import type { HomeAssistant } from "../types";
|
||||||
|
|
||||||
interface MaintenanceDocument {
|
interface MaintenanceDocument {
|
||||||
@@ -263,7 +263,7 @@ export class MaintenanceDocumentsSection extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private async _delete(doc: MaintenanceDocument): Promise<void> {
|
private async _delete(doc: MaintenanceDocument): Promise<void> {
|
||||||
const name = doc.title || doc.filename || doc.url || "";
|
const name = docDisplayName(doc);
|
||||||
if (!window.confirm(t("doc_delete_confirm", this._lang).replace("{name}", name))) return;
|
if (!window.confirm(t("doc_delete_confirm", this._lang).replace("{name}", name))) return;
|
||||||
this._busy = true;
|
this._busy = true;
|
||||||
this._error = "";
|
this._error = "";
|
||||||
@@ -447,7 +447,7 @@ export class MaintenanceDocumentsSection extends LitElement {
|
|||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div class="doc-title">${doc.title || doc.filename || doc.url}</div>
|
<div class="doc-title">${docDisplayName(doc)}</div>
|
||||||
<div class="doc-meta">${meta}</div>
|
<div class="doc-meta">${meta}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="doc-row-actions">
|
<div class="doc-row-actions">
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import { LitElement, html, css, nothing } from "lit";
|
|||||||
import { property, state } from "lit/decorators.js";
|
import { property, state } from "lit/decorators.js";
|
||||||
import type { HomeAssistant } from "../types";
|
import type { HomeAssistant } from "../types";
|
||||||
import { t } from "../styles";
|
import { t } from "../styles";
|
||||||
|
import { downloadTextFile } from "../helpers/download";
|
||||||
|
|
||||||
interface QrResult {
|
interface QrResult {
|
||||||
svg_data_uri: string;
|
svg_data_uri: string;
|
||||||
@@ -194,16 +195,13 @@ ${safeSub ? `<div class="sub">${safeSub}</div>` : ""}
|
|||||||
const svgContent = decodeURIComponent(
|
const svgContent = decodeURIComponent(
|
||||||
result.svg_data_uri.replace("data:image/svg+xml,", ""),
|
result.svg_data_uri.replace("data:image/svg+xml,", ""),
|
||||||
);
|
);
|
||||||
const blob = new Blob([svgContent], { type: "image/svg+xml" });
|
|
||||||
const url = URL.createObjectURL(blob);
|
|
||||||
const a = document.createElement("a");
|
|
||||||
a.href = url;
|
|
||||||
const name = this._taskName
|
const name = this._taskName
|
||||||
? `${this._objectName}-${this._taskName}`
|
? `${this._objectName}-${this._taskName}`
|
||||||
: this._objectName;
|
: this._objectName;
|
||||||
a.download = `qr-${sanitizeFilename(name)}-${suffix}.svg`;
|
// helpers/download.ts, not a hand-rolled anchor: the detached-anchor +
|
||||||
a.click();
|
// immediate-revoke pattern this used silently fails in the Companion
|
||||||
URL.revokeObjectURL(url);
|
// WebView (drift audit 2026-08 caught the bypass).
|
||||||
|
downloadTextFile(svgContent, `qr-${sanitizeFilename(name)}-${suffix}.svg`, "image/svg+xml");
|
||||||
}
|
}
|
||||||
|
|
||||||
private _close(): void {
|
private _close(): void {
|
||||||
|
|||||||
+7
-2
@@ -7,10 +7,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { LitElement, html, css, nothing } from "lit";
|
import { LitElement, html, css, nothing } from "lit";
|
||||||
|
import { docDisplayName } from "../helpers/document-categories";
|
||||||
import { property, state } from "lit/decorators.js";
|
import { property, state } from "lit/decorators.js";
|
||||||
import { t, ensureLocale, langOf } from "../styles";
|
import { t, ensureLocale, langOf } from "../styles";
|
||||||
import { describeWsError } from "../ws-errors";
|
import { describeWsError } from "../ws-errors";
|
||||||
import { openSignedDocument } from "../helpers/document-url";
|
import { openSignedDocument } from "../helpers/document-url";
|
||||||
|
import { isSafeHttpUrl } from "../helpers/url";
|
||||||
import { formatBytes } from "../helpers/format-bytes";
|
import { formatBytes } from "../helpers/format-bytes";
|
||||||
import type { HomeAssistant } from "../types";
|
import type { HomeAssistant } from "../types";
|
||||||
|
|
||||||
@@ -135,7 +137,10 @@ export class MaintenanceStorageSectionCard extends LitElement {
|
|||||||
|
|
||||||
private async _openResult(doc: SearchResult): Promise<void> {
|
private async _openResult(doc: SearchResult): Promise<void> {
|
||||||
if (doc.kind === "weblink") {
|
if (doc.kind === "weblink") {
|
||||||
window.open(doc.url, "_blank", "noopener");
|
// Defense-in-depth (mirrors task-documents/documents-section): never
|
||||||
|
// hand a non-http(s) weblink to window.open, even though the WS add
|
||||||
|
// path already rejects such schemes.
|
||||||
|
if (isSafeHttpUrl(doc.url)) window.open(doc.url, "_blank", "noopener");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
@@ -150,7 +155,7 @@ export class MaintenanceStorageSectionCard extends LitElement {
|
|||||||
<div class="obj-row result-row" title=${t("doc_open", L)} @click=${() => this._openResult(doc)}>
|
<div class="obj-row result-row" title=${t("doc_open", L)} @click=${() => this._openResult(doc)}>
|
||||||
<ha-icon icon=${doc.kind === "weblink" ? "mdi:link-variant" : "mdi:file-document-outline"}></ha-icon>
|
<ha-icon icon=${doc.kind === "weblink" ? "mdi:link-variant" : "mdi:file-document-outline"}></ha-icon>
|
||||||
<div class="result-info">
|
<div class="result-info">
|
||||||
<div class="result-title">${doc.title || doc.filename || doc.url}</div>
|
<div class="result-title">${docDisplayName(doc)}</div>
|
||||||
<div class="result-obj">${doc.object_name}</div>
|
<div class="result-obj">${doc.object_name}</div>
|
||||||
</div>
|
</div>
|
||||||
<ha-icon class="result-open" icon=${doc.kind === "weblink" ? "mdi:open-in-new" : "mdi:eye-outline"}></ha-icon>
|
<ha-icon class="result-open" icon=${doc.kind === "weblink" ? "mdi:open-in-new" : "mdi:eye-outline"}></ha-icon>
|
||||||
|
|||||||
@@ -1149,6 +1149,8 @@ export class MaintenanceTaskDialog extends LitElement {
|
|||||||
if (this._triggerFromState) triggerConfig.trigger_from_state = this._triggerFromState;
|
if (this._triggerFromState) triggerConfig.trigger_from_state = this._triggerFromState;
|
||||||
if (this._triggerToState) triggerConfig.trigger_to_state = this._triggerToState;
|
if (this._triggerToState) triggerConfig.trigger_to_state = this._triggerToState;
|
||||||
if (this._triggerTargetChanges) { const v = parseInt(this._triggerTargetChanges, 10); if (!isNaN(v)) triggerConfig.trigger_target_changes = v; }
|
if (this._triggerTargetChanges) { const v = parseInt(this._triggerTargetChanges, 10); if (!isNaN(v)) triggerConfig.trigger_target_changes = v; }
|
||||||
|
// #136: the new state must hold this long before a change counts.
|
||||||
|
if (this._triggerForMinutes) { const v = parseInt(this._triggerForMinutes, 10); if (!isNaN(v)) triggerConfig.trigger_for_minutes = v; }
|
||||||
} else if (this._triggerType === "runtime") {
|
} else if (this._triggerType === "runtime") {
|
||||||
if (this._triggerRuntimeHours) { const v = parseFloat(this._triggerRuntimeHours); if (!isNaN(v)) triggerConfig.trigger_runtime_hours = v; }
|
if (this._triggerRuntimeHours) { const v = parseFloat(this._triggerRuntimeHours); if (!isNaN(v)) triggerConfig.trigger_runtime_hours = v; }
|
||||||
const onStates = this._triggerOnStates.split(",").map((s) => s.trim()).filter(Boolean);
|
const onStates = this._triggerOnStates.split(",").map((s) => s.trim()).filter(Boolean);
|
||||||
@@ -2246,6 +2248,14 @@ export class MaintenanceTaskDialog extends LitElement {
|
|||||||
@input=${(e: Event) => (this._triggerTargetChanges = (e.target as HTMLInputElement).value)}
|
@input=${(e: Event) => (this._triggerTargetChanges = (e.target as HTMLInputElement).value)}
|
||||||
></ms-textfield>
|
></ms-textfield>
|
||||||
<div class="field-help">${t("target_changes_help", L)}</div>
|
<div class="field-help">${t("target_changes_help", L)}</div>
|
||||||
|
<ms-textfield
|
||||||
|
label="${t("for_at_least_minutes", L)}"
|
||||||
|
type="number"
|
||||||
|
min="0"
|
||||||
|
.value=${this._triggerForMinutes}
|
||||||
|
@input=${(e: Event) => (this._triggerForMinutes = (e.target as HTMLInputElement).value)}
|
||||||
|
></ms-textfield>
|
||||||
|
<div class="field-help">${t("for_minutes_state_help", L)}</div>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
if (this._triggerType === "runtime") {
|
if (this._triggerType === "runtime") {
|
||||||
|
|||||||
@@ -15,8 +15,9 @@ import { t, ensureLocale, langOf } from "../styles";
|
|||||||
import { describeWsError } from "../ws-errors";
|
import { describeWsError } from "../ws-errors";
|
||||||
import { downloadUrl } from "../helpers/download";
|
import { downloadUrl } from "../helpers/download";
|
||||||
import { downloadSignedDocument, openSignedDocument } from "../helpers/document-url";
|
import { downloadSignedDocument, openSignedDocument } from "../helpers/document-url";
|
||||||
|
import { isSafeHttpUrl } from "../helpers/url";
|
||||||
import { formatBytes } from "../helpers/format-bytes";
|
import { formatBytes } from "../helpers/format-bytes";
|
||||||
import { CATEGORIES, CATEGORY_ICONS } from "../helpers/document-categories";
|
import { docDisplayName, CATEGORIES, CATEGORY_ICONS } from "../helpers/document-categories";
|
||||||
import type { HomeAssistant } from "../types";
|
import type { HomeAssistant } from "../types";
|
||||||
|
|
||||||
interface Doc {
|
interface Doc {
|
||||||
@@ -144,7 +145,11 @@ export class MaintenanceTaskDocuments extends LitElement {
|
|||||||
|
|
||||||
private async _open(doc: Doc): Promise<void> {
|
private async _open(doc: Doc): Promise<void> {
|
||||||
if (doc.kind === "weblink") {
|
if (doc.kind === "weblink") {
|
||||||
window.open(doc.url, "_blank", "noopener");
|
// Defense-in-depth: the add-link WS path already refuses non-http(s)
|
||||||
|
// schemes, but a weblink stored before that check (or via a future
|
||||||
|
// path) must never reach window.open as javascript:/data: — guard the
|
||||||
|
// sink too, like documents-section does.
|
||||||
|
if (isSafeHttpUrl(doc.url)) window.open(doc.url, "_blank", "noopener");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// A per-task page hint jumps straight to the relevant page via the PDF
|
// A per-task page hint jumps straight to the relevant page via the PDF
|
||||||
@@ -206,7 +211,7 @@ export class MaintenanceTaskDocuments extends LitElement {
|
|||||||
>
|
>
|
||||||
<option value="" ?selected=${!this._attachId}>${t("doc_link_existing", L)}</option>
|
<option value="" ?selected=${!this._attachId}>${t("doc_link_existing", L)}</option>
|
||||||
${available.map(
|
${available.map(
|
||||||
(d) => html`<option value=${d.id} ?selected=${d.id === this._attachId}>${d.title || d.filename || d.url}</option>`,
|
(d) => html`<option value=${d.id} ?selected=${d.id === this._attachId}>${docDisplayName(d)}</option>`,
|
||||||
)}
|
)}
|
||||||
</select>
|
</select>
|
||||||
<button class="tdoc-btn" ?disabled=${this._busy || !this._attachId} @click=${this._link}>
|
<button class="tdoc-btn" ?disabled=${this._busy || !this._attachId} @click=${this._link}>
|
||||||
@@ -240,7 +245,7 @@ export class MaintenanceTaskDocuments extends LitElement {
|
|||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div class="tdoc-title">${doc.title || doc.filename || doc.url}</div>
|
<div class="tdoc-title">${docDisplayName(doc)}</div>
|
||||||
<div class="tdoc-meta">
|
<div class="tdoc-meta">
|
||||||
${meta}${page ? html` · <span class="tdoc-pagetag">${t("doc_page", L)} ${page}</span>` : nothing}
|
${meta}${page ? html` · <span class="tdoc-pagetag">${t("doc_page", L)} ${page}</span>` : nothing}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ import type { MaintenanceQrDialog } from "./components/qr-dialog";
|
|||||||
import type { MaintenanceTaskQuickActionsDialog } from "./components/task-quick-actions-dialog";
|
import type { MaintenanceTaskQuickActionsDialog } from "./components/task-quick-actions-dialog";
|
||||||
import type { MaintenanceObjectQuickActionsDialog } from "./components/object-quick-actions-dialog";
|
import type { MaintenanceObjectQuickActionsDialog } from "./components/object-quick-actions-dialog";
|
||||||
import type { HomeAssistant, MaintenanceObject } from "./types";
|
import type { HomeAssistant, MaintenanceObject } from "./types";
|
||||||
import { ensureLocale, isLocaleLoaded } from "./styles";
|
import { ensureLocale, isLocaleLoaded, langOf } from "./styles";
|
||||||
|
|
||||||
const OBJECT_DIALOG_TAG = "maintenance-object-dialog";
|
const OBJECT_DIALOG_TAG = "maintenance-object-dialog";
|
||||||
const TASK_DIALOG_TAG = "maintenance-task-dialog";
|
const TASK_DIALOG_TAG = "maintenance-task-dialog";
|
||||||
@@ -91,7 +91,7 @@ function syncHass(el: HTMLElement & { hass?: HomeAssistant }): boolean {
|
|||||||
// in English even when the rest of HA is localized. Fetch the user's locale
|
// in English even when the rest of HA is localized. Fetch the user's locale
|
||||||
// (idempotent + cached) and force a re-render once it's in, so the first paint
|
// (idempotent + cached) and force a re-render once it's in, so the first paint
|
||||||
// (which may be English) is corrected to the user's language.
|
// (which may be English) is corrected to the user's language.
|
||||||
const lang = hass.language || "en";
|
const lang = langOf(hass);
|
||||||
if (!isLocaleLoaded(lang)) {
|
if (!isLocaleLoaded(lang)) {
|
||||||
void ensureLocale(lang).then(() => {
|
void ensureLocale(lang).then(() => {
|
||||||
(el as unknown as { requestUpdate?: () => void }).requestUpdate?.();
|
(el as unknown as { requestUpdate?: () => void }).requestUpdate?.();
|
||||||
|
|||||||
@@ -279,6 +279,10 @@ const HISTORY_TYPE_TO_STATUS: Record<string, string> = {
|
|||||||
completed: "ok",
|
completed: "ok",
|
||||||
reset: "ok",
|
reset: "ok",
|
||||||
skipped: "due_soon",
|
skipped: "due_soon",
|
||||||
|
// A cycle that was NOT done in time (skip-while-overdue writes it, and the
|
||||||
|
// coordinator stamps it automatically) — must never paint green. Found by
|
||||||
|
// the 2026-08 drift audit: the missing entry fell through to "ok".
|
||||||
|
missed: "overdue",
|
||||||
triggered: "triggered",
|
triggered: "triggered",
|
||||||
trigger_replaced: "triggered",
|
trigger_replaced: "triggered",
|
||||||
trigger_removed: "ok", // config change, not a due/triggered event
|
trigger_removed: "ok", // config change, not a due/triggered event
|
||||||
|
|||||||
@@ -517,6 +517,7 @@
|
|||||||
"group_by_label": "Seskupit podle",
|
"group_by_label": "Seskupit podle",
|
||||||
"state_value_help": "Použijte hodnotu stavu HA (obvykle malými písmeny, např. \"on\"/\"off\"). Velikost písmen se při uložení normalizuje.",
|
"state_value_help": "Použijte hodnotu stavu HA (obvykle malými písmeny, např. \"on\"/\"off\"). Velikost písmen se při uložení normalizuje.",
|
||||||
"target_changes_help": "Počet odpovídajících přechodů, po kterých se trigger spustí (výchozí: 1).",
|
"target_changes_help": "Počet odpovídajících přechodů, po kterých se trigger spustí (výchozí: 1).",
|
||||||
|
"for_minutes_state_help": "0 počítá každou změnu ihned. S minutami musí nový stav nejprve vydržet — krátké bliknutí pak nespustí ani se nepočítá.",
|
||||||
"qr_print_title": "Tisk QR kódů",
|
"qr_print_title": "Tisk QR kódů",
|
||||||
"qr_print_desc": "Vygeneruj tiskovou stránku s QR kódy k vystřižení a nalepení na zařízení.",
|
"qr_print_desc": "Vygeneruj tiskovou stránku s QR kódy k vystřižení a nalepení na zařízení.",
|
||||||
"qr_print_load": "Načíst objekty",
|
"qr_print_load": "Načíst objekty",
|
||||||
@@ -584,6 +585,7 @@
|
|||||||
"quick_complete_defaults_feedback_not_needed": "Nebylo potřeba",
|
"quick_complete_defaults_feedback_not_needed": "Nebylo potřeba",
|
||||||
"quick_complete_success": "Rychle označeno jako hotové",
|
"quick_complete_success": "Rychle označeno jako hotové",
|
||||||
"trigger_replaced": "Spouštěč nahrazen",
|
"trigger_replaced": "Spouštěč nahrazen",
|
||||||
|
"trigger_removed": "Spouštěč odebrán",
|
||||||
"add": "Přidat",
|
"add": "Přidat",
|
||||||
"show_stats": "Zobrazit statistiky + grafy",
|
"show_stats": "Zobrazit statistiky + grafy",
|
||||||
"hide_stats": "Skrýt statistiky",
|
"hide_stats": "Skrýt statistiky",
|
||||||
@@ -819,6 +821,7 @@
|
|||||||
"schedule_preview_ontime": "Za předpokladu včasného dokončení.",
|
"schedule_preview_ontime": "Za předpokladu včasného dokončení.",
|
||||||
"schedule_preview_ends": "(série končí)",
|
"schedule_preview_ends": "(série končí)",
|
||||||
"adopt_problem_responsible": "Odpovědná osoba pro všechny převzaté úkoly (volitelné)",
|
"adopt_problem_responsible": "Odpovědná osoba pro všechny převzaté úkoly (volitelné)",
|
||||||
|
"adopt_for_minutes_hint": "Spustit až když problém trvá takto dlouho — 0 reaguje na první bliknutí.",
|
||||||
"adopt_problem_configure": "Konfigurovat",
|
"adopt_problem_configure": "Konfigurovat",
|
||||||
"history_auto": "Automaticky",
|
"history_auto": "Automaticky",
|
||||||
"battery_fleet_title": "Flotila baterií",
|
"battery_fleet_title": "Flotila baterií",
|
||||||
@@ -838,6 +841,8 @@
|
|||||||
"battery_fleet_all_hint": "Vylučte zařízení už dřív, než vůbec ohlásí nízkou úroveň — vysavač, který se sám nabíjí, nebo telefon, který varuje sám.",
|
"battery_fleet_all_hint": "Vylučte zařízení už dřív, než vůbec ohlásí nízkou úroveň — vysavač, který se sám nabíjí, nebo telefon, který varuje sám.",
|
||||||
"battery_fleet_add": "Přidat baterii",
|
"battery_fleet_add": "Přidat baterii",
|
||||||
"battery_fleet_add_hint": "Vyberte senzor baterie, který automatická detekce přehlédla — okamžitě se objeví v seznamu.",
|
"battery_fleet_add_hint": "Vyberte senzor baterie, který automatická detekce přehlédla — okamžitě se objeví v seznamu.",
|
||||||
|
"battery_fleet_track_self": "Sledovat samodobíjecí baterie",
|
||||||
|
"battery_fleet_track_self_hint": "Telefony, vysavače a další samodobíjecí zařízení se zobrazují jako akumulátory — při nízkém stavu žádají o nabití, nikdy o nové články.",
|
||||||
"battery_fleet_status_low": "Nízká",
|
"battery_fleet_status_low": "Nízká",
|
||||||
"battery_fleet_status_soon": "Brzy",
|
"battery_fleet_status_soon": "Brzy",
|
||||||
"battery_fleet_status_ok": "V pořádku",
|
"battery_fleet_status_ok": "V pořádku",
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
"due_soon": "Snart forfalden",
|
"due_soon": "Snart forfalden",
|
||||||
"triggered": "Udløst",
|
"triggered": "Udløst",
|
||||||
"trigger_replaced": "Udløser erstattet",
|
"trigger_replaced": "Udløser erstattet",
|
||||||
|
"trigger_removed": "Udløser fjernet",
|
||||||
"ok": "OK",
|
"ok": "OK",
|
||||||
"all": "Alle",
|
"all": "Alle",
|
||||||
"new_object": "+ Nyt objekt",
|
"new_object": "+ Nyt objekt",
|
||||||
@@ -518,6 +519,7 @@
|
|||||||
"group_by_label": "Grupper efter",
|
"group_by_label": "Grupper efter",
|
||||||
"state_value_help": "Brug HA-tilstandsværdien (normalt med små bogstaver, f.eks. \"on\"/\"off\"). Store/små bogstaver normaliseres ved lagring.",
|
"state_value_help": "Brug HA-tilstandsværdien (normalt med små bogstaver, f.eks. \"on\"/\"off\"). Store/små bogstaver normaliseres ved lagring.",
|
||||||
"target_changes_help": "Antal matchende overgange, før udløseren aktiveres (standard: 1).",
|
"target_changes_help": "Antal matchende overgange, før udløseren aktiveres (standard: 1).",
|
||||||
|
"for_minutes_state_help": "0 tæller hver ændring straks. Med minutter skal den nye tilstand først holde — korte blink hverken udløser eller tælles så.",
|
||||||
"qr_print_title": "Udskriv QR-koder",
|
"qr_print_title": "Udskriv QR-koder",
|
||||||
"qr_print_desc": "Generer en udskriftsklar side med QR-koder, der kan klippes ud og sættes på dit udstyr.",
|
"qr_print_desc": "Generer en udskriftsklar side med QR-koder, der kan klippes ud og sættes på dit udstyr.",
|
||||||
"qr_print_load": "Indlæs objekter",
|
"qr_print_load": "Indlæs objekter",
|
||||||
@@ -819,6 +821,7 @@
|
|||||||
"schedule_preview_ontime": "Forudsat rettidig fuldførelse.",
|
"schedule_preview_ontime": "Forudsat rettidig fuldførelse.",
|
||||||
"schedule_preview_ends": "(serien slutter)",
|
"schedule_preview_ends": "(serien slutter)",
|
||||||
"adopt_problem_responsible": "Ansvarlig bruger for alle overtagne opgaver (valgfrit)",
|
"adopt_problem_responsible": "Ansvarlig bruger for alle overtagne opgaver (valgfrit)",
|
||||||
|
"adopt_for_minutes_hint": "Udløs først når problemet har varet så længe — 0 reagerer på første blink.",
|
||||||
"adopt_problem_configure": "Konfigurer",
|
"adopt_problem_configure": "Konfigurer",
|
||||||
"history_auto": "Automatisk",
|
"history_auto": "Automatisk",
|
||||||
"battery_fleet_title": "Batteriflåde",
|
"battery_fleet_title": "Batteriflåde",
|
||||||
@@ -838,6 +841,8 @@
|
|||||||
"battery_fleet_all_hint": "Udeluk en enhed her, før den overhovedet melder lavt niveau — en støvsuger, der lader sig selv, eller en telefon, der advarer af sig selv.",
|
"battery_fleet_all_hint": "Udeluk en enhed her, før den overhovedet melder lavt niveau — en støvsuger, der lader sig selv, eller en telefon, der advarer af sig selv.",
|
||||||
"battery_fleet_add": "Tilføj et batteri",
|
"battery_fleet_add": "Tilføj et batteri",
|
||||||
"battery_fleet_add_hint": "Vælg en batterisensor, som den automatiske registrering overså — den kommer straks på listen.",
|
"battery_fleet_add_hint": "Vælg en batterisensor, som den automatiske registrering overså — den kommer straks på listen.",
|
||||||
|
"battery_fleet_track_self": "Spor selvopladende batterier",
|
||||||
|
"battery_fleet_track_self_hint": "Telefoner, støvsugere og andre selvopladende enheder vises som genopladelige — ved lavt niveau bedes om opladning, aldrig om nye batterier.",
|
||||||
"battery_fleet_status_low": "Lav",
|
"battery_fleet_status_low": "Lav",
|
||||||
"battery_fleet_status_soon": "Snart",
|
"battery_fleet_status_soon": "Snart",
|
||||||
"battery_fleet_status_ok": "I orden",
|
"battery_fleet_status_ok": "I orden",
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
"due_soon": "Bald fällig",
|
"due_soon": "Bald fällig",
|
||||||
"triggered": "Ausgelöst",
|
"triggered": "Ausgelöst",
|
||||||
"trigger_replaced": "Auslöser ersetzt",
|
"trigger_replaced": "Auslöser ersetzt",
|
||||||
|
"trigger_removed": "Trigger entfernt",
|
||||||
"ok": "OK",
|
"ok": "OK",
|
||||||
"all": "Alle",
|
"all": "Alle",
|
||||||
"new_object": "+ Neues Objekt",
|
"new_object": "+ Neues Objekt",
|
||||||
@@ -518,6 +519,7 @@
|
|||||||
"group_by_label": "Gruppieren nach",
|
"group_by_label": "Gruppieren nach",
|
||||||
"state_value_help": "Verwende den HA-Zustandswert (meist kleingeschrieben, z. B. \"on\"/\"off\"). Groß-/Kleinschreibung wird beim Speichern normalisiert.",
|
"state_value_help": "Verwende den HA-Zustandswert (meist kleingeschrieben, z. B. \"on\"/\"off\"). Groß-/Kleinschreibung wird beim Speichern normalisiert.",
|
||||||
"target_changes_help": "Anzahl der passenden Übergänge, nach denen der Trigger auslöst (Standard: 1).",
|
"target_changes_help": "Anzahl der passenden Übergänge, nach denen der Trigger auslöst (Standard: 1).",
|
||||||
|
"for_minutes_state_help": "0 zählt jede Änderung sofort. Mit Minuten muss der neue Zustand erst so lange bestehen — kurzes Flackern löst dann weder aus noch zählt es.",
|
||||||
"qr_print_title": "QR-Codes drucken",
|
"qr_print_title": "QR-Codes drucken",
|
||||||
"qr_print_desc": "Erzeuge eine Druckseite mit QR-Codes zum Ausschneiden und Anbringen an den Geräten.",
|
"qr_print_desc": "Erzeuge eine Druckseite mit QR-Codes zum Ausschneiden und Anbringen an den Geräten.",
|
||||||
"qr_print_load": "Objekte laden",
|
"qr_print_load": "Objekte laden",
|
||||||
@@ -819,6 +821,7 @@
|
|||||||
"schedule_preview_ontime": "Bei pünktlichem Abschluss.",
|
"schedule_preview_ontime": "Bei pünktlichem Abschluss.",
|
||||||
"schedule_preview_ends": "(Serie endet)",
|
"schedule_preview_ends": "(Serie endet)",
|
||||||
"adopt_problem_responsible": "Verantwortliche Person für alle übernommenen Aufgaben (optional)",
|
"adopt_problem_responsible": "Verantwortliche Person für alle übernommenen Aufgaben (optional)",
|
||||||
|
"adopt_for_minutes_hint": "Erst auslösen, wenn das Problem so lange besteht — 0 reagiert auf das erste Flackern.",
|
||||||
"adopt_problem_configure": "Konfigurieren",
|
"adopt_problem_configure": "Konfigurieren",
|
||||||
"history_auto": "Automatisch",
|
"history_auto": "Automatisch",
|
||||||
"battery_fleet_title": "Batterie-Flotte",
|
"battery_fleet_title": "Batterie-Flotte",
|
||||||
@@ -838,6 +841,8 @@
|
|||||||
"battery_fleet_all_hint": "Ein Gerät hier ausschließen, bevor es überhaupt schwach meldet — etwa ein Sauger, der sich selbst lädt, oder ein Telefon, das von sich aus warnt.",
|
"battery_fleet_all_hint": "Ein Gerät hier ausschließen, bevor es überhaupt schwach meldet — etwa ein Sauger, der sich selbst lädt, oder ein Telefon, das von sich aus warnt.",
|
||||||
"battery_fleet_add": "Batterie hinzufügen",
|
"battery_fleet_add": "Batterie hinzufügen",
|
||||||
"battery_fleet_add_hint": "Einen Batteriesensor wählen, den die automatische Erkennung übersehen hat — er erscheint sofort in der Liste.",
|
"battery_fleet_add_hint": "Einen Batteriesensor wählen, den die automatische Erkennung übersehen hat — er erscheint sofort in der Liste.",
|
||||||
|
"battery_fleet_track_self": "Selbstladende Batterien mitverfolgen",
|
||||||
|
"battery_fleet_track_self_hint": "Telefone, Staubsauger und andere selbstladende Geräte erscheinen als Akkus — bei niedrigem Stand wird ans Laden erinnert, nie an neue Zellen.",
|
||||||
"battery_fleet_status_low": "Schwach",
|
"battery_fleet_status_low": "Schwach",
|
||||||
"battery_fleet_status_soon": "Bald",
|
"battery_fleet_status_soon": "Bald",
|
||||||
"battery_fleet_status_ok": "In Ordnung",
|
"battery_fleet_status_ok": "In Ordnung",
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
"due_soon": "Due Soon",
|
"due_soon": "Due Soon",
|
||||||
"triggered": "Triggered",
|
"triggered": "Triggered",
|
||||||
"trigger_replaced": "Trigger replaced",
|
"trigger_replaced": "Trigger replaced",
|
||||||
|
"trigger_removed": "Trigger removed",
|
||||||
"ok": "OK",
|
"ok": "OK",
|
||||||
"all": "All",
|
"all": "All",
|
||||||
"new_object": "+ New Object",
|
"new_object": "+ New Object",
|
||||||
@@ -524,6 +525,7 @@
|
|||||||
"group_by_label": "Group by",
|
"group_by_label": "Group by",
|
||||||
"state_value_help": "Use the HA state value (usually lowercase, e.g. \"on\"/\"off\"). Case is normalised on save.",
|
"state_value_help": "Use the HA state value (usually lowercase, e.g. \"on\"/\"off\"). Case is normalised on save.",
|
||||||
"target_changes_help": "Number of matching transitions before the trigger fires (default: 1).",
|
"target_changes_help": "Number of matching transitions before the trigger fires (default: 1).",
|
||||||
|
"for_minutes_state_help": "0 counts every change immediately. Set minutes and the new state must hold that long first — brief flickers then neither trigger nor count.",
|
||||||
"qr_print_title": "Print QR codes",
|
"qr_print_title": "Print QR codes",
|
||||||
"qr_print_desc": "Generate a printable page of QR codes to cut out and stick on your equipment.",
|
"qr_print_desc": "Generate a printable page of QR codes to cut out and stick on your equipment.",
|
||||||
"qr_print_load": "Load objects",
|
"qr_print_load": "Load objects",
|
||||||
@@ -819,6 +821,7 @@
|
|||||||
"schedule_preview_ontime": "Assuming on-time completion.",
|
"schedule_preview_ontime": "Assuming on-time completion.",
|
||||||
"schedule_preview_ends": "(series ends)",
|
"schedule_preview_ends": "(series ends)",
|
||||||
"adopt_problem_responsible": "Responsible user for all adopted tasks (optional)",
|
"adopt_problem_responsible": "Responsible user for all adopted tasks (optional)",
|
||||||
|
"adopt_for_minutes_hint": "Only trigger once the problem has persisted this long — 0 reacts to the first flicker.",
|
||||||
"adopt_problem_configure": "Configure",
|
"adopt_problem_configure": "Configure",
|
||||||
"history_auto": "Automatic",
|
"history_auto": "Automatic",
|
||||||
"battery_fleet_title": "Battery fleet",
|
"battery_fleet_title": "Battery fleet",
|
||||||
@@ -838,6 +841,8 @@
|
|||||||
"battery_fleet_all_hint": "Exclude a device here to drop it from the fleet before it ever reports low — a vacuum that recharges itself, or a phone that warns you on its own.",
|
"battery_fleet_all_hint": "Exclude a device here to drop it from the fleet before it ever reports low — a vacuum that recharges itself, or a phone that warns you on its own.",
|
||||||
"battery_fleet_add": "Add a battery",
|
"battery_fleet_add": "Add a battery",
|
||||||
"battery_fleet_add_hint": "Pick a battery sensor the automatic discovery missed — it joins the roster immediately.",
|
"battery_fleet_add_hint": "Pick a battery sensor the automatic discovery missed — it joins the roster immediately.",
|
||||||
|
"battery_fleet_track_self": "Track self-charging batteries",
|
||||||
|
"battery_fleet_track_self_hint": "Phones, vacuums and other devices that recharge themselves appear as rechargeables — a low one asks for a charge, never for new cells.",
|
||||||
"battery_fleet_status_low": "Low",
|
"battery_fleet_status_low": "Low",
|
||||||
"battery_fleet_status_soon": "Soon",
|
"battery_fleet_status_soon": "Soon",
|
||||||
"battery_fleet_status_ok": "Healthy",
|
"battery_fleet_status_ok": "Healthy",
|
||||||
|
|||||||
@@ -517,6 +517,7 @@
|
|||||||
"group_by_label": "Agrupar por",
|
"group_by_label": "Agrupar por",
|
||||||
"state_value_help": "Usa el valor de estado de HA (normalmente en minúsculas, p. ej. \"on\"/\"off\"). Las mayúsculas se normalizan al guardar.",
|
"state_value_help": "Usa el valor de estado de HA (normalmente en minúsculas, p. ej. \"on\"/\"off\"). Las mayúsculas se normalizan al guardar.",
|
||||||
"target_changes_help": "Número de transiciones coincidentes antes de que se dispare el trigger (predeterminado: 1).",
|
"target_changes_help": "Número de transiciones coincidentes antes de que se dispare el trigger (predeterminado: 1).",
|
||||||
|
"for_minutes_state_help": "0 cuenta cada cambio de inmediato. Con minutos, el nuevo estado debe mantenerse primero — un parpadeo breve entonces ni dispara ni cuenta.",
|
||||||
"qr_print_title": "Imprimir códigos QR",
|
"qr_print_title": "Imprimir códigos QR",
|
||||||
"qr_print_desc": "Genera una página imprimible de códigos QR para recortar y pegar en tus equipos.",
|
"qr_print_desc": "Genera una página imprimible de códigos QR para recortar y pegar en tus equipos.",
|
||||||
"qr_print_load": "Cargar objetos",
|
"qr_print_load": "Cargar objetos",
|
||||||
@@ -584,6 +585,7 @@
|
|||||||
"quick_complete_defaults_feedback_not_needed": "No era necesario",
|
"quick_complete_defaults_feedback_not_needed": "No era necesario",
|
||||||
"quick_complete_success": "Completado rápido",
|
"quick_complete_success": "Completado rápido",
|
||||||
"trigger_replaced": "Disparador reemplazado",
|
"trigger_replaced": "Disparador reemplazado",
|
||||||
|
"trigger_removed": "Disparador eliminado",
|
||||||
"add": "Añadir",
|
"add": "Añadir",
|
||||||
"show_stats": "Mostrar estadísticas + gráficos",
|
"show_stats": "Mostrar estadísticas + gráficos",
|
||||||
"hide_stats": "Ocultar estadísticas",
|
"hide_stats": "Ocultar estadísticas",
|
||||||
@@ -819,6 +821,7 @@
|
|||||||
"schedule_preview_ontime": "Suponiendo finalización puntual.",
|
"schedule_preview_ontime": "Suponiendo finalización puntual.",
|
||||||
"schedule_preview_ends": "(la serie termina)",
|
"schedule_preview_ends": "(la serie termina)",
|
||||||
"adopt_problem_responsible": "Usuario responsable para todas las tareas adoptadas (opcional)",
|
"adopt_problem_responsible": "Usuario responsable para todas las tareas adoptadas (opcional)",
|
||||||
|
"adopt_for_minutes_hint": "Disparar solo si el problema persiste este tiempo — 0 reacciona al primer parpadeo.",
|
||||||
"adopt_problem_configure": "Configurar",
|
"adopt_problem_configure": "Configurar",
|
||||||
"history_auto": "Automático",
|
"history_auto": "Automático",
|
||||||
"battery_fleet_title": "Flota de baterías",
|
"battery_fleet_title": "Flota de baterías",
|
||||||
@@ -838,6 +841,8 @@
|
|||||||
"battery_fleet_all_hint": "Excluye aquí un dispositivo antes de que llegue a avisar de carga baja — un aspirador que se recarga solo o un teléfono que ya avisa por su cuenta.",
|
"battery_fleet_all_hint": "Excluye aquí un dispositivo antes de que llegue a avisar de carga baja — un aspirador que se recarga solo o un teléfono que ya avisa por su cuenta.",
|
||||||
"battery_fleet_add": "Añadir una batería",
|
"battery_fleet_add": "Añadir una batería",
|
||||||
"battery_fleet_add_hint": "Elige un sensor de batería que la detección automática pasó por alto — se une a la lista de inmediato.",
|
"battery_fleet_add_hint": "Elige un sensor de batería que la detección automática pasó por alto — se une a la lista de inmediato.",
|
||||||
|
"battery_fleet_track_self": "Seguir baterías de carga automática",
|
||||||
|
"battery_fleet_track_self_hint": "Teléfonos, aspiradoras y otros dispositivos que se recargan solos aparecen como recargables: si están bajos piden una carga, nunca pilas nuevas.",
|
||||||
"battery_fleet_status_low": "Baja",
|
"battery_fleet_status_low": "Baja",
|
||||||
"battery_fleet_status_soon": "Pronto",
|
"battery_fleet_status_soon": "Pronto",
|
||||||
"battery_fleet_status_ok": "Correcta",
|
"battery_fleet_status_ok": "Correcta",
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
"due_soon": "Pian erääntyy",
|
"due_soon": "Pian erääntyy",
|
||||||
"triggered": "Laukaistu",
|
"triggered": "Laukaistu",
|
||||||
"trigger_replaced": "Laukaisin korvattu",
|
"trigger_replaced": "Laukaisin korvattu",
|
||||||
|
"trigger_removed": "Laukaisin poistettu",
|
||||||
"ok": "OK",
|
"ok": "OK",
|
||||||
"all": "Kaikki",
|
"all": "Kaikki",
|
||||||
"new_object": "+ Uusi kohde",
|
"new_object": "+ Uusi kohde",
|
||||||
@@ -518,6 +519,7 @@
|
|||||||
"group_by_label": "Ryhmittele",
|
"group_by_label": "Ryhmittele",
|
||||||
"state_value_help": "Käytä HA:n tila-arvoa (yleensä pienillä kirjaimilla, esim. \"on\"/\"off\"). Kirjainkoko normalisoidaan tallennettaessa.",
|
"state_value_help": "Käytä HA:n tila-arvoa (yleensä pienillä kirjaimilla, esim. \"on\"/\"off\"). Kirjainkoko normalisoidaan tallennettaessa.",
|
||||||
"target_changes_help": "Vastaavien siirtymien määrä ennen laukaisua (oletus: 1).",
|
"target_changes_help": "Vastaavien siirtymien määrä ennen laukaisua (oletus: 1).",
|
||||||
|
"for_minutes_state_help": "0 laskee jokaisen muutoksen heti. Minuuteilla uuden tilan on ensin pysyttävä — lyhyet välähdykset eivät silloin laukaise eivätkä kirjaudu.",
|
||||||
"qr_print_title": "Tulosta QR-koodit",
|
"qr_print_title": "Tulosta QR-koodit",
|
||||||
"qr_print_desc": "Luo tulostettava sivu QR-koodeja, jotka voit leikata ja kiinnittää laitteisiin.",
|
"qr_print_desc": "Luo tulostettava sivu QR-koodeja, jotka voit leikata ja kiinnittää laitteisiin.",
|
||||||
"qr_print_load": "Lataa kohteet",
|
"qr_print_load": "Lataa kohteet",
|
||||||
@@ -819,6 +821,7 @@
|
|||||||
"schedule_preview_ontime": "Olettaen, että valmistuminen on ajallaan.",
|
"schedule_preview_ontime": "Olettaen, että valmistuminen on ajallaan.",
|
||||||
"schedule_preview_ends": "(sarja päättyy)",
|
"schedule_preview_ends": "(sarja päättyy)",
|
||||||
"adopt_problem_responsible": "Vastuuhenkilö kaikille omaksutuille tehtäville (valinnainen)",
|
"adopt_problem_responsible": "Vastuuhenkilö kaikille omaksutuille tehtäville (valinnainen)",
|
||||||
|
"adopt_for_minutes_hint": "Laukaise vasta kun ongelma on kestänyt näin kauan — 0 reagoi ensimmäiseen välähdykseen.",
|
||||||
"adopt_problem_configure": "Määritä",
|
"adopt_problem_configure": "Määritä",
|
||||||
"history_auto": "Automaattinen",
|
"history_auto": "Automaattinen",
|
||||||
"battery_fleet_title": "Paristokanta",
|
"battery_fleet_title": "Paristokanta",
|
||||||
@@ -838,6 +841,8 @@
|
|||||||
"battery_fleet_all_hint": "Sulje laite pois jo ennen kuin se ilmoittaa alhaisesta varauksesta — imuri, joka lataa itsensä, tai puhelin, joka varoittaa itse.",
|
"battery_fleet_all_hint": "Sulje laite pois jo ennen kuin se ilmoittaa alhaisesta varauksesta — imuri, joka lataa itsensä, tai puhelin, joka varoittaa itse.",
|
||||||
"battery_fleet_add": "Lisää paristo",
|
"battery_fleet_add": "Lisää paristo",
|
||||||
"battery_fleet_add_hint": "Valitse paristoanturi, jonka automaattinen tunnistus ohitti — se liittyy luetteloon heti.",
|
"battery_fleet_add_hint": "Valitse paristoanturi, jonka automaattinen tunnistus ohitti — se liittyy luetteloon heti.",
|
||||||
|
"battery_fleet_track_self": "Seuraa itselatautuvia akkuja",
|
||||||
|
"battery_fleet_track_self_hint": "Puhelimet, imurit ja muut itselatautuvat laitteet näkyvät ladattavina — vähissä oleva pyytää latausta, ei koskaan uusia paristoja.",
|
||||||
"battery_fleet_status_low": "Vähissä",
|
"battery_fleet_status_low": "Vähissä",
|
||||||
"battery_fleet_status_soon": "Pian",
|
"battery_fleet_status_soon": "Pian",
|
||||||
"battery_fleet_status_ok": "Kunnossa",
|
"battery_fleet_status_ok": "Kunnossa",
|
||||||
|
|||||||
@@ -517,6 +517,7 @@
|
|||||||
"group_by_label": "Grouper par",
|
"group_by_label": "Grouper par",
|
||||||
"state_value_help": "Utilisez la valeur d'état HA (généralement en minuscules, p. ex. \"on\"/\"off\"). La casse est normalisée à l'enregistrement.",
|
"state_value_help": "Utilisez la valeur d'état HA (généralement en minuscules, p. ex. \"on\"/\"off\"). La casse est normalisée à l'enregistrement.",
|
||||||
"target_changes_help": "Nombre de transitions correspondantes avant le déclenchement (par défaut : 1).",
|
"target_changes_help": "Nombre de transitions correspondantes avant le déclenchement (par défaut : 1).",
|
||||||
|
"for_minutes_state_help": "0 compte chaque changement immédiatement. Avec des minutes, le nouvel état doit d'abord se maintenir — un bref clignotement ne déclenche ni ne compte alors.",
|
||||||
"qr_print_title": "Imprimer les QR codes",
|
"qr_print_title": "Imprimer les QR codes",
|
||||||
"qr_print_desc": "Générer une page imprimable de QR codes à découper et coller sur votre équipement.",
|
"qr_print_desc": "Générer une page imprimable de QR codes à découper et coller sur votre équipement.",
|
||||||
"qr_print_load": "Charger les objets",
|
"qr_print_load": "Charger les objets",
|
||||||
@@ -584,6 +585,7 @@
|
|||||||
"quick_complete_defaults_feedback_not_needed": "Non nécessaire",
|
"quick_complete_defaults_feedback_not_needed": "Non nécessaire",
|
||||||
"quick_complete_success": "Terminé rapidement",
|
"quick_complete_success": "Terminé rapidement",
|
||||||
"trigger_replaced": "Déclencheur remplacé",
|
"trigger_replaced": "Déclencheur remplacé",
|
||||||
|
"trigger_removed": "Déclencheur supprimé",
|
||||||
"add": "Ajouter",
|
"add": "Ajouter",
|
||||||
"show_stats": "Afficher les statistiques + graphiques",
|
"show_stats": "Afficher les statistiques + graphiques",
|
||||||
"hide_stats": "Masquer les statistiques",
|
"hide_stats": "Masquer les statistiques",
|
||||||
@@ -819,6 +821,7 @@
|
|||||||
"schedule_preview_ontime": "En supposant un achèvement ponctuel.",
|
"schedule_preview_ontime": "En supposant un achèvement ponctuel.",
|
||||||
"schedule_preview_ends": "(fin de la série)",
|
"schedule_preview_ends": "(fin de la série)",
|
||||||
"adopt_problem_responsible": "Personne responsable pour toutes les tâches adoptées (optionnel)",
|
"adopt_problem_responsible": "Personne responsable pour toutes les tâches adoptées (optionnel)",
|
||||||
|
"adopt_for_minutes_hint": "Ne déclencher que si le problème persiste aussi longtemps — 0 réagit au premier clignotement.",
|
||||||
"adopt_problem_configure": "Configurer",
|
"adopt_problem_configure": "Configurer",
|
||||||
"history_auto": "Automatique",
|
"history_auto": "Automatique",
|
||||||
"battery_fleet_title": "Parc de piles",
|
"battery_fleet_title": "Parc de piles",
|
||||||
@@ -838,6 +841,8 @@
|
|||||||
"battery_fleet_all_hint": "Excluez un appareil ici avant même qu'il ne signale une charge faible — un aspirateur qui se recharge seul, ou un téléphone qui vous prévient lui-même.",
|
"battery_fleet_all_hint": "Excluez un appareil ici avant même qu'il ne signale une charge faible — un aspirateur qui se recharge seul, ou un téléphone qui vous prévient lui-même.",
|
||||||
"battery_fleet_add": "Ajouter une batterie",
|
"battery_fleet_add": "Ajouter une batterie",
|
||||||
"battery_fleet_add_hint": "Choisissez un capteur de batterie que la détection automatique a manqué — il rejoint la liste immédiatement.",
|
"battery_fleet_add_hint": "Choisissez un capteur de batterie que la détection automatique a manqué — il rejoint la liste immédiatement.",
|
||||||
|
"battery_fleet_track_self": "Suivre les batteries à recharge automatique",
|
||||||
|
"battery_fleet_track_self_hint": "Les téléphones, aspirateurs et autres appareils qui se rechargent seuls apparaissent comme rechargeables — un niveau bas demande une recharge, jamais de nouvelles piles.",
|
||||||
"battery_fleet_status_low": "Faible",
|
"battery_fleet_status_low": "Faible",
|
||||||
"battery_fleet_status_soon": "Bientôt",
|
"battery_fleet_status_soon": "Bientôt",
|
||||||
"battery_fleet_status_ok": "Bon état",
|
"battery_fleet_status_ok": "Bon état",
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
"due_soon": "जल्द देय",
|
"due_soon": "जल्द देय",
|
||||||
"triggered": "ट्रिगर हुआ",
|
"triggered": "ट्रिगर हुआ",
|
||||||
"trigger_replaced": "ट्रिगर बदला गया",
|
"trigger_replaced": "ट्रिगर बदला गया",
|
||||||
|
"trigger_removed": "ट्रिगर हटाया गया",
|
||||||
"ok": "ठीक",
|
"ok": "ठीक",
|
||||||
"all": "सभी",
|
"all": "सभी",
|
||||||
"new_object": "+ नई वस्तु",
|
"new_object": "+ नई वस्तु",
|
||||||
@@ -518,6 +519,7 @@
|
|||||||
"group_by_label": "इसके अनुसार समूहित करें",
|
"group_by_label": "इसके अनुसार समूहित करें",
|
||||||
"state_value_help": "HA स्थिति मान का उपयोग करें (आमतौर पर लोअरकेस, उदा. \"on\"/\"off\")। सहेजने पर केस सामान्यीकृत हो जाता है।",
|
"state_value_help": "HA स्थिति मान का उपयोग करें (आमतौर पर लोअरकेस, उदा. \"on\"/\"off\")। सहेजने पर केस सामान्यीकृत हो जाता है।",
|
||||||
"target_changes_help": "ट्रिगर होने से पहले मिलान वाले संक्रमणों की संख्या (डिफ़ॉल्ट: 1)।",
|
"target_changes_help": "ट्रिगर होने से पहले मिलान वाले संक्रमणों की संख्या (डिफ़ॉल्ट: 1)।",
|
||||||
|
"for_minutes_state_help": "0 हर परिवर्तन को तुरंत गिनता है। मिनट सेट करने पर नई स्थिति को पहले उतनी देर बनी रहनी होगी — क्षणिक झिलमिलाहट तब न ट्रिगर करती है न गिनी जाती है।",
|
||||||
"qr_print_title": "QR कोड प्रिंट करें",
|
"qr_print_title": "QR कोड प्रिंट करें",
|
||||||
"qr_print_desc": "अपने उपकरण पर काटकर चिपकाने के लिए QR कोड का प्रिंट-योग्य पृष्ठ बनाएँ।",
|
"qr_print_desc": "अपने उपकरण पर काटकर चिपकाने के लिए QR कोड का प्रिंट-योग्य पृष्ठ बनाएँ।",
|
||||||
"qr_print_load": "वस्तुएँ लोड करें",
|
"qr_print_load": "वस्तुएँ लोड करें",
|
||||||
@@ -819,6 +821,7 @@
|
|||||||
"schedule_preview_ontime": "समय पर पूर्णता मानते हुए।",
|
"schedule_preview_ontime": "समय पर पूर्णता मानते हुए।",
|
||||||
"schedule_preview_ends": "(श्रृंखला समाप्त)",
|
"schedule_preview_ends": "(श्रृंखला समाप्त)",
|
||||||
"adopt_problem_responsible": "सभी अपनाए गए कार्यों के लिए ज़िम्मेदार उपयोगकर्ता (वैकल्पिक)",
|
"adopt_problem_responsible": "सभी अपनाए गए कार्यों के लिए ज़िम्मेदार उपयोगकर्ता (वैकल्पिक)",
|
||||||
|
"adopt_for_minutes_hint": "समस्या इतनी देर बनी रहने पर ही ट्रिगर करें — 0 पहली झिलमिलाहट पर प्रतिक्रिया करता है।",
|
||||||
"adopt_problem_configure": "कॉन्फ़िगर करें",
|
"adopt_problem_configure": "कॉन्फ़िगर करें",
|
||||||
"history_auto": "स्वचालित",
|
"history_auto": "स्वचालित",
|
||||||
"battery_fleet_title": "बैटरी फ्लीट",
|
"battery_fleet_title": "बैटरी फ्लीट",
|
||||||
@@ -838,6 +841,8 @@
|
|||||||
"battery_fleet_all_hint": "किसी डिवाइस को यहाँ कम बैटरी बताने से पहले ही बाहर रखें — जैसे खुद चार्ज होने वाला वैक्यूम, या खुद ही चेतावनी देने वाला फ़ोन।",
|
"battery_fleet_all_hint": "किसी डिवाइस को यहाँ कम बैटरी बताने से पहले ही बाहर रखें — जैसे खुद चार्ज होने वाला वैक्यूम, या खुद ही चेतावनी देने वाला फ़ोन।",
|
||||||
"battery_fleet_add": "बैटरी जोड़ें",
|
"battery_fleet_add": "बैटरी जोड़ें",
|
||||||
"battery_fleet_add_hint": "स्वचालित खोज से छूटा बैटरी सेंसर चुनें — यह तुरंत सूची में जुड़ जाएगा।",
|
"battery_fleet_add_hint": "स्वचालित खोज से छूटा बैटरी सेंसर चुनें — यह तुरंत सूची में जुड़ जाएगा।",
|
||||||
|
"battery_fleet_track_self": "स्वयं चार्ज होने वाली बैटरियों को ट्रैक करें",
|
||||||
|
"battery_fleet_track_self_hint": "फ़ोन, वैक्यूम और अन्य स्वयं चार्ज होने वाले उपकरण रिचार्जेबल के रूप में दिखते हैं — कम होने पर चार्ज करने को कहा जाता है, नई बैटरी कभी नहीं।",
|
||||||
"battery_fleet_status_low": "कम",
|
"battery_fleet_status_low": "कम",
|
||||||
"battery_fleet_status_soon": "जल्द",
|
"battery_fleet_status_soon": "जल्द",
|
||||||
"battery_fleet_status_ok": "ठीक",
|
"battery_fleet_status_ok": "ठीक",
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
"due_soon": "Hamarosan esedékes",
|
"due_soon": "Hamarosan esedékes",
|
||||||
"triggered": "Aktiválva",
|
"triggered": "Aktiválva",
|
||||||
"trigger_replaced": "Kiváltó lecserélve",
|
"trigger_replaced": "Kiváltó lecserélve",
|
||||||
|
"trigger_removed": "Eseményindító eltávolítva",
|
||||||
"ok": "OK",
|
"ok": "OK",
|
||||||
"all": "Összes",
|
"all": "Összes",
|
||||||
"new_object": "+ Új objektum",
|
"new_object": "+ Új objektum",
|
||||||
@@ -524,6 +525,7 @@
|
|||||||
"group_by_label": "Csoportosítás",
|
"group_by_label": "Csoportosítás",
|
||||||
"state_value_help": "A HA állapotértékét használja (általában kisbetűs, pl. „on”/„off”). A kis- és nagybetűk mentéskor normalizálódnak.",
|
"state_value_help": "A HA állapotértékét használja (általában kisbetűs, pl. „on”/„off”). A kis- és nagybetűk mentéskor normalizálódnak.",
|
||||||
"target_changes_help": "Az egyező átmenetek száma a kiváltás előtt (alapértelmezés: 1).",
|
"target_changes_help": "Az egyező átmenetek száma a kiváltás előtt (alapértelmezés: 1).",
|
||||||
|
"for_minutes_state_help": "A 0 minden változást azonnal számol. Percekkel az új állapotnak előbb fenn kell maradnia — a rövid villanás ekkor se nem indít, se nem számít.",
|
||||||
"qr_print_title": "QR-kódok nyomtatása",
|
"qr_print_title": "QR-kódok nyomtatása",
|
||||||
"qr_print_desc": "Nyomtatható oldal QR-kódokkal — vágja ki és ragassza fel a berendezésekre.",
|
"qr_print_desc": "Nyomtatható oldal QR-kódokkal — vágja ki és ragassza fel a berendezésekre.",
|
||||||
"qr_print_load": "Objektumok betöltése",
|
"qr_print_load": "Objektumok betöltése",
|
||||||
@@ -819,6 +821,7 @@
|
|||||||
"schedule_preview_ontime": "Időben történő elvégzést feltételezve.",
|
"schedule_preview_ontime": "Időben történő elvégzést feltételezve.",
|
||||||
"schedule_preview_ends": "(a sorozat véget ér)",
|
"schedule_preview_ends": "(a sorozat véget ér)",
|
||||||
"adopt_problem_responsible": "Felelős felhasználó az összes átvett feladathoz (opcionális)",
|
"adopt_problem_responsible": "Felelős felhasználó az összes átvett feladathoz (opcionális)",
|
||||||
|
"adopt_for_minutes_hint": "Csak akkor induljon, ha a probléma ennyi ideig fennáll — a 0 az első villanásra reagál.",
|
||||||
"adopt_problem_configure": "Beállítás",
|
"adopt_problem_configure": "Beállítás",
|
||||||
"history_auto": "Automatikus",
|
"history_auto": "Automatikus",
|
||||||
"battery_fleet_title": "Elemflotta",
|
"battery_fleet_title": "Elemflotta",
|
||||||
@@ -838,6 +841,8 @@
|
|||||||
"battery_fleet_all_hint": "Zárjon ki egy eszközt már azelőtt, hogy alacsony töltöttséget jelezne — például egy magát töltő porszívót vagy egy telefont, amely magától figyelmeztet.",
|
"battery_fleet_all_hint": "Zárjon ki egy eszközt már azelőtt, hogy alacsony töltöttséget jelezne — például egy magát töltő porszívót vagy egy telefont, amely magától figyelmeztet.",
|
||||||
"battery_fleet_add": "Elem hozzáadása",
|
"battery_fleet_add": "Elem hozzáadása",
|
||||||
"battery_fleet_add_hint": "Válassz egy elem-érzékelőt, amelyet az automatikus felismerés kihagyott — azonnal felkerül a listára.",
|
"battery_fleet_add_hint": "Válassz egy elem-érzékelőt, amelyet az automatikus felismerés kihagyott — azonnal felkerül a listára.",
|
||||||
|
"battery_fleet_track_self": "Öntöltő akkumulátorok követése",
|
||||||
|
"battery_fleet_track_self_hint": "A telefonok, porszívók és más öntöltő eszközök akkumulátorként jelennek meg — alacsony töltöttségnél töltést kérnek, sosem új elemet.",
|
||||||
"battery_fleet_status_low": "Alacsony",
|
"battery_fleet_status_low": "Alacsony",
|
||||||
"battery_fleet_status_soon": "Hamarosan",
|
"battery_fleet_status_soon": "Hamarosan",
|
||||||
"battery_fleet_status_ok": "Rendben",
|
"battery_fleet_status_ok": "Rendben",
|
||||||
|
|||||||
@@ -517,6 +517,7 @@
|
|||||||
"group_by_label": "Raggruppa per",
|
"group_by_label": "Raggruppa per",
|
||||||
"state_value_help": "Usa il valore di stato HA (di solito minuscolo, es. \"on\"/\"off\"). Il case viene normalizzato al salvataggio.",
|
"state_value_help": "Usa il valore di stato HA (di solito minuscolo, es. \"on\"/\"off\"). Il case viene normalizzato al salvataggio.",
|
||||||
"target_changes_help": "Numero di transizioni corrispondenti prima che il trigger si attivi (predefinito: 1).",
|
"target_changes_help": "Numero di transizioni corrispondenti prima che il trigger si attivi (predefinito: 1).",
|
||||||
|
"for_minutes_state_help": "0 conta ogni cambiamento subito. Con i minuti, il nuovo stato deve prima mantenersi — un breve sfarfallio allora non attiva né conta.",
|
||||||
"qr_print_title": "Stampa codici QR",
|
"qr_print_title": "Stampa codici QR",
|
||||||
"qr_print_desc": "Genera una pagina stampabile di codici QR da ritagliare e applicare sulle apparecchiature.",
|
"qr_print_desc": "Genera una pagina stampabile di codici QR da ritagliare e applicare sulle apparecchiature.",
|
||||||
"qr_print_load": "Carica oggetti",
|
"qr_print_load": "Carica oggetti",
|
||||||
@@ -584,6 +585,7 @@
|
|||||||
"quick_complete_defaults_feedback_not_needed": "Non necessario",
|
"quick_complete_defaults_feedback_not_needed": "Non necessario",
|
||||||
"quick_complete_success": "Completato rapidamente",
|
"quick_complete_success": "Completato rapidamente",
|
||||||
"trigger_replaced": "Trigger sostituito",
|
"trigger_replaced": "Trigger sostituito",
|
||||||
|
"trigger_removed": "Trigger rimosso",
|
||||||
"add": "Aggiungi",
|
"add": "Aggiungi",
|
||||||
"show_stats": "Mostra statistiche + grafici",
|
"show_stats": "Mostra statistiche + grafici",
|
||||||
"hide_stats": "Nascondi statistiche",
|
"hide_stats": "Nascondi statistiche",
|
||||||
@@ -819,6 +821,7 @@
|
|||||||
"schedule_preview_ontime": "Presumendo un completamento puntuale.",
|
"schedule_preview_ontime": "Presumendo un completamento puntuale.",
|
||||||
"schedule_preview_ends": "(la serie termina)",
|
"schedule_preview_ends": "(la serie termina)",
|
||||||
"adopt_problem_responsible": "Utente responsabile per tutte le attività adottate (opzionale)",
|
"adopt_problem_responsible": "Utente responsabile per tutte le attività adottate (opzionale)",
|
||||||
|
"adopt_for_minutes_hint": "Attiva solo se il problema persiste per questo tempo — 0 reagisce al primo sfarfallio.",
|
||||||
"adopt_problem_configure": "Configura",
|
"adopt_problem_configure": "Configura",
|
||||||
"history_auto": "Automatico",
|
"history_auto": "Automatico",
|
||||||
"battery_fleet_title": "Parco batterie",
|
"battery_fleet_title": "Parco batterie",
|
||||||
@@ -838,6 +841,8 @@
|
|||||||
"battery_fleet_all_hint": "Escludi qui un dispositivo prima ancora che segnali la batteria scarica — un aspirapolvere che si ricarica da solo o un telefono che avvisa da sé.",
|
"battery_fleet_all_hint": "Escludi qui un dispositivo prima ancora che segnali la batteria scarica — un aspirapolvere che si ricarica da solo o un telefono che avvisa da sé.",
|
||||||
"battery_fleet_add": "Aggiungi una batteria",
|
"battery_fleet_add": "Aggiungi una batteria",
|
||||||
"battery_fleet_add_hint": "Scegli un sensore batteria sfuggito al rilevamento automatico — entra subito nell'elenco.",
|
"battery_fleet_add_hint": "Scegli un sensore batteria sfuggito al rilevamento automatico — entra subito nell'elenco.",
|
||||||
|
"battery_fleet_track_self": "Traccia le batterie autoricaricabili",
|
||||||
|
"battery_fleet_track_self_hint": "Telefoni, aspirapolvere e altri dispositivi che si ricaricano da soli appaiono come ricaricabili — se scarichi chiedono una ricarica, mai batterie nuove.",
|
||||||
"battery_fleet_status_low": "Scarica",
|
"battery_fleet_status_low": "Scarica",
|
||||||
"battery_fleet_status_soon": "A breve",
|
"battery_fleet_status_soon": "A breve",
|
||||||
"battery_fleet_status_ok": "A posto",
|
"battery_fleet_status_ok": "A posto",
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
"due_soon": "期限間近",
|
"due_soon": "期限間近",
|
||||||
"triggered": "トリガー発生",
|
"triggered": "トリガー発生",
|
||||||
"trigger_replaced": "トリガー解除済み",
|
"trigger_replaced": "トリガー解除済み",
|
||||||
|
"trigger_removed": "トリガーを削除しました",
|
||||||
"ok": "OK",
|
"ok": "OK",
|
||||||
"all": "すべて",
|
"all": "すべて",
|
||||||
"new_object": "+ 新規対象",
|
"new_object": "+ 新規対象",
|
||||||
@@ -518,6 +519,7 @@
|
|||||||
"group_by_label": "グループ化",
|
"group_by_label": "グループ化",
|
||||||
"state_value_help": "HAの状態値を使用してください(通常は小文字、例: \"on\"/\"off\")。保存時に大文字小文字は正規化されます。",
|
"state_value_help": "HAの状態値を使用してください(通常は小文字、例: \"on\"/\"off\")。保存時に大文字小文字は正規化されます。",
|
||||||
"target_changes_help": "トリガーが発生するまでに一致する遷移の回数(既定: 1)。",
|
"target_changes_help": "トリガーが発生するまでに一致する遷移の回数(既定: 1)。",
|
||||||
|
"for_minutes_state_help": "0 はすべての変化を即座にカウントします。分を設定すると新しい状態がその時間続く必要があり、一瞬の変動はトリガーもカウントもされません。",
|
||||||
"qr_print_title": "QRコードを印刷",
|
"qr_print_title": "QRコードを印刷",
|
||||||
"qr_print_desc": "切り取って機器に貼れるQRコードの印刷ページを生成します。",
|
"qr_print_desc": "切り取って機器に貼れるQRコードの印刷ページを生成します。",
|
||||||
"qr_print_load": "対象を読み込む",
|
"qr_print_load": "対象を読み込む",
|
||||||
@@ -819,6 +821,7 @@
|
|||||||
"schedule_preview_ontime": "期日どおりに完了した場合。",
|
"schedule_preview_ontime": "期日どおりに完了した場合。",
|
||||||
"schedule_preview_ends": "(シリーズ終了)",
|
"schedule_preview_ends": "(シリーズ終了)",
|
||||||
"adopt_problem_responsible": "採用したすべてのタスクの担当ユーザー(任意)",
|
"adopt_problem_responsible": "採用したすべてのタスクの担当ユーザー(任意)",
|
||||||
|
"adopt_for_minutes_hint": "問題がこの時間続いた場合にのみトリガーします。0 は最初の変動に即反応します。",
|
||||||
"adopt_problem_configure": "設定",
|
"adopt_problem_configure": "設定",
|
||||||
"history_auto": "自動",
|
"history_auto": "自動",
|
||||||
"battery_fleet_title": "電池フリート",
|
"battery_fleet_title": "電池フリート",
|
||||||
@@ -838,6 +841,8 @@
|
|||||||
"battery_fleet_all_hint": "電池残量が少ないと報告される前に、ここで機器を除外できます — 自動充電するロボット掃除機や、自分で警告するスマートフォンなど。",
|
"battery_fleet_all_hint": "電池残量が少ないと報告される前に、ここで機器を除外できます — 自動充電するロボット掃除機や、自分で警告するスマートフォンなど。",
|
||||||
"battery_fleet_add": "電池を追加",
|
"battery_fleet_add": "電池を追加",
|
||||||
"battery_fleet_add_hint": "自動検出が見逃した電池センサーを選択すると、すぐに一覧に追加されます。",
|
"battery_fleet_add_hint": "自動検出が見逃した電池センサーを選択すると、すぐに一覧に追加されます。",
|
||||||
|
"battery_fleet_track_self": "自己充電式バッテリーを追跡",
|
||||||
|
"battery_fleet_track_self_hint": "スマートフォンや掃除機など自己充電するデバイスは充電式として表示されます。残量が少ないときは充電を促し、電池交換は求めません。",
|
||||||
"battery_fleet_status_low": "残量低下",
|
"battery_fleet_status_low": "残量低下",
|
||||||
"battery_fleet_status_soon": "まもなく",
|
"battery_fleet_status_soon": "まもなく",
|
||||||
"battery_fleet_status_ok": "良好",
|
"battery_fleet_status_ok": "良好",
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
"due_soon": "기한 임박",
|
"due_soon": "기한 임박",
|
||||||
"triggered": "트리거됨",
|
"triggered": "트리거됨",
|
||||||
"trigger_replaced": "트리거 교체됨",
|
"trigger_replaced": "트리거 교체됨",
|
||||||
|
"trigger_removed": "트리거 제거됨",
|
||||||
"ok": "정상",
|
"ok": "정상",
|
||||||
"all": "전체",
|
"all": "전체",
|
||||||
"new_object": "+ 새 객체",
|
"new_object": "+ 새 객체",
|
||||||
@@ -524,6 +525,7 @@
|
|||||||
"group_by_label": "그룹화",
|
"group_by_label": "그룹화",
|
||||||
"state_value_help": "HA 상태 값을 사용하세요(보통 소문자, 예: \"on\"/\"off\"). 대소문자는 저장 시 정규화됩니다.",
|
"state_value_help": "HA 상태 값을 사용하세요(보통 소문자, 예: \"on\"/\"off\"). 대소문자는 저장 시 정규화됩니다.",
|
||||||
"target_changes_help": "트리거가 발동하기까지 필요한 일치 전환 횟수입니다 (기본값: 1).",
|
"target_changes_help": "트리거가 발동하기까지 필요한 일치 전환 횟수입니다 (기본값: 1).",
|
||||||
|
"for_minutes_state_help": "0은 모든 변화를 즉시 집계합니다. 분을 설정하면 새 상태가 먼저 그 시간 동안 유지되어야 하며, 짧은 깜빡임은 트리거되지도 집계되지도 않습니다.",
|
||||||
"qr_print_title": "QR 코드 인쇄",
|
"qr_print_title": "QR 코드 인쇄",
|
||||||
"qr_print_desc": "잘라서 장비에 붙일 수 있는 QR 코드 인쇄 페이지를 생성합니다.",
|
"qr_print_desc": "잘라서 장비에 붙일 수 있는 QR 코드 인쇄 페이지를 생성합니다.",
|
||||||
"qr_print_load": "객체 불러오기",
|
"qr_print_load": "객체 불러오기",
|
||||||
@@ -819,6 +821,7 @@
|
|||||||
"schedule_preview_ontime": "제때 완료한다고 가정한 일정입니다.",
|
"schedule_preview_ontime": "제때 완료한다고 가정한 일정입니다.",
|
||||||
"schedule_preview_ends": "(시리즈 종료)",
|
"schedule_preview_ends": "(시리즈 종료)",
|
||||||
"adopt_problem_responsible": "가져온 모든 작업의 담당자 (선택)",
|
"adopt_problem_responsible": "가져온 모든 작업의 담당자 (선택)",
|
||||||
|
"adopt_for_minutes_hint": "문제가 이 시간 동안 지속된 경우에만 트리거합니다. 0은 첫 깜빡임에 즉시 반응합니다.",
|
||||||
"adopt_problem_configure": "구성",
|
"adopt_problem_configure": "구성",
|
||||||
"history_auto": "자동",
|
"history_auto": "자동",
|
||||||
"battery_fleet_title": "배터리 플릿",
|
"battery_fleet_title": "배터리 플릿",
|
||||||
@@ -838,6 +841,8 @@
|
|||||||
"battery_fleet_all_hint": "배터리 부족을 알리기 전에 여기에서 기기를 제외하세요 — 스스로 충전하는 로봇청소기나 자체적으로 경고하는 휴대폰처럼.",
|
"battery_fleet_all_hint": "배터리 부족을 알리기 전에 여기에서 기기를 제외하세요 — 스스로 충전하는 로봇청소기나 자체적으로 경고하는 휴대폰처럼.",
|
||||||
"battery_fleet_add": "배터리 추가",
|
"battery_fleet_add": "배터리 추가",
|
||||||
"battery_fleet_add_hint": "자동 검색이 놓친 배터리 센서를 선택하면 즉시 목록에 추가됩니다.",
|
"battery_fleet_add_hint": "자동 검색이 놓친 배터리 센서를 선택하면 즉시 목록에 추가됩니다.",
|
||||||
|
"battery_fleet_track_self": "자체 충전 배터리 추적",
|
||||||
|
"battery_fleet_track_self_hint": "휴대폰, 청소기 등 스스로 충전되는 기기는 충전식으로 표시됩니다. 잔량이 낮으면 충전을 요청하며 새 전지를 요구하지 않습니다.",
|
||||||
"battery_fleet_status_low": "부족",
|
"battery_fleet_status_low": "부족",
|
||||||
"battery_fleet_status_soon": "곧",
|
"battery_fleet_status_soon": "곧",
|
||||||
"battery_fleet_status_ok": "정상",
|
"battery_fleet_status_ok": "정상",
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
"due_soon": "Forfaller snart",
|
"due_soon": "Forfaller snart",
|
||||||
"triggered": "Utløst",
|
"triggered": "Utløst",
|
||||||
"trigger_replaced": "Utløser erstattet",
|
"trigger_replaced": "Utløser erstattet",
|
||||||
|
"trigger_removed": "Utløser fjernet",
|
||||||
"ok": "OK",
|
"ok": "OK",
|
||||||
"all": "Alle",
|
"all": "Alle",
|
||||||
"new_object": "+ Nytt objekt",
|
"new_object": "+ Nytt objekt",
|
||||||
@@ -518,6 +519,7 @@
|
|||||||
"group_by_label": "Grupper etter",
|
"group_by_label": "Grupper etter",
|
||||||
"state_value_help": "Bruk HA-tilstandsverdien (vanligvis små bokstaver, f.eks. \"on\"/\"off\"). Store/små bokstaver normaliseres ved lagring.",
|
"state_value_help": "Bruk HA-tilstandsverdien (vanligvis små bokstaver, f.eks. \"on\"/\"off\"). Store/små bokstaver normaliseres ved lagring.",
|
||||||
"target_changes_help": "Antall samsvarende overganger før utløseren aktiveres (standard: 1).",
|
"target_changes_help": "Antall samsvarende overganger før utløseren aktiveres (standard: 1).",
|
||||||
|
"for_minutes_state_help": "0 teller hver endring umiddelbart. Med minutter må den nye tilstanden først holde seg — korte blink verken utløser eller telles da.",
|
||||||
"qr_print_title": "Skriv ut QR-koder",
|
"qr_print_title": "Skriv ut QR-koder",
|
||||||
"qr_print_desc": "Generer en utskrivbar side med QR-koder som kan klippes ut og festes på utstyret ditt.",
|
"qr_print_desc": "Generer en utskrivbar side med QR-koder som kan klippes ut og festes på utstyret ditt.",
|
||||||
"qr_print_load": "Last objekter",
|
"qr_print_load": "Last objekter",
|
||||||
@@ -819,6 +821,7 @@
|
|||||||
"schedule_preview_ontime": "Forutsatt fullføring i tide.",
|
"schedule_preview_ontime": "Forutsatt fullføring i tide.",
|
||||||
"schedule_preview_ends": "(serien avsluttes)",
|
"schedule_preview_ends": "(serien avsluttes)",
|
||||||
"adopt_problem_responsible": "Ansvarlig bruker for alle overtatte oppgaver (valgfritt)",
|
"adopt_problem_responsible": "Ansvarlig bruker for alle overtatte oppgaver (valgfritt)",
|
||||||
|
"adopt_for_minutes_hint": "Utløs først når problemet har vart så lenge — 0 reagerer på første blink.",
|
||||||
"adopt_problem_configure": "Konfigurer",
|
"adopt_problem_configure": "Konfigurer",
|
||||||
"history_auto": "Automatisk",
|
"history_auto": "Automatisk",
|
||||||
"battery_fleet_title": "Batteriflåte",
|
"battery_fleet_title": "Batteriflåte",
|
||||||
@@ -838,6 +841,8 @@
|
|||||||
"battery_fleet_all_hint": "Utelukk en enhet her før den i det hele tatt melder lavt nivå — en støvsuger som lader seg selv, eller en telefon som varsler av seg selv.",
|
"battery_fleet_all_hint": "Utelukk en enhet her før den i det hele tatt melder lavt nivå — en støvsuger som lader seg selv, eller en telefon som varsler av seg selv.",
|
||||||
"battery_fleet_add": "Legg til et batteri",
|
"battery_fleet_add": "Legg til et batteri",
|
||||||
"battery_fleet_add_hint": "Velg en batterisensor som den automatiske gjenkjenningen overså — den blir med i listen umiddelbart.",
|
"battery_fleet_add_hint": "Velg en batterisensor som den automatiske gjenkjenningen overså — den blir med i listen umiddelbart.",
|
||||||
|
"battery_fleet_track_self": "Spor selvladende batterier",
|
||||||
|
"battery_fleet_track_self_hint": "Telefoner, støvsugere og andre selvladende enheter vises som oppladbare — ved lavt nivå bes det om lading, aldri om nye batterier.",
|
||||||
"battery_fleet_status_low": "Lav",
|
"battery_fleet_status_low": "Lav",
|
||||||
"battery_fleet_status_soon": "Snart",
|
"battery_fleet_status_soon": "Snart",
|
||||||
"battery_fleet_status_ok": "I orden",
|
"battery_fleet_status_ok": "I orden",
|
||||||
|
|||||||
@@ -517,6 +517,7 @@
|
|||||||
"group_by_label": "Groeperen op",
|
"group_by_label": "Groeperen op",
|
||||||
"state_value_help": "Gebruik de HA-statuswaarde (meestal in kleine letters, bv. \"on\"/\"off\"). Hoofdletters worden bij opslaan genormaliseerd.",
|
"state_value_help": "Gebruik de HA-statuswaarde (meestal in kleine letters, bv. \"on\"/\"off\"). Hoofdletters worden bij opslaan genormaliseerd.",
|
||||||
"target_changes_help": "Aantal overeenkomende overgangen voordat de trigger wordt geactiveerd (standaard: 1).",
|
"target_changes_help": "Aantal overeenkomende overgangen voordat de trigger wordt geactiveerd (standaard: 1).",
|
||||||
|
"for_minutes_state_help": "0 telt elke wijziging direct. Met minuten moet de nieuwe status eerst zo lang aanhouden — kort flikkeren triggert dan niet en telt niet mee.",
|
||||||
"qr_print_title": "QR-codes afdrukken",
|
"qr_print_title": "QR-codes afdrukken",
|
||||||
"qr_print_desc": "Genereer een afdrukpagina met QR-codes om uit te knippen en op je apparaten te plakken.",
|
"qr_print_desc": "Genereer een afdrukpagina met QR-codes om uit te knippen en op je apparaten te plakken.",
|
||||||
"qr_print_load": "Objecten laden",
|
"qr_print_load": "Objecten laden",
|
||||||
@@ -584,6 +585,7 @@
|
|||||||
"quick_complete_defaults_feedback_not_needed": "Niet nodig",
|
"quick_complete_defaults_feedback_not_needed": "Niet nodig",
|
||||||
"quick_complete_success": "Snel als voltooid gemarkeerd",
|
"quick_complete_success": "Snel als voltooid gemarkeerd",
|
||||||
"trigger_replaced": "Trigger vervangen",
|
"trigger_replaced": "Trigger vervangen",
|
||||||
|
"trigger_removed": "Trigger verwijderd",
|
||||||
"add": "Toevoegen",
|
"add": "Toevoegen",
|
||||||
"show_stats": "Statistieken + grafieken tonen",
|
"show_stats": "Statistieken + grafieken tonen",
|
||||||
"hide_stats": "Statistieken verbergen",
|
"hide_stats": "Statistieken verbergen",
|
||||||
@@ -819,6 +821,7 @@
|
|||||||
"schedule_preview_ontime": "Uitgaande van tijdige afronding.",
|
"schedule_preview_ontime": "Uitgaande van tijdige afronding.",
|
||||||
"schedule_preview_ends": "(reeks eindigt)",
|
"schedule_preview_ends": "(reeks eindigt)",
|
||||||
"adopt_problem_responsible": "Verantwoordelijke gebruiker voor alle overgenomen taken (optioneel)",
|
"adopt_problem_responsible": "Verantwoordelijke gebruiker voor alle overgenomen taken (optioneel)",
|
||||||
|
"adopt_for_minutes_hint": "Pas triggeren als het probleem zo lang aanhoudt — 0 reageert op de eerste flikkering.",
|
||||||
"adopt_problem_configure": "Configureren",
|
"adopt_problem_configure": "Configureren",
|
||||||
"history_auto": "Automatisch",
|
"history_auto": "Automatisch",
|
||||||
"battery_fleet_title": "Batterijvloot",
|
"battery_fleet_title": "Batterijvloot",
|
||||||
@@ -838,6 +841,8 @@
|
|||||||
"battery_fleet_all_hint": "Sluit een apparaat hier uit voordat het ooit laag meldt — een stofzuiger die zichzelf oplaadt, of een telefoon die zelf waarschuwt.",
|
"battery_fleet_all_hint": "Sluit een apparaat hier uit voordat het ooit laag meldt — een stofzuiger die zichzelf oplaadt, of een telefoon die zelf waarschuwt.",
|
||||||
"battery_fleet_add": "Batterij toevoegen",
|
"battery_fleet_add": "Batterij toevoegen",
|
||||||
"battery_fleet_add_hint": "Kies een batterijsensor die de automatische detectie heeft gemist — hij verschijnt direct in de lijst.",
|
"battery_fleet_add_hint": "Kies een batterijsensor die de automatische detectie heeft gemist — hij verschijnt direct in de lijst.",
|
||||||
|
"battery_fleet_track_self": "Zelfopladende batterijen volgen",
|
||||||
|
"battery_fleet_track_self_hint": "Telefoons, stofzuigers en andere zelfopladende apparaten verschijnen als oplaadbaar — bij een lage stand wordt om opladen gevraagd, nooit om nieuwe batterijen.",
|
||||||
"battery_fleet_status_low": "Laag",
|
"battery_fleet_status_low": "Laag",
|
||||||
"battery_fleet_status_soon": "Binnenkort",
|
"battery_fleet_status_soon": "Binnenkort",
|
||||||
"battery_fleet_status_ok": "In orde",
|
"battery_fleet_status_ok": "In orde",
|
||||||
|
|||||||
@@ -517,6 +517,7 @@
|
|||||||
"group_by_label": "Grupuj wg",
|
"group_by_label": "Grupuj wg",
|
||||||
"state_value_help": "Użyj wartości stanu HA (zwykle małymi literami, np. \"on\"/\"off\"). Wielkość liter jest normalizowana przy zapisie.",
|
"state_value_help": "Użyj wartości stanu HA (zwykle małymi literami, np. \"on\"/\"off\"). Wielkość liter jest normalizowana przy zapisie.",
|
||||||
"target_changes_help": "Liczba pasujących przejść przed wyzwoleniem (domyślnie: 1).",
|
"target_changes_help": "Liczba pasujących przejść przed wyzwoleniem (domyślnie: 1).",
|
||||||
|
"for_minutes_state_help": "0 liczy każdą zmianę od razu. Z minutami nowy stan musi się najpierw utrzymać — krótkie mignięcia wtedy nie wyzwalają i nie liczą się.",
|
||||||
"qr_print_title": "Drukuj kody QR",
|
"qr_print_title": "Drukuj kody QR",
|
||||||
"qr_print_desc": "Wygeneruj stronę do druku z kodami QR do wycięcia i naklejenia na sprzęcie.",
|
"qr_print_desc": "Wygeneruj stronę do druku z kodami QR do wycięcia i naklejenia na sprzęcie.",
|
||||||
"qr_print_load": "Załaduj obiekty",
|
"qr_print_load": "Załaduj obiekty",
|
||||||
@@ -584,6 +585,7 @@
|
|||||||
"quick_complete_defaults_feedback_not_needed": "Nie było potrzebne",
|
"quick_complete_defaults_feedback_not_needed": "Nie było potrzebne",
|
||||||
"quick_complete_success": "Szybko oznaczono jako wykonane",
|
"quick_complete_success": "Szybko oznaczono jako wykonane",
|
||||||
"trigger_replaced": "Wyzwalacz zastąpiony",
|
"trigger_replaced": "Wyzwalacz zastąpiony",
|
||||||
|
"trigger_removed": "Wyzwalacz usunięty",
|
||||||
"add": "Dodaj",
|
"add": "Dodaj",
|
||||||
"show_stats": "Pokaż statystyki + wykresy",
|
"show_stats": "Pokaż statystyki + wykresy",
|
||||||
"hide_stats": "Ukryj statystyki",
|
"hide_stats": "Ukryj statystyki",
|
||||||
@@ -819,6 +821,7 @@
|
|||||||
"schedule_preview_ontime": "Przy założeniu terminowego ukończenia.",
|
"schedule_preview_ontime": "Przy założeniu terminowego ukończenia.",
|
||||||
"schedule_preview_ends": "(seria się kończy)",
|
"schedule_preview_ends": "(seria się kończy)",
|
||||||
"adopt_problem_responsible": "Osoba odpowiedzialna za wszystkie przejęte zadania (opcjonalnie)",
|
"adopt_problem_responsible": "Osoba odpowiedzialna za wszystkie przejęte zadania (opcjonalnie)",
|
||||||
|
"adopt_for_minutes_hint": "Wyzwalaj dopiero, gdy problem utrzymuje się tak długo — 0 reaguje na pierwsze mignięcie.",
|
||||||
"adopt_problem_configure": "Konfiguruj",
|
"adopt_problem_configure": "Konfiguruj",
|
||||||
"history_auto": "Automatycznie",
|
"history_auto": "Automatycznie",
|
||||||
"battery_fleet_title": "Flota baterii",
|
"battery_fleet_title": "Flota baterii",
|
||||||
@@ -838,6 +841,8 @@
|
|||||||
"battery_fleet_all_hint": "Wyklucz tutaj urządzenie, zanim w ogóle zgłosi niski poziom — odkurzacz, który sam się ładuje, albo telefon, który ostrzega samodzielnie.",
|
"battery_fleet_all_hint": "Wyklucz tutaj urządzenie, zanim w ogóle zgłosi niski poziom — odkurzacz, który sam się ładuje, albo telefon, który ostrzega samodzielnie.",
|
||||||
"battery_fleet_add": "Dodaj baterię",
|
"battery_fleet_add": "Dodaj baterię",
|
||||||
"battery_fleet_add_hint": "Wybierz czujnik baterii pominięty przez automatyczne wykrywanie — od razu trafi na listę.",
|
"battery_fleet_add_hint": "Wybierz czujnik baterii pominięty przez automatyczne wykrywanie — od razu trafi na listę.",
|
||||||
|
"battery_fleet_track_self": "Śledź baterie samoładujące",
|
||||||
|
"battery_fleet_track_self_hint": "Telefony, odkurzacze i inne samoładujące się urządzenia pojawiają się jako akumulatory — przy niskim poziomie proszą o ładowanie, nigdy o nowe baterie.",
|
||||||
"battery_fleet_status_low": "Niski",
|
"battery_fleet_status_low": "Niski",
|
||||||
"battery_fleet_status_soon": "Wkrótce",
|
"battery_fleet_status_soon": "Wkrótce",
|
||||||
"battery_fleet_status_ok": "W porządku",
|
"battery_fleet_status_ok": "W porządku",
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
"due_soon": "Vence em breve",
|
"due_soon": "Vence em breve",
|
||||||
"triggered": "Acionada",
|
"triggered": "Acionada",
|
||||||
"trigger_replaced": "Gatilho substituído",
|
"trigger_replaced": "Gatilho substituído",
|
||||||
|
"trigger_removed": "Gatilho removido",
|
||||||
"ok": "OK",
|
"ok": "OK",
|
||||||
"all": "Todas",
|
"all": "Todas",
|
||||||
"new_object": "+ Novo objeto",
|
"new_object": "+ Novo objeto",
|
||||||
@@ -524,6 +525,7 @@
|
|||||||
"group_by_label": "Agrupar por",
|
"group_by_label": "Agrupar por",
|
||||||
"state_value_help": "Use o valor de estado do HA (geralmente minúsculo, ex.: \"on\"/\"off\"). Maiúsculas e minúsculas são normalizadas ao salvar.",
|
"state_value_help": "Use o valor de estado do HA (geralmente minúsculo, ex.: \"on\"/\"off\"). Maiúsculas e minúsculas são normalizadas ao salvar.",
|
||||||
"target_changes_help": "Número de transições correspondentes antes de o gatilho disparar (padrão: 1).",
|
"target_changes_help": "Número de transições correspondentes antes de o gatilho disparar (padrão: 1).",
|
||||||
|
"for_minutes_state_help": "0 conta cada mudança imediatamente. Com minutos, o novo estado deve se manter primeiro — uma oscilação breve então não dispara nem conta.",
|
||||||
"qr_print_title": "Imprimir códigos QR",
|
"qr_print_title": "Imprimir códigos QR",
|
||||||
"qr_print_desc": "Gere uma página imprimível de códigos QR para recortar e colar nos seus equipamentos.",
|
"qr_print_desc": "Gere uma página imprimível de códigos QR para recortar e colar nos seus equipamentos.",
|
||||||
"qr_print_load": "Carregar objetos",
|
"qr_print_load": "Carregar objetos",
|
||||||
@@ -819,6 +821,7 @@
|
|||||||
"schedule_preview_ontime": "Supondo conclusão em dia.",
|
"schedule_preview_ontime": "Supondo conclusão em dia.",
|
||||||
"schedule_preview_ends": "(a série termina)",
|
"schedule_preview_ends": "(a série termina)",
|
||||||
"adopt_problem_responsible": "Usuário responsável por todas as tarefas adotadas (opcional)",
|
"adopt_problem_responsible": "Usuário responsável por todas as tarefas adotadas (opcional)",
|
||||||
|
"adopt_for_minutes_hint": "Disparar apenas se o problema persistir por esse tempo — 0 reage à primeira oscilação.",
|
||||||
"adopt_problem_configure": "Configurar",
|
"adopt_problem_configure": "Configurar",
|
||||||
"history_auto": "Automática",
|
"history_auto": "Automática",
|
||||||
"battery_fleet_title": "Frota de baterias",
|
"battery_fleet_title": "Frota de baterias",
|
||||||
@@ -838,6 +841,8 @@
|
|||||||
"battery_fleet_all_hint": "Exclua aqui um dispositivo antes que ele sequer indique carga baixa — um aspirador que se recarrega sozinho ou um celular que já avisa sozinho.",
|
"battery_fleet_all_hint": "Exclua aqui um dispositivo antes que ele sequer indique carga baixa — um aspirador que se recarrega sozinho ou um celular que já avisa sozinho.",
|
||||||
"battery_fleet_add": "Adicionar uma bateria",
|
"battery_fleet_add": "Adicionar uma bateria",
|
||||||
"battery_fleet_add_hint": "Escolha um sensor de bateria que a detecção automática não encontrou — ele entra na lista imediatamente.",
|
"battery_fleet_add_hint": "Escolha um sensor de bateria que a detecção automática não encontrou — ele entra na lista imediatamente.",
|
||||||
|
"battery_fleet_track_self": "Acompanhar baterias de carregamento automático",
|
||||||
|
"battery_fleet_track_self_hint": "Telefones, aspiradores e outros dispositivos que se recarregam sozinhos aparecem como recarregáveis — com carga baixa pedem uma recarga, nunca pilhas novas.",
|
||||||
"battery_fleet_status_low": "Fraca",
|
"battery_fleet_status_low": "Fraca",
|
||||||
"battery_fleet_status_soon": "Em breve",
|
"battery_fleet_status_soon": "Em breve",
|
||||||
"battery_fleet_status_ok": "Em bom estado",
|
"battery_fleet_status_ok": "Em bom estado",
|
||||||
|
|||||||
@@ -513,6 +513,7 @@
|
|||||||
"group_by_label": "Agrupar por",
|
"group_by_label": "Agrupar por",
|
||||||
"state_value_help": "Use o valor de estado HA (normalmente em minúsculas, p. ex. \"on\"/\"off\"). As maiúsculas são normalizadas ao guardar.",
|
"state_value_help": "Use o valor de estado HA (normalmente em minúsculas, p. ex. \"on\"/\"off\"). As maiúsculas são normalizadas ao guardar.",
|
||||||
"target_changes_help": "Número de transições correspondentes antes do trigger disparar (predefinido: 1).",
|
"target_changes_help": "Número de transições correspondentes antes do trigger disparar (predefinido: 1).",
|
||||||
|
"for_minutes_state_help": "0 conta cada mudança de imediato. Com minutos, o novo estado tem de se manter primeiro — uma oscilação breve então não dispara nem conta.",
|
||||||
"qr_print_title": "Imprimir códigos QR",
|
"qr_print_title": "Imprimir códigos QR",
|
||||||
"qr_print_desc": "Gera uma página imprimível de códigos QR para recortar e colar nos equipamentos.",
|
"qr_print_desc": "Gera uma página imprimível de códigos QR para recortar e colar nos equipamentos.",
|
||||||
"qr_print_load": "Carregar objetos",
|
"qr_print_load": "Carregar objetos",
|
||||||
@@ -584,6 +585,7 @@
|
|||||||
"quick_complete_defaults_feedback_not_needed": "Não era necessário",
|
"quick_complete_defaults_feedback_not_needed": "Não era necessário",
|
||||||
"quick_complete_success": "Concluído rapidamente",
|
"quick_complete_success": "Concluído rapidamente",
|
||||||
"trigger_replaced": "Acionador substituído",
|
"trigger_replaced": "Acionador substituído",
|
||||||
|
"trigger_removed": "Gatilho removido",
|
||||||
"add": "Adicionar",
|
"add": "Adicionar",
|
||||||
"show_stats": "Mostrar estatísticas + gráficos",
|
"show_stats": "Mostrar estatísticas + gráficos",
|
||||||
"hide_stats": "Ocultar estatísticas",
|
"hide_stats": "Ocultar estatísticas",
|
||||||
@@ -819,6 +821,7 @@
|
|||||||
"schedule_preview_ontime": "Assumindo conclusão pontual.",
|
"schedule_preview_ontime": "Assumindo conclusão pontual.",
|
||||||
"schedule_preview_ends": "(a série termina)",
|
"schedule_preview_ends": "(a série termina)",
|
||||||
"adopt_problem_responsible": "Utilizador responsável por todas as tarefas adotadas (opcional)",
|
"adopt_problem_responsible": "Utilizador responsável por todas as tarefas adotadas (opcional)",
|
||||||
|
"adopt_for_minutes_hint": "Disparar apenas se o problema persistir este tempo — 0 reage à primeira oscilação.",
|
||||||
"adopt_problem_configure": "Configurar",
|
"adopt_problem_configure": "Configurar",
|
||||||
"history_auto": "Automático",
|
"history_auto": "Automático",
|
||||||
"battery_fleet_title": "Frota de baterias",
|
"battery_fleet_title": "Frota de baterias",
|
||||||
@@ -838,6 +841,8 @@
|
|||||||
"battery_fleet_all_hint": "Exclua aqui um dispositivo antes de ele sequer indicar carga fraca — um aspirador que se recarrega sozinho ou um telemóvel que já avisa por si.",
|
"battery_fleet_all_hint": "Exclua aqui um dispositivo antes de ele sequer indicar carga fraca — um aspirador que se recarrega sozinho ou um telemóvel que já avisa por si.",
|
||||||
"battery_fleet_add": "Adicionar uma bateria",
|
"battery_fleet_add": "Adicionar uma bateria",
|
||||||
"battery_fleet_add_hint": "Escolha um sensor de bateria que a deteção automática não encontrou — entra de imediato na lista.",
|
"battery_fleet_add_hint": "Escolha um sensor de bateria que a deteção automática não encontrou — entra de imediato na lista.",
|
||||||
|
"battery_fleet_track_self": "Acompanhar baterias de carregamento automático",
|
||||||
|
"battery_fleet_track_self_hint": "Telefones, aspiradores e outros dispositivos que se recarregam sozinhos aparecem como recarregáveis — com carga baixa pedem um carregamento, nunca pilhas novas.",
|
||||||
"battery_fleet_status_low": "Fraca",
|
"battery_fleet_status_low": "Fraca",
|
||||||
"battery_fleet_status_soon": "Em breve",
|
"battery_fleet_status_soon": "Em breve",
|
||||||
"battery_fleet_status_ok": "Em bom estado",
|
"battery_fleet_status_ok": "Em bom estado",
|
||||||
|
|||||||
@@ -517,6 +517,7 @@
|
|||||||
"group_by_label": "Группировать по",
|
"group_by_label": "Группировать по",
|
||||||
"state_value_help": "Используйте значение состояния HA (обычно в нижнем регистре, напр. \"on\"/\"off\"). Регистр нормализуется при сохранении.",
|
"state_value_help": "Используйте значение состояния HA (обычно в нижнем регистре, напр. \"on\"/\"off\"). Регистр нормализуется при сохранении.",
|
||||||
"target_changes_help": "Количество совпадающих переходов, после которых срабатывает триггер (по умолчанию: 1).",
|
"target_changes_help": "Количество совпадающих переходов, после которых срабатывает триггер (по умолчанию: 1).",
|
||||||
|
"for_minutes_state_help": "0 — каждое изменение засчитывается сразу. С минутами новое состояние сначала должно удержаться — короткие сбои тогда не срабатывают и не считаются.",
|
||||||
"qr_print_title": "Печать QR-кодов",
|
"qr_print_title": "Печать QR-кодов",
|
||||||
"qr_print_desc": "Создай страницу для печати с QR-кодами для вырезания и наклеивания на оборудование.",
|
"qr_print_desc": "Создай страницу для печати с QR-кодами для вырезания и наклеивания на оборудование.",
|
||||||
"qr_print_load": "Загрузить объекты",
|
"qr_print_load": "Загрузить объекты",
|
||||||
@@ -584,6 +585,7 @@
|
|||||||
"quick_complete_defaults_feedback_not_needed": "Не было необходимо",
|
"quick_complete_defaults_feedback_not_needed": "Не было необходимо",
|
||||||
"quick_complete_success": "Быстро отмечено как выполнено",
|
"quick_complete_success": "Быстро отмечено как выполнено",
|
||||||
"trigger_replaced": "Триггер заменён",
|
"trigger_replaced": "Триггер заменён",
|
||||||
|
"trigger_removed": "Триггер удалён",
|
||||||
"add": "Добавить",
|
"add": "Добавить",
|
||||||
"show_stats": "Показать статистику + графики",
|
"show_stats": "Показать статистику + графики",
|
||||||
"hide_stats": "Скрыть статистику",
|
"hide_stats": "Скрыть статистику",
|
||||||
@@ -819,6 +821,7 @@
|
|||||||
"schedule_preview_ontime": "При условии своевременного выполнения.",
|
"schedule_preview_ontime": "При условии своевременного выполнения.",
|
||||||
"schedule_preview_ends": "(серия завершается)",
|
"schedule_preview_ends": "(серия завершается)",
|
||||||
"adopt_problem_responsible": "Ответственный пользователь для всех принятых задач (необязательно)",
|
"adopt_problem_responsible": "Ответственный пользователь для всех принятых задач (необязательно)",
|
||||||
|
"adopt_for_minutes_hint": "Срабатывать только если проблема сохраняется это время — 0 реагирует на первый сбой.",
|
||||||
"adopt_problem_configure": "Настроить",
|
"adopt_problem_configure": "Настроить",
|
||||||
"history_auto": "Автоматически",
|
"history_auto": "Автоматически",
|
||||||
"battery_fleet_title": "Парк батарей",
|
"battery_fleet_title": "Парк батарей",
|
||||||
@@ -838,6 +841,8 @@
|
|||||||
"battery_fleet_all_hint": "Исключите устройство здесь ещё до того, как оно сообщит о низком заряде — робот-пылесос, который заряжается сам, или телефон, который предупреждает вас сам.",
|
"battery_fleet_all_hint": "Исключите устройство здесь ещё до того, как оно сообщит о низком заряде — робот-пылесос, который заряжается сам, или телефон, который предупреждает вас сам.",
|
||||||
"battery_fleet_add": "Добавить батарею",
|
"battery_fleet_add": "Добавить батарею",
|
||||||
"battery_fleet_add_hint": "Выберите датчик батареи, который автоматическое обнаружение пропустило — он сразу появится в списке.",
|
"battery_fleet_add_hint": "Выберите датчик батареи, который автоматическое обнаружение пропустило — он сразу появится в списке.",
|
||||||
|
"battery_fleet_track_self": "Отслеживать самозаряжающиеся батареи",
|
||||||
|
"battery_fleet_track_self_hint": "Телефоны, пылесосы и другие самозаряжающиеся устройства отображаются как аккумуляторы — при низком заряде нужна зарядка, а не новые батарейки.",
|
||||||
"battery_fleet_status_low": "Низкий",
|
"battery_fleet_status_low": "Низкий",
|
||||||
"battery_fleet_status_soon": "Скоро",
|
"battery_fleet_status_soon": "Скоро",
|
||||||
"battery_fleet_status_ok": "В норме",
|
"battery_fleet_status_ok": "В норме",
|
||||||
|
|||||||
@@ -517,6 +517,7 @@
|
|||||||
"group_by_label": "Gruppera efter",
|
"group_by_label": "Gruppera efter",
|
||||||
"state_value_help": "Använd HA-tillståndsvärdet (vanligtvis med små bokstäver, t.ex. \"on\"/\"off\"). Versaler normaliseras vid sparande.",
|
"state_value_help": "Använd HA-tillståndsvärdet (vanligtvis med små bokstäver, t.ex. \"on\"/\"off\"). Versaler normaliseras vid sparande.",
|
||||||
"target_changes_help": "Antal matchande övergångar innan utlösaren aktiveras (standard: 1).",
|
"target_changes_help": "Antal matchande övergångar innan utlösaren aktiveras (standard: 1).",
|
||||||
|
"for_minutes_state_help": "0 räknar varje ändring direkt. Med minuter måste det nya tillståndet först hålla i sig — korta blinkningar varken utlöser eller räknas då.",
|
||||||
"qr_print_title": "Skriv ut QR-koder",
|
"qr_print_title": "Skriv ut QR-koder",
|
||||||
"qr_print_desc": "Skapa en utskriftssida med QR-koder att klippa ut och sätta på din utrustning.",
|
"qr_print_desc": "Skapa en utskriftssida med QR-koder att klippa ut och sätta på din utrustning.",
|
||||||
"qr_print_load": "Ladda objekt",
|
"qr_print_load": "Ladda objekt",
|
||||||
@@ -584,6 +585,7 @@
|
|||||||
"quick_complete_defaults_feedback_not_needed": "Inte nödvändigt",
|
"quick_complete_defaults_feedback_not_needed": "Inte nödvändigt",
|
||||||
"quick_complete_success": "Snabbt markerad som klar",
|
"quick_complete_success": "Snabbt markerad som klar",
|
||||||
"trigger_replaced": "Utlösare ersatt",
|
"trigger_replaced": "Utlösare ersatt",
|
||||||
|
"trigger_removed": "Utlösare borttagen",
|
||||||
"add": "Lägg till",
|
"add": "Lägg till",
|
||||||
"show_stats": "Visa statistik + grafer",
|
"show_stats": "Visa statistik + grafer",
|
||||||
"hide_stats": "Dölj statistik",
|
"hide_stats": "Dölj statistik",
|
||||||
@@ -819,6 +821,7 @@
|
|||||||
"schedule_preview_ontime": "Förutsatt slutförande i tid.",
|
"schedule_preview_ontime": "Förutsatt slutförande i tid.",
|
||||||
"schedule_preview_ends": "(serien avslutas)",
|
"schedule_preview_ends": "(serien avslutas)",
|
||||||
"adopt_problem_responsible": "Ansvarig användare för alla övertagna uppgifter (valfritt)",
|
"adopt_problem_responsible": "Ansvarig användare för alla övertagna uppgifter (valfritt)",
|
||||||
|
"adopt_for_minutes_hint": "Utlös först när problemet kvarstått så här länge — 0 reagerar på första blinkningen.",
|
||||||
"adopt_problem_configure": "Konfigurera",
|
"adopt_problem_configure": "Konfigurera",
|
||||||
"history_auto": "Automatiskt",
|
"history_auto": "Automatiskt",
|
||||||
"battery_fleet_title": "Batteriflotta",
|
"battery_fleet_title": "Batteriflotta",
|
||||||
@@ -838,6 +841,8 @@
|
|||||||
"battery_fleet_all_hint": "Uteslut en enhet här redan innan den rapporterar låg nivå — en dammsugare som laddar sig själv, eller en telefon som varnar på egen hand.",
|
"battery_fleet_all_hint": "Uteslut en enhet här redan innan den rapporterar låg nivå — en dammsugare som laddar sig själv, eller en telefon som varnar på egen hand.",
|
||||||
"battery_fleet_add": "Lägg till ett batteri",
|
"battery_fleet_add": "Lägg till ett batteri",
|
||||||
"battery_fleet_add_hint": "Välj en batterisensor som den automatiska identifieringen missade — den läggs till i listan direkt.",
|
"battery_fleet_add_hint": "Välj en batterisensor som den automatiska identifieringen missade — den läggs till i listan direkt.",
|
||||||
|
"battery_fleet_track_self": "Spåra självladdande batterier",
|
||||||
|
"battery_fleet_track_self_hint": "Telefoner, dammsugare och andra självladdande enheter visas som laddningsbara — vid låg nivå begärs laddning, aldrig nya batterier.",
|
||||||
"battery_fleet_status_low": "Låg",
|
"battery_fleet_status_low": "Låg",
|
||||||
"battery_fleet_status_soon": "Snart",
|
"battery_fleet_status_soon": "Snart",
|
||||||
"battery_fleet_status_ok": "I ordning",
|
"battery_fleet_status_ok": "I ordning",
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
"due_soon": "Yaklaşan",
|
"due_soon": "Yaklaşan",
|
||||||
"triggered": "Tetiklendi",
|
"triggered": "Tetiklendi",
|
||||||
"trigger_replaced": "Tetikleyici değiştirildi",
|
"trigger_replaced": "Tetikleyici değiştirildi",
|
||||||
|
"trigger_removed": "Tetikleyici kaldırıldı",
|
||||||
"ok": "Tamam",
|
"ok": "Tamam",
|
||||||
"all": "Tümü",
|
"all": "Tümü",
|
||||||
"new_object": "+ Yeni Nesne",
|
"new_object": "+ Yeni Nesne",
|
||||||
@@ -524,6 +525,7 @@
|
|||||||
"group_by_label": "Grupla",
|
"group_by_label": "Grupla",
|
||||||
"state_value_help": "HA durum değerini kullanın (genellikle küçük harf, örn. \"on\"/\"off\"). Büyük/küçük harf kaydederken normalleştirilir.",
|
"state_value_help": "HA durum değerini kullanın (genellikle küçük harf, örn. \"on\"/\"off\"). Büyük/küçük harf kaydederken normalleştirilir.",
|
||||||
"target_changes_help": "Tetikleyici çalışmadan önceki eşleşen geçiş sayısı (varsayılan: 1).",
|
"target_changes_help": "Tetikleyici çalışmadan önceki eşleşen geçiş sayısı (varsayılan: 1).",
|
||||||
|
"for_minutes_state_help": "0 her değişikliği hemen sayar. Dakika ayarlanırsa yeni durumun önce o kadar sürmesi gerekir — kısa titremeler o zaman ne tetikler ne de sayılır.",
|
||||||
"qr_print_title": "QR kodlarını yazdır",
|
"qr_print_title": "QR kodlarını yazdır",
|
||||||
"qr_print_desc": "Kesip ekipmanınıza yapıştırmak için yazdırılabilir bir QR kodu sayfası oluşturun.",
|
"qr_print_desc": "Kesip ekipmanınıza yapıştırmak için yazdırılabilir bir QR kodu sayfası oluşturun.",
|
||||||
"qr_print_load": "Nesneleri yükle",
|
"qr_print_load": "Nesneleri yükle",
|
||||||
@@ -819,6 +821,7 @@
|
|||||||
"schedule_preview_ontime": "Zamanında tamamlama varsayılarak.",
|
"schedule_preview_ontime": "Zamanında tamamlama varsayılarak.",
|
||||||
"schedule_preview_ends": "(seri sona erer)",
|
"schedule_preview_ends": "(seri sona erer)",
|
||||||
"adopt_problem_responsible": "Devralınan tüm görevler için sorumlu kullanıcı (isteğe bağlı)",
|
"adopt_problem_responsible": "Devralınan tüm görevler için sorumlu kullanıcı (isteğe bağlı)",
|
||||||
|
"adopt_for_minutes_hint": "Yalnızca sorun bu süre boyunca devam ederse tetikle — 0 ilk titremeye tepki verir.",
|
||||||
"adopt_problem_configure": "Yapılandır",
|
"adopt_problem_configure": "Yapılandır",
|
||||||
"history_auto": "Otomatik",
|
"history_auto": "Otomatik",
|
||||||
"battery_fleet_title": "Pil filosu",
|
"battery_fleet_title": "Pil filosu",
|
||||||
@@ -838,6 +841,8 @@
|
|||||||
"battery_fleet_all_hint": "Bir cihazı, daha düşük şarj bildirmeden burada hariç tutun — kendi kendine şarj olan bir süpürge ya da zaten kendisi uyaran bir telefon gibi.",
|
"battery_fleet_all_hint": "Bir cihazı, daha düşük şarj bildirmeden burada hariç tutun — kendi kendine şarj olan bir süpürge ya da zaten kendisi uyaran bir telefon gibi.",
|
||||||
"battery_fleet_add": "Pil ekle",
|
"battery_fleet_add": "Pil ekle",
|
||||||
"battery_fleet_add_hint": "Otomatik keşfin atladığı bir pil sensörü seçin — hemen listeye katılır.",
|
"battery_fleet_add_hint": "Otomatik keşfin atladığı bir pil sensörü seçin — hemen listeye katılır.",
|
||||||
|
"battery_fleet_track_self": "Kendi kendine şarj olan pilleri izle",
|
||||||
|
"battery_fleet_track_self_hint": "Telefonlar, süpürgeler ve kendi kendine şarj olan diğer cihazlar şarj edilebilir olarak görünür — seviye düşükken şarj istenir, asla yeni pil istenmez.",
|
||||||
"battery_fleet_status_low": "Düşük",
|
"battery_fleet_status_low": "Düşük",
|
||||||
"battery_fleet_status_soon": "Yakında",
|
"battery_fleet_status_soon": "Yakında",
|
||||||
"battery_fleet_status_ok": "İyi durumda",
|
"battery_fleet_status_ok": "İyi durumda",
|
||||||
|
|||||||
@@ -517,6 +517,7 @@
|
|||||||
"group_by_label": "Групувати за",
|
"group_by_label": "Групувати за",
|
||||||
"state_value_help": "Використовуйте значення стану HA (зазвичай у нижньому регістрі, напр. \"on\"/\"off\"). Регістр нормалізується при збереженні.",
|
"state_value_help": "Використовуйте значення стану HA (зазвичай у нижньому регістрі, напр. \"on\"/\"off\"). Регістр нормалізується при збереженні.",
|
||||||
"target_changes_help": "Кількість відповідних переходів, після яких тригер спрацює (за замовчуванням: 1).",
|
"target_changes_help": "Кількість відповідних переходів, після яких тригер спрацює (за замовчуванням: 1).",
|
||||||
|
"for_minutes_state_help": "0 — кожна зміна зараховується одразу. З хвилинами новий стан спершу має утриматися — короткі збої тоді не спрацьовують і не рахуються.",
|
||||||
"qr_print_title": "Друкувати QR-коди",
|
"qr_print_title": "Друкувати QR-коди",
|
||||||
"qr_print_desc": "Створи сторінку для друку з QR-кодами, які можна вирізати та наклеїти на обладнання.",
|
"qr_print_desc": "Створи сторінку для друку з QR-кодами, які можна вирізати та наклеїти на обладнання.",
|
||||||
"qr_print_load": "Завантажити об'єкти",
|
"qr_print_load": "Завантажити об'єкти",
|
||||||
@@ -584,6 +585,7 @@
|
|||||||
"quick_complete_defaults_feedback_not_needed": "Не було необхідно",
|
"quick_complete_defaults_feedback_not_needed": "Не було необхідно",
|
||||||
"quick_complete_success": "Швидко позначено виконаним",
|
"quick_complete_success": "Швидко позначено виконаним",
|
||||||
"trigger_replaced": "Тригер замінено",
|
"trigger_replaced": "Тригер замінено",
|
||||||
|
"trigger_removed": "Тригер видалено",
|
||||||
"add": "Додати",
|
"add": "Додати",
|
||||||
"show_stats": "Показати статистику + графіки",
|
"show_stats": "Показати статистику + графіки",
|
||||||
"hide_stats": "Сховати статистику",
|
"hide_stats": "Сховати статистику",
|
||||||
@@ -819,6 +821,7 @@
|
|||||||
"schedule_preview_ontime": "За умови вчасного виконання.",
|
"schedule_preview_ontime": "За умови вчасного виконання.",
|
||||||
"schedule_preview_ends": "(серія завершується)",
|
"schedule_preview_ends": "(серія завершується)",
|
||||||
"adopt_problem_responsible": "Відповідальний користувач для всіх прийнятих завдань (необов'язково)",
|
"adopt_problem_responsible": "Відповідальний користувач для всіх прийнятих завдань (необов'язково)",
|
||||||
|
"adopt_for_minutes_hint": "Спрацьовувати лише якщо проблема триває цей час — 0 реагує на перший збій.",
|
||||||
"adopt_problem_configure": "Налаштувати",
|
"adopt_problem_configure": "Налаштувати",
|
||||||
"history_auto": "Автоматично",
|
"history_auto": "Автоматично",
|
||||||
"battery_fleet_title": "Парк батарей",
|
"battery_fleet_title": "Парк батарей",
|
||||||
@@ -838,6 +841,8 @@
|
|||||||
"battery_fleet_all_hint": "Вилучіть пристрій тут ще до того, як він повідомить про низький заряд — робот-пилосос, що заряджається сам, або телефон, який попереджає сам.",
|
"battery_fleet_all_hint": "Вилучіть пристрій тут ще до того, як він повідомить про низький заряд — робот-пилосос, що заряджається сам, або телефон, який попереджає сам.",
|
||||||
"battery_fleet_add": "Додати батарею",
|
"battery_fleet_add": "Додати батарею",
|
||||||
"battery_fleet_add_hint": "Виберіть датчик батареї, який автоматичне виявлення пропустило — він одразу з'явиться у списку.",
|
"battery_fleet_add_hint": "Виберіть датчик батареї, який автоматичне виявлення пропустило — він одразу з'явиться у списку.",
|
||||||
|
"battery_fleet_track_self": "Відстежувати самозарядні батареї",
|
||||||
|
"battery_fleet_track_self_hint": "Телефони, пилососи та інші самозарядні пристрої відображаються як акумулятори — за низького заряду потрібна зарядка, а не нові батарейки.",
|
||||||
"battery_fleet_status_low": "Низький",
|
"battery_fleet_status_low": "Низький",
|
||||||
"battery_fleet_status_soon": "Незабаром",
|
"battery_fleet_status_soon": "Незабаром",
|
||||||
"battery_fleet_status_ok": "У нормі",
|
"battery_fleet_status_ok": "У нормі",
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
"due_soon": "即将到期",
|
"due_soon": "即将到期",
|
||||||
"triggered": "已触发",
|
"triggered": "已触发",
|
||||||
"trigger_replaced": "触发器已更换",
|
"trigger_replaced": "触发器已更换",
|
||||||
|
"trigger_removed": "触发器已移除",
|
||||||
"ok": "正常",
|
"ok": "正常",
|
||||||
"all": "全部",
|
"all": "全部",
|
||||||
"new_object": "+ 新建维护项",
|
"new_object": "+ 新建维护项",
|
||||||
@@ -518,6 +519,7 @@
|
|||||||
"group_by_label": "分组依据",
|
"group_by_label": "分组依据",
|
||||||
"state_value_help": "使用 HA 状态值(通常为小写,例如 \"on\"/\"off\")。保存时大小写会自动规范化。",
|
"state_value_help": "使用 HA 状态值(通常为小写,例如 \"on\"/\"off\")。保存时大小写会自动规范化。",
|
||||||
"target_changes_help": "触发前需要满足的状态转换次数(默认为 1)。",
|
"target_changes_help": "触发前需要满足的状态转换次数(默认为 1)。",
|
||||||
|
"for_minutes_state_help": "0 表示每次变化立即计数。设置分钟后,新状态需先保持该时长——短暂闪变既不触发也不计数。",
|
||||||
"qr_print_title": "打印二维码",
|
"qr_print_title": "打印二维码",
|
||||||
"qr_print_desc": "生成一张包含多个二维码的可打印页面,方便裁剪并贴在设备上。",
|
"qr_print_desc": "生成一张包含多个二维码的可打印页面,方便裁剪并贴在设备上。",
|
||||||
"qr_print_load": "加载设备",
|
"qr_print_load": "加载设备",
|
||||||
@@ -819,6 +821,7 @@
|
|||||||
"schedule_preview_ontime": "假设按时完成。",
|
"schedule_preview_ontime": "假设按时完成。",
|
||||||
"schedule_preview_ends": "(系列结束)",
|
"schedule_preview_ends": "(系列结束)",
|
||||||
"adopt_problem_responsible": "所有采用任务的负责用户(可选)",
|
"adopt_problem_responsible": "所有采用任务的负责用户(可选)",
|
||||||
|
"adopt_for_minutes_hint": "问题持续此时长后才触发——0 表示对首次闪变立即响应。",
|
||||||
"adopt_problem_configure": "配置",
|
"adopt_problem_configure": "配置",
|
||||||
"history_auto": "自动",
|
"history_auto": "自动",
|
||||||
"battery_fleet_title": "电池群",
|
"battery_fleet_title": "电池群",
|
||||||
@@ -838,6 +841,8 @@
|
|||||||
"battery_fleet_all_hint": "在设备报告电量不足之前就可以在这里将其排除——例如会自行充电的扫地机器人,或本身就会提醒你的手机。",
|
"battery_fleet_all_hint": "在设备报告电量不足之前就可以在这里将其排除——例如会自行充电的扫地机器人,或本身就会提醒你的手机。",
|
||||||
"battery_fleet_add": "添加电池",
|
"battery_fleet_add": "添加电池",
|
||||||
"battery_fleet_add_hint": "选择自动发现遗漏的电池传感器——它会立即加入列表。",
|
"battery_fleet_add_hint": "选择自动发现遗漏的电池传感器——它会立即加入列表。",
|
||||||
|
"battery_fleet_track_self": "跟踪自充电电池",
|
||||||
|
"battery_fleet_track_self_hint": "手机、吸尘器等自充电设备显示为可充电电池——电量低时提示充电,而不是更换电池。",
|
||||||
"battery_fleet_status_low": "电量低",
|
"battery_fleet_status_low": "电量低",
|
||||||
"battery_fleet_status_soon": "即将",
|
"battery_fleet_status_soon": "即将",
|
||||||
"battery_fleet_status_ok": "正常",
|
"battery_fleet_status_ok": "正常",
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ import {
|
|||||||
type CalendarEvent,
|
type CalendarEvent,
|
||||||
} from "./helpers/calendar-bucket";
|
} from "./helpers/calendar-bucket";
|
||||||
import { calendarStyles } from "./calendar-styles";
|
import { calendarStyles } from "./calendar-styles";
|
||||||
import { sharedStyles, DEFAULT_CURRENCY_SYMBOL, t, ensureLocale, isLocaleLoaded, setDateTimePrefs, formatDueDays, langOf } from "./styles";
|
import { syncLocaleFromHass, sharedStyles, DEFAULT_CURRENCY_SYMBOL, t, ensureLocale, isLocaleLoaded, setDateTimePrefs, formatDueDays, langOf } from "./styles";
|
||||||
import { registerCustomCard } from "./helpers/register-card";
|
import { registerCustomCard } from "./helpers/register-card";
|
||||||
import { openHistoryEditDialog, openTaskQuickActions } from "./dialog-mount";
|
import { openHistoryEditDialog, openTaskQuickActions } from "./dialog-mount";
|
||||||
import type {
|
import type {
|
||||||
@@ -139,12 +139,7 @@ export class MaintenanceCalendarCard extends LitElement {
|
|||||||
|
|
||||||
updated(changedProps: Map<string, unknown>): void {
|
updated(changedProps: Map<string, unknown>): void {
|
||||||
super.updated(changedProps);
|
super.updated(changedProps);
|
||||||
// Dates/times follow the HA profile format, not just the language (#97).
|
syncLocaleFromHass(this, changedProps);
|
||||||
if (changedProps.has("hass")) setDateTimePrefs(this.hass?.locale);
|
|
||||||
const lang = this.hass?.language;
|
|
||||||
if (lang && !isLocaleLoaded(lang)) {
|
|
||||||
ensureLocale(lang).then(() => this.requestUpdate());
|
|
||||||
}
|
|
||||||
if (changedProps.has("hass") && this.hass) {
|
if (changedProps.has("hass") && this.hass) {
|
||||||
if (!this._dataLoaded) {
|
if (!this._dataLoaded) {
|
||||||
this._dataLoaded = true;
|
this._dataLoaded = true;
|
||||||
|
|||||||
@@ -4,8 +4,9 @@ import { LitElement, html, css, nothing } from "lit";
|
|||||||
import { applySubscriptionEvent, type SubscriptionEvent } from "./helpers/subscription-merge";
|
import { applySubscriptionEvent, type SubscriptionEvent } from "./helpers/subscription-merge";
|
||||||
import { hydrateObjects } from "./helpers/hydrate-objects";
|
import { hydrateObjects } from "./helpers/hydrate-objects";
|
||||||
import { property, state } from "lit/decorators.js";
|
import { property, state } from "lit/decorators.js";
|
||||||
import { sharedStyles, STATUS_COLORS, t, ensureLocale, isLocaleLoaded, setDateTimePrefs, formatDueDays, langOf } from "./styles";
|
import { syncLocaleFromHass, sharedStyles, STATUS_COLORS, t, ensureLocale, isLocaleLoaded, setDateTimePrefs, formatDueDays, langOf } from "./styles";
|
||||||
import { openSignedDocument } from "./helpers/document-url";
|
import { openSignedDocument } from "./helpers/document-url";
|
||||||
|
import { isSafeHttpUrl } from "./helpers/url";
|
||||||
import { registerCustomCard } from "./helpers/register-card";
|
import { registerCustomCard } from "./helpers/register-card";
|
||||||
import type {
|
import type {
|
||||||
HomeAssistant,
|
HomeAssistant,
|
||||||
@@ -20,6 +21,9 @@ import { UserService } from "./user-service";
|
|||||||
import { partsForCompletion } from "./helpers/shared-parts";
|
import { partsForCompletion } from "./helpers/shared-parts";
|
||||||
import "./maintenance-card-editor";
|
import "./maintenance-card-editor";
|
||||||
import "./components/complete-dialog";
|
import "./components/complete-dialog";
|
||||||
|
// The Battery Fleet card ships in this globally-loaded bundle so it is
|
||||||
|
// available on every dashboard without another extra_module_url entry.
|
||||||
|
import "./components/battery-fleet-card";
|
||||||
import {
|
import {
|
||||||
openCreateObjectDialog,
|
openCreateObjectDialog,
|
||||||
openCreateTaskDialog,
|
openCreateTaskDialog,
|
||||||
@@ -110,12 +114,7 @@ export class MaintenanceSupporterCard extends LitElement {
|
|||||||
|
|
||||||
updated(changedProps: Map<string, unknown>): void {
|
updated(changedProps: Map<string, unknown>): void {
|
||||||
super.updated(changedProps);
|
super.updated(changedProps);
|
||||||
// Dates/times follow the HA profile format, not just the language (#97).
|
syncLocaleFromHass(this, changedProps);
|
||||||
if (changedProps.has("hass")) setDateTimePrefs(this.hass?.locale);
|
|
||||||
const lang = this.hass?.language;
|
|
||||||
if (lang && !isLocaleLoaded(lang)) {
|
|
||||||
ensureLocale(lang).then(() => this.requestUpdate());
|
|
||||||
}
|
|
||||||
// Assignee names: resolved once, only when the config allows it AND some
|
// Assignee names: resolved once, only when the config allows it AND some
|
||||||
// task actually carries a responsible user. The condition is checked
|
// task actually carries a responsible user. The condition is checked
|
||||||
// synchronously here — an unconditional call whose promise triggered a
|
// synchronously here — an unconditional call whose promise triggered a
|
||||||
@@ -239,7 +238,10 @@ export class MaintenanceSupporterCard extends LitElement {
|
|||||||
* (the same route the panel uses, so it works in the Companion app). */
|
* (the same route the panel uses, so it works in the Companion app). */
|
||||||
private async _openDoc(doc: CardDoc): Promise<void> {
|
private async _openDoc(doc: CardDoc): Promise<void> {
|
||||||
if (doc.kind === "weblink" && doc.url) {
|
if (doc.kind === "weblink" && doc.url) {
|
||||||
window.open(doc.url, "_blank", "noopener");
|
// Same guarded sink as every other weblink opener: never hand a
|
||||||
|
// non-http(s) URL to window.open (defense-in-depth against a link
|
||||||
|
// stored before the server-side scheme check existed).
|
||||||
|
if (isSafeHttpUrl(doc.url)) window.open(doc.url, "_blank", "noopener");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ import { isSafeHttpUrl } from "./helpers/url";
|
|||||||
import { applySubscriptionEvent, type SubscriptionEvent } from "./helpers/subscription-merge";
|
import { applySubscriptionEvent, type SubscriptionEvent } from "./helpers/subscription-merge";
|
||||||
import { isStaleBundle } from "./helpers/bundle-version";
|
import { isStaleBundle } from "./helpers/bundle-version";
|
||||||
import { customElement, property, state } from "lit/decorators.js";
|
import { customElement, property, state } from "lit/decorators.js";
|
||||||
import { sharedStyles, STATUS_COLORS, STATUS_ICONS, DEFAULT_CURRENCY_SYMBOL, t, ensureLocale, isLocaleLoaded, formatDate, formatDueDays, formatInterval, formatRecurrence, setDateTimePrefs, langOf } from "./styles";
|
import { syncLocaleFromHass, sharedStyles, STATUS_COLORS, STATUS_ICONS, DEFAULT_CURRENCY_SYMBOL, t, ensureLocale, isLocaleLoaded, formatDate, formatDueDays, formatInterval, formatRecurrence, setDateTimePrefs, langOf } from "./styles";
|
||||||
import { LS_KEYS, lsGet, lsSet } from "./helpers/storage-keys";
|
import { LS_KEYS, lsGet, lsSet } from "./helpers/storage-keys";
|
||||||
import { openSignedDocument, signApiPath } from "./helpers/document-url";
|
import { openHtmlInNewTab, openSignedDocument, signApiPath } from "./helpers/document-url";
|
||||||
import { readObjectsCache, writeObjectsCache } from "./helpers/objects-cache";
|
import { readObjectsCache, writeObjectsCache } from "./helpers/objects-cache";
|
||||||
import { hydrateObjects } from "./helpers/hydrate-objects";
|
import { hydrateObjects } from "./helpers/hydrate-objects";
|
||||||
import { daysProgress } from "./helpers/interval";
|
import { daysProgress } from "./helpers/interval";
|
||||||
@@ -373,15 +373,7 @@ export class MaintenanceSupporterPanel extends LitElement {
|
|||||||
|
|
||||||
updated(changedProps: Map<string, unknown>): void {
|
updated(changedProps: Map<string, unknown>): void {
|
||||||
super.updated(changedProps);
|
super.updated(changedProps);
|
||||||
// Dates/times follow the HA profile format, not just the language (#97).
|
syncLocaleFromHass(this, changedProps);
|
||||||
if (changedProps.has("hass")) setDateTimePrefs(this.hass?.locale);
|
|
||||||
// Lazy-load the user's UI language (non-EN tables aren't bundled) and
|
|
||||||
// re-render once it arrives. EN is bundled, so strings read in English
|
|
||||||
// until then rather than as raw keys.
|
|
||||||
const lang = this.hass?.language;
|
|
||||||
if (lang && !isLocaleLoaded(lang)) {
|
|
||||||
ensureLocale(lang).then(() => this.requestUpdate());
|
|
||||||
}
|
|
||||||
if (changedProps.has("hass") && this.hass) {
|
if (changedProps.has("hass") && this.hass) {
|
||||||
if (!this._dataLoaded) {
|
if (!this._dataLoaded) {
|
||||||
this._dataLoaded = true;
|
this._dataLoaded = true;
|
||||||
@@ -1477,9 +1469,7 @@ export class MaintenanceSupporterPanel extends LitElement {
|
|||||||
this._currencySymbol,
|
this._currencySymbol,
|
||||||
new Date().toISOString(),
|
new Date().toISOString(),
|
||||||
);
|
);
|
||||||
const url = URL.createObjectURL(new Blob([html], { type: "text/html" }));
|
openHtmlInNewTab(html);
|
||||||
window.open(url, "_blank");
|
|
||||||
setTimeout(() => URL.revokeObjectURL(url), 60000);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private async _duplicateObject(entryId: string): Promise<void> {
|
private async _duplicateObject(entryId: string): Promise<void> {
|
||||||
@@ -1843,9 +1833,7 @@ export class MaintenanceSupporterPanel extends LitElement {
|
|||||||
new Date().toISOString(),
|
new Date().toISOString(),
|
||||||
partsLines,
|
partsLines,
|
||||||
);
|
);
|
||||||
const url = URL.createObjectURL(new Blob([html], { type: "text/html" }));
|
openHtmlInNewTab(html);
|
||||||
window.open(url, "_blank");
|
|
||||||
setTimeout(() => URL.revokeObjectURL(url), 60000);
|
|
||||||
} finally {
|
} finally {
|
||||||
this._actionLoading = false;
|
this._actionLoading = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,7 +29,11 @@ export interface HistoryContext {
|
|||||||
readingDelta?: (entry: HistoryEntry) => number | null;
|
readingDelta?: (entry: HistoryEntry) => number | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const _FILTER_TYPES = ["completed", "skipped", "missed", "reset", "triggered"] as const;
|
// Every HistoryEntryType is filterable (drift audit 2026-08: the repair-flow
|
||||||
|
// types were missing, so their entries could not be isolated). Chips only
|
||||||
|
// render for types present in the task's history, so the two rare ones cost
|
||||||
|
// nothing on normal tasks.
|
||||||
|
const _FILTER_TYPES = ["completed", "skipped", "missed", "reset", "triggered", "trigger_replaced", "trigger_removed"] as const;
|
||||||
|
|
||||||
export function renderHistoryFilters(task: MaintenanceTask, ctx: HistoryContext) {
|
export function renderHistoryFilters(task: MaintenanceTask, ctx: HistoryContext) {
|
||||||
const L = ctx.lang;
|
const L = ctx.lang;
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
import { css } from "lit";
|
import { css } from "lit";
|
||||||
import EN from "./locales/en.json";
|
import EN from "./locales/en.json";
|
||||||
|
import { BUNDLE_VERSION } from "./helpers/bundle-version";
|
||||||
|
|
||||||
// Display fallback when the backend hasn't sent a currency symbol. The backend
|
// Display fallback when the backend hasn't sent a currency symbol. The backend
|
||||||
// derives the real symbol from const.BUDGET_CURRENCIES[DEFAULT_BUDGET_CURRENCY].
|
// derives the real symbol from const.BUDGET_CURRENCIES[DEFAULT_BUDGET_CURRENCY].
|
||||||
@@ -47,8 +48,21 @@ const _localeGlobals: LocaleGlobals = (() => {
|
|||||||
})();
|
})();
|
||||||
|
|
||||||
const STORE = _localeGlobals.store;
|
const STORE = _localeGlobals.store;
|
||||||
// Each copy guarantees the bundled English fallback is present.
|
|
||||||
if (!STORE.en) STORE.en = EN as Translations;
|
/** Seed/extend the shared English table with this bundle's copy.
|
||||||
|
*
|
||||||
|
* MERGE, not first-wins (#135 regression): after an update, a cached app
|
||||||
|
* shell can still list an OLD sibling bundle (the card) next to the fresh
|
||||||
|
* panel. First-wins let the stale bundle's EN — missing every new key —
|
||||||
|
* claim the store, and the fresh panel rendered raw keys
|
||||||
|
* ("BATTERY_FLEET_ADD"). Existing entries win conflicts (steady state is
|
||||||
|
* unchanged); every bundle contributes the keys it knows, so a newer
|
||||||
|
* bundle's keys can never be shadowed by an older first-loader.
|
||||||
|
*/
|
||||||
|
export function seedEnglish(en: Record<string, string>): void {
|
||||||
|
STORE.en = Object.assign({}, en, STORE.en ?? {});
|
||||||
|
}
|
||||||
|
seedEnglish(EN as Translations);
|
||||||
|
|
||||||
/** Languages available as runtime-loaded JSON. Keep in sync with locales/. */
|
/** Languages available as runtime-loaded JSON. Keep in sync with locales/. */
|
||||||
const SUPPORTED_LANGS = new Set<string>([
|
const SUPPORTED_LANGS = new Set<string>([
|
||||||
@@ -79,6 +93,22 @@ export function t(key: string, lang?: string): string {
|
|||||||
return STORE[l]?.[key] ?? STORE.en[key] ?? key;
|
return STORE[l]?.[key] ?? STORE.en[key] ?? key;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** The per-`updated()` locale boot every top-level surface needs: date/time
|
||||||
|
* prefs follow the HA profile (#97), and the user's UI language is lazily
|
||||||
|
* fetched with a re-render once it arrives (EN is bundled, so strings read
|
||||||
|
* in English until then rather than as raw keys). Was copy-pasted across the
|
||||||
|
* panel and both cards (drift audit 2026-08). */
|
||||||
|
export function syncLocaleFromHass(
|
||||||
|
host: { hass?: { language?: string; locale?: unknown }; requestUpdate: () => void },
|
||||||
|
changedProps: Map<string, unknown>,
|
||||||
|
): void {
|
||||||
|
if (changedProps.has("hass")) setDateTimePrefs(host.hass?.locale as Parameters<typeof setDateTimePrefs>[0]);
|
||||||
|
const lang = host.hass?.language;
|
||||||
|
if (lang && !isLocaleLoaded(lang)) {
|
||||||
|
ensureLocale(lang).then(() => host.requestUpdate());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The UI language for a hass object — the ONE rule every component's `_lang`
|
* The UI language for a hass object — the ONE rule every component's `_lang`
|
||||||
* getter delegates to. Before this helper the 23 hand-copied getters had
|
* getter delegates to. Before this helper the 23 hand-copied getters had
|
||||||
@@ -108,7 +138,11 @@ export function ensureLocale(lang?: string): Promise<void> {
|
|||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
}
|
}
|
||||||
if (!(l in _localeInflight)) {
|
if (!(l in _localeInflight)) {
|
||||||
_localeInflight[l] = fetch(`${LOCALES_BASE}/${l}.json`)
|
// Version-busted (#135, same family as #124): the locale files are served
|
||||||
|
// without Cache-Control, so browsers cache them heuristically — after an
|
||||||
|
// update a stale table would miss every new key and silently fall back to
|
||||||
|
// English for them. "dev" builds keep a stable URL.
|
||||||
|
_localeInflight[l] = fetch(`${LOCALES_BASE}/${l}.json?v=${BUNDLE_VERSION}`)
|
||||||
.then((r) => (r.ok ? r.json() : null))
|
.then((r) => (r.ok ? r.json() : null))
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
if (data) {
|
if (data) {
|
||||||
@@ -1067,48 +1101,9 @@ export const sharedStyles = css`
|
|||||||
.confidence-dot.medium { background: var(--warning-color, #ff9800); }
|
.confidence-dot.medium { background: var(--warning-color, #ff9800); }
|
||||||
.confidence-dot.high { background: var(--success-color, #4caf50); }
|
.confidence-dot.high { background: var(--success-color, #4caf50); }
|
||||||
|
|
||||||
/* Feedback toggle buttons in complete dialog */
|
/* (The complete-dialog's .feedback-* rules live in complete-dialog.ts —
|
||||||
.feedback-section {
|
this sheet carried a dead byte-identical copy until the 2026-08 drift
|
||||||
display: flex;
|
audit; complete-dialog never imports sharedStyles.) */
|
||||||
flex-direction: column;
|
|
||||||
gap: 8px;
|
|
||||||
padding: 8px 0;
|
|
||||||
border-top: 1px solid var(--divider-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
.feedback-label {
|
|
||||||
font-weight: 500;
|
|
||||||
font-size: 13px;
|
|
||||||
color: var(--secondary-text-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
.feedback-buttons {
|
|
||||||
display: flex;
|
|
||||||
gap: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.feedback-btn {
|
|
||||||
flex: 1;
|
|
||||||
padding: 8px 12px;
|
|
||||||
border: 1px solid var(--divider-color);
|
|
||||||
border-radius: 8px;
|
|
||||||
background: var(--card-background-color, #fff);
|
|
||||||
color: var(--primary-text-color);
|
|
||||||
font-size: 13px;
|
|
||||||
cursor: pointer;
|
|
||||||
text-align: center;
|
|
||||||
transition: all 0.2s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.feedback-btn:hover {
|
|
||||||
background: var(--secondary-background-color, #f5f5f5);
|
|
||||||
}
|
|
||||||
|
|
||||||
.feedback-btn.selected {
|
|
||||||
background: var(--primary-color);
|
|
||||||
color: var(--text-primary-color, #fff);
|
|
||||||
border-color: var(--primary-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Seasonal chart */
|
/* Seasonal chart */
|
||||||
.seasonal-chart {
|
.seasonal-chart {
|
||||||
|
|||||||
@@ -517,6 +517,7 @@
|
|||||||
"group_by_label": "Seskupit podle",
|
"group_by_label": "Seskupit podle",
|
||||||
"state_value_help": "Použijte hodnotu stavu HA (obvykle malými písmeny, např. \"on\"/\"off\"). Velikost písmen se při uložení normalizuje.",
|
"state_value_help": "Použijte hodnotu stavu HA (obvykle malými písmeny, např. \"on\"/\"off\"). Velikost písmen se při uložení normalizuje.",
|
||||||
"target_changes_help": "Počet odpovídajících přechodů, po kterých se trigger spustí (výchozí: 1).",
|
"target_changes_help": "Počet odpovídajících přechodů, po kterých se trigger spustí (výchozí: 1).",
|
||||||
|
"for_minutes_state_help": "0 počítá každou změnu ihned. S minutami musí nový stav nejprve vydržet — krátké bliknutí pak nespustí ani se nepočítá.",
|
||||||
"qr_print_title": "Tisk QR kódů",
|
"qr_print_title": "Tisk QR kódů",
|
||||||
"qr_print_desc": "Vygeneruj tiskovou stránku s QR kódy k vystřižení a nalepení na zařízení.",
|
"qr_print_desc": "Vygeneruj tiskovou stránku s QR kódy k vystřižení a nalepení na zařízení.",
|
||||||
"qr_print_load": "Načíst objekty",
|
"qr_print_load": "Načíst objekty",
|
||||||
@@ -584,6 +585,7 @@
|
|||||||
"quick_complete_defaults_feedback_not_needed": "Nebylo potřeba",
|
"quick_complete_defaults_feedback_not_needed": "Nebylo potřeba",
|
||||||
"quick_complete_success": "Rychle označeno jako hotové",
|
"quick_complete_success": "Rychle označeno jako hotové",
|
||||||
"trigger_replaced": "Spouštěč nahrazen",
|
"trigger_replaced": "Spouštěč nahrazen",
|
||||||
|
"trigger_removed": "Spouštěč odebrán",
|
||||||
"add": "Přidat",
|
"add": "Přidat",
|
||||||
"show_stats": "Zobrazit statistiky + grafy",
|
"show_stats": "Zobrazit statistiky + grafy",
|
||||||
"hide_stats": "Skrýt statistiky",
|
"hide_stats": "Skrýt statistiky",
|
||||||
@@ -819,6 +821,7 @@
|
|||||||
"schedule_preview_ontime": "Za předpokladu včasného dokončení.",
|
"schedule_preview_ontime": "Za předpokladu včasného dokončení.",
|
||||||
"schedule_preview_ends": "(série končí)",
|
"schedule_preview_ends": "(série končí)",
|
||||||
"adopt_problem_responsible": "Odpovědná osoba pro všechny převzaté úkoly (volitelné)",
|
"adopt_problem_responsible": "Odpovědná osoba pro všechny převzaté úkoly (volitelné)",
|
||||||
|
"adopt_for_minutes_hint": "Spustit až když problém trvá takto dlouho — 0 reaguje na první bliknutí.",
|
||||||
"adopt_problem_configure": "Konfigurovat",
|
"adopt_problem_configure": "Konfigurovat",
|
||||||
"history_auto": "Automaticky",
|
"history_auto": "Automaticky",
|
||||||
"battery_fleet_title": "Flotila baterií",
|
"battery_fleet_title": "Flotila baterií",
|
||||||
@@ -838,6 +841,8 @@
|
|||||||
"battery_fleet_all_hint": "Vylučte zařízení už dřív, než vůbec ohlásí nízkou úroveň — vysavač, který se sám nabíjí, nebo telefon, který varuje sám.",
|
"battery_fleet_all_hint": "Vylučte zařízení už dřív, než vůbec ohlásí nízkou úroveň — vysavač, který se sám nabíjí, nebo telefon, který varuje sám.",
|
||||||
"battery_fleet_add": "Přidat baterii",
|
"battery_fleet_add": "Přidat baterii",
|
||||||
"battery_fleet_add_hint": "Vyberte senzor baterie, který automatická detekce přehlédla — okamžitě se objeví v seznamu.",
|
"battery_fleet_add_hint": "Vyberte senzor baterie, který automatická detekce přehlédla — okamžitě se objeví v seznamu.",
|
||||||
|
"battery_fleet_track_self": "Sledovat samodobíjecí baterie",
|
||||||
|
"battery_fleet_track_self_hint": "Telefony, vysavače a další samodobíjecí zařízení se zobrazují jako akumulátory — při nízkém stavu žádají o nabití, nikdy o nové články.",
|
||||||
"battery_fleet_status_low": "Nízká",
|
"battery_fleet_status_low": "Nízká",
|
||||||
"battery_fleet_status_soon": "Brzy",
|
"battery_fleet_status_soon": "Brzy",
|
||||||
"battery_fleet_status_ok": "V pořádku",
|
"battery_fleet_status_ok": "V pořádku",
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
"due_soon": "Snart forfalden",
|
"due_soon": "Snart forfalden",
|
||||||
"triggered": "Udløst",
|
"triggered": "Udløst",
|
||||||
"trigger_replaced": "Udløser erstattet",
|
"trigger_replaced": "Udløser erstattet",
|
||||||
|
"trigger_removed": "Udløser fjernet",
|
||||||
"ok": "OK",
|
"ok": "OK",
|
||||||
"all": "Alle",
|
"all": "Alle",
|
||||||
"new_object": "+ Nyt objekt",
|
"new_object": "+ Nyt objekt",
|
||||||
@@ -518,6 +519,7 @@
|
|||||||
"group_by_label": "Grupper efter",
|
"group_by_label": "Grupper efter",
|
||||||
"state_value_help": "Brug HA-tilstandsværdien (normalt med små bogstaver, f.eks. \"on\"/\"off\"). Store/små bogstaver normaliseres ved lagring.",
|
"state_value_help": "Brug HA-tilstandsværdien (normalt med små bogstaver, f.eks. \"on\"/\"off\"). Store/små bogstaver normaliseres ved lagring.",
|
||||||
"target_changes_help": "Antal matchende overgange, før udløseren aktiveres (standard: 1).",
|
"target_changes_help": "Antal matchende overgange, før udløseren aktiveres (standard: 1).",
|
||||||
|
"for_minutes_state_help": "0 tæller hver ændring straks. Med minutter skal den nye tilstand først holde — korte blink hverken udløser eller tælles så.",
|
||||||
"qr_print_title": "Udskriv QR-koder",
|
"qr_print_title": "Udskriv QR-koder",
|
||||||
"qr_print_desc": "Generer en udskriftsklar side med QR-koder, der kan klippes ud og sættes på dit udstyr.",
|
"qr_print_desc": "Generer en udskriftsklar side med QR-koder, der kan klippes ud og sættes på dit udstyr.",
|
||||||
"qr_print_load": "Indlæs objekter",
|
"qr_print_load": "Indlæs objekter",
|
||||||
@@ -819,6 +821,7 @@
|
|||||||
"schedule_preview_ontime": "Forudsat rettidig fuldførelse.",
|
"schedule_preview_ontime": "Forudsat rettidig fuldførelse.",
|
||||||
"schedule_preview_ends": "(serien slutter)",
|
"schedule_preview_ends": "(serien slutter)",
|
||||||
"adopt_problem_responsible": "Ansvarlig bruger for alle overtagne opgaver (valgfrit)",
|
"adopt_problem_responsible": "Ansvarlig bruger for alle overtagne opgaver (valgfrit)",
|
||||||
|
"adopt_for_minutes_hint": "Udløs først når problemet har varet så længe — 0 reagerer på første blink.",
|
||||||
"adopt_problem_configure": "Konfigurer",
|
"adopt_problem_configure": "Konfigurer",
|
||||||
"history_auto": "Automatisk",
|
"history_auto": "Automatisk",
|
||||||
"battery_fleet_title": "Batteriflåde",
|
"battery_fleet_title": "Batteriflåde",
|
||||||
@@ -838,6 +841,8 @@
|
|||||||
"battery_fleet_all_hint": "Udeluk en enhed her, før den overhovedet melder lavt niveau — en støvsuger, der lader sig selv, eller en telefon, der advarer af sig selv.",
|
"battery_fleet_all_hint": "Udeluk en enhed her, før den overhovedet melder lavt niveau — en støvsuger, der lader sig selv, eller en telefon, der advarer af sig selv.",
|
||||||
"battery_fleet_add": "Tilføj et batteri",
|
"battery_fleet_add": "Tilføj et batteri",
|
||||||
"battery_fleet_add_hint": "Vælg en batterisensor, som den automatiske registrering overså — den kommer straks på listen.",
|
"battery_fleet_add_hint": "Vælg en batterisensor, som den automatiske registrering overså — den kommer straks på listen.",
|
||||||
|
"battery_fleet_track_self": "Spor selvopladende batterier",
|
||||||
|
"battery_fleet_track_self_hint": "Telefoner, støvsugere og andre selvopladende enheder vises som genopladelige — ved lavt niveau bedes om opladning, aldrig om nye batterier.",
|
||||||
"battery_fleet_status_low": "Lav",
|
"battery_fleet_status_low": "Lav",
|
||||||
"battery_fleet_status_soon": "Snart",
|
"battery_fleet_status_soon": "Snart",
|
||||||
"battery_fleet_status_ok": "I orden",
|
"battery_fleet_status_ok": "I orden",
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
"due_soon": "Bald fällig",
|
"due_soon": "Bald fällig",
|
||||||
"triggered": "Ausgelöst",
|
"triggered": "Ausgelöst",
|
||||||
"trigger_replaced": "Auslöser ersetzt",
|
"trigger_replaced": "Auslöser ersetzt",
|
||||||
|
"trigger_removed": "Trigger entfernt",
|
||||||
"ok": "OK",
|
"ok": "OK",
|
||||||
"all": "Alle",
|
"all": "Alle",
|
||||||
"new_object": "+ Neues Objekt",
|
"new_object": "+ Neues Objekt",
|
||||||
@@ -518,6 +519,7 @@
|
|||||||
"group_by_label": "Gruppieren nach",
|
"group_by_label": "Gruppieren nach",
|
||||||
"state_value_help": "Verwende den HA-Zustandswert (meist kleingeschrieben, z. B. \"on\"/\"off\"). Groß-/Kleinschreibung wird beim Speichern normalisiert.",
|
"state_value_help": "Verwende den HA-Zustandswert (meist kleingeschrieben, z. B. \"on\"/\"off\"). Groß-/Kleinschreibung wird beim Speichern normalisiert.",
|
||||||
"target_changes_help": "Anzahl der passenden Übergänge, nach denen der Trigger auslöst (Standard: 1).",
|
"target_changes_help": "Anzahl der passenden Übergänge, nach denen der Trigger auslöst (Standard: 1).",
|
||||||
|
"for_minutes_state_help": "0 zählt jede Änderung sofort. Mit Minuten muss der neue Zustand erst so lange bestehen — kurzes Flackern löst dann weder aus noch zählt es.",
|
||||||
"qr_print_title": "QR-Codes drucken",
|
"qr_print_title": "QR-Codes drucken",
|
||||||
"qr_print_desc": "Erzeuge eine Druckseite mit QR-Codes zum Ausschneiden und Anbringen an den Geräten.",
|
"qr_print_desc": "Erzeuge eine Druckseite mit QR-Codes zum Ausschneiden und Anbringen an den Geräten.",
|
||||||
"qr_print_load": "Objekte laden",
|
"qr_print_load": "Objekte laden",
|
||||||
@@ -819,6 +821,7 @@
|
|||||||
"schedule_preview_ontime": "Bei pünktlichem Abschluss.",
|
"schedule_preview_ontime": "Bei pünktlichem Abschluss.",
|
||||||
"schedule_preview_ends": "(Serie endet)",
|
"schedule_preview_ends": "(Serie endet)",
|
||||||
"adopt_problem_responsible": "Verantwortliche Person für alle übernommenen Aufgaben (optional)",
|
"adopt_problem_responsible": "Verantwortliche Person für alle übernommenen Aufgaben (optional)",
|
||||||
|
"adopt_for_minutes_hint": "Erst auslösen, wenn das Problem so lange besteht — 0 reagiert auf das erste Flackern.",
|
||||||
"adopt_problem_configure": "Konfigurieren",
|
"adopt_problem_configure": "Konfigurieren",
|
||||||
"history_auto": "Automatisch",
|
"history_auto": "Automatisch",
|
||||||
"battery_fleet_title": "Batterie-Flotte",
|
"battery_fleet_title": "Batterie-Flotte",
|
||||||
@@ -838,6 +841,8 @@
|
|||||||
"battery_fleet_all_hint": "Ein Gerät hier ausschließen, bevor es überhaupt schwach meldet — etwa ein Sauger, der sich selbst lädt, oder ein Telefon, das von sich aus warnt.",
|
"battery_fleet_all_hint": "Ein Gerät hier ausschließen, bevor es überhaupt schwach meldet — etwa ein Sauger, der sich selbst lädt, oder ein Telefon, das von sich aus warnt.",
|
||||||
"battery_fleet_add": "Batterie hinzufügen",
|
"battery_fleet_add": "Batterie hinzufügen",
|
||||||
"battery_fleet_add_hint": "Einen Batteriesensor wählen, den die automatische Erkennung übersehen hat — er erscheint sofort in der Liste.",
|
"battery_fleet_add_hint": "Einen Batteriesensor wählen, den die automatische Erkennung übersehen hat — er erscheint sofort in der Liste.",
|
||||||
|
"battery_fleet_track_self": "Selbstladende Batterien mitverfolgen",
|
||||||
|
"battery_fleet_track_self_hint": "Telefone, Staubsauger und andere selbstladende Geräte erscheinen als Akkus — bei niedrigem Stand wird ans Laden erinnert, nie an neue Zellen.",
|
||||||
"battery_fleet_status_low": "Schwach",
|
"battery_fleet_status_low": "Schwach",
|
||||||
"battery_fleet_status_soon": "Bald",
|
"battery_fleet_status_soon": "Bald",
|
||||||
"battery_fleet_status_ok": "In Ordnung",
|
"battery_fleet_status_ok": "In Ordnung",
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
"due_soon": "Due Soon",
|
"due_soon": "Due Soon",
|
||||||
"triggered": "Triggered",
|
"triggered": "Triggered",
|
||||||
"trigger_replaced": "Trigger replaced",
|
"trigger_replaced": "Trigger replaced",
|
||||||
|
"trigger_removed": "Trigger removed",
|
||||||
"ok": "OK",
|
"ok": "OK",
|
||||||
"all": "All",
|
"all": "All",
|
||||||
"new_object": "+ New Object",
|
"new_object": "+ New Object",
|
||||||
@@ -524,6 +525,7 @@
|
|||||||
"group_by_label": "Group by",
|
"group_by_label": "Group by",
|
||||||
"state_value_help": "Use the HA state value (usually lowercase, e.g. \"on\"/\"off\"). Case is normalised on save.",
|
"state_value_help": "Use the HA state value (usually lowercase, e.g. \"on\"/\"off\"). Case is normalised on save.",
|
||||||
"target_changes_help": "Number of matching transitions before the trigger fires (default: 1).",
|
"target_changes_help": "Number of matching transitions before the trigger fires (default: 1).",
|
||||||
|
"for_minutes_state_help": "0 counts every change immediately. Set minutes and the new state must hold that long first — brief flickers then neither trigger nor count.",
|
||||||
"qr_print_title": "Print QR codes",
|
"qr_print_title": "Print QR codes",
|
||||||
"qr_print_desc": "Generate a printable page of QR codes to cut out and stick on your equipment.",
|
"qr_print_desc": "Generate a printable page of QR codes to cut out and stick on your equipment.",
|
||||||
"qr_print_load": "Load objects",
|
"qr_print_load": "Load objects",
|
||||||
@@ -819,6 +821,7 @@
|
|||||||
"schedule_preview_ontime": "Assuming on-time completion.",
|
"schedule_preview_ontime": "Assuming on-time completion.",
|
||||||
"schedule_preview_ends": "(series ends)",
|
"schedule_preview_ends": "(series ends)",
|
||||||
"adopt_problem_responsible": "Responsible user for all adopted tasks (optional)",
|
"adopt_problem_responsible": "Responsible user for all adopted tasks (optional)",
|
||||||
|
"adopt_for_minutes_hint": "Only trigger once the problem has persisted this long — 0 reacts to the first flicker.",
|
||||||
"adopt_problem_configure": "Configure",
|
"adopt_problem_configure": "Configure",
|
||||||
"history_auto": "Automatic",
|
"history_auto": "Automatic",
|
||||||
"battery_fleet_title": "Battery fleet",
|
"battery_fleet_title": "Battery fleet",
|
||||||
@@ -838,6 +841,8 @@
|
|||||||
"battery_fleet_all_hint": "Exclude a device here to drop it from the fleet before it ever reports low — a vacuum that recharges itself, or a phone that warns you on its own.",
|
"battery_fleet_all_hint": "Exclude a device here to drop it from the fleet before it ever reports low — a vacuum that recharges itself, or a phone that warns you on its own.",
|
||||||
"battery_fleet_add": "Add a battery",
|
"battery_fleet_add": "Add a battery",
|
||||||
"battery_fleet_add_hint": "Pick a battery sensor the automatic discovery missed — it joins the roster immediately.",
|
"battery_fleet_add_hint": "Pick a battery sensor the automatic discovery missed — it joins the roster immediately.",
|
||||||
|
"battery_fleet_track_self": "Track self-charging batteries",
|
||||||
|
"battery_fleet_track_self_hint": "Phones, vacuums and other devices that recharge themselves appear as rechargeables — a low one asks for a charge, never for new cells.",
|
||||||
"battery_fleet_status_low": "Low",
|
"battery_fleet_status_low": "Low",
|
||||||
"battery_fleet_status_soon": "Soon",
|
"battery_fleet_status_soon": "Soon",
|
||||||
"battery_fleet_status_ok": "Healthy",
|
"battery_fleet_status_ok": "Healthy",
|
||||||
|
|||||||
@@ -517,6 +517,7 @@
|
|||||||
"group_by_label": "Agrupar por",
|
"group_by_label": "Agrupar por",
|
||||||
"state_value_help": "Usa el valor de estado de HA (normalmente en minúsculas, p. ej. \"on\"/\"off\"). Las mayúsculas se normalizan al guardar.",
|
"state_value_help": "Usa el valor de estado de HA (normalmente en minúsculas, p. ej. \"on\"/\"off\"). Las mayúsculas se normalizan al guardar.",
|
||||||
"target_changes_help": "Número de transiciones coincidentes antes de que se dispare el trigger (predeterminado: 1).",
|
"target_changes_help": "Número de transiciones coincidentes antes de que se dispare el trigger (predeterminado: 1).",
|
||||||
|
"for_minutes_state_help": "0 cuenta cada cambio de inmediato. Con minutos, el nuevo estado debe mantenerse primero — un parpadeo breve entonces ni dispara ni cuenta.",
|
||||||
"qr_print_title": "Imprimir códigos QR",
|
"qr_print_title": "Imprimir códigos QR",
|
||||||
"qr_print_desc": "Genera una página imprimible de códigos QR para recortar y pegar en tus equipos.",
|
"qr_print_desc": "Genera una página imprimible de códigos QR para recortar y pegar en tus equipos.",
|
||||||
"qr_print_load": "Cargar objetos",
|
"qr_print_load": "Cargar objetos",
|
||||||
@@ -584,6 +585,7 @@
|
|||||||
"quick_complete_defaults_feedback_not_needed": "No era necesario",
|
"quick_complete_defaults_feedback_not_needed": "No era necesario",
|
||||||
"quick_complete_success": "Completado rápido",
|
"quick_complete_success": "Completado rápido",
|
||||||
"trigger_replaced": "Disparador reemplazado",
|
"trigger_replaced": "Disparador reemplazado",
|
||||||
|
"trigger_removed": "Disparador eliminado",
|
||||||
"add": "Añadir",
|
"add": "Añadir",
|
||||||
"show_stats": "Mostrar estadísticas + gráficos",
|
"show_stats": "Mostrar estadísticas + gráficos",
|
||||||
"hide_stats": "Ocultar estadísticas",
|
"hide_stats": "Ocultar estadísticas",
|
||||||
@@ -819,6 +821,7 @@
|
|||||||
"schedule_preview_ontime": "Suponiendo finalización puntual.",
|
"schedule_preview_ontime": "Suponiendo finalización puntual.",
|
||||||
"schedule_preview_ends": "(la serie termina)",
|
"schedule_preview_ends": "(la serie termina)",
|
||||||
"adopt_problem_responsible": "Usuario responsable para todas las tareas adoptadas (opcional)",
|
"adopt_problem_responsible": "Usuario responsable para todas las tareas adoptadas (opcional)",
|
||||||
|
"adopt_for_minutes_hint": "Disparar solo si el problema persiste este tiempo — 0 reacciona al primer parpadeo.",
|
||||||
"adopt_problem_configure": "Configurar",
|
"adopt_problem_configure": "Configurar",
|
||||||
"history_auto": "Automático",
|
"history_auto": "Automático",
|
||||||
"battery_fleet_title": "Flota de baterías",
|
"battery_fleet_title": "Flota de baterías",
|
||||||
@@ -838,6 +841,8 @@
|
|||||||
"battery_fleet_all_hint": "Excluye aquí un dispositivo antes de que llegue a avisar de carga baja — un aspirador que se recarga solo o un teléfono que ya avisa por su cuenta.",
|
"battery_fleet_all_hint": "Excluye aquí un dispositivo antes de que llegue a avisar de carga baja — un aspirador que se recarga solo o un teléfono que ya avisa por su cuenta.",
|
||||||
"battery_fleet_add": "Añadir una batería",
|
"battery_fleet_add": "Añadir una batería",
|
||||||
"battery_fleet_add_hint": "Elige un sensor de batería que la detección automática pasó por alto — se une a la lista de inmediato.",
|
"battery_fleet_add_hint": "Elige un sensor de batería que la detección automática pasó por alto — se une a la lista de inmediato.",
|
||||||
|
"battery_fleet_track_self": "Seguir baterías de carga automática",
|
||||||
|
"battery_fleet_track_self_hint": "Teléfonos, aspiradoras y otros dispositivos que se recargan solos aparecen como recargables: si están bajos piden una carga, nunca pilas nuevas.",
|
||||||
"battery_fleet_status_low": "Baja",
|
"battery_fleet_status_low": "Baja",
|
||||||
"battery_fleet_status_soon": "Pronto",
|
"battery_fleet_status_soon": "Pronto",
|
||||||
"battery_fleet_status_ok": "Correcta",
|
"battery_fleet_status_ok": "Correcta",
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
"due_soon": "Pian erääntyy",
|
"due_soon": "Pian erääntyy",
|
||||||
"triggered": "Laukaistu",
|
"triggered": "Laukaistu",
|
||||||
"trigger_replaced": "Laukaisin korvattu",
|
"trigger_replaced": "Laukaisin korvattu",
|
||||||
|
"trigger_removed": "Laukaisin poistettu",
|
||||||
"ok": "OK",
|
"ok": "OK",
|
||||||
"all": "Kaikki",
|
"all": "Kaikki",
|
||||||
"new_object": "+ Uusi kohde",
|
"new_object": "+ Uusi kohde",
|
||||||
@@ -518,6 +519,7 @@
|
|||||||
"group_by_label": "Ryhmittele",
|
"group_by_label": "Ryhmittele",
|
||||||
"state_value_help": "Käytä HA:n tila-arvoa (yleensä pienillä kirjaimilla, esim. \"on\"/\"off\"). Kirjainkoko normalisoidaan tallennettaessa.",
|
"state_value_help": "Käytä HA:n tila-arvoa (yleensä pienillä kirjaimilla, esim. \"on\"/\"off\"). Kirjainkoko normalisoidaan tallennettaessa.",
|
||||||
"target_changes_help": "Vastaavien siirtymien määrä ennen laukaisua (oletus: 1).",
|
"target_changes_help": "Vastaavien siirtymien määrä ennen laukaisua (oletus: 1).",
|
||||||
|
"for_minutes_state_help": "0 laskee jokaisen muutoksen heti. Minuuteilla uuden tilan on ensin pysyttävä — lyhyet välähdykset eivät silloin laukaise eivätkä kirjaudu.",
|
||||||
"qr_print_title": "Tulosta QR-koodit",
|
"qr_print_title": "Tulosta QR-koodit",
|
||||||
"qr_print_desc": "Luo tulostettava sivu QR-koodeja, jotka voit leikata ja kiinnittää laitteisiin.",
|
"qr_print_desc": "Luo tulostettava sivu QR-koodeja, jotka voit leikata ja kiinnittää laitteisiin.",
|
||||||
"qr_print_load": "Lataa kohteet",
|
"qr_print_load": "Lataa kohteet",
|
||||||
@@ -819,6 +821,7 @@
|
|||||||
"schedule_preview_ontime": "Olettaen, että valmistuminen on ajallaan.",
|
"schedule_preview_ontime": "Olettaen, että valmistuminen on ajallaan.",
|
||||||
"schedule_preview_ends": "(sarja päättyy)",
|
"schedule_preview_ends": "(sarja päättyy)",
|
||||||
"adopt_problem_responsible": "Vastuuhenkilö kaikille omaksutuille tehtäville (valinnainen)",
|
"adopt_problem_responsible": "Vastuuhenkilö kaikille omaksutuille tehtäville (valinnainen)",
|
||||||
|
"adopt_for_minutes_hint": "Laukaise vasta kun ongelma on kestänyt näin kauan — 0 reagoi ensimmäiseen välähdykseen.",
|
||||||
"adopt_problem_configure": "Määritä",
|
"adopt_problem_configure": "Määritä",
|
||||||
"history_auto": "Automaattinen",
|
"history_auto": "Automaattinen",
|
||||||
"battery_fleet_title": "Paristokanta",
|
"battery_fleet_title": "Paristokanta",
|
||||||
@@ -838,6 +841,8 @@
|
|||||||
"battery_fleet_all_hint": "Sulje laite pois jo ennen kuin se ilmoittaa alhaisesta varauksesta — imuri, joka lataa itsensä, tai puhelin, joka varoittaa itse.",
|
"battery_fleet_all_hint": "Sulje laite pois jo ennen kuin se ilmoittaa alhaisesta varauksesta — imuri, joka lataa itsensä, tai puhelin, joka varoittaa itse.",
|
||||||
"battery_fleet_add": "Lisää paristo",
|
"battery_fleet_add": "Lisää paristo",
|
||||||
"battery_fleet_add_hint": "Valitse paristoanturi, jonka automaattinen tunnistus ohitti — se liittyy luetteloon heti.",
|
"battery_fleet_add_hint": "Valitse paristoanturi, jonka automaattinen tunnistus ohitti — se liittyy luetteloon heti.",
|
||||||
|
"battery_fleet_track_self": "Seuraa itselatautuvia akkuja",
|
||||||
|
"battery_fleet_track_self_hint": "Puhelimet, imurit ja muut itselatautuvat laitteet näkyvät ladattavina — vähissä oleva pyytää latausta, ei koskaan uusia paristoja.",
|
||||||
"battery_fleet_status_low": "Vähissä",
|
"battery_fleet_status_low": "Vähissä",
|
||||||
"battery_fleet_status_soon": "Pian",
|
"battery_fleet_status_soon": "Pian",
|
||||||
"battery_fleet_status_ok": "Kunnossa",
|
"battery_fleet_status_ok": "Kunnossa",
|
||||||
|
|||||||
@@ -517,6 +517,7 @@
|
|||||||
"group_by_label": "Grouper par",
|
"group_by_label": "Grouper par",
|
||||||
"state_value_help": "Utilisez la valeur d'état HA (généralement en minuscules, p. ex. \"on\"/\"off\"). La casse est normalisée à l'enregistrement.",
|
"state_value_help": "Utilisez la valeur d'état HA (généralement en minuscules, p. ex. \"on\"/\"off\"). La casse est normalisée à l'enregistrement.",
|
||||||
"target_changes_help": "Nombre de transitions correspondantes avant le déclenchement (par défaut : 1).",
|
"target_changes_help": "Nombre de transitions correspondantes avant le déclenchement (par défaut : 1).",
|
||||||
|
"for_minutes_state_help": "0 compte chaque changement immédiatement. Avec des minutes, le nouvel état doit d'abord se maintenir — un bref clignotement ne déclenche ni ne compte alors.",
|
||||||
"qr_print_title": "Imprimer les QR codes",
|
"qr_print_title": "Imprimer les QR codes",
|
||||||
"qr_print_desc": "Générer une page imprimable de QR codes à découper et coller sur votre équipement.",
|
"qr_print_desc": "Générer une page imprimable de QR codes à découper et coller sur votre équipement.",
|
||||||
"qr_print_load": "Charger les objets",
|
"qr_print_load": "Charger les objets",
|
||||||
@@ -584,6 +585,7 @@
|
|||||||
"quick_complete_defaults_feedback_not_needed": "Non nécessaire",
|
"quick_complete_defaults_feedback_not_needed": "Non nécessaire",
|
||||||
"quick_complete_success": "Terminé rapidement",
|
"quick_complete_success": "Terminé rapidement",
|
||||||
"trigger_replaced": "Déclencheur remplacé",
|
"trigger_replaced": "Déclencheur remplacé",
|
||||||
|
"trigger_removed": "Déclencheur supprimé",
|
||||||
"add": "Ajouter",
|
"add": "Ajouter",
|
||||||
"show_stats": "Afficher les statistiques + graphiques",
|
"show_stats": "Afficher les statistiques + graphiques",
|
||||||
"hide_stats": "Masquer les statistiques",
|
"hide_stats": "Masquer les statistiques",
|
||||||
@@ -819,6 +821,7 @@
|
|||||||
"schedule_preview_ontime": "En supposant un achèvement ponctuel.",
|
"schedule_preview_ontime": "En supposant un achèvement ponctuel.",
|
||||||
"schedule_preview_ends": "(fin de la série)",
|
"schedule_preview_ends": "(fin de la série)",
|
||||||
"adopt_problem_responsible": "Personne responsable pour toutes les tâches adoptées (optionnel)",
|
"adopt_problem_responsible": "Personne responsable pour toutes les tâches adoptées (optionnel)",
|
||||||
|
"adopt_for_minutes_hint": "Ne déclencher que si le problème persiste aussi longtemps — 0 réagit au premier clignotement.",
|
||||||
"adopt_problem_configure": "Configurer",
|
"adopt_problem_configure": "Configurer",
|
||||||
"history_auto": "Automatique",
|
"history_auto": "Automatique",
|
||||||
"battery_fleet_title": "Parc de piles",
|
"battery_fleet_title": "Parc de piles",
|
||||||
@@ -838,6 +841,8 @@
|
|||||||
"battery_fleet_all_hint": "Excluez un appareil ici avant même qu'il ne signale une charge faible — un aspirateur qui se recharge seul, ou un téléphone qui vous prévient lui-même.",
|
"battery_fleet_all_hint": "Excluez un appareil ici avant même qu'il ne signale une charge faible — un aspirateur qui se recharge seul, ou un téléphone qui vous prévient lui-même.",
|
||||||
"battery_fleet_add": "Ajouter une batterie",
|
"battery_fleet_add": "Ajouter une batterie",
|
||||||
"battery_fleet_add_hint": "Choisissez un capteur de batterie que la détection automatique a manqué — il rejoint la liste immédiatement.",
|
"battery_fleet_add_hint": "Choisissez un capteur de batterie que la détection automatique a manqué — il rejoint la liste immédiatement.",
|
||||||
|
"battery_fleet_track_self": "Suivre les batteries à recharge automatique",
|
||||||
|
"battery_fleet_track_self_hint": "Les téléphones, aspirateurs et autres appareils qui se rechargent seuls apparaissent comme rechargeables — un niveau bas demande une recharge, jamais de nouvelles piles.",
|
||||||
"battery_fleet_status_low": "Faible",
|
"battery_fleet_status_low": "Faible",
|
||||||
"battery_fleet_status_soon": "Bientôt",
|
"battery_fleet_status_soon": "Bientôt",
|
||||||
"battery_fleet_status_ok": "Bon état",
|
"battery_fleet_status_ok": "Bon état",
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
"due_soon": "जल्द देय",
|
"due_soon": "जल्द देय",
|
||||||
"triggered": "ट्रिगर हुआ",
|
"triggered": "ट्रिगर हुआ",
|
||||||
"trigger_replaced": "ट्रिगर बदला गया",
|
"trigger_replaced": "ट्रिगर बदला गया",
|
||||||
|
"trigger_removed": "ट्रिगर हटाया गया",
|
||||||
"ok": "ठीक",
|
"ok": "ठीक",
|
||||||
"all": "सभी",
|
"all": "सभी",
|
||||||
"new_object": "+ नई वस्तु",
|
"new_object": "+ नई वस्तु",
|
||||||
@@ -518,6 +519,7 @@
|
|||||||
"group_by_label": "इसके अनुसार समूहित करें",
|
"group_by_label": "इसके अनुसार समूहित करें",
|
||||||
"state_value_help": "HA स्थिति मान का उपयोग करें (आमतौर पर लोअरकेस, उदा. \"on\"/\"off\")। सहेजने पर केस सामान्यीकृत हो जाता है।",
|
"state_value_help": "HA स्थिति मान का उपयोग करें (आमतौर पर लोअरकेस, उदा. \"on\"/\"off\")। सहेजने पर केस सामान्यीकृत हो जाता है।",
|
||||||
"target_changes_help": "ट्रिगर होने से पहले मिलान वाले संक्रमणों की संख्या (डिफ़ॉल्ट: 1)।",
|
"target_changes_help": "ट्रिगर होने से पहले मिलान वाले संक्रमणों की संख्या (डिफ़ॉल्ट: 1)।",
|
||||||
|
"for_minutes_state_help": "0 हर परिवर्तन को तुरंत गिनता है। मिनट सेट करने पर नई स्थिति को पहले उतनी देर बनी रहनी होगी — क्षणिक झिलमिलाहट तब न ट्रिगर करती है न गिनी जाती है।",
|
||||||
"qr_print_title": "QR कोड प्रिंट करें",
|
"qr_print_title": "QR कोड प्रिंट करें",
|
||||||
"qr_print_desc": "अपने उपकरण पर काटकर चिपकाने के लिए QR कोड का प्रिंट-योग्य पृष्ठ बनाएँ।",
|
"qr_print_desc": "अपने उपकरण पर काटकर चिपकाने के लिए QR कोड का प्रिंट-योग्य पृष्ठ बनाएँ।",
|
||||||
"qr_print_load": "वस्तुएँ लोड करें",
|
"qr_print_load": "वस्तुएँ लोड करें",
|
||||||
@@ -819,6 +821,7 @@
|
|||||||
"schedule_preview_ontime": "समय पर पूर्णता मानते हुए।",
|
"schedule_preview_ontime": "समय पर पूर्णता मानते हुए।",
|
||||||
"schedule_preview_ends": "(श्रृंखला समाप्त)",
|
"schedule_preview_ends": "(श्रृंखला समाप्त)",
|
||||||
"adopt_problem_responsible": "सभी अपनाए गए कार्यों के लिए ज़िम्मेदार उपयोगकर्ता (वैकल्पिक)",
|
"adopt_problem_responsible": "सभी अपनाए गए कार्यों के लिए ज़िम्मेदार उपयोगकर्ता (वैकल्पिक)",
|
||||||
|
"adopt_for_minutes_hint": "समस्या इतनी देर बनी रहने पर ही ट्रिगर करें — 0 पहली झिलमिलाहट पर प्रतिक्रिया करता है।",
|
||||||
"adopt_problem_configure": "कॉन्फ़िगर करें",
|
"adopt_problem_configure": "कॉन्फ़िगर करें",
|
||||||
"history_auto": "स्वचालित",
|
"history_auto": "स्वचालित",
|
||||||
"battery_fleet_title": "बैटरी फ्लीट",
|
"battery_fleet_title": "बैटरी फ्लीट",
|
||||||
@@ -838,6 +841,8 @@
|
|||||||
"battery_fleet_all_hint": "किसी डिवाइस को यहाँ कम बैटरी बताने से पहले ही बाहर रखें — जैसे खुद चार्ज होने वाला वैक्यूम, या खुद ही चेतावनी देने वाला फ़ोन।",
|
"battery_fleet_all_hint": "किसी डिवाइस को यहाँ कम बैटरी बताने से पहले ही बाहर रखें — जैसे खुद चार्ज होने वाला वैक्यूम, या खुद ही चेतावनी देने वाला फ़ोन।",
|
||||||
"battery_fleet_add": "बैटरी जोड़ें",
|
"battery_fleet_add": "बैटरी जोड़ें",
|
||||||
"battery_fleet_add_hint": "स्वचालित खोज से छूटा बैटरी सेंसर चुनें — यह तुरंत सूची में जुड़ जाएगा।",
|
"battery_fleet_add_hint": "स्वचालित खोज से छूटा बैटरी सेंसर चुनें — यह तुरंत सूची में जुड़ जाएगा।",
|
||||||
|
"battery_fleet_track_self": "स्वयं चार्ज होने वाली बैटरियों को ट्रैक करें",
|
||||||
|
"battery_fleet_track_self_hint": "फ़ोन, वैक्यूम और अन्य स्वयं चार्ज होने वाले उपकरण रिचार्जेबल के रूप में दिखते हैं — कम होने पर चार्ज करने को कहा जाता है, नई बैटरी कभी नहीं।",
|
||||||
"battery_fleet_status_low": "कम",
|
"battery_fleet_status_low": "कम",
|
||||||
"battery_fleet_status_soon": "जल्द",
|
"battery_fleet_status_soon": "जल्द",
|
||||||
"battery_fleet_status_ok": "ठीक",
|
"battery_fleet_status_ok": "ठीक",
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
"due_soon": "Hamarosan esedékes",
|
"due_soon": "Hamarosan esedékes",
|
||||||
"triggered": "Aktiválva",
|
"triggered": "Aktiválva",
|
||||||
"trigger_replaced": "Kiváltó lecserélve",
|
"trigger_replaced": "Kiváltó lecserélve",
|
||||||
|
"trigger_removed": "Eseményindító eltávolítva",
|
||||||
"ok": "OK",
|
"ok": "OK",
|
||||||
"all": "Összes",
|
"all": "Összes",
|
||||||
"new_object": "+ Új objektum",
|
"new_object": "+ Új objektum",
|
||||||
@@ -524,6 +525,7 @@
|
|||||||
"group_by_label": "Csoportosítás",
|
"group_by_label": "Csoportosítás",
|
||||||
"state_value_help": "A HA állapotértékét használja (általában kisbetűs, pl. „on”/„off”). A kis- és nagybetűk mentéskor normalizálódnak.",
|
"state_value_help": "A HA állapotértékét használja (általában kisbetűs, pl. „on”/„off”). A kis- és nagybetűk mentéskor normalizálódnak.",
|
||||||
"target_changes_help": "Az egyező átmenetek száma a kiváltás előtt (alapértelmezés: 1).",
|
"target_changes_help": "Az egyező átmenetek száma a kiváltás előtt (alapértelmezés: 1).",
|
||||||
|
"for_minutes_state_help": "A 0 minden változást azonnal számol. Percekkel az új állapotnak előbb fenn kell maradnia — a rövid villanás ekkor se nem indít, se nem számít.",
|
||||||
"qr_print_title": "QR-kódok nyomtatása",
|
"qr_print_title": "QR-kódok nyomtatása",
|
||||||
"qr_print_desc": "Nyomtatható oldal QR-kódokkal — vágja ki és ragassza fel a berendezésekre.",
|
"qr_print_desc": "Nyomtatható oldal QR-kódokkal — vágja ki és ragassza fel a berendezésekre.",
|
||||||
"qr_print_load": "Objektumok betöltése",
|
"qr_print_load": "Objektumok betöltése",
|
||||||
@@ -819,6 +821,7 @@
|
|||||||
"schedule_preview_ontime": "Időben történő elvégzést feltételezve.",
|
"schedule_preview_ontime": "Időben történő elvégzést feltételezve.",
|
||||||
"schedule_preview_ends": "(a sorozat véget ér)",
|
"schedule_preview_ends": "(a sorozat véget ér)",
|
||||||
"adopt_problem_responsible": "Felelős felhasználó az összes átvett feladathoz (opcionális)",
|
"adopt_problem_responsible": "Felelős felhasználó az összes átvett feladathoz (opcionális)",
|
||||||
|
"adopt_for_minutes_hint": "Csak akkor induljon, ha a probléma ennyi ideig fennáll — a 0 az első villanásra reagál.",
|
||||||
"adopt_problem_configure": "Beállítás",
|
"adopt_problem_configure": "Beállítás",
|
||||||
"history_auto": "Automatikus",
|
"history_auto": "Automatikus",
|
||||||
"battery_fleet_title": "Elemflotta",
|
"battery_fleet_title": "Elemflotta",
|
||||||
@@ -838,6 +841,8 @@
|
|||||||
"battery_fleet_all_hint": "Zárjon ki egy eszközt már azelőtt, hogy alacsony töltöttséget jelezne — például egy magát töltő porszívót vagy egy telefont, amely magától figyelmeztet.",
|
"battery_fleet_all_hint": "Zárjon ki egy eszközt már azelőtt, hogy alacsony töltöttséget jelezne — például egy magát töltő porszívót vagy egy telefont, amely magától figyelmeztet.",
|
||||||
"battery_fleet_add": "Elem hozzáadása",
|
"battery_fleet_add": "Elem hozzáadása",
|
||||||
"battery_fleet_add_hint": "Válassz egy elem-érzékelőt, amelyet az automatikus felismerés kihagyott — azonnal felkerül a listára.",
|
"battery_fleet_add_hint": "Válassz egy elem-érzékelőt, amelyet az automatikus felismerés kihagyott — azonnal felkerül a listára.",
|
||||||
|
"battery_fleet_track_self": "Öntöltő akkumulátorok követése",
|
||||||
|
"battery_fleet_track_self_hint": "A telefonok, porszívók és más öntöltő eszközök akkumulátorként jelennek meg — alacsony töltöttségnél töltést kérnek, sosem új elemet.",
|
||||||
"battery_fleet_status_low": "Alacsony",
|
"battery_fleet_status_low": "Alacsony",
|
||||||
"battery_fleet_status_soon": "Hamarosan",
|
"battery_fleet_status_soon": "Hamarosan",
|
||||||
"battery_fleet_status_ok": "Rendben",
|
"battery_fleet_status_ok": "Rendben",
|
||||||
|
|||||||
@@ -517,6 +517,7 @@
|
|||||||
"group_by_label": "Raggruppa per",
|
"group_by_label": "Raggruppa per",
|
||||||
"state_value_help": "Usa il valore di stato HA (di solito minuscolo, es. \"on\"/\"off\"). Il case viene normalizzato al salvataggio.",
|
"state_value_help": "Usa il valore di stato HA (di solito minuscolo, es. \"on\"/\"off\"). Il case viene normalizzato al salvataggio.",
|
||||||
"target_changes_help": "Numero di transizioni corrispondenti prima che il trigger si attivi (predefinito: 1).",
|
"target_changes_help": "Numero di transizioni corrispondenti prima che il trigger si attivi (predefinito: 1).",
|
||||||
|
"for_minutes_state_help": "0 conta ogni cambiamento subito. Con i minuti, il nuovo stato deve prima mantenersi — un breve sfarfallio allora non attiva né conta.",
|
||||||
"qr_print_title": "Stampa codici QR",
|
"qr_print_title": "Stampa codici QR",
|
||||||
"qr_print_desc": "Genera una pagina stampabile di codici QR da ritagliare e applicare sulle apparecchiature.",
|
"qr_print_desc": "Genera una pagina stampabile di codici QR da ritagliare e applicare sulle apparecchiature.",
|
||||||
"qr_print_load": "Carica oggetti",
|
"qr_print_load": "Carica oggetti",
|
||||||
@@ -584,6 +585,7 @@
|
|||||||
"quick_complete_defaults_feedback_not_needed": "Non necessario",
|
"quick_complete_defaults_feedback_not_needed": "Non necessario",
|
||||||
"quick_complete_success": "Completato rapidamente",
|
"quick_complete_success": "Completato rapidamente",
|
||||||
"trigger_replaced": "Trigger sostituito",
|
"trigger_replaced": "Trigger sostituito",
|
||||||
|
"trigger_removed": "Trigger rimosso",
|
||||||
"add": "Aggiungi",
|
"add": "Aggiungi",
|
||||||
"show_stats": "Mostra statistiche + grafici",
|
"show_stats": "Mostra statistiche + grafici",
|
||||||
"hide_stats": "Nascondi statistiche",
|
"hide_stats": "Nascondi statistiche",
|
||||||
@@ -819,6 +821,7 @@
|
|||||||
"schedule_preview_ontime": "Presumendo un completamento puntuale.",
|
"schedule_preview_ontime": "Presumendo un completamento puntuale.",
|
||||||
"schedule_preview_ends": "(la serie termina)",
|
"schedule_preview_ends": "(la serie termina)",
|
||||||
"adopt_problem_responsible": "Utente responsabile per tutte le attività adottate (opzionale)",
|
"adopt_problem_responsible": "Utente responsabile per tutte le attività adottate (opzionale)",
|
||||||
|
"adopt_for_minutes_hint": "Attiva solo se il problema persiste per questo tempo — 0 reagisce al primo sfarfallio.",
|
||||||
"adopt_problem_configure": "Configura",
|
"adopt_problem_configure": "Configura",
|
||||||
"history_auto": "Automatico",
|
"history_auto": "Automatico",
|
||||||
"battery_fleet_title": "Parco batterie",
|
"battery_fleet_title": "Parco batterie",
|
||||||
@@ -838,6 +841,8 @@
|
|||||||
"battery_fleet_all_hint": "Escludi qui un dispositivo prima ancora che segnali la batteria scarica — un aspirapolvere che si ricarica da solo o un telefono che avvisa da sé.",
|
"battery_fleet_all_hint": "Escludi qui un dispositivo prima ancora che segnali la batteria scarica — un aspirapolvere che si ricarica da solo o un telefono che avvisa da sé.",
|
||||||
"battery_fleet_add": "Aggiungi una batteria",
|
"battery_fleet_add": "Aggiungi una batteria",
|
||||||
"battery_fleet_add_hint": "Scegli un sensore batteria sfuggito al rilevamento automatico — entra subito nell'elenco.",
|
"battery_fleet_add_hint": "Scegli un sensore batteria sfuggito al rilevamento automatico — entra subito nell'elenco.",
|
||||||
|
"battery_fleet_track_self": "Traccia le batterie autoricaricabili",
|
||||||
|
"battery_fleet_track_self_hint": "Telefoni, aspirapolvere e altri dispositivi che si ricaricano da soli appaiono come ricaricabili — se scarichi chiedono una ricarica, mai batterie nuove.",
|
||||||
"battery_fleet_status_low": "Scarica",
|
"battery_fleet_status_low": "Scarica",
|
||||||
"battery_fleet_status_soon": "A breve",
|
"battery_fleet_status_soon": "A breve",
|
||||||
"battery_fleet_status_ok": "A posto",
|
"battery_fleet_status_ok": "A posto",
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
"due_soon": "期限間近",
|
"due_soon": "期限間近",
|
||||||
"triggered": "トリガー発生",
|
"triggered": "トリガー発生",
|
||||||
"trigger_replaced": "トリガー解除済み",
|
"trigger_replaced": "トリガー解除済み",
|
||||||
|
"trigger_removed": "トリガーを削除しました",
|
||||||
"ok": "OK",
|
"ok": "OK",
|
||||||
"all": "すべて",
|
"all": "すべて",
|
||||||
"new_object": "+ 新規対象",
|
"new_object": "+ 新規対象",
|
||||||
@@ -518,6 +519,7 @@
|
|||||||
"group_by_label": "グループ化",
|
"group_by_label": "グループ化",
|
||||||
"state_value_help": "HAの状態値を使用してください(通常は小文字、例: \"on\"/\"off\")。保存時に大文字小文字は正規化されます。",
|
"state_value_help": "HAの状態値を使用してください(通常は小文字、例: \"on\"/\"off\")。保存時に大文字小文字は正規化されます。",
|
||||||
"target_changes_help": "トリガーが発生するまでに一致する遷移の回数(既定: 1)。",
|
"target_changes_help": "トリガーが発生するまでに一致する遷移の回数(既定: 1)。",
|
||||||
|
"for_minutes_state_help": "0 はすべての変化を即座にカウントします。分を設定すると新しい状態がその時間続く必要があり、一瞬の変動はトリガーもカウントもされません。",
|
||||||
"qr_print_title": "QRコードを印刷",
|
"qr_print_title": "QRコードを印刷",
|
||||||
"qr_print_desc": "切り取って機器に貼れるQRコードの印刷ページを生成します。",
|
"qr_print_desc": "切り取って機器に貼れるQRコードの印刷ページを生成します。",
|
||||||
"qr_print_load": "対象を読み込む",
|
"qr_print_load": "対象を読み込む",
|
||||||
@@ -819,6 +821,7 @@
|
|||||||
"schedule_preview_ontime": "期日どおりに完了した場合。",
|
"schedule_preview_ontime": "期日どおりに完了した場合。",
|
||||||
"schedule_preview_ends": "(シリーズ終了)",
|
"schedule_preview_ends": "(シリーズ終了)",
|
||||||
"adopt_problem_responsible": "採用したすべてのタスクの担当ユーザー(任意)",
|
"adopt_problem_responsible": "採用したすべてのタスクの担当ユーザー(任意)",
|
||||||
|
"adopt_for_minutes_hint": "問題がこの時間続いた場合にのみトリガーします。0 は最初の変動に即反応します。",
|
||||||
"adopt_problem_configure": "設定",
|
"adopt_problem_configure": "設定",
|
||||||
"history_auto": "自動",
|
"history_auto": "自動",
|
||||||
"battery_fleet_title": "電池フリート",
|
"battery_fleet_title": "電池フリート",
|
||||||
@@ -838,6 +841,8 @@
|
|||||||
"battery_fleet_all_hint": "電池残量が少ないと報告される前に、ここで機器を除外できます — 自動充電するロボット掃除機や、自分で警告するスマートフォンなど。",
|
"battery_fleet_all_hint": "電池残量が少ないと報告される前に、ここで機器を除外できます — 自動充電するロボット掃除機や、自分で警告するスマートフォンなど。",
|
||||||
"battery_fleet_add": "電池を追加",
|
"battery_fleet_add": "電池を追加",
|
||||||
"battery_fleet_add_hint": "自動検出が見逃した電池センサーを選択すると、すぐに一覧に追加されます。",
|
"battery_fleet_add_hint": "自動検出が見逃した電池センサーを選択すると、すぐに一覧に追加されます。",
|
||||||
|
"battery_fleet_track_self": "自己充電式バッテリーを追跡",
|
||||||
|
"battery_fleet_track_self_hint": "スマートフォンや掃除機など自己充電するデバイスは充電式として表示されます。残量が少ないときは充電を促し、電池交換は求めません。",
|
||||||
"battery_fleet_status_low": "残量低下",
|
"battery_fleet_status_low": "残量低下",
|
||||||
"battery_fleet_status_soon": "まもなく",
|
"battery_fleet_status_soon": "まもなく",
|
||||||
"battery_fleet_status_ok": "良好",
|
"battery_fleet_status_ok": "良好",
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
"due_soon": "기한 임박",
|
"due_soon": "기한 임박",
|
||||||
"triggered": "트리거됨",
|
"triggered": "트리거됨",
|
||||||
"trigger_replaced": "트리거 교체됨",
|
"trigger_replaced": "트리거 교체됨",
|
||||||
|
"trigger_removed": "트리거 제거됨",
|
||||||
"ok": "정상",
|
"ok": "정상",
|
||||||
"all": "전체",
|
"all": "전체",
|
||||||
"new_object": "+ 새 객체",
|
"new_object": "+ 새 객체",
|
||||||
@@ -524,6 +525,7 @@
|
|||||||
"group_by_label": "그룹화",
|
"group_by_label": "그룹화",
|
||||||
"state_value_help": "HA 상태 값을 사용하세요(보통 소문자, 예: \"on\"/\"off\"). 대소문자는 저장 시 정규화됩니다.",
|
"state_value_help": "HA 상태 값을 사용하세요(보통 소문자, 예: \"on\"/\"off\"). 대소문자는 저장 시 정규화됩니다.",
|
||||||
"target_changes_help": "트리거가 발동하기까지 필요한 일치 전환 횟수입니다 (기본값: 1).",
|
"target_changes_help": "트리거가 발동하기까지 필요한 일치 전환 횟수입니다 (기본값: 1).",
|
||||||
|
"for_minutes_state_help": "0은 모든 변화를 즉시 집계합니다. 분을 설정하면 새 상태가 먼저 그 시간 동안 유지되어야 하며, 짧은 깜빡임은 트리거되지도 집계되지도 않습니다.",
|
||||||
"qr_print_title": "QR 코드 인쇄",
|
"qr_print_title": "QR 코드 인쇄",
|
||||||
"qr_print_desc": "잘라서 장비에 붙일 수 있는 QR 코드 인쇄 페이지를 생성합니다.",
|
"qr_print_desc": "잘라서 장비에 붙일 수 있는 QR 코드 인쇄 페이지를 생성합니다.",
|
||||||
"qr_print_load": "객체 불러오기",
|
"qr_print_load": "객체 불러오기",
|
||||||
@@ -819,6 +821,7 @@
|
|||||||
"schedule_preview_ontime": "제때 완료한다고 가정한 일정입니다.",
|
"schedule_preview_ontime": "제때 완료한다고 가정한 일정입니다.",
|
||||||
"schedule_preview_ends": "(시리즈 종료)",
|
"schedule_preview_ends": "(시리즈 종료)",
|
||||||
"adopt_problem_responsible": "가져온 모든 작업의 담당자 (선택)",
|
"adopt_problem_responsible": "가져온 모든 작업의 담당자 (선택)",
|
||||||
|
"adopt_for_minutes_hint": "문제가 이 시간 동안 지속된 경우에만 트리거합니다. 0은 첫 깜빡임에 즉시 반응합니다.",
|
||||||
"adopt_problem_configure": "구성",
|
"adopt_problem_configure": "구성",
|
||||||
"history_auto": "자동",
|
"history_auto": "자동",
|
||||||
"battery_fleet_title": "배터리 플릿",
|
"battery_fleet_title": "배터리 플릿",
|
||||||
@@ -838,6 +841,8 @@
|
|||||||
"battery_fleet_all_hint": "배터리 부족을 알리기 전에 여기에서 기기를 제외하세요 — 스스로 충전하는 로봇청소기나 자체적으로 경고하는 휴대폰처럼.",
|
"battery_fleet_all_hint": "배터리 부족을 알리기 전에 여기에서 기기를 제외하세요 — 스스로 충전하는 로봇청소기나 자체적으로 경고하는 휴대폰처럼.",
|
||||||
"battery_fleet_add": "배터리 추가",
|
"battery_fleet_add": "배터리 추가",
|
||||||
"battery_fleet_add_hint": "자동 검색이 놓친 배터리 센서를 선택하면 즉시 목록에 추가됩니다.",
|
"battery_fleet_add_hint": "자동 검색이 놓친 배터리 센서를 선택하면 즉시 목록에 추가됩니다.",
|
||||||
|
"battery_fleet_track_self": "자체 충전 배터리 추적",
|
||||||
|
"battery_fleet_track_self_hint": "휴대폰, 청소기 등 스스로 충전되는 기기는 충전식으로 표시됩니다. 잔량이 낮으면 충전을 요청하며 새 전지를 요구하지 않습니다.",
|
||||||
"battery_fleet_status_low": "부족",
|
"battery_fleet_status_low": "부족",
|
||||||
"battery_fleet_status_soon": "곧",
|
"battery_fleet_status_soon": "곧",
|
||||||
"battery_fleet_status_ok": "정상",
|
"battery_fleet_status_ok": "정상",
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
"due_soon": "Forfaller snart",
|
"due_soon": "Forfaller snart",
|
||||||
"triggered": "Utløst",
|
"triggered": "Utløst",
|
||||||
"trigger_replaced": "Utløser erstattet",
|
"trigger_replaced": "Utløser erstattet",
|
||||||
|
"trigger_removed": "Utløser fjernet",
|
||||||
"ok": "OK",
|
"ok": "OK",
|
||||||
"all": "Alle",
|
"all": "Alle",
|
||||||
"new_object": "+ Nytt objekt",
|
"new_object": "+ Nytt objekt",
|
||||||
@@ -518,6 +519,7 @@
|
|||||||
"group_by_label": "Grupper etter",
|
"group_by_label": "Grupper etter",
|
||||||
"state_value_help": "Bruk HA-tilstandsverdien (vanligvis små bokstaver, f.eks. \"on\"/\"off\"). Store/små bokstaver normaliseres ved lagring.",
|
"state_value_help": "Bruk HA-tilstandsverdien (vanligvis små bokstaver, f.eks. \"on\"/\"off\"). Store/små bokstaver normaliseres ved lagring.",
|
||||||
"target_changes_help": "Antall samsvarende overganger før utløseren aktiveres (standard: 1).",
|
"target_changes_help": "Antall samsvarende overganger før utløseren aktiveres (standard: 1).",
|
||||||
|
"for_minutes_state_help": "0 teller hver endring umiddelbart. Med minutter må den nye tilstanden først holde seg — korte blink verken utløser eller telles da.",
|
||||||
"qr_print_title": "Skriv ut QR-koder",
|
"qr_print_title": "Skriv ut QR-koder",
|
||||||
"qr_print_desc": "Generer en utskrivbar side med QR-koder som kan klippes ut og festes på utstyret ditt.",
|
"qr_print_desc": "Generer en utskrivbar side med QR-koder som kan klippes ut og festes på utstyret ditt.",
|
||||||
"qr_print_load": "Last objekter",
|
"qr_print_load": "Last objekter",
|
||||||
@@ -819,6 +821,7 @@
|
|||||||
"schedule_preview_ontime": "Forutsatt fullføring i tide.",
|
"schedule_preview_ontime": "Forutsatt fullføring i tide.",
|
||||||
"schedule_preview_ends": "(serien avsluttes)",
|
"schedule_preview_ends": "(serien avsluttes)",
|
||||||
"adopt_problem_responsible": "Ansvarlig bruker for alle overtatte oppgaver (valgfritt)",
|
"adopt_problem_responsible": "Ansvarlig bruker for alle overtatte oppgaver (valgfritt)",
|
||||||
|
"adopt_for_minutes_hint": "Utløs først når problemet har vart så lenge — 0 reagerer på første blink.",
|
||||||
"adopt_problem_configure": "Konfigurer",
|
"adopt_problem_configure": "Konfigurer",
|
||||||
"history_auto": "Automatisk",
|
"history_auto": "Automatisk",
|
||||||
"battery_fleet_title": "Batteriflåte",
|
"battery_fleet_title": "Batteriflåte",
|
||||||
@@ -838,6 +841,8 @@
|
|||||||
"battery_fleet_all_hint": "Utelukk en enhet her før den i det hele tatt melder lavt nivå — en støvsuger som lader seg selv, eller en telefon som varsler av seg selv.",
|
"battery_fleet_all_hint": "Utelukk en enhet her før den i det hele tatt melder lavt nivå — en støvsuger som lader seg selv, eller en telefon som varsler av seg selv.",
|
||||||
"battery_fleet_add": "Legg til et batteri",
|
"battery_fleet_add": "Legg til et batteri",
|
||||||
"battery_fleet_add_hint": "Velg en batterisensor som den automatiske gjenkjenningen overså — den blir med i listen umiddelbart.",
|
"battery_fleet_add_hint": "Velg en batterisensor som den automatiske gjenkjenningen overså — den blir med i listen umiddelbart.",
|
||||||
|
"battery_fleet_track_self": "Spor selvladende batterier",
|
||||||
|
"battery_fleet_track_self_hint": "Telefoner, støvsugere og andre selvladende enheter vises som oppladbare — ved lavt nivå bes det om lading, aldri om nye batterier.",
|
||||||
"battery_fleet_status_low": "Lav",
|
"battery_fleet_status_low": "Lav",
|
||||||
"battery_fleet_status_soon": "Snart",
|
"battery_fleet_status_soon": "Snart",
|
||||||
"battery_fleet_status_ok": "I orden",
|
"battery_fleet_status_ok": "I orden",
|
||||||
|
|||||||
@@ -517,6 +517,7 @@
|
|||||||
"group_by_label": "Groeperen op",
|
"group_by_label": "Groeperen op",
|
||||||
"state_value_help": "Gebruik de HA-statuswaarde (meestal in kleine letters, bv. \"on\"/\"off\"). Hoofdletters worden bij opslaan genormaliseerd.",
|
"state_value_help": "Gebruik de HA-statuswaarde (meestal in kleine letters, bv. \"on\"/\"off\"). Hoofdletters worden bij opslaan genormaliseerd.",
|
||||||
"target_changes_help": "Aantal overeenkomende overgangen voordat de trigger wordt geactiveerd (standaard: 1).",
|
"target_changes_help": "Aantal overeenkomende overgangen voordat de trigger wordt geactiveerd (standaard: 1).",
|
||||||
|
"for_minutes_state_help": "0 telt elke wijziging direct. Met minuten moet de nieuwe status eerst zo lang aanhouden — kort flikkeren triggert dan niet en telt niet mee.",
|
||||||
"qr_print_title": "QR-codes afdrukken",
|
"qr_print_title": "QR-codes afdrukken",
|
||||||
"qr_print_desc": "Genereer een afdrukpagina met QR-codes om uit te knippen en op je apparaten te plakken.",
|
"qr_print_desc": "Genereer een afdrukpagina met QR-codes om uit te knippen en op je apparaten te plakken.",
|
||||||
"qr_print_load": "Objecten laden",
|
"qr_print_load": "Objecten laden",
|
||||||
@@ -584,6 +585,7 @@
|
|||||||
"quick_complete_defaults_feedback_not_needed": "Niet nodig",
|
"quick_complete_defaults_feedback_not_needed": "Niet nodig",
|
||||||
"quick_complete_success": "Snel als voltooid gemarkeerd",
|
"quick_complete_success": "Snel als voltooid gemarkeerd",
|
||||||
"trigger_replaced": "Trigger vervangen",
|
"trigger_replaced": "Trigger vervangen",
|
||||||
|
"trigger_removed": "Trigger verwijderd",
|
||||||
"add": "Toevoegen",
|
"add": "Toevoegen",
|
||||||
"show_stats": "Statistieken + grafieken tonen",
|
"show_stats": "Statistieken + grafieken tonen",
|
||||||
"hide_stats": "Statistieken verbergen",
|
"hide_stats": "Statistieken verbergen",
|
||||||
@@ -819,6 +821,7 @@
|
|||||||
"schedule_preview_ontime": "Uitgaande van tijdige afronding.",
|
"schedule_preview_ontime": "Uitgaande van tijdige afronding.",
|
||||||
"schedule_preview_ends": "(reeks eindigt)",
|
"schedule_preview_ends": "(reeks eindigt)",
|
||||||
"adopt_problem_responsible": "Verantwoordelijke gebruiker voor alle overgenomen taken (optioneel)",
|
"adopt_problem_responsible": "Verantwoordelijke gebruiker voor alle overgenomen taken (optioneel)",
|
||||||
|
"adopt_for_minutes_hint": "Pas triggeren als het probleem zo lang aanhoudt — 0 reageert op de eerste flikkering.",
|
||||||
"adopt_problem_configure": "Configureren",
|
"adopt_problem_configure": "Configureren",
|
||||||
"history_auto": "Automatisch",
|
"history_auto": "Automatisch",
|
||||||
"battery_fleet_title": "Batterijvloot",
|
"battery_fleet_title": "Batterijvloot",
|
||||||
@@ -838,6 +841,8 @@
|
|||||||
"battery_fleet_all_hint": "Sluit een apparaat hier uit voordat het ooit laag meldt — een stofzuiger die zichzelf oplaadt, of een telefoon die zelf waarschuwt.",
|
"battery_fleet_all_hint": "Sluit een apparaat hier uit voordat het ooit laag meldt — een stofzuiger die zichzelf oplaadt, of een telefoon die zelf waarschuwt.",
|
||||||
"battery_fleet_add": "Batterij toevoegen",
|
"battery_fleet_add": "Batterij toevoegen",
|
||||||
"battery_fleet_add_hint": "Kies een batterijsensor die de automatische detectie heeft gemist — hij verschijnt direct in de lijst.",
|
"battery_fleet_add_hint": "Kies een batterijsensor die de automatische detectie heeft gemist — hij verschijnt direct in de lijst.",
|
||||||
|
"battery_fleet_track_self": "Zelfopladende batterijen volgen",
|
||||||
|
"battery_fleet_track_self_hint": "Telefoons, stofzuigers en andere zelfopladende apparaten verschijnen als oplaadbaar — bij een lage stand wordt om opladen gevraagd, nooit om nieuwe batterijen.",
|
||||||
"battery_fleet_status_low": "Laag",
|
"battery_fleet_status_low": "Laag",
|
||||||
"battery_fleet_status_soon": "Binnenkort",
|
"battery_fleet_status_soon": "Binnenkort",
|
||||||
"battery_fleet_status_ok": "In orde",
|
"battery_fleet_status_ok": "In orde",
|
||||||
|
|||||||
@@ -517,6 +517,7 @@
|
|||||||
"group_by_label": "Grupuj wg",
|
"group_by_label": "Grupuj wg",
|
||||||
"state_value_help": "Użyj wartości stanu HA (zwykle małymi literami, np. \"on\"/\"off\"). Wielkość liter jest normalizowana przy zapisie.",
|
"state_value_help": "Użyj wartości stanu HA (zwykle małymi literami, np. \"on\"/\"off\"). Wielkość liter jest normalizowana przy zapisie.",
|
||||||
"target_changes_help": "Liczba pasujących przejść przed wyzwoleniem (domyślnie: 1).",
|
"target_changes_help": "Liczba pasujących przejść przed wyzwoleniem (domyślnie: 1).",
|
||||||
|
"for_minutes_state_help": "0 liczy każdą zmianę od razu. Z minutami nowy stan musi się najpierw utrzymać — krótkie mignięcia wtedy nie wyzwalają i nie liczą się.",
|
||||||
"qr_print_title": "Drukuj kody QR",
|
"qr_print_title": "Drukuj kody QR",
|
||||||
"qr_print_desc": "Wygeneruj stronę do druku z kodami QR do wycięcia i naklejenia na sprzęcie.",
|
"qr_print_desc": "Wygeneruj stronę do druku z kodami QR do wycięcia i naklejenia na sprzęcie.",
|
||||||
"qr_print_load": "Załaduj obiekty",
|
"qr_print_load": "Załaduj obiekty",
|
||||||
@@ -584,6 +585,7 @@
|
|||||||
"quick_complete_defaults_feedback_not_needed": "Nie było potrzebne",
|
"quick_complete_defaults_feedback_not_needed": "Nie było potrzebne",
|
||||||
"quick_complete_success": "Szybko oznaczono jako wykonane",
|
"quick_complete_success": "Szybko oznaczono jako wykonane",
|
||||||
"trigger_replaced": "Wyzwalacz zastąpiony",
|
"trigger_replaced": "Wyzwalacz zastąpiony",
|
||||||
|
"trigger_removed": "Wyzwalacz usunięty",
|
||||||
"add": "Dodaj",
|
"add": "Dodaj",
|
||||||
"show_stats": "Pokaż statystyki + wykresy",
|
"show_stats": "Pokaż statystyki + wykresy",
|
||||||
"hide_stats": "Ukryj statystyki",
|
"hide_stats": "Ukryj statystyki",
|
||||||
@@ -819,6 +821,7 @@
|
|||||||
"schedule_preview_ontime": "Przy założeniu terminowego ukończenia.",
|
"schedule_preview_ontime": "Przy założeniu terminowego ukończenia.",
|
||||||
"schedule_preview_ends": "(seria się kończy)",
|
"schedule_preview_ends": "(seria się kończy)",
|
||||||
"adopt_problem_responsible": "Osoba odpowiedzialna za wszystkie przejęte zadania (opcjonalnie)",
|
"adopt_problem_responsible": "Osoba odpowiedzialna za wszystkie przejęte zadania (opcjonalnie)",
|
||||||
|
"adopt_for_minutes_hint": "Wyzwalaj dopiero, gdy problem utrzymuje się tak długo — 0 reaguje na pierwsze mignięcie.",
|
||||||
"adopt_problem_configure": "Konfiguruj",
|
"adopt_problem_configure": "Konfiguruj",
|
||||||
"history_auto": "Automatycznie",
|
"history_auto": "Automatycznie",
|
||||||
"battery_fleet_title": "Flota baterii",
|
"battery_fleet_title": "Flota baterii",
|
||||||
@@ -838,6 +841,8 @@
|
|||||||
"battery_fleet_all_hint": "Wyklucz tutaj urządzenie, zanim w ogóle zgłosi niski poziom — odkurzacz, który sam się ładuje, albo telefon, który ostrzega samodzielnie.",
|
"battery_fleet_all_hint": "Wyklucz tutaj urządzenie, zanim w ogóle zgłosi niski poziom — odkurzacz, który sam się ładuje, albo telefon, który ostrzega samodzielnie.",
|
||||||
"battery_fleet_add": "Dodaj baterię",
|
"battery_fleet_add": "Dodaj baterię",
|
||||||
"battery_fleet_add_hint": "Wybierz czujnik baterii pominięty przez automatyczne wykrywanie — od razu trafi na listę.",
|
"battery_fleet_add_hint": "Wybierz czujnik baterii pominięty przez automatyczne wykrywanie — od razu trafi na listę.",
|
||||||
|
"battery_fleet_track_self": "Śledź baterie samoładujące",
|
||||||
|
"battery_fleet_track_self_hint": "Telefony, odkurzacze i inne samoładujące się urządzenia pojawiają się jako akumulatory — przy niskim poziomie proszą o ładowanie, nigdy o nowe baterie.",
|
||||||
"battery_fleet_status_low": "Niski",
|
"battery_fleet_status_low": "Niski",
|
||||||
"battery_fleet_status_soon": "Wkrótce",
|
"battery_fleet_status_soon": "Wkrótce",
|
||||||
"battery_fleet_status_ok": "W porządku",
|
"battery_fleet_status_ok": "W porządku",
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
"due_soon": "Vence em breve",
|
"due_soon": "Vence em breve",
|
||||||
"triggered": "Acionada",
|
"triggered": "Acionada",
|
||||||
"trigger_replaced": "Gatilho substituído",
|
"trigger_replaced": "Gatilho substituído",
|
||||||
|
"trigger_removed": "Gatilho removido",
|
||||||
"ok": "OK",
|
"ok": "OK",
|
||||||
"all": "Todas",
|
"all": "Todas",
|
||||||
"new_object": "+ Novo objeto",
|
"new_object": "+ Novo objeto",
|
||||||
@@ -524,6 +525,7 @@
|
|||||||
"group_by_label": "Agrupar por",
|
"group_by_label": "Agrupar por",
|
||||||
"state_value_help": "Use o valor de estado do HA (geralmente minúsculo, ex.: \"on\"/\"off\"). Maiúsculas e minúsculas são normalizadas ao salvar.",
|
"state_value_help": "Use o valor de estado do HA (geralmente minúsculo, ex.: \"on\"/\"off\"). Maiúsculas e minúsculas são normalizadas ao salvar.",
|
||||||
"target_changes_help": "Número de transições correspondentes antes de o gatilho disparar (padrão: 1).",
|
"target_changes_help": "Número de transições correspondentes antes de o gatilho disparar (padrão: 1).",
|
||||||
|
"for_minutes_state_help": "0 conta cada mudança imediatamente. Com minutos, o novo estado deve se manter primeiro — uma oscilação breve então não dispara nem conta.",
|
||||||
"qr_print_title": "Imprimir códigos QR",
|
"qr_print_title": "Imprimir códigos QR",
|
||||||
"qr_print_desc": "Gere uma página imprimível de códigos QR para recortar e colar nos seus equipamentos.",
|
"qr_print_desc": "Gere uma página imprimível de códigos QR para recortar e colar nos seus equipamentos.",
|
||||||
"qr_print_load": "Carregar objetos",
|
"qr_print_load": "Carregar objetos",
|
||||||
@@ -819,6 +821,7 @@
|
|||||||
"schedule_preview_ontime": "Supondo conclusão em dia.",
|
"schedule_preview_ontime": "Supondo conclusão em dia.",
|
||||||
"schedule_preview_ends": "(a série termina)",
|
"schedule_preview_ends": "(a série termina)",
|
||||||
"adopt_problem_responsible": "Usuário responsável por todas as tarefas adotadas (opcional)",
|
"adopt_problem_responsible": "Usuário responsável por todas as tarefas adotadas (opcional)",
|
||||||
|
"adopt_for_minutes_hint": "Disparar apenas se o problema persistir por esse tempo — 0 reage à primeira oscilação.",
|
||||||
"adopt_problem_configure": "Configurar",
|
"adopt_problem_configure": "Configurar",
|
||||||
"history_auto": "Automática",
|
"history_auto": "Automática",
|
||||||
"battery_fleet_title": "Frota de baterias",
|
"battery_fleet_title": "Frota de baterias",
|
||||||
@@ -838,6 +841,8 @@
|
|||||||
"battery_fleet_all_hint": "Exclua aqui um dispositivo antes que ele sequer indique carga baixa — um aspirador que se recarrega sozinho ou um celular que já avisa sozinho.",
|
"battery_fleet_all_hint": "Exclua aqui um dispositivo antes que ele sequer indique carga baixa — um aspirador que se recarrega sozinho ou um celular que já avisa sozinho.",
|
||||||
"battery_fleet_add": "Adicionar uma bateria",
|
"battery_fleet_add": "Adicionar uma bateria",
|
||||||
"battery_fleet_add_hint": "Escolha um sensor de bateria que a detecção automática não encontrou — ele entra na lista imediatamente.",
|
"battery_fleet_add_hint": "Escolha um sensor de bateria que a detecção automática não encontrou — ele entra na lista imediatamente.",
|
||||||
|
"battery_fleet_track_self": "Acompanhar baterias de carregamento automático",
|
||||||
|
"battery_fleet_track_self_hint": "Telefones, aspiradores e outros dispositivos que se recarregam sozinhos aparecem como recarregáveis — com carga baixa pedem uma recarga, nunca pilhas novas.",
|
||||||
"battery_fleet_status_low": "Fraca",
|
"battery_fleet_status_low": "Fraca",
|
||||||
"battery_fleet_status_soon": "Em breve",
|
"battery_fleet_status_soon": "Em breve",
|
||||||
"battery_fleet_status_ok": "Em bom estado",
|
"battery_fleet_status_ok": "Em bom estado",
|
||||||
|
|||||||
@@ -513,6 +513,7 @@
|
|||||||
"group_by_label": "Agrupar por",
|
"group_by_label": "Agrupar por",
|
||||||
"state_value_help": "Use o valor de estado HA (normalmente em minúsculas, p. ex. \"on\"/\"off\"). As maiúsculas são normalizadas ao guardar.",
|
"state_value_help": "Use o valor de estado HA (normalmente em minúsculas, p. ex. \"on\"/\"off\"). As maiúsculas são normalizadas ao guardar.",
|
||||||
"target_changes_help": "Número de transições correspondentes antes do trigger disparar (predefinido: 1).",
|
"target_changes_help": "Número de transições correspondentes antes do trigger disparar (predefinido: 1).",
|
||||||
|
"for_minutes_state_help": "0 conta cada mudança de imediato. Com minutos, o novo estado tem de se manter primeiro — uma oscilação breve então não dispara nem conta.",
|
||||||
"qr_print_title": "Imprimir códigos QR",
|
"qr_print_title": "Imprimir códigos QR",
|
||||||
"qr_print_desc": "Gera uma página imprimível de códigos QR para recortar e colar nos equipamentos.",
|
"qr_print_desc": "Gera uma página imprimível de códigos QR para recortar e colar nos equipamentos.",
|
||||||
"qr_print_load": "Carregar objetos",
|
"qr_print_load": "Carregar objetos",
|
||||||
@@ -584,6 +585,7 @@
|
|||||||
"quick_complete_defaults_feedback_not_needed": "Não era necessário",
|
"quick_complete_defaults_feedback_not_needed": "Não era necessário",
|
||||||
"quick_complete_success": "Concluído rapidamente",
|
"quick_complete_success": "Concluído rapidamente",
|
||||||
"trigger_replaced": "Acionador substituído",
|
"trigger_replaced": "Acionador substituído",
|
||||||
|
"trigger_removed": "Gatilho removido",
|
||||||
"add": "Adicionar",
|
"add": "Adicionar",
|
||||||
"show_stats": "Mostrar estatísticas + gráficos",
|
"show_stats": "Mostrar estatísticas + gráficos",
|
||||||
"hide_stats": "Ocultar estatísticas",
|
"hide_stats": "Ocultar estatísticas",
|
||||||
@@ -819,6 +821,7 @@
|
|||||||
"schedule_preview_ontime": "Assumindo conclusão pontual.",
|
"schedule_preview_ontime": "Assumindo conclusão pontual.",
|
||||||
"schedule_preview_ends": "(a série termina)",
|
"schedule_preview_ends": "(a série termina)",
|
||||||
"adopt_problem_responsible": "Utilizador responsável por todas as tarefas adotadas (opcional)",
|
"adopt_problem_responsible": "Utilizador responsável por todas as tarefas adotadas (opcional)",
|
||||||
|
"adopt_for_minutes_hint": "Disparar apenas se o problema persistir este tempo — 0 reage à primeira oscilação.",
|
||||||
"adopt_problem_configure": "Configurar",
|
"adopt_problem_configure": "Configurar",
|
||||||
"history_auto": "Automático",
|
"history_auto": "Automático",
|
||||||
"battery_fleet_title": "Frota de baterias",
|
"battery_fleet_title": "Frota de baterias",
|
||||||
@@ -838,6 +841,8 @@
|
|||||||
"battery_fleet_all_hint": "Exclua aqui um dispositivo antes de ele sequer indicar carga fraca — um aspirador que se recarrega sozinho ou um telemóvel que já avisa por si.",
|
"battery_fleet_all_hint": "Exclua aqui um dispositivo antes de ele sequer indicar carga fraca — um aspirador que se recarrega sozinho ou um telemóvel que já avisa por si.",
|
||||||
"battery_fleet_add": "Adicionar uma bateria",
|
"battery_fleet_add": "Adicionar uma bateria",
|
||||||
"battery_fleet_add_hint": "Escolha um sensor de bateria que a deteção automática não encontrou — entra de imediato na lista.",
|
"battery_fleet_add_hint": "Escolha um sensor de bateria que a deteção automática não encontrou — entra de imediato na lista.",
|
||||||
|
"battery_fleet_track_self": "Acompanhar baterias de carregamento automático",
|
||||||
|
"battery_fleet_track_self_hint": "Telefones, aspiradores e outros dispositivos que se recarregam sozinhos aparecem como recarregáveis — com carga baixa pedem um carregamento, nunca pilhas novas.",
|
||||||
"battery_fleet_status_low": "Fraca",
|
"battery_fleet_status_low": "Fraca",
|
||||||
"battery_fleet_status_soon": "Em breve",
|
"battery_fleet_status_soon": "Em breve",
|
||||||
"battery_fleet_status_ok": "Em bom estado",
|
"battery_fleet_status_ok": "Em bom estado",
|
||||||
|
|||||||
@@ -517,6 +517,7 @@
|
|||||||
"group_by_label": "Группировать по",
|
"group_by_label": "Группировать по",
|
||||||
"state_value_help": "Используйте значение состояния HA (обычно в нижнем регистре, напр. \"on\"/\"off\"). Регистр нормализуется при сохранении.",
|
"state_value_help": "Используйте значение состояния HA (обычно в нижнем регистре, напр. \"on\"/\"off\"). Регистр нормализуется при сохранении.",
|
||||||
"target_changes_help": "Количество совпадающих переходов, после которых срабатывает триггер (по умолчанию: 1).",
|
"target_changes_help": "Количество совпадающих переходов, после которых срабатывает триггер (по умолчанию: 1).",
|
||||||
|
"for_minutes_state_help": "0 — каждое изменение засчитывается сразу. С минутами новое состояние сначала должно удержаться — короткие сбои тогда не срабатывают и не считаются.",
|
||||||
"qr_print_title": "Печать QR-кодов",
|
"qr_print_title": "Печать QR-кодов",
|
||||||
"qr_print_desc": "Создай страницу для печати с QR-кодами для вырезания и наклеивания на оборудование.",
|
"qr_print_desc": "Создай страницу для печати с QR-кодами для вырезания и наклеивания на оборудование.",
|
||||||
"qr_print_load": "Загрузить объекты",
|
"qr_print_load": "Загрузить объекты",
|
||||||
@@ -584,6 +585,7 @@
|
|||||||
"quick_complete_defaults_feedback_not_needed": "Не было необходимо",
|
"quick_complete_defaults_feedback_not_needed": "Не было необходимо",
|
||||||
"quick_complete_success": "Быстро отмечено как выполнено",
|
"quick_complete_success": "Быстро отмечено как выполнено",
|
||||||
"trigger_replaced": "Триггер заменён",
|
"trigger_replaced": "Триггер заменён",
|
||||||
|
"trigger_removed": "Триггер удалён",
|
||||||
"add": "Добавить",
|
"add": "Добавить",
|
||||||
"show_stats": "Показать статистику + графики",
|
"show_stats": "Показать статистику + графики",
|
||||||
"hide_stats": "Скрыть статистику",
|
"hide_stats": "Скрыть статистику",
|
||||||
@@ -819,6 +821,7 @@
|
|||||||
"schedule_preview_ontime": "При условии своевременного выполнения.",
|
"schedule_preview_ontime": "При условии своевременного выполнения.",
|
||||||
"schedule_preview_ends": "(серия завершается)",
|
"schedule_preview_ends": "(серия завершается)",
|
||||||
"adopt_problem_responsible": "Ответственный пользователь для всех принятых задач (необязательно)",
|
"adopt_problem_responsible": "Ответственный пользователь для всех принятых задач (необязательно)",
|
||||||
|
"adopt_for_minutes_hint": "Срабатывать только если проблема сохраняется это время — 0 реагирует на первый сбой.",
|
||||||
"adopt_problem_configure": "Настроить",
|
"adopt_problem_configure": "Настроить",
|
||||||
"history_auto": "Автоматически",
|
"history_auto": "Автоматически",
|
||||||
"battery_fleet_title": "Парк батарей",
|
"battery_fleet_title": "Парк батарей",
|
||||||
@@ -838,6 +841,8 @@
|
|||||||
"battery_fleet_all_hint": "Исключите устройство здесь ещё до того, как оно сообщит о низком заряде — робот-пылесос, который заряжается сам, или телефон, который предупреждает вас сам.",
|
"battery_fleet_all_hint": "Исключите устройство здесь ещё до того, как оно сообщит о низком заряде — робот-пылесос, который заряжается сам, или телефон, который предупреждает вас сам.",
|
||||||
"battery_fleet_add": "Добавить батарею",
|
"battery_fleet_add": "Добавить батарею",
|
||||||
"battery_fleet_add_hint": "Выберите датчик батареи, который автоматическое обнаружение пропустило — он сразу появится в списке.",
|
"battery_fleet_add_hint": "Выберите датчик батареи, который автоматическое обнаружение пропустило — он сразу появится в списке.",
|
||||||
|
"battery_fleet_track_self": "Отслеживать самозаряжающиеся батареи",
|
||||||
|
"battery_fleet_track_self_hint": "Телефоны, пылесосы и другие самозаряжающиеся устройства отображаются как аккумуляторы — при низком заряде нужна зарядка, а не новые батарейки.",
|
||||||
"battery_fleet_status_low": "Низкий",
|
"battery_fleet_status_low": "Низкий",
|
||||||
"battery_fleet_status_soon": "Скоро",
|
"battery_fleet_status_soon": "Скоро",
|
||||||
"battery_fleet_status_ok": "В норме",
|
"battery_fleet_status_ok": "В норме",
|
||||||
|
|||||||
@@ -517,6 +517,7 @@
|
|||||||
"group_by_label": "Gruppera efter",
|
"group_by_label": "Gruppera efter",
|
||||||
"state_value_help": "Använd HA-tillståndsvärdet (vanligtvis med små bokstäver, t.ex. \"on\"/\"off\"). Versaler normaliseras vid sparande.",
|
"state_value_help": "Använd HA-tillståndsvärdet (vanligtvis med små bokstäver, t.ex. \"on\"/\"off\"). Versaler normaliseras vid sparande.",
|
||||||
"target_changes_help": "Antal matchande övergångar innan utlösaren aktiveras (standard: 1).",
|
"target_changes_help": "Antal matchande övergångar innan utlösaren aktiveras (standard: 1).",
|
||||||
|
"for_minutes_state_help": "0 räknar varje ändring direkt. Med minuter måste det nya tillståndet först hålla i sig — korta blinkningar varken utlöser eller räknas då.",
|
||||||
"qr_print_title": "Skriv ut QR-koder",
|
"qr_print_title": "Skriv ut QR-koder",
|
||||||
"qr_print_desc": "Skapa en utskriftssida med QR-koder att klippa ut och sätta på din utrustning.",
|
"qr_print_desc": "Skapa en utskriftssida med QR-koder att klippa ut och sätta på din utrustning.",
|
||||||
"qr_print_load": "Ladda objekt",
|
"qr_print_load": "Ladda objekt",
|
||||||
@@ -584,6 +585,7 @@
|
|||||||
"quick_complete_defaults_feedback_not_needed": "Inte nödvändigt",
|
"quick_complete_defaults_feedback_not_needed": "Inte nödvändigt",
|
||||||
"quick_complete_success": "Snabbt markerad som klar",
|
"quick_complete_success": "Snabbt markerad som klar",
|
||||||
"trigger_replaced": "Utlösare ersatt",
|
"trigger_replaced": "Utlösare ersatt",
|
||||||
|
"trigger_removed": "Utlösare borttagen",
|
||||||
"add": "Lägg till",
|
"add": "Lägg till",
|
||||||
"show_stats": "Visa statistik + grafer",
|
"show_stats": "Visa statistik + grafer",
|
||||||
"hide_stats": "Dölj statistik",
|
"hide_stats": "Dölj statistik",
|
||||||
@@ -819,6 +821,7 @@
|
|||||||
"schedule_preview_ontime": "Förutsatt slutförande i tid.",
|
"schedule_preview_ontime": "Förutsatt slutförande i tid.",
|
||||||
"schedule_preview_ends": "(serien avslutas)",
|
"schedule_preview_ends": "(serien avslutas)",
|
||||||
"adopt_problem_responsible": "Ansvarig användare för alla övertagna uppgifter (valfritt)",
|
"adopt_problem_responsible": "Ansvarig användare för alla övertagna uppgifter (valfritt)",
|
||||||
|
"adopt_for_minutes_hint": "Utlös först när problemet kvarstått så här länge — 0 reagerar på första blinkningen.",
|
||||||
"adopt_problem_configure": "Konfigurera",
|
"adopt_problem_configure": "Konfigurera",
|
||||||
"history_auto": "Automatiskt",
|
"history_auto": "Automatiskt",
|
||||||
"battery_fleet_title": "Batteriflotta",
|
"battery_fleet_title": "Batteriflotta",
|
||||||
@@ -838,6 +841,8 @@
|
|||||||
"battery_fleet_all_hint": "Uteslut en enhet här redan innan den rapporterar låg nivå — en dammsugare som laddar sig själv, eller en telefon som varnar på egen hand.",
|
"battery_fleet_all_hint": "Uteslut en enhet här redan innan den rapporterar låg nivå — en dammsugare som laddar sig själv, eller en telefon som varnar på egen hand.",
|
||||||
"battery_fleet_add": "Lägg till ett batteri",
|
"battery_fleet_add": "Lägg till ett batteri",
|
||||||
"battery_fleet_add_hint": "Välj en batterisensor som den automatiska identifieringen missade — den läggs till i listan direkt.",
|
"battery_fleet_add_hint": "Välj en batterisensor som den automatiska identifieringen missade — den läggs till i listan direkt.",
|
||||||
|
"battery_fleet_track_self": "Spåra självladdande batterier",
|
||||||
|
"battery_fleet_track_self_hint": "Telefoner, dammsugare och andra självladdande enheter visas som laddningsbara — vid låg nivå begärs laddning, aldrig nya batterier.",
|
||||||
"battery_fleet_status_low": "Låg",
|
"battery_fleet_status_low": "Låg",
|
||||||
"battery_fleet_status_soon": "Snart",
|
"battery_fleet_status_soon": "Snart",
|
||||||
"battery_fleet_status_ok": "I ordning",
|
"battery_fleet_status_ok": "I ordning",
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
"due_soon": "Yaklaşan",
|
"due_soon": "Yaklaşan",
|
||||||
"triggered": "Tetiklendi",
|
"triggered": "Tetiklendi",
|
||||||
"trigger_replaced": "Tetikleyici değiştirildi",
|
"trigger_replaced": "Tetikleyici değiştirildi",
|
||||||
|
"trigger_removed": "Tetikleyici kaldırıldı",
|
||||||
"ok": "Tamam",
|
"ok": "Tamam",
|
||||||
"all": "Tümü",
|
"all": "Tümü",
|
||||||
"new_object": "+ Yeni Nesne",
|
"new_object": "+ Yeni Nesne",
|
||||||
@@ -524,6 +525,7 @@
|
|||||||
"group_by_label": "Grupla",
|
"group_by_label": "Grupla",
|
||||||
"state_value_help": "HA durum değerini kullanın (genellikle küçük harf, örn. \"on\"/\"off\"). Büyük/küçük harf kaydederken normalleştirilir.",
|
"state_value_help": "HA durum değerini kullanın (genellikle küçük harf, örn. \"on\"/\"off\"). Büyük/küçük harf kaydederken normalleştirilir.",
|
||||||
"target_changes_help": "Tetikleyici çalışmadan önceki eşleşen geçiş sayısı (varsayılan: 1).",
|
"target_changes_help": "Tetikleyici çalışmadan önceki eşleşen geçiş sayısı (varsayılan: 1).",
|
||||||
|
"for_minutes_state_help": "0 her değişikliği hemen sayar. Dakika ayarlanırsa yeni durumun önce o kadar sürmesi gerekir — kısa titremeler o zaman ne tetikler ne de sayılır.",
|
||||||
"qr_print_title": "QR kodlarını yazdır",
|
"qr_print_title": "QR kodlarını yazdır",
|
||||||
"qr_print_desc": "Kesip ekipmanınıza yapıştırmak için yazdırılabilir bir QR kodu sayfası oluşturun.",
|
"qr_print_desc": "Kesip ekipmanınıza yapıştırmak için yazdırılabilir bir QR kodu sayfası oluşturun.",
|
||||||
"qr_print_load": "Nesneleri yükle",
|
"qr_print_load": "Nesneleri yükle",
|
||||||
@@ -819,6 +821,7 @@
|
|||||||
"schedule_preview_ontime": "Zamanında tamamlama varsayılarak.",
|
"schedule_preview_ontime": "Zamanında tamamlama varsayılarak.",
|
||||||
"schedule_preview_ends": "(seri sona erer)",
|
"schedule_preview_ends": "(seri sona erer)",
|
||||||
"adopt_problem_responsible": "Devralınan tüm görevler için sorumlu kullanıcı (isteğe bağlı)",
|
"adopt_problem_responsible": "Devralınan tüm görevler için sorumlu kullanıcı (isteğe bağlı)",
|
||||||
|
"adopt_for_minutes_hint": "Yalnızca sorun bu süre boyunca devam ederse tetikle — 0 ilk titremeye tepki verir.",
|
||||||
"adopt_problem_configure": "Yapılandır",
|
"adopt_problem_configure": "Yapılandır",
|
||||||
"history_auto": "Otomatik",
|
"history_auto": "Otomatik",
|
||||||
"battery_fleet_title": "Pil filosu",
|
"battery_fleet_title": "Pil filosu",
|
||||||
@@ -838,6 +841,8 @@
|
|||||||
"battery_fleet_all_hint": "Bir cihazı, daha düşük şarj bildirmeden burada hariç tutun — kendi kendine şarj olan bir süpürge ya da zaten kendisi uyaran bir telefon gibi.",
|
"battery_fleet_all_hint": "Bir cihazı, daha düşük şarj bildirmeden burada hariç tutun — kendi kendine şarj olan bir süpürge ya da zaten kendisi uyaran bir telefon gibi.",
|
||||||
"battery_fleet_add": "Pil ekle",
|
"battery_fleet_add": "Pil ekle",
|
||||||
"battery_fleet_add_hint": "Otomatik keşfin atladığı bir pil sensörü seçin — hemen listeye katılır.",
|
"battery_fleet_add_hint": "Otomatik keşfin atladığı bir pil sensörü seçin — hemen listeye katılır.",
|
||||||
|
"battery_fleet_track_self": "Kendi kendine şarj olan pilleri izle",
|
||||||
|
"battery_fleet_track_self_hint": "Telefonlar, süpürgeler ve kendi kendine şarj olan diğer cihazlar şarj edilebilir olarak görünür — seviye düşükken şarj istenir, asla yeni pil istenmez.",
|
||||||
"battery_fleet_status_low": "Düşük",
|
"battery_fleet_status_low": "Düşük",
|
||||||
"battery_fleet_status_soon": "Yakında",
|
"battery_fleet_status_soon": "Yakında",
|
||||||
"battery_fleet_status_ok": "İyi durumda",
|
"battery_fleet_status_ok": "İyi durumda",
|
||||||
|
|||||||
@@ -517,6 +517,7 @@
|
|||||||
"group_by_label": "Групувати за",
|
"group_by_label": "Групувати за",
|
||||||
"state_value_help": "Використовуйте значення стану HA (зазвичай у нижньому регістрі, напр. \"on\"/\"off\"). Регістр нормалізується при збереженні.",
|
"state_value_help": "Використовуйте значення стану HA (зазвичай у нижньому регістрі, напр. \"on\"/\"off\"). Регістр нормалізується при збереженні.",
|
||||||
"target_changes_help": "Кількість відповідних переходів, після яких тригер спрацює (за замовчуванням: 1).",
|
"target_changes_help": "Кількість відповідних переходів, після яких тригер спрацює (за замовчуванням: 1).",
|
||||||
|
"for_minutes_state_help": "0 — кожна зміна зараховується одразу. З хвилинами новий стан спершу має утриматися — короткі збої тоді не спрацьовують і не рахуються.",
|
||||||
"qr_print_title": "Друкувати QR-коди",
|
"qr_print_title": "Друкувати QR-коди",
|
||||||
"qr_print_desc": "Створи сторінку для друку з QR-кодами, які можна вирізати та наклеїти на обладнання.",
|
"qr_print_desc": "Створи сторінку для друку з QR-кодами, які можна вирізати та наклеїти на обладнання.",
|
||||||
"qr_print_load": "Завантажити об'єкти",
|
"qr_print_load": "Завантажити об'єкти",
|
||||||
@@ -584,6 +585,7 @@
|
|||||||
"quick_complete_defaults_feedback_not_needed": "Не було необхідно",
|
"quick_complete_defaults_feedback_not_needed": "Не було необхідно",
|
||||||
"quick_complete_success": "Швидко позначено виконаним",
|
"quick_complete_success": "Швидко позначено виконаним",
|
||||||
"trigger_replaced": "Тригер замінено",
|
"trigger_replaced": "Тригер замінено",
|
||||||
|
"trigger_removed": "Тригер видалено",
|
||||||
"add": "Додати",
|
"add": "Додати",
|
||||||
"show_stats": "Показати статистику + графіки",
|
"show_stats": "Показати статистику + графіки",
|
||||||
"hide_stats": "Сховати статистику",
|
"hide_stats": "Сховати статистику",
|
||||||
@@ -819,6 +821,7 @@
|
|||||||
"schedule_preview_ontime": "За умови вчасного виконання.",
|
"schedule_preview_ontime": "За умови вчасного виконання.",
|
||||||
"schedule_preview_ends": "(серія завершується)",
|
"schedule_preview_ends": "(серія завершується)",
|
||||||
"adopt_problem_responsible": "Відповідальний користувач для всіх прийнятих завдань (необов'язково)",
|
"adopt_problem_responsible": "Відповідальний користувач для всіх прийнятих завдань (необов'язково)",
|
||||||
|
"adopt_for_minutes_hint": "Спрацьовувати лише якщо проблема триває цей час — 0 реагує на перший збій.",
|
||||||
"adopt_problem_configure": "Налаштувати",
|
"adopt_problem_configure": "Налаштувати",
|
||||||
"history_auto": "Автоматично",
|
"history_auto": "Автоматично",
|
||||||
"battery_fleet_title": "Парк батарей",
|
"battery_fleet_title": "Парк батарей",
|
||||||
@@ -838,6 +841,8 @@
|
|||||||
"battery_fleet_all_hint": "Вилучіть пристрій тут ще до того, як він повідомить про низький заряд — робот-пилосос, що заряджається сам, або телефон, який попереджає сам.",
|
"battery_fleet_all_hint": "Вилучіть пристрій тут ще до того, як він повідомить про низький заряд — робот-пилосос, що заряджається сам, або телефон, який попереджає сам.",
|
||||||
"battery_fleet_add": "Додати батарею",
|
"battery_fleet_add": "Додати батарею",
|
||||||
"battery_fleet_add_hint": "Виберіть датчик батареї, який автоматичне виявлення пропустило — він одразу з'явиться у списку.",
|
"battery_fleet_add_hint": "Виберіть датчик батареї, який автоматичне виявлення пропустило — він одразу з'явиться у списку.",
|
||||||
|
"battery_fleet_track_self": "Відстежувати самозарядні батареї",
|
||||||
|
"battery_fleet_track_self_hint": "Телефони, пилососи та інші самозарядні пристрої відображаються як акумулятори — за низького заряду потрібна зарядка, а не нові батарейки.",
|
||||||
"battery_fleet_status_low": "Низький",
|
"battery_fleet_status_low": "Низький",
|
||||||
"battery_fleet_status_soon": "Незабаром",
|
"battery_fleet_status_soon": "Незабаром",
|
||||||
"battery_fleet_status_ok": "У нормі",
|
"battery_fleet_status_ok": "У нормі",
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
"due_soon": "即将到期",
|
"due_soon": "即将到期",
|
||||||
"triggered": "已触发",
|
"triggered": "已触发",
|
||||||
"trigger_replaced": "触发器已更换",
|
"trigger_replaced": "触发器已更换",
|
||||||
|
"trigger_removed": "触发器已移除",
|
||||||
"ok": "正常",
|
"ok": "正常",
|
||||||
"all": "全部",
|
"all": "全部",
|
||||||
"new_object": "+ 新建维护项",
|
"new_object": "+ 新建维护项",
|
||||||
@@ -518,6 +519,7 @@
|
|||||||
"group_by_label": "分组依据",
|
"group_by_label": "分组依据",
|
||||||
"state_value_help": "使用 HA 状态值(通常为小写,例如 \"on\"/\"off\")。保存时大小写会自动规范化。",
|
"state_value_help": "使用 HA 状态值(通常为小写,例如 \"on\"/\"off\")。保存时大小写会自动规范化。",
|
||||||
"target_changes_help": "触发前需要满足的状态转换次数(默认为 1)。",
|
"target_changes_help": "触发前需要满足的状态转换次数(默认为 1)。",
|
||||||
|
"for_minutes_state_help": "0 表示每次变化立即计数。设置分钟后,新状态需先保持该时长——短暂闪变既不触发也不计数。",
|
||||||
"qr_print_title": "打印二维码",
|
"qr_print_title": "打印二维码",
|
||||||
"qr_print_desc": "生成一张包含多个二维码的可打印页面,方便裁剪并贴在设备上。",
|
"qr_print_desc": "生成一张包含多个二维码的可打印页面,方便裁剪并贴在设备上。",
|
||||||
"qr_print_load": "加载设备",
|
"qr_print_load": "加载设备",
|
||||||
@@ -819,6 +821,7 @@
|
|||||||
"schedule_preview_ontime": "假设按时完成。",
|
"schedule_preview_ontime": "假设按时完成。",
|
||||||
"schedule_preview_ends": "(系列结束)",
|
"schedule_preview_ends": "(系列结束)",
|
||||||
"adopt_problem_responsible": "所有采用任务的负责用户(可选)",
|
"adopt_problem_responsible": "所有采用任务的负责用户(可选)",
|
||||||
|
"adopt_for_minutes_hint": "问题持续此时长后才触发——0 表示对首次闪变立即响应。",
|
||||||
"adopt_problem_configure": "配置",
|
"adopt_problem_configure": "配置",
|
||||||
"history_auto": "自动",
|
"history_auto": "自动",
|
||||||
"battery_fleet_title": "电池群",
|
"battery_fleet_title": "电池群",
|
||||||
@@ -838,6 +841,8 @@
|
|||||||
"battery_fleet_all_hint": "在设备报告电量不足之前就可以在这里将其排除——例如会自行充电的扫地机器人,或本身就会提醒你的手机。",
|
"battery_fleet_all_hint": "在设备报告电量不足之前就可以在这里将其排除——例如会自行充电的扫地机器人,或本身就会提醒你的手机。",
|
||||||
"battery_fleet_add": "添加电池",
|
"battery_fleet_add": "添加电池",
|
||||||
"battery_fleet_add_hint": "选择自动发现遗漏的电池传感器——它会立即加入列表。",
|
"battery_fleet_add_hint": "选择自动发现遗漏的电池传感器——它会立即加入列表。",
|
||||||
|
"battery_fleet_track_self": "跟踪自充电电池",
|
||||||
|
"battery_fleet_track_self_hint": "手机、吸尘器等自充电设备显示为可充电电池——电量低时提示充电,而不是更换电池。",
|
||||||
"battery_fleet_status_low": "电量低",
|
"battery_fleet_status_low": "电量低",
|
||||||
"battery_fleet_status_soon": "即将",
|
"battery_fleet_status_soon": "即将",
|
||||||
"battery_fleet_status_ok": "正常",
|
"battery_fleet_status_ok": "正常",
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/*! maintenance_supporter frontend 2.61.0 */
|
/*! maintenance_supporter frontend 2.63.1 */
|
||||||
var bt=Object.defineProperty;var Wi=Object.getOwnPropertyDescriptor;var w=(a,r,e)=>()=>{if(e)throw e[0];try{return a&&(r=a(a=0)),r}catch(t){throw e=[t],t}};var Vi=(a,r)=>{for(var e in r)bt(a,e,{get:r[e],enumerable:!0})};var d=(a,r,e,t)=>{for(var i=t>1?void 0:t?Wi(r,e):r,n=a.length-1,o;n>=0;n--)(o=a[n])&&(i=(t?o(r,e,i):o(i))||i);return t&&i&&bt(r,e,i),i};var Ne,He,Je,xt,ye,wt,S,$t,Ze,Xe=w(()=>{Ne=globalThis,He=Ne.ShadowRoot&&(Ne.ShadyCSS===void 0||Ne.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Je=Symbol(),xt=new WeakMap,ye=class{constructor(r,e,t){if(this._$cssResult$=!0,t!==Je)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=r,this.t=e}get styleSheet(){let r=this.o,e=this.t;if(He&&r===void 0){let t=e!==void 0&&e.length===1;t&&(r=xt.get(e)),r===void 0&&((this.o=r=new CSSStyleSheet).replaceSync(this.cssText),t&&xt.set(e,r))}return r}toString(){return this.cssText}},wt=a=>new ye(typeof a=="string"?a:a+"",void 0,Je),S=(a,...r)=>{let e=a.length===1?a[0]:r.reduce((t,i,n)=>t+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+a[n+1],a[0]);return new ye(e,a,Je)},$t=(a,r)=>{if(He)a.adoptedStyleSheets=r.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of r){let t=document.createElement("style"),i=Ne.litNonce;i!==void 0&&t.setAttribute("nonce",i),t.textContent=e.cssText,a.appendChild(t)}},Ze=He?a=>a:a=>a instanceof CSSStyleSheet?(r=>{let e="";for(let t of r.cssRules)e+=t.cssText;return wt(e)})(a):a});var Ki,Gi,Yi,Qi,Ji,Zi,qe,kt,Xi,er,be,xe,Me,Et,K,we=w(()=>{Xe();Xe();({is:Ki,defineProperty:Gi,getOwnPropertyDescriptor:Yi,getOwnPropertyNames:Qi,getOwnPropertySymbols:Ji,getPrototypeOf:Zi}=Object),qe=globalThis,kt=qe.trustedTypes,Xi=kt?kt.emptyScript:"",er=qe.reactiveElementPolyfillSupport,be=(a,r)=>a,xe={toAttribute(a,r){switch(r){case Boolean:a=a?Xi:null;break;case Object:case Array:a=a==null?a:JSON.stringify(a)}return a},fromAttribute(a,r){let e=a;switch(r){case Boolean:e=a!==null;break;case Number:e=a===null?null:Number(a);break;case Object:case Array:try{e=JSON.parse(a)}catch{e=null}}return e}},Me=(a,r)=>!Ki(a,r),Et={attribute:!0,type:String,converter:xe,reflect:!1,useDefault:!1,hasChanged:Me};Symbol.metadata??=Symbol("metadata"),qe.litPropertyMetadata??=new WeakMap;K=class extends HTMLElement{static addInitializer(r){this._$Ei(),(this.l??=[]).push(r)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(r,e=Et){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(r)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(r,e),!e.noAccessor){let t=Symbol(),i=this.getPropertyDescriptor(r,t,e);i!==void 0&&Gi(this.prototype,r,i)}}static getPropertyDescriptor(r,e,t){let{get:i,set:n}=Yi(this.prototype,r)??{get(){return this[e]},set(o){this[e]=o}};return{get:i,set(o){let p=i?.call(this);n?.call(this,o),this.requestUpdate(r,p,t)},configurable:!0,enumerable:!0}}static getPropertyOptions(r){return this.elementProperties.get(r)??Et}static _$Ei(){if(this.hasOwnProperty(be("elementProperties")))return;let r=Zi(this);r.finalize(),r.l!==void 0&&(this.l=[...r.l]),this.elementProperties=new Map(r.elementProperties)}static finalize(){if(this.hasOwnProperty(be("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(be("properties"))){let e=this.properties,t=[...Qi(e),...Ji(e)];for(let i of t)this.createProperty(i,e[i])}let r=this[Symbol.metadata];if(r!==null){let e=litPropertyMetadata.get(r);if(e!==void 0)for(let[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(let[e,t]of this.elementProperties){let i=this._$Eu(e,t);i!==void 0&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(r){let e=[];if(Array.isArray(r)){let t=new Set(r.flat(1/0).reverse());for(let i of t)e.unshift(Ze(i))}else r!==void 0&&e.push(Ze(r));return e}static _$Eu(r,e){let t=e.attribute;return t===!1?void 0:typeof t=="string"?t:typeof r=="string"?r.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(r=>this.enableUpdating=r),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(r=>r(this))}addController(r){(this._$EO??=new Set).add(r),this.renderRoot!==void 0&&this.isConnected&&r.hostConnected?.()}removeController(r){this._$EO?.delete(r)}_$E_(){let r=new Map,e=this.constructor.elementProperties;for(let t of e.keys())this.hasOwnProperty(t)&&(r.set(t,this[t]),delete this[t]);r.size>0&&(this._$Ep=r)}createRenderRoot(){let r=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return $t(r,this.constructor.elementStyles),r}connectedCallback(){this.renderRoot??=thiLine truncated
|
var bt=Object.defineProperty;var Yi=Object.getOwnPropertyDescriptor;var w=(a,r,e)=>()=>{if(e)throw e[0];try{return a&&(r=a(a=0)),r}catch(t){throw e=[t],t}};var Qi=(a,r)=>{for(var e in r)bt(a,e,{get:r[e],enumerable:!0})};var d=(a,r,e,t)=>{for(var i=t>1?void 0:t?Yi(r,e):r,n=a.length-1,o;n>=0;n--)(o=a[n])&&(i=(t?o(r,e,i):o(i))||i);return t&&i&&bt(r,e,i),i};var je,He,Je,xt,ye,wt,S,$t,Ze,Xe=w(()=>{je=globalThis,He=je.ShadowRoot&&(je.ShadyCSS===void 0||je.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Je=Symbol(),xt=new WeakMap,ye=class{constructor(r,e,t){if(this._$cssResult$=!0,t!==Je)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=r,this.t=e}get styleSheet(){let r=this.o,e=this.t;if(He&&r===void 0){let t=e!==void 0&&e.length===1;t&&(r=xt.get(e)),r===void 0&&((this.o=r=new CSSStyleSheet).replaceSync(this.cssText),t&&xt.set(e,r))}return r}toString(){return this.cssText}},wt=a=>new ye(typeof a=="string"?a:a+"",void 0,Je),S=(a,...r)=>{let e=a.length===1?a[0]:r.reduce((t,i,n)=>t+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+a[n+1],a[0]);return new ye(e,a,Je)},$t=(a,r)=>{if(He)a.adoptedStyleSheets=r.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of r){let t=document.createElement("style"),i=je.litNonce;i!==void 0&&t.setAttribute("nonce",i),t.textContent=e.cssText,a.appendChild(t)}},Ze=He?a=>a:a=>a instanceof CSSStyleSheet?(r=>{let e="";for(let t of r.cssRules)e+=t.cssText;return wt(e)})(a):a});var Ji,Zi,Xi,er,tr,ir,qe,kt,rr,sr,be,xe,Me,Et,K,we=w(()=>{Xe();Xe();({is:Ji,defineProperty:Zi,getOwnPropertyDescriptor:Xi,getOwnPropertyNames:er,getOwnPropertySymbols:tr,getPrototypeOf:ir}=Object),qe=globalThis,kt=qe.trustedTypes,rr=kt?kt.emptyScript:"",sr=qe.reactiveElementPolyfillSupport,be=(a,r)=>a,xe={toAttribute(a,r){switch(r){case Boolean:a=a?rr:null;break;case Object:case Array:a=a==null?a:JSON.stringify(a)}return a},fromAttribute(a,r){let e=a;switch(r){case Boolean:e=a!==null;break;case Number:e=a===null?null:Number(a);break;case Object:case Array:try{e=JSON.parse(a)}catch{e=null}}return e}},Me=(a,r)=>!Ji(a,r),Et={attribute:!0,type:String,converter:xe,reflect:!1,useDefault:!1,hasChanged:Me};Symbol.metadata??=Symbol("metadata"),qe.litPropertyMetadata??=new WeakMap;K=class extends HTMLElement{static addInitializer(r){this._$Ei(),(this.l??=[]).push(r)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(r,e=Et){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(r)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(r,e),!e.noAccessor){let t=Symbol(),i=this.getPropertyDescriptor(r,t,e);i!==void 0&&Zi(this.prototype,r,i)}}static getPropertyDescriptor(r,e,t){let{get:i,set:n}=Xi(this.prototype,r)??{get(){return this[e]},set(o){this[e]=o}};return{get:i,set(o){let p=i?.call(this);n?.call(this,o),this.requestUpdate(r,p,t)},configurable:!0,enumerable:!0}}static getPropertyOptions(r){return this.elementProperties.get(r)??Et}static _$Ei(){if(this.hasOwnProperty(be("elementProperties")))return;let r=ir(this);r.finalize(),r.l!==void 0&&(this.l=[...r.l]),this.elementProperties=new Map(r.elementProperties)}static finalize(){if(this.hasOwnProperty(be("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(be("properties"))){let e=this.properties,t=[...er(e),...tr(e)];for(let i of t)this.createProperty(i,e[i])}let r=this[Symbol.metadata];if(r!==null){let e=litPropertyMetadata.get(r);if(e!==void 0)for(let[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(let[e,t]of this.elementProperties){let i=this._$Eu(e,t);i!==void 0&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(r){let e=[];if(Array.isArray(r)){let t=new Set(r.flat(1/0).reverse());for(let i of t)e.unshift(Ze(i))}else r!==void 0&&e.push(Ze(r));return e}static _$Eu(r,e){let t=e.attribute;return t===!1?void 0:typeof t=="string"?t:typeof r=="string"?r.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(r=>this.enableUpdating=r),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(r=>r(this))}addController(r){(this._$EO??=new Set).add(r),this.renderRoot!==void 0&&this.isConnected&&r.hostConnected?.()}removeController(r){this._$EO?.delete(r)}_$E_(){let r=new Map,e=this.constructor.elementProperties;for(let t of e.keys())this.hasOwnProperty(t)&&(r.set(t,this[t]),delete this[t]);r.size>0&&(this._$Ep=r)}createRenderRoot(){let r=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return $t(r,this.constructor.elementStyles),r}connectedCallback(){this.renderRoot??=thiLine truncated
|
||||||
\f\r]`,$e=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Tt=/-->/g,Ct=/>/g,ie=RegExp(`>|${et}(?:([^\\s"'>=/]+)(${et}*=${et}*(?:[^
|
\f\r]`,$e=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Tt=/-->/g,Ct=/>/g,ie=RegExp(`>|${et}(?:([^\\s"'>=/]+)(${et}*=${et}*(?:[^
|
||||||
\f\r"'\`<>=]|("|')|))|$)`,"g"),It=/'/g,Lt=/"/g,Nt=/^(?:script|style|textarea|title)$/i,lt=a=>(r,...e)=>({_$litType$:a,strings:r,values:e}),l=lt(1),_e=lt(2),rs=lt(3),ae=Symbol.for("lit-noChange"),h=Symbol.for("lit-nothing"),Pt=new WeakMap,re=se.createTreeWalker(se,129);rr=(a,r)=>{let e=a.length-1,t=[],i,n=r===2?"<svg>":r===3?"<math>":"",o=$e;for(let p=0;p<e;p++){let c=a[p],_,f,m=-1,y=0;for(;y<c.length&&(o.lastIndex=y,f=o.exec(c),f!==null);)y=o.lastIndex,o===$e?f[1]==="!--"?o=Tt:f[1]!==void 0?o=Ct:f[2]!==void 0?(Nt.test(f[2])&&(i=RegExp("</"+f[2],"g")),o=ie):f[3]!==void 0&&(o=ie):o===ie?f[0]===">"?(o=i??$e,m=-1):f[1]===void 0?m=-2:(m=o.lastIndex-f[2].length,_=f[1],o=f[3]===void 0?ie:f[3]==='"'?Lt:It):o===Lt||o===It?o=ie:o===Tt||o===Ct?o=$e:(o=ie,i=void 0);let b=o===ie&&a[p+1].startsWith("/>")?" ":"";n+=o===$e?c+tr:m>=0?(t.push(_),c.slice(0,m)+Rt+c.slice(m)+X+b):c+X+(m===-2?p:b)}return[Ht(a,n+(a[e]||"<?>")+(r===2?"</svg>":r===3?"</math>":"")),t]},Se=class a{constructor({strings:r,_$litType$:e},t){let i;this.parts=[];let n=0,o=0,p=r.length-1,c=this.parts,[_,f]=rr(r,e);if(this.el=a.createElement(_,t),re.currentNode=this.el.content,e===2||e===3){let m=this.el.content.firstChild;m.replaceWith(...m.childNodes)}for(;(i=re.nextNode())!==null&&c.length<p;){if(i.nodeType===1){if(i.hasAttributes())for(let m of i.getAttributeNames())if(m.endsWith(Rt)){let y=f[o++],b=i.getAttribute(m).split(X),k=/([.?@])?(.*)/.exec(y);c.push({type:1,index:n,name:k[2],strings:b,ctor:k[1]==="."?it:k[1]==="?"?rt:k[1]==="@"?st:ue}),i.removeAttribute(m)}else m.startsWith(X)&&(c.push({type:6,index:n}),i.removeAttribute(m));if(Nt.test(i.tagName)){let m=i.textContent.split(X),y=m.length-1;if(y>0){i.textContent=Oe?Oe.emptyScript:"";for(let b=0;b<y;b++)i.append(m[b],ke()),re.nextNode(),c.push({type:2,index:++n});i.append(m[y],ke())}}}else if(i.nodeType===8)if(i.data===jt)c.push({type:2,index:n});else{let m=-1;for(;(m=i.data.indexOf(X,m+1))!==-1;)c.push({type:7,index:n}),m+=X.length-1}n++}}static createElement(r,e){let t=se.createElement("template");return t.innerHTML=r,t}};tt=class{constructor(r,e){this._$AV=[],this._$AN=void 0,this._$AD=r,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(r){let{el:{content:e},parts:t}=this._$AD,i=(r?.creationScope??se).importNode(e,!0);re.currentNode=i;let n=re.nextNode(),o=0,p=0,c=t[0];for(;c!==void 0;){if(o===c.index){let _;c.type===2?_=new Ae(n,n.nextSibling,this,r):c.type===1?_=new c.ctor(n,c.name,c.strings,this,r):c.type===6&&(_=new at(n,this,r)),this._$AV.push(_),c=t[++p]}o!==c?.index&&(n=re.nextNode(),o++)}return re.currentNode=se,i}p(r){let e=0;for(let t of this._$AV)t!==void 0&&(t.strings!==void 0?(t._$AI(r,t,e),e+=t.strings.length-2):t._$AI(r[e])),e++}},Ae=class a{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(r,e,t,i){this.type=2,this._$AH=h,this._$AN=void 0,this._$AA=r,this._$AB=e,this._$AM=t,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let r=this._$AA.parentNode,e=this._$AM;return e!==void 0&&r?.nodeType===11&&(r=e.parentNode),r}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(r,e=this){r=pe(this,r,e),Ee(r)?r===h||r==null||r===""?(this._$AH!==h&&this._$AR(),this._$AH=h):r!==this._$AH&&r!==ae&&this._(r):r._$litType$!==void 0?this.$(r):r.nodeType!==void 0?this.T(r):ir(r)?this.k(r):this._(r)}O(r){return this._$AA.parentNode.insertBefore(r,this._$AB)}T(r){this._$AH!==r&&(this._$AR(),this._$AH=this.O(r))}_(r){this._$AH!==h&&Ee(this._$AH)?this._$AA.nextSibling.data=r:this.T(se.createTextNode(r)),this._$AH=r}$(r){let{values:e,_$litType$:t}=r,i=typeof t=="number"?this._$AC(r):(t.el===void 0&&(t.el=Se.createElement(Ht(t.h,t.h[0]),this.options)),t);if(this._$AH?._$AD===i)this._$AH.p(e);else{let n=new tt(i,this),o=n.u(this.options);n.p(e),this.T(o),this._$AH=n}}_$AC(r){let e=Pt.get(r.strings);return e===void 0&&Pt.set(r.strings,e=new Se(r)),e}k(r){ot(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,t,i=0;for(let n of r)i===e.length?e.push(t=new a(this.O(ke()),this.O(ke()),this,this.options)):t=e[i],t._$AI(n),i++;i<e.length&&(this._$AR(t&&t._$AB.nextSibling,i),e.length=i)}_$AR(r=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);r!==this._$AB;){let t=St(r).nextSibling;St(r).remove(),r=t}}setConnected(r){this._$AM===void 0&&(this._$Cv=r,this._$AP?.(r))}},ue=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(r,e,t,i,n){this.type=1,this._$AH=h,this._$AN=void 0,this.element=r,this.name=e,this._$AM=i,this.options=n,t.length>2||t[0]!==""||t[1]!==""?(this._$AH=Array(t.length-1).fill(new String),this.strings=t):this._$AH=h}_$AI(r,e=this,t,i){let n=this.strings,o=!1;if(n===void 0)r=pe(this,r,e,0),o=!Ee(r)||r!==this._$AH&&r!==ae,o&&(this._$AH=r);else{let p=r,c,_;for(r=n[0],c=0;c<n.length-1;c++)_=pe(this,p[t+c],e,c),_===ae&&(_=this._$AH[c]),o||=!Ee(_)||_!==this._$AH[c],_===h?r=h:r!==h&&(r+=(_??"")+n[c+1]),this._$AH[c]=_}o&&!i&&this.j(r)}j(r){r===h?this.element.removeAttribute(this.name):thiLine truncated
|
\f\r"'\`<>=]|("|')|))|$)`,"g"),It=/'/g,Lt=/"/g,jt=/^(?:script|style|textarea|title)$/i,lt=a=>(r,...e)=>({_$litType$:a,strings:r,values:e}),l=lt(1),_e=lt(2),ds=lt(3),ae=Symbol.for("lit-noChange"),h=Symbol.for("lit-nothing"),Pt=new WeakMap,re=se.createTreeWalker(se,129);or=(a,r)=>{let e=a.length-1,t=[],i,n=r===2?"<svg>":r===3?"<math>":"",o=$e;for(let p=0;p<e;p++){let c=a[p],u,f,m=-1,y=0;for(;y<c.length&&(o.lastIndex=y,f=o.exec(c),f!==null);)y=o.lastIndex,o===$e?f[1]==="!--"?o=Tt:f[1]!==void 0?o=Ct:f[2]!==void 0?(jt.test(f[2])&&(i=RegExp("</"+f[2],"g")),o=ie):f[3]!==void 0&&(o=ie):o===ie?f[0]===">"?(o=i??$e,m=-1):f[1]===void 0?m=-2:(m=o.lastIndex-f[2].length,u=f[1],o=f[3]===void 0?ie:f[3]==='"'?Lt:It):o===Lt||o===It?o=ie:o===Tt||o===Ct?o=$e:(o=ie,i=void 0);let b=o===ie&&a[p+1].startsWith("/>")?" ":"";n+=o===$e?c+ar:m>=0?(t.push(u),c.slice(0,m)+Rt+c.slice(m)+X+b):c+X+(m===-2?p:b)}return[Ht(a,n+(a[e]||"<?>")+(r===2?"</svg>":r===3?"</math>":"")),t]},Se=class a{constructor({strings:r,_$litType$:e},t){let i;this.parts=[];let n=0,o=0,p=r.length-1,c=this.parts,[u,f]=or(r,e);if(this.el=a.createElement(u,t),re.currentNode=this.el.content,e===2||e===3){let m=this.el.content.firstChild;m.replaceWith(...m.childNodes)}for(;(i=re.nextNode())!==null&&c.length<p;){if(i.nodeType===1){if(i.hasAttributes())for(let m of i.getAttributeNames())if(m.endsWith(Rt)){let y=f[o++],b=i.getAttribute(m).split(X),k=/([.?@])?(.*)/.exec(y);c.push({type:1,index:n,name:k[2],strings:b,ctor:k[1]==="."?it:k[1]==="?"?rt:k[1]==="@"?st:ue}),i.removeAttribute(m)}else m.startsWith(X)&&(c.push({type:6,index:n}),i.removeAttribute(m));if(jt.test(i.tagName)){let m=i.textContent.split(X),y=m.length-1;if(y>0){i.textContent=Oe?Oe.emptyScript:"";for(let b=0;b<y;b++)i.append(m[b],ke()),re.nextNode(),c.push({type:2,index:++n});i.append(m[y],ke())}}}else if(i.nodeType===8)if(i.data===Nt)c.push({type:2,index:n});else{let m=-1;for(;(m=i.data.indexOf(X,m+1))!==-1;)c.push({type:7,index:n}),m+=X.length-1}n++}}static createElement(r,e){let t=se.createElement("template");return t.innerHTML=r,t}};tt=class{constructor(r,e){this._$AV=[],this._$AN=void 0,this._$AD=r,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(r){let{el:{content:e},parts:t}=this._$AD,i=(r?.creationScope??se).importNode(e,!0);re.currentNode=i;let n=re.nextNode(),o=0,p=0,c=t[0];for(;c!==void 0;){if(o===c.index){let u;c.type===2?u=new Ae(n,n.nextSibling,this,r):c.type===1?u=new c.ctor(n,c.name,c.strings,this,r):c.type===6&&(u=new at(n,this,r)),this._$AV.push(u),c=t[++p]}o!==c?.index&&(n=re.nextNode(),o++)}return re.currentNode=se,i}p(r){let e=0;for(let t of this._$AV)t!==void 0&&(t.strings!==void 0?(t._$AI(r,t,e),e+=t.strings.length-2):t._$AI(r[e])),e++}},Ae=class a{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(r,e,t,i){this.type=2,this._$AH=h,this._$AN=void 0,this._$AA=r,this._$AB=e,this._$AM=t,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let r=this._$AA.parentNode,e=this._$AM;return e!==void 0&&r?.nodeType===11&&(r=e.parentNode),r}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(r,e=this){r=pe(this,r,e),Ee(r)?r===h||r==null||r===""?(this._$AH!==h&&this._$AR(),this._$AH=h):r!==this._$AH&&r!==ae&&this._(r):r._$litType$!==void 0?this.$(r):r.nodeType!==void 0?this.T(r):nr(r)?this.k(r):this._(r)}O(r){return this._$AA.parentNode.insertBefore(r,this._$AB)}T(r){this._$AH!==r&&(this._$AR(),this._$AH=this.O(r))}_(r){this._$AH!==h&&Ee(this._$AH)?this._$AA.nextSibling.data=r:this.T(se.createTextNode(r)),this._$AH=r}$(r){let{values:e,_$litType$:t}=r,i=typeof t=="number"?this._$AC(r):(t.el===void 0&&(t.el=Se.createElement(Ht(t.h,t.h[0]),this.options)),t);if(this._$AH?._$AD===i)this._$AH.p(e);else{let n=new tt(i,this),o=n.u(this.options);n.p(e),this.T(o),this._$AH=n}}_$AC(r){let e=Pt.get(r.strings);return e===void 0&&Pt.set(r.strings,e=new Se(r)),e}k(r){ot(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,t,i=0;for(let n of r)i===e.length?e.push(t=new a(this.O(ke()),this.O(ke()),this,this.options)):t=e[i],t._$AI(n),i++;i<e.length&&(this._$AR(t&&t._$AB.nextSibling,i),e.length=i)}_$AR(r=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);r!==this._$AB;){let t=St(r).nextSibling;St(r).remove(),r=t}}setConnected(r){this._$AM===void 0&&(this._$Cv=r,this._$AP?.(r))}},ue=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(r,e,t,i,n){this.type=1,this._$AH=h,this._$AN=void 0,this.element=r,this.name=e,this._$AM=i,this.options=n,t.length>2||t[0]!==""||t[1]!==""?(this._$AH=Array(t.length-1).fill(new String),this.strings=t):this._$AH=h}_$AI(r,e=this,t,i){let n=this.strings,o=!1;if(n===void 0)r=pe(this,r,e,0),o=!Ee(r)||r!==this._$AH&&r!==ae,o&&(this._$AH=r);else{let p=r,c,u;for(r=n[0],c=0;c<n.length-1;c++)u=pe(this,p[t+c],e,c),u===ae&&(u=this._$AH[c]),o||=!Ee(u)||u!==this._$AH[c],u===h?r=h:r!==h&&(r+=(u??"")+n[c+1]),this._$AH[c]=u}o&&!i&&this.j(r)}j(r){r===h?this.element.removeAttribute(this.name):thiLine truncated
|
||||||
Replace seal
|
Replace seal
|
||||||
Test pressure`,checklist_help:"One step per line. Max 100 items.",err_too_long:"{field}: too long (max {n} characters)",err_too_short:"{field}: too short (min {n} characters)",err_value_too_high:"{field}: too large (max {n})",err_value_too_low:"{field}: too small (min {n})",err_required:"{field}: required",err_wrong_type:"{field}: wrong type (expected: {type})",err_invalid_choice:"{field}: not an allowed value",err_invalid_value:"{field}: invalid value",feat_schedule_time:"Time-of-day scheduling",feat_schedule_time_desc:"Tasks become overdue at a specific time of day instead of midnight.",schedule_time_optional:"Due at time (optional, HH:MM)",schedule_time_help:"Empty = midnight (default). HA timezone.",at_time:"at",notes_optional:"Notes (optional)",cost_optional:"Cost (optional)",duration_minutes:"Duration in minutes (optional)",completed_at_optional:"Completed at (optional, empty = now)",completed_at_future_error:"The completion date cannot be in the future.",days:"days",day:"day",today:"Today",d_overdue:"d overdue",no_tasks:"No maintenance tasks yet. Create an object to get started.",no_tasks_short:"No tasks",no_history:"No history entries yet.",show_all:"Show all",cost_duration_chart:"Cost & Duration",installed:"Installed",confirm_delete_object:"Delete this object and all its tasks?",confirm_delete_task:"Delete this task?",min:"Min",max:"Max",save:"Save",saving:"Saving\u2026",edit_task:"Edit Task",new_task:"New Maintenance Task",task_name:"Task name",maintenance_type:"Maintenance type",priority:"Priority",labels:"Labels",labels_placeholder:"e.g. safety, seasonal, tenant-visible",labels_help:"Comma-separated tags for filtering and reporting.",priority_low:"Low",priority_normal:"Normal",priority_high:"High",all_priorities:"All priorities",schedule_type:"Schedule type",interval_days:"Interval (days)",warning_days:"Warning days",earliest_completion_days:"Earliest completion (days before due)",earliest_completion_days_help:"Leave empty to allow completing any time. 0 = only on/after the due date.",last_performed_optional:"Last performed (optional)",interval_anchor:"Interval anchor",anchor_completion:"From completion date",anchor_planned:"From planned date (no drift)",edit_object:"Edit Object",name:"Name",manufacturer_optional:"Manufacturer (optional)",model_optional:"Model (optional)",serial_number_optional:"Serial number (optional)",serial_number_label:"S/N",documentation_url_label:"Manual",object_notes_label:"Notes",sort_due_date:"Due date",sort_object:"Object name",sort_type:"Type",sort_task_name:"Task name",all_objects:"All objects",all_parts:"All parts",tasks_lower:"tasks",no_tasks_yet:"No tasks yet",add_first_task:"Add first task",trigger_configuration:"Trigger Configuration",entity_id:"Entity ID",comma_separated:"comma-separated",entity_logic:"Entity logic",entity_logic_any:"Any entity triggers",entity_logic_all:"All entities must trigger",entities:"entities",attribute_optional:"Attribute (optional, blank = state)",use_entity_state:"Use entity state (no attribute)",trigger_above:"Trigger above",trigger_below:"Trigger below",trigger_equals:"Trigger when equal to (=)",trigger_not_equals:"Trigger when different from (\u2260)",for_at_least_minutes:"For at least (minutes)",safety_interval_days:"Safety interval (days, optional)",safety_interval:"Safety interval (optional)",trigger_combinator:"Combine trigger and interval",trigger_combinator_any:"Trigger or interval (whichever first)",trigger_combinator_all:"Trigger and interval (both required)",delta_mode:"Delta mode",from_state_optional:"From state (optional)",to_state_optional:"To state (optional)",documentation_url_optional:"Documentation URL (optional)",object_notes_optional:"Notes (optional)",nfc_tag_id_optional:"NFC Tag ID (optional)",nfc_tags_empty_help:"No NFC tags registered in Home Assistant yet.",nfc_tags_open_settings:"Open Tags settings",nfc_tags_refresh:"Refresh",environmental_entity_optional:"Environmental sensor (optional)",environmental_entity_helper:"e.g. sensor.outdoor_temperature \u2014 adjusts the interval based on environmental conditions",adaptive_prediction_enabled:"Enable sensor-driven predictions",adaptive_seasonal_enabled:"Enable seasonal awareness",adaptive_max_interval:"Maximum interval (days)",adaptive_min_interval:"Minimum interval (days)",adaptive_ewa_alpha:"Learning rate (alpha)",adaptive_enabled:"Enable adaptive scheduling",adaptive_section_title:"Adaptive Scheduling",environmental_attribute_optional:"Environmental attribute (optional)",nfc_tag_id:"NFC Tag ID",nfc_linked:"NFC tag linked",nfc_link_hint:"Click to link NFC tag",responsible_user:"Responsible User",shared_with:"Shared with (rotation)",shared_with_help:"Pick multiple people to share this task; the responsible person rotates on each completion.",rotation_strategy:"Rotation",rotation_none:"No rotation",rotation_round_robin:"Round-robin",rotation_least_completed:"Least completed",rotation_random:"Random",no_user_assigned:"(No user assigned)",all_users:"All Users",m
Line truncated
|
Test pressure`,checklist_help:"One step per line. Max 100 items.",err_too_long:"{field}: too long (max {n} characters)",err_too_short:"{field}: too short (min {n} characters)",err_value_too_high:"{field}: too large (max {n})",err_value_too_low:"{field}: too small (min {n})",err_required:"{field}: required",err_wrong_type:"{field}: wrong type (expected: {type})",err_invalid_choice:"{field}: not an allowed value",err_invalid_value:"{field}: invalid value",feat_schedule_time:"Time-of-day scheduling",feat_schedule_time_desc:"Tasks become overdue at a specific time of day instead of midnight.",schedule_time_optional:"Due at time (optional, HH:MM)",schedule_time_help:"Empty = midnight (default). HA timezone.",at_time:"at",notes_optional:"Notes (optional)",cost_optional:"Cost (optional)",duration_minutes:"Duration in minutes (optional)",completed_at_optional:"Completed at (optional, empty = now)",completed_at_future_error:"The completion date cannot be in the future.",days:"days",day:"day",today:"Today",d_overdue:"d overdue",no_tasks:"No maintenance tasks yet. Create an object to get started.",no_tasks_short:"No tasks",no_history:"No history entries yet.",show_all:"Show all",cost_duration_chart:"Cost & Duration",installed:"Installed",confirm_delete_object:"Delete this object and all its tasks?",confirm_delete_task:"Delete this task?",min:"Min",max:"Max",save:"Save",saving:"Saving\u2026",edit_task:"Edit Task",new_task:"New Maintenance Task",task_name:"Task name",maintenance_type:"Maintenance type",priority:"Priority",labels:"Labels",labels_placeholder:"e.g. safety, seasonal, tenant-visible",labels_help:"Comma-separated tags for filtering and reporting.",priority_low:"Low",priority_normal:"Normal",priority_high:"High",all_priorities:"All priorities",schedule_type:"Schedule type",interval_days:"Interval (days)",warning_days:"Warning days",earliest_completion_days:"Earliest completion (days before due)",earliest_completion_days_help:"Leave empty to allow completing any time. 0 = only on/after the due date.",last_performed_optional:"Last performed (optional)",interval_anchor:"Interval anchor",anchor_completion:"From completion date",anchor_planned:"From planned date (no drift)",edit_object:"Edit Object",name:"Name",manufacturer_optional:"Manufacturer (optional)",model_optional:"Model (optional)",serial_number_optional:"Serial number (optional)",serial_number_label:"S/N",documentation_url_label:"Manual",object_notes_label:"Notes",sort_due_date:"Due date",sort_object:"Object name",sort_type:"Type",sort_task_name:"Task name",all_objects:"All objects",all_parts:"All parts",tasks_lower:"tasks",no_tasks_yet:"No tasks yet",add_first_task:"Add first task",trigger_configuration:"Trigger Configuration",entity_id:"Entity ID",comma_separated:"comma-separated",entity_logic:"Entity logic",entity_logic_any:"Any entity triggers",entity_logic_all:"All entities must trigger",entities:"entities",attribute_optional:"Attribute (optional, blank = state)",use_entity_state:"Use entity state (no attribute)",trigger_above:"Trigger above",trigger_below:"Trigger below",trigger_equals:"Trigger when equal to (=)",trigger_not_equals:"Trigger when different from (\u2260)",for_at_least_minutes:"For at least (minutes)",safety_interval_days:"Safety interval (days, optional)",safety_interval:"Safety interval (optional)",trigger_combinator:"Combine trigger and interval",trigger_combinator_any:"Trigger or interval (whichever first)",trigger_combinator_all:"Trigger and interval (both required)",delta_mode:"Delta mode",from_state_optional:"From state (optional)",to_state_optional:"To state (optional)",documentation_url_optional:"Documentation URL (optional)",object_notes_optional:"Notes (optional)",nfc_tag_id_optional:"NFC Tag ID (optional)",nfc_tags_empty_help:"No NFC tags registered in Home Assistant yet.",nfc_tags_open_settings:"Open Tags settings",nfc_tags_refresh:"Refresh",environmental_entity_optional:"Environmental sensor (optional)",environmental_entity_helper:"e.g. sensor.outdoor_temperature \u2014 adjusts the interval based on environmental conditions",adaptive_prediction_enabled:"Enable sensor-driven predictions",adaptive_seasonal_enabled:"Enable seasonal awareness",adaptive_max_interval:"Maximum interval (days)",adaptive_min_interval:"Minimum interval (days)",adaptive_ewa_alpha:"Learning rate (alpha)",adaptive_enabled:"Enable adaptive scheduling",adaptive_section_title:"Adaptive Scheduling",environmental_attribute_optional:"Environmental attribute (optional)",nfc_tag_id:"NFC Tag ID",nfc_linked:"NFC tag linked",nfc_link_hint:"Click to link NFC tag",responsible_user:"Responsible User",shared_with:"Shared with (rotation)",shared_with_help:"Pick multiple people to share this task; the responsible person rotates on each completion.",rotation_strategy:"Rotation",rotation_none:"No rotation",rotation_round_robin:"Round-robin",rotation_least_completed:"Least completed",rotation_random:"Random",no_user_assigned:"(No user assigned)",all_users:"All Users",m
Line truncated
|
||||||
.field { display: flex; flex-direction: column; gap: 4px; }
|
.field { display: flex; flex-direction: column; gap: 4px; }
|
||||||
.field-label { font-size: 12px; color: var(--secondary-text-color); }
|
.field-label { font-size: 12px; color: var(--secondary-text-color); }
|
||||||
.field-input {
|
.field-input {
|
||||||
@@ -755,48 +755,9 @@ Test pressure`,checklist_help:"One step per line. Max 100 items.",err_too_long:"
|
|||||||
.confidence-dot.medium { background: var(--warning-color, #ff9800); }
|
.confidence-dot.medium { background: var(--warning-color, #ff9800); }
|
||||||
.confidence-dot.high { background: var(--success-color, #4caf50); }
|
.confidence-dot.high { background: var(--success-color, #4caf50); }
|
||||||
|
|
||||||
/* Feedback toggle buttons in complete dialog */
|
/* (The complete-dialog's .feedback-* rules live in complete-dialog.ts —
|
||||||
.feedback-section {
|
this sheet carried a dead byte-identical copy until the 2026-08 drift
|
||||||
display: flex;
|
audit; complete-dialog never imports sharedStyles.) */
|
||||||
flex-direction: column;
|
|
||||||
gap: 8px;
|
|
||||||
padding: 8px 0;
|
|
||||||
border-top: 1px solid var(--divider-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
.feedback-label {
|
|
||||||
font-weight: 500;
|
|
||||||
font-size: 13px;
|
|
||||||
color: var(--secondary-text-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
.feedback-buttons {
|
|
||||||
display: flex;
|
|
||||||
gap: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.feedback-btn {
|
|
||||||
flex: 1;
|
|
||||||
padding: 8px 12px;
|
|
||||||
border: 1px solid var(--divider-color);
|
|
||||||
border-radius: 8px;
|
|
||||||
background: var(--card-background-color, #fff);
|
|
||||||
color: var(--primary-text-color);
|
|
||||||
font-size: 13px;
|
|
||||||
cursor: pointer;
|
|
||||||
text-align: center;
|
|
||||||
transition: all 0.2s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.feedback-btn:hover {
|
|
||||||
background: var(--secondary-background-color, #f5f5f5);
|
|
||||||
}
|
|
||||||
|
|
||||||
.feedback-btn.selected {
|
|
||||||
background: var(--primary-color);
|
|
||||||
color: var(--text-primary-color, #fff);
|
|
||||||
border-color: var(--primary-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Seasonal chart */
|
/* Seasonal chart */
|
||||||
.seasonal-chart {
|
.seasonal-chart {
|
||||||
@@ -1157,7 +1118,7 @@ Test pressure`,checklist_help:"One step per line. Max 100 items.",err_too_long:"
|
|||||||
.stat-item .stat-label { font-size: 11px; white-space: normal; text-align: center; line-height: 1.2; }
|
.stat-item .stat-label { font-size: 11px; white-space: normal; text-align: center; line-height: 1.2; }
|
||||||
.stat-value { font-size: 20px; }
|
.stat-value { font-size: 20px; }
|
||||||
}
|
}
|
||||||
`});function br(a,r){let e=yr[a];if(!e)return a;let t=s(e,r);return t&&t!==e?t:a}function xr(a){let e=a.match(/data\['([^']+)'\]/)?.[1],t;return(t=a.match(/length of value must be at most (\d+)/))?{field:e,rule:"too_long",param:t[1]}:(t=a.match(/length of value must be at least (\d+)/))?{field:e,rule:"too_short",param:t[1]}:(t=a.match(/value must be at most (\S+)/))?{field:e,rule:"value_too_high",param:t[1]}:(t=a.match(/value must be at least (\S+)/))?{field:e,rule:"value_too_low",param:t[1]}:/required key not provided/.test(a)?{field:e,rule:"required"}:(t=a.match(/expected (\w+)/))?{field:e,rule:"wrong_type",param:t[1]}:/value must be one of/.test(a)?{field:e,rule:"invalid_choice"}:/not a valid value/.test(a)?{field:e,rule:"invalid_value"}:{field:e,rule:"unknown"}}function j(a,r,e){if(e=e??s("action_error",r),typeof a=="string")return a;if(typeof a!="object"||a===null)return e;let t=a,i=t.message||t.error?.message||"";if(!i)return e;let n=xr(i),o=n.field?br(n.field,r):"",p=c=>s(c,r).replace("{field}",o).replace("{n}",n.param??"");switch(n.rule){case"too_long":return p("err_too_long");case"too_short":return p("err_too_short");case"value_too_high":return p("err_value_too_high");case"value_too_low":return p("err_value_too_low");case"required":return p("err_required");case"wrong_type":return p("err_wrong_type").replace("{type}",n.param??"");case"invalid_choice":return p("err_invalid_choice");case"invalid_value":return p("err_invalid_value");default:return i||e}}var yr,oe=w(()=>{"use strict";R();yr={name:"name",task_type:"maintenance_type",schedule_type:"schedule_type",interval_days:"interval_days",interval_anchor:"interval_anchor",warning_days:"warning_days",last_performed:"last_performed_optional",notes:"notes_optional",documentation_url:"documentation_url_optional",custom_icon:"custom_icon_optional",nfc_tag_id:"nfc_tag_id_optional",responsible_user_id:"responsible_user",entity_slug:"entity_slug",entity_id:"entity_id",area_id:"area_id_optional",manufacturer:"manufacturer_optional",model:"model_optional",serial_number:"serial_number_optional",installation_date:"installation_date_optional",warranty_expiry:"warranty_expiry_optional",checklist:"checklist_steps_optional",reason:"reason",feedback:"feedback",cost:"cost",duration:"duration",description:"description_optional",group_name:"name",group_description:"description_optional",environmental_entity:"environmental_entity_optional",environmental_attribute:"environmental_attribute_optional",trigger_above:"trigger_above",trigger_below:"trigger_below",trigger_equals:"trigger_equals",trigger_not_equals:"trigger_not_equals",trigger_for_minutes:"trigger_for_minutes"}});var N,ut=w(()=>{"use strict";P();U();N=class extends A{constructor(){super(...arguments);this.label="";this.value="";this.placeholder="";this.type="text";this.required=!1;this.disabled=!1}_onInput(e){let t=e.target.value;this.value=t,this.dispatchEvent(new CustomEvent("input",{bubbles:!0,composed:!0,detail:{value:t}}))}render(){return l`
|
`});function Sr(a,r){let e=Er[a];if(!e)return a;let t=s(e,r);return t&&t!==e?t:a}function Ar(a){let e=a.match(/data\['([^']+)'\]/)?.[1],t;return(t=a.match(/length of value must be at most (\d+)/))?{field:e,rule:"too_long",param:t[1]}:(t=a.match(/length of value must be at least (\d+)/))?{field:e,rule:"too_short",param:t[1]}:(t=a.match(/value must be at most (\S+)/))?{field:e,rule:"value_too_high",param:t[1]}:(t=a.match(/value must be at least (\S+)/))?{field:e,rule:"value_too_low",param:t[1]}:/required key not provided/.test(a)?{field:e,rule:"required"}:(t=a.match(/expected (\w+)/))?{field:e,rule:"wrong_type",param:t[1]}:/value must be one of/.test(a)?{field:e,rule:"invalid_choice"}:/not a valid value/.test(a)?{field:e,rule:"invalid_value"}:{field:e,rule:"unknown"}}function N(a,r,e){if(e=e??s("action_error",r),typeof a=="string")return a;if(typeof a!="object"||a===null)return e;let t=a,i=t.message||t.error?.message||"";if(!i)return e;let n=Ar(i),o=n.field?Sr(n.field,r):"",p=c=>s(c,r).replace("{field}",o).replace("{n}",n.param??"");switch(n.rule){case"too_long":return p("err_too_long");case"too_short":return p("err_too_short");case"value_too_high":return p("err_value_too_high");case"value_too_low":return p("err_value_too_low");case"required":return p("err_required");case"wrong_type":return p("err_wrong_type").replace("{type}",n.param??"");case"invalid_choice":return p("err_invalid_choice");case"invalid_value":return p("err_invalid_value");default:return i||e}}var Er,oe=w(()=>{"use strict";R();Er={name:"name",task_type:"maintenance_type",schedule_type:"schedule_type",interval_days:"interval_days",interval_anchor:"interval_anchor",warning_days:"warning_days",last_performed:"last_performed_optional",notes:"notes_optional",documentation_url:"documentation_url_optional",custom_icon:"custom_icon_optional",nfc_tag_id:"nfc_tag_id_optional",responsible_user_id:"responsible_user",entity_slug:"entity_slug",entity_id:"entity_id",area_id:"area_id_optional",manufacturer:"manufacturer_optional",model:"model_optional",serial_number:"serial_number_optional",installation_date:"installation_date_optional",warranty_expiry:"warranty_expiry_optional",checklist:"checklist_steps_optional",reason:"reason",feedback:"feedback",cost:"cost",duration:"duration",description:"description_optional",group_name:"name",group_description:"description_optional",environmental_entity:"environmental_entity_optional",environmental_attribute:"environmental_attribute_optional",trigger_above:"trigger_above",trigger_below:"trigger_below",trigger_equals:"trigger_equals",trigger_not_equals:"trigger_not_equals",trigger_for_minutes:"trigger_for_minutes"}});var H,ut=w(()=>{"use strict";P();U();H=class extends A{constructor(){super(...arguments);this.label="";this.value="";this.placeholder="";this.type="text";this.required=!1;this.disabled=!1}_onInput(e){let t=e.target.value;this.value=t,this.dispatchEvent(new CustomEvent("input",{bubbles:!0,composed:!0,detail:{value:t}}))}render(){return l`
|
||||||
<label class="field">
|
<label class="field">
|
||||||
${this.label?l`<span class="label">${this.label}${this.required?l`<span class="req">*</span>`:h}</span>`:h}
|
${this.label?l`<span class="label">${this.label}${this.required?l`<span class="req">*</span>`:h}</span>`:h}
|
||||||
<input
|
<input
|
||||||
@@ -1175,7 +1136,7 @@ Test pressure`,checklist_help:"One step per line. Max 100 items.",err_too_long:"
|
|||||||
/>
|
/>
|
||||||
${this.helper?l`<span class="helper">${this.helper}</span>`:h}
|
${this.helper?l`<span class="helper">${this.helper}</span>`:h}
|
||||||
</label>
|
</label>
|
||||||
`}};N.styles=S`
|
`}};H.styles=S`
|
||||||
:host { display: block; }
|
:host { display: block; }
|
||||||
.field {
|
.field {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -1209,7 +1170,7 @@ Test pressure`,checklist_help:"One step per line. Max 100 items.",err_too_long:"
|
|||||||
color: var(--secondary-text-color);
|
color: var(--secondary-text-color);
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
}
|
}
|
||||||
`,d([x()],N.prototype,"label",2),d([x()],N.prototype,"value",2),d([x()],N.prototype,"placeholder",2),d([x()],N.prototype,"type",2),d([x({type:Boolean})],N.prototype,"required",2),d([x({type:Boolean})],N.prototype,"disabled",2),d([x()],N.prototype,"step",2),d([x()],N.prototype,"min",2),d([x()],N.prototype,"max",2),d([x()],N.prototype,"pattern",2),d([x()],N.prototype,"helper",2);customElements.get("ms-textfield")||customElements.define("ms-textfield",N)});var T,_i=w(()=>{"use strict";P();U();R();oe();ut();T=class extends A{constructor(){super(...arguments);this.objects=[];this._open=!1;this._loading=!1;this._error="";this._name="";this._manufacturer="";this._model="";this._serialNumber="";this._areaId="";this._installationDate="";this._warrantyExpiry="";this._documentationUrl="";this._notes="";this._haDeviceId="";this._parentEntryId="";this._entryId=null}get _lang(){return H(this.hass)}openCreate(){this._entryId=null,this._name="",this._manufacturer="",this._model="",this._serialNumber="",this._areaId="",this._installationDate="",this._warrantyExpiry="",this._documentationUrl="",this._notes="",this._haDeviceId="",this._parentEntryId="",this._error="",this._open=!0}openEdit(e,t){this._entryId=e,this._name=t.name||"",this._manufacturer=t.manufacturer||"",this._model=t.model||"",this._serialNumber=t.serial_number||"",this._areaId=t.area_id||"",this._installationDate=t.installation_date||"",this._warrantyExpiry=t.warranty_expiry||"",this._documentationUrl=t.documentation_url||"",this._notes=t.notes||"",this._haDeviceId=t.ha_device_id||"",this._parentEntryId=t.parent_entry_id||"",this._error="",this._open=!0}async _save(){if(!this._loading&&this._name.trim()){this._loading=!0,this._error="";try{this._entryId?await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/object/update",entry_id:this._entryId,name:this._name,manufacturer:this._manufacturer||null,model:this._model||null,serial_number:this._serialNumber||null,area_id:this._areaId||null,installation_date:this._installationDate||null,warranty_expiry:this._warrantyExpiry||null,documentation_url:this._documentationUrl.trim()||null,notes:this._notes.trim()||null,ha_device_id:this._haDeviceId||null,parent_entry_id:this._parentEntryId||null}):await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/object/create",name:this._name,manufacturer:this._manufacturer||null,model:this._model||null,serial_number:this._serialNumber||null,area_id:this._areaId||null,installation_date:this._installationDate||null,warranty_expiry:this._warrantyExpiry||null,documentation_url:this._documentationUrl.trim()||null,notes:this._notes.trim()||null,ha_device_id:this._haDeviceId||null,parent_entry_id:this._parentEntryId||null}),this._open=!1,this.dispatchEvent(new CustomEvent("object-saved"))}catch(e){this._error=j(e,this._lang,s("save_error",this._lang))}finally{this._loading=!1}}}_parentChoices(){return(this.objects||[]).filter(e=>e.entry_id!==this._entryId)}_close(){this._open=!1}render(){if(!this._open)return l``;let e=this._lang,t=this._entryId?s("edit_object",e):s("new_object",e);return l`
|
`,d([x()],H.prototype,"label",2),d([x()],H.prototype,"value",2),d([x()],H.prototype,"placeholder",2),d([x()],H.prototype,"type",2),d([x({type:Boolean})],H.prototype,"required",2),d([x({type:Boolean})],H.prototype,"disabled",2),d([x()],H.prototype,"step",2),d([x()],H.prototype,"min",2),d([x()],H.prototype,"max",2),d([x()],H.prototype,"pattern",2),d([x()],H.prototype,"helper",2);customElements.get("ms-textfield")||customElements.define("ms-textfield",H)});var T,gi=w(()=>{"use strict";P();U();R();oe();ut();T=class extends A{constructor(){super(...arguments);this.objects=[];this._open=!1;this._loading=!1;this._error="";this._name="";this._manufacturer="";this._model="";this._serialNumber="";this._areaId="";this._installationDate="";this._warrantyExpiry="";this._documentationUrl="";this._notes="";this._haDeviceId="";this._parentEntryId="";this._entryId=null}get _lang(){return j(this.hass)}openCreate(){this._entryId=null,this._name="",this._manufacturer="",this._model="",this._serialNumber="",this._areaId="",this._installationDate="",this._warrantyExpiry="",this._documentationUrl="",this._notes="",this._haDeviceId="",this._parentEntryId="",this._error="",this._open=!0}openEdit(e,t){this._entryId=e,this._name=t.name||"",this._manufacturer=t.manufacturer||"",this._model=t.model||"",this._serialNumber=t.serial_number||"",this._areaId=t.area_id||"",this._installationDate=t.installation_date||"",this._warrantyExpiry=t.warranty_expiry||"",this._documentationUrl=t.documentation_url||"",this._notes=t.notes||"",this._haDeviceId=t.ha_device_id||"",this._parentEntryId=t.parent_entry_id||"",this._error="",this._open=!0}async _save(){if(!this._loading&&this._name.trim()){this._loading=!0,this._error="";try{this._entryId?await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/object/update",entry_id:this._entryId,name:this._name,manufacturer:this._manufacturer||null,model:this._model||null,serial_number:this._serialNumber||null,area_id:this._areaId||null,installation_date:this._installationDate||null,warranty_expiry:this._warrantyExpiry||null,documentation_url:this._documentationUrl.trim()||null,notes:this._notes.trim()||null,ha_device_id:this._haDeviceId||null,parent_entry_id:this._parentEntryId||null}):await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/object/create",name:this._name,manufacturer:this._manufacturer||null,model:this._model||null,serial_number:this._serialNumber||null,area_id:this._areaId||null,installation_date:this._installationDate||null,warranty_expiry:this._warrantyExpiry||null,documentation_url:this._documentationUrl.trim()||null,notes:this._notes.trim()||null,ha_device_id:this._haDeviceId||null,parent_entry_id:this._parentEntryId||null}),this._open=!1,this.dispatchEvent(new CustomEvent("object-saved"))}catch(e){this._error=N(e,this._lang,s("save_error",this._lang))}finally{this._loading=!1}}}_parentChoices(){return(this.objects||[]).filter(e=>e.entry_id!==this._entryId)}_close(){this._open=!1}render(){if(!this._open)return l``;let e=this._lang,t=this._entryId?s("edit_object",e):s("new_object",e);return l`
|
||||||
<ha-dialog open @closed=${this._close}>
|
<ha-dialog open @closed=${this._close}>
|
||||||
<div class="dialog-title">${t}</div>
|
<div class="dialog-title">${t}</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
@@ -1350,8 +1311,8 @@ Test pressure`,checklist_help:"One step per line. Max 100 items.",err_too_long:"
|
|||||||
color: var(--error-color, #f44336);
|
color: var(--error-color, #f44336);
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
}
|
}
|
||||||
`,d([x({attribute:!1})],T.prototype,"hass",2),d([x({attribute:!1})],T.prototype,"objects",2),d([u()],T.prototype,"_open",2),d([u()],T.prototype,"_loading",2),d([u()],T.prototype,"_error",2),d([u()],T.prototype,"_name",2),d([u()],T.prototype,"_manufacturer",2),d([u()],T.prototype,"_model",2),d([u()],T.prototype,"_serialNumber",2),d([u()],T.prototype,"_areaId",2),d([u()],T.prototype,"_installationDate",2),d([u()],T.prototype,"_warrantyExpiry",2),d([u()],T.prototype,"_documentationUrl",2),d([u()],T.prototype,"_notes",2),d([u()],T.prototype,"_haDeviceId",2),d([u()],T.prototype,"_parentEntryId",2),d([u()],T.prototype,"_entryId",2);customElements.get("maintenance-object-dialog")||customElements.define("maintenance-object-dialog",T)});var Ke,hi=w(()=>{"use strict";Ke=class{constructor(r){this.usersCache=null;this.cacheTimestamp=0;this.CACHE_TTL_MS=6e4;this.hass=r}updateHass(r){this.hass=r}async getUsers(r=!1){let e=Date.now();if(!r&&this.usersCache&&e-this.cacheTimestamp<this.CACHE_TTL_MS)return this.usersCache;try{let t=await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/users/list"});return this.usersCache=t.users,this.cacheTimestamp=e,this.usersCache}catch(t){return console.error("Failed to fetch users:",t),this.usersCache||[]}}async assignUser(r,e,t){await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/task/assign_user",entry_id:r,task_id:e,user_id:t})}async getTasksByUser(r){return(await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/tasks/by_user",user_id:r})).tasks}getUserName(r){return!r||!this.usersCache?null:this.usersCache.find(t=>t.id===r)?.name||null}getUser(r){return!r||!this.usersCache?null:this.usersCache.find(e=>e.id===r)||null}getCurrentUserId(){return this.hass.user?.id||null}isCurrentUser(r){return r?r===this.getCurrentUserId():!1}clearCache(){this.usersCache=null,this.cacheTimestamp=0}}});function ee(a){return`${a.entry_id??""}\0${a.part_id}`}var _t=w(()=>{"use strict";R()});var ht,gi,mi,fi=w(()=>{"use strict";ht=["sensor","binary_sensor","number","input_number","input_boolean","switch","climate","vacuum","cover","fan","light","water_heater","humidifier","media_player","weather","air_quality","valve","lawn_mower","lock"],gi=["sensor"],mi=["temperature","humidity","pressure"]});var vi,Ge,gt=w(()=>{"use strict";vi=["notes","cost","duration","photo","user"],Ge={notes:"notes_label",cost:"cost",duration:"duration",photo:"photo_label",user:"user_label"}});function Sr(){return{entityIds:"",type:"threshold",attribute:"",above:"",below:"",equals:"",notEquals:"",forMinutes:"0",targetValue:"",deltaMode:!1,fromState:"",toState:"",targetChanges:"",runtimeHours:"",onStates:"",carry:{}}}function Tr(a){return{entityIds:(a.entity_ids||(a.entity_id?[a.entity_id]:[])).join(", "),type:a.type||"threshold",attribute:a.attribute||"",above:a.trigger_above?.toString()??"",below:a.trigger_below?.toString()??"",equals:a.trigger_equals?.toString()??"",notEquals:a.trigger_not_equals?.toString()??"",forMinutes:a.trigger_for_minutes?.toString()??"0",targetValue:a.trigger_target_value?.toString()??"",deltaMode:a.trigger_delta_mode||!1,fromState:a.trigger_from_state||"",toState:a.trigger_to_state||"",targetChanges:a.trigger_target_changes?.toString()??"",runtimeHours:a.trigger_runtime_hours?.toString()??"",onStates:(a.trigger_on_states||[]).join(", "),carry:Object.fromEntries(Object.entries(a).filter(([e])=>!Ar.has(e)&&!e.startsWith("_")))}}function Cr(a){let r=a.entityIds.split(",").map(t=>t.trim()).filter(Boolean);if(r.length===0)return null;let e={...a.carry||{},entity_id:r[0],entity_ids:r,type:a.type};if(a.attribute&&(e.attribute=a.attribute),a.type==="threshold"){let t=parseFloat(a.above);isNaN(t)||(e.trigger_above=t);let i=parseFloat(a.below);isNaN(i)||(e.trigger_below=i);let n=parseFloat(a.equals);isNaN(n)||(e.trigger_equals=n);let o=parseFloat(a.notEquals);isNaN(o)||(e.trigger_not_equals=o);let p=parseInt(a.forMinutes,10);isNaN(p)||(e.trigger_for_minutes=p)}else if(a.type==="counter"){let t=parseFloat(a.targetValue);isNaN(t)||(e.trigger_target_value=t),e.trigger_delta_mode=a.deltaMode}else if(a.type==="state_change"){a.fromState&&(e.trigger_from_state=a.fromState),a.toState&&(e.trigger_to_state=a.toState);let t=parseInt(a.targetChanges,10);isNaN(t)||(e.trigger_target_changes=t)}else if(a.type==="runtime"){let t=parseFloat(a.runtimeHours);isNaN(t)||(e.trigger_runtime_hours=t);let i=(a.onStates||"").split(",").map(n=>n.trim()).filter(Boolean);i.length>0&&(e.trigger_on_states=i)}return e}function Ir(a){return Array.from({length:7},(r,e)=>Pe(e,a,"short"))}function Lr(a){let r=new Intl.DateTimeFormat(a||"en",{month:"short"});return Array.from({length:12},(e,t)=>r.format(new Date(2021,t,1)))}var wr,$r,kr,mt,yi,Er,Y,Ar,g,ft,bi=w(()=>{"use strict";P();U();R();hi();_t();fi();oe();gt();ut();wr=["cleaning","inspection","replacement","calibration","service","reading","custom"],$r=["low","normal","high"],kr=["time_based","weekdays","nth_weekday","day_of_month","
Line truncated
|
`,d([x({attribute:!1})],T.prototype,"hass",2),d([x({attribute:!1})],T.prototype,"objects",2),d([_()],T.prototype,"_open",2),d([_()],T.prototype,"_loading",2),d([_()],T.prototype,"_error",2),d([_()],T.prototype,"_name",2),d([_()],T.prototype,"_manufacturer",2),d([_()],T.prototype,"_model",2),d([_()],T.prototype,"_serialNumber",2),d([_()],T.prototype,"_areaId",2),d([_()],T.prototype,"_installationDate",2),d([_()],T.prototype,"_warrantyExpiry",2),d([_()],T.prototype,"_documentationUrl",2),d([_()],T.prototype,"_notes",2),d([_()],T.prototype,"_haDeviceId",2),d([_()],T.prototype,"_parentEntryId",2),d([_()],T.prototype,"_entryId",2);customElements.get("maintenance-object-dialog")||customElements.define("maintenance-object-dialog",T)});var Ke,mi=w(()=>{"use strict";Ke=class{constructor(r){this.usersCache=null;this.cacheTimestamp=0;this.CACHE_TTL_MS=6e4;this.hass=r}updateHass(r){this.hass=r}async getUsers(r=!1){let e=Date.now();if(!r&&this.usersCache&&e-this.cacheTimestamp<this.CACHE_TTL_MS)return this.usersCache;try{let t=await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/users/list"});return this.usersCache=t.users,this.cacheTimestamp=e,this.usersCache}catch(t){return console.error("Failed to fetch users:",t),this.usersCache||[]}}async assignUser(r,e,t){await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/task/assign_user",entry_id:r,task_id:e,user_id:t})}async getTasksByUser(r){return(await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/tasks/by_user",user_id:r})).tasks}getUserName(r){return!r||!this.usersCache?null:this.usersCache.find(t=>t.id===r)?.name||null}getUser(r){return!r||!this.usersCache?null:this.usersCache.find(e=>e.id===r)||null}getCurrentUserId(){return this.hass.user?.id||null}isCurrentUser(r){return r?r===this.getCurrentUserId():!1}clearCache(){this.usersCache=null,this.cacheTimestamp=0}}});function ee(a){return`${a.entry_id??""}\0${a.part_id}`}var _t=w(()=>{"use strict";R()});var ht,fi,vi,yi=w(()=>{"use strict";ht=["sensor","binary_sensor","number","input_number","input_boolean","switch","climate","vacuum","cover","fan","light","water_heater","humidifier","media_player","weather","air_quality","valve","lawn_mower","lock"],fi=["sensor"],vi=["temperature","humidity","pressure"]});var bi,Ge,gt=w(()=>{"use strict";bi=["notes","cost","duration","photo","user"],Ge={notes:"notes_label",cost:"cost",duration:"duration",photo:"photo_label",user:"user_label"}});function Pr(){return{entityIds:"",type:"threshold",attribute:"",above:"",below:"",equals:"",notEquals:"",forMinutes:"0",targetValue:"",deltaMode:!1,fromState:"",toState:"",targetChanges:"",runtimeHours:"",onStates:"",carry:{}}}function Nr(a){return{entityIds:(a.entity_ids||(a.entity_id?[a.entity_id]:[])).join(", "),type:a.type||"threshold",attribute:a.attribute||"",above:a.trigger_above?.toString()??"",below:a.trigger_below?.toString()??"",equals:a.trigger_equals?.toString()??"",notEquals:a.trigger_not_equals?.toString()??"",forMinutes:a.trigger_for_minutes?.toString()??"0",targetValue:a.trigger_target_value?.toString()??"",deltaMode:a.trigger_delta_mode||!1,fromState:a.trigger_from_state||"",toState:a.trigger_to_state||"",targetChanges:a.trigger_target_changes?.toString()??"",runtimeHours:a.trigger_runtime_hours?.toString()??"",onStates:(a.trigger_on_states||[]).join(", "),carry:Object.fromEntries(Object.entries(a).filter(([e])=>!Rr.has(e)&&!e.startsWith("_")))}}function jr(a){let r=a.entityIds.split(",").map(t=>t.trim()).filter(Boolean);if(r.length===0)return null;let e={...a.carry||{},entity_id:r[0],entity_ids:r,type:a.type};if(a.attribute&&(e.attribute=a.attribute),a.type==="threshold"){let t=parseFloat(a.above);isNaN(t)||(e.trigger_above=t);let i=parseFloat(a.below);isNaN(i)||(e.trigger_below=i);let n=parseFloat(a.equals);isNaN(n)||(e.trigger_equals=n);let o=parseFloat(a.notEquals);isNaN(o)||(e.trigger_not_equals=o);let p=parseInt(a.forMinutes,10);isNaN(p)||(e.trigger_for_minutes=p)}else if(a.type==="counter"){let t=parseFloat(a.targetValue);isNaN(t)||(e.trigger_target_value=t),e.trigger_delta_mode=a.deltaMode}else if(a.type==="state_change"){a.fromState&&(e.trigger_from_state=a.fromState),a.toState&&(e.trigger_to_state=a.toState);let t=parseInt(a.targetChanges,10);isNaN(t)||(e.trigger_target_changes=t)}else if(a.type==="runtime"){let t=parseFloat(a.runtimeHours);isNaN(t)||(e.trigger_runtime_hours=t);let i=(a.onStates||"").split(",").map(n=>n.trim()).filter(Boolean);i.length>0&&(e.trigger_on_states=i)}return e}function Hr(a){return Array.from({length:7},(r,e)=>Pe(e,a,"short"))}function qr(a){let r=new Intl.DateTimeFormat(a||"en",{month:"short"});return Array.from({length:12},(e,t)=>r.format(new Date(2021,t,1)))}var Tr,Cr,Ir,mt,xi,Lr,Y,Rr,g,ft,wi=w(()=>{"use strict";P();U();R();mi();_t();yi();oe();gt();ut();Tr=["cleaning","inspection","replacement","calibration","service","reading","custom"],Cr=["low","normal","high"],Ir=["time_based","weekdays","nth_weekday","day_of_month","
Line truncated
|
||||||
`),this._requiredCompletion=[...t.required_completion_fields||[]],this._scheduleTime=t.schedule_time||"";let o=t.on_complete_action;if(o&&o.service){this._actionService=o.service;let _=o.target?.entity_id;this._actionTargetEntity=Array.isArray(_)?_[0]||"":_||"",this._actionData=o.data&&typeof o.data=="object"?{...o.data}:{},this._actionDataJsonFallback=""}else this._actionService="",this._actionTargetEntity="",this._actionData={},this._actionDataJsonFallback="";let p=t.quick_complete_defaults;this._qcNotes=p?.notes||"",this._qcCost=p?.cost!=null?String(p.cost):"",this._qcDuration=p?.duration!=null?String(p.duration):"",this._qcFeedback=p?.feedback||"";let c=t.adaptive_config||{};if(this._environmentalEntity=c.environmental_entity||"",this._environmentalAttribute=c.environmental_attribute||"",this._environmentalInitial=this._environmentalEntity,this._environmentalAttributeInitial=this._environmentalAttribute,this._adaptiveEnabled=!!c.enabled,this._adaptiveAlpha=c.ewa_alpha?.toString()??Y.alpha,this._adaptiveMin=c.min_interval_days?.toString()??Y.min,this._adaptiveMax=c.max_interval_days?.toString()??Y.max,this._adaptiveSeasonal=c.seasonal_enabled!==!1,this._adaptivePrediction=c.sensor_prediction_enabled!==!1,this._adaptiveInitial=this._adaptiveSnapshot(),t.trigger_config){let _=t.trigger_config;this._triggerEntityId=_.entity_id||_.entity_ids&&_.entity_ids[0]||"",this._triggerEntityIds=_.entity_ids||(_.entity_id?[_.entity_id]:[]),this._triggerEntityLogic=_.entity_logic||"any",this._triggerAttribute=_.attribute||"",this._triggerType=_.type||"threshold",this._triggerAbove=_.trigger_above?.toString()||"",this._triggerBelow=_.trigger_below?.toString()||"",this._triggerEquals=_.trigger_equals?.toString()||"",this._triggerNotEquals=_.trigger_not_equals?.toString()||"",this._triggerForMinutes=_.trigger_for_minutes?.toString()||"0",this._triggerCombinator=_.trigger_combinator==="all"?"all":"any",this._triggerTargetValue=_.trigger_target_value?.toString()||"",this._triggerDeltaMode=_.trigger_delta_mode||!1,this._triggerBaselineValue=_.trigger_baseline_value?.toString()||"",this._liveBaselineValue=t.trigger_baseline_value??null,this._autoCompleteOnRecovery=_.auto_complete_on_recovery||!1,this._triggerFromState=_.trigger_from_state||"",this._triggerToState=_.trigger_to_state||"",this._triggerTargetChanges=_.trigger_target_changes?.toString()||"",this._triggerRuntimeHours=_.trigger_runtime_hours?.toString()||"",this._triggerOnStates=(_.trigger_on_states||[]).join(", "),_.type==="compound"?(this._compoundLogic=_.compound_logic==="OR"?"OR":"AND",this._compoundConditions=(_.conditions||[]).map(Tr)):(this._compoundLogic="AND",this._compoundConditions=[])}else this._resetTriggerFields();this._triggerEntityId&&this._fetchEntityAttributes(this._triggerEntityId),await Promise.all([this._loadUsers(),this._loadTags(),this._loadParts(),this._loadForeignPools()]),this._open=!0}_resetFields(){this._name="",this._type="custom",this._scheduleType="time_based",this._intervalDays="30",this._intervalUnit="days",this._dueDate="",this._warningDays=String(this.defaultWarningDays),this._earliestCompletionDays="",this._intervalAnchor="completion",this._weekdays=[],this._nth="1",this._nthWeekday="5",this._domDay="1",this._domLastDay=!1,this._domBusiness=!1,this._calOffset="0",this._seasonMonths=[],this._endsMode="never",this._endsCount="",this._endsUntil="",this._notes="",this._documentationUrl="",this._customIcon="",this._priority="normal",this._labels="",this._enabled=!0,this._lastPerformed="",this._nfcTagId="",this._readingUnit="",this._consumesParts={},this._responsibleUserId=null,this._assigneePool=[],this._rotationStrategy="",this._checklistText="",this._requiredCompletion=[],this._scheduleTime="",this._environmentalEntity="",this._environmentalAttribute="",this._environmentalInitial="",this._environmentalAttributeInitial="",this._adaptiveEnabled=!1,this._adaptiveAlpha=Y.alpha,this._adaptiveMin=Y.min,this._adaptiveMax=Y.max,this._adaptiveSeasonal=!0,this._adaptivePrediction=!0,this._adaptiveInitial=this._adaptiveSnapshot(),this._actionService="",this._actionTargetEntity="",this._actionData={},this._actionDataJsonFallback="",this._actionTesting=!1,this._actionTestResult="",this._qcNotes="",this._qcCost="",this._qcDuration="",this._qcFeedback="",this._resetTriggerFields()}_resetTriggerFields(){this._triggerEntityId="",this._triggerEntityIds=[],this._triggerEntityLogic="any",this._triggerAttribute="",this._suggestedAttributes=[],this._availableAttributes=[],this._entityDomain="",this._triggerType="threshold",this._triggerAbove="",this._triggerBelow="",this._triggerEquals="",this._triggerNotEquals="",this._triggerForMinutes="0",this._triggerCombinator="any",this._triggerTargetValue="",this._triggerDeltaMode=!1,this._triggerBaselineValue="",this._liveBaselineValue=null,this._autoCompleteOnRecovery=!1,this._triggerFromState="",this._triggerToState="",this._triggerTargetChanges="",this._triggerRuntimeHours="",this._triggerOnStates="",this._comp
Line truncated
|
`),this._requiredCompletion=[...t.required_completion_fields||[]],this._scheduleTime=t.schedule_time||"";let o=t.on_complete_action;if(o&&o.service){this._actionService=o.service;let u=o.target?.entity_id;this._actionTargetEntity=Array.isArray(u)?u[0]||"":u||"",this._actionData=o.data&&typeof o.data=="object"?{...o.data}:{},this._actionDataJsonFallback=""}else this._actionService="",this._actionTargetEntity="",this._actionData={},this._actionDataJsonFallback="";let p=t.quick_complete_defaults;this._qcNotes=p?.notes||"",this._qcCost=p?.cost!=null?String(p.cost):"",this._qcDuration=p?.duration!=null?String(p.duration):"",this._qcFeedback=p?.feedback||"";let c=t.adaptive_config||{};if(this._environmentalEntity=c.environmental_entity||"",this._environmentalAttribute=c.environmental_attribute||"",this._environmentalInitial=this._environmentalEntity,this._environmentalAttributeInitial=this._environmentalAttribute,this._adaptiveEnabled=!!c.enabled,this._adaptiveAlpha=c.ewa_alpha?.toString()??Y.alpha,this._adaptiveMin=c.min_interval_days?.toString()??Y.min,this._adaptiveMax=c.max_interval_days?.toString()??Y.max,this._adaptiveSeasonal=c.seasonal_enabled!==!1,this._adaptivePrediction=c.sensor_prediction_enabled!==!1,this._adaptiveInitial=this._adaptiveSnapshot(),t.trigger_config){let u=t.trigger_config;this._triggerEntityId=u.entity_id||u.entity_ids&&u.entity_ids[0]||"",this._triggerEntityIds=u.entity_ids||(u.entity_id?[u.entity_id]:[]),this._triggerEntityLogic=u.entity_logic||"any",this._triggerAttribute=u.attribute||"",this._triggerType=u.type||"threshold",this._triggerAbove=u.trigger_above?.toString()||"",this._triggerBelow=u.trigger_below?.toString()||"",this._triggerEquals=u.trigger_equals?.toString()||"",this._triggerNotEquals=u.trigger_not_equals?.toString()||"",this._triggerForMinutes=u.trigger_for_minutes?.toString()||"0",this._triggerCombinator=u.trigger_combinator==="all"?"all":"any",this._triggerTargetValue=u.trigger_target_value?.toString()||"",this._triggerDeltaMode=u.trigger_delta_mode||!1,this._triggerBaselineValue=u.trigger_baseline_value?.toString()||"",this._liveBaselineValue=t.trigger_baseline_value??null,this._autoCompleteOnRecovery=u.auto_complete_on_recovery||!1,this._triggerFromState=u.trigger_from_state||"",this._triggerToState=u.trigger_to_state||"",this._triggerTargetChanges=u.trigger_target_changes?.toString()||"",this._triggerRuntimeHours=u.trigger_runtime_hours?.toString()||"",this._triggerOnStates=(u.trigger_on_states||[]).join(", "),u.type==="compound"?(this._compoundLogic=u.compound_logic==="OR"?"OR":"AND",this._compoundConditions=(u.conditions||[]).map(Nr)):(this._compoundLogic="AND",this._compoundConditions=[])}else this._resetTriggerFields();this._triggerEntityId&&this._fetchEntityAttributes(this._triggerEntityId),await Promise.all([this._loadUsers(),this._loadTags(),this._loadParts(),this._loadForeignPools()]),this._open=!0}_resetFields(){this._name="",this._type="custom",this._scheduleType="time_based",this._intervalDays="30",this._intervalUnit="days",this._dueDate="",this._warningDays=String(this.defaultWarningDays),this._earliestCompletionDays="",this._intervalAnchor="completion",this._weekdays=[],this._nth="1",this._nthWeekday="5",this._domDay="1",this._domLastDay=!1,this._domBusiness=!1,this._calOffset="0",this._seasonMonths=[],this._endsMode="never",this._endsCount="",this._endsUntil="",this._notes="",this._documentationUrl="",this._customIcon="",this._priority="normal",this._labels="",this._enabled=!0,this._lastPerformed="",this._nfcTagId="",this._readingUnit="",this._consumesParts={},this._responsibleUserId=null,this._assigneePool=[],this._rotationStrategy="",this._checklistText="",this._requiredCompletion=[],this._scheduleTime="",this._environmentalEntity="",this._environmentalAttribute="",this._environmentalInitial="",this._environmentalAttributeInitial="",this._adaptiveEnabled=!1,this._adaptiveAlpha=Y.alpha,this._adaptiveMin=Y.min,this._adaptiveMax=Y.max,this._adaptiveSeasonal=!0,this._adaptivePrediction=!0,this._adaptiveInitial=this._adaptiveSnapshot(),this._actionService="",this._actionTargetEntity="",this._actionData={},this._actionDataJsonFallback="",this._actionTesting=!1,this._actionTestResult="",this._qcNotes="",this._qcCost="",this._qcDuration="",this._qcFeedback="",this._resetTriggerFields()}_resetTriggerFields(){this._triggerEntityId="",this._triggerEntityIds=[],this._triggerEntityLogic="any",this._triggerAttribute="",this._suggestedAttributes=[],this._availableAttributes=[],this._entityDomain="",this._triggerType="threshold",this._triggerAbove="",this._triggerBelow="",this._triggerEquals="",this._triggerNotEquals="",this._triggerForMinutes="0",this._triggerCombinator="any",this._triggerTargetValue="",this._triggerDeltaMode=!1,this._triggerBaselineValue="",this._liveBaselineValue=null,this._autoCompleteOnRecovery=!1,this._triggerFromState="",this._triggerToState="",this._triggerTargetChanges="",this._triggerRuntimeHours="",this._triggerOnStates="",this._comp
Line truncated
|
||||||
<details class="ca-section">
|
<details class="ca-section">
|
||||||
<summary>${s("on_complete_action_title",e)}</summary>
|
<summary>${s("on_complete_action_title",e)}</summary>
|
||||||
<p class="field-help">${s("on_complete_action_desc",e)}</p>
|
<p class="field-help">${s("on_complete_action_desc",e)}</p>
|
||||||
@@ -1447,8 +1408,8 @@ Test pressure`,checklist_help:"One step per line. Max 100 items.",err_too_long:"
|
|||||||
@input=${p=>{let c=parseFloat(p.target.value);this._consumesParts={...this._consumesParts,[i]:{...o,quantity:Number.isFinite(c)&&c>=.01?c:1}}}}
|
@input=${p=>{let c=parseFloat(p.target.value);this._consumesParts={...this._consumesParts,[i]:{...o,quantity:Number.isFinite(c)&&c>=.01?c:1}}}}
|
||||||
/>`:h}
|
/>`:h}
|
||||||
</div>
|
</div>
|
||||||
`}_toggleRequired(e,t){let i=new Set(this._requiredCompletion);t?i.add(e):i.delete(e),this._requiredCompletion=[...i]}async _save(){if(!this._loading&&this._name.trim()){if(this._adaptiveSnapshot()!==this._adaptiveInitial){let e=parseInt(this._adaptiveMin,10),t=parseInt(this._adaptiveMax,10);if(!isNaN(e)&&!isNaN(t)&&e>t){this._error=`${s("adaptive_min_interval",this._lang)} > ${s("adaptive_max_interval",this._lang)}`;return}}this._loading=!0,this._error="";try{let e={type:this._taskId?"maintenance_supporter/task/update":"maintenance_supporter/task/create",entry_id:this._entryId,name:this._name,task_type:this._type,schedule_type:this._scheduleType,warning_days:Number.isNaN(parseInt(this._warningDays,10))?this.defaultWarningDays:Math.max(0,parseInt(this._warningDays,10))},t=this._earliestCompletionDays.trim();if(e.earliest_completion_days=t===""?null:Math.max(0,parseInt(t,10)||0),this._taskId&&(e.task_id=this._taskId),this._scheduleType==="one_time"?(e.due_date=this._dueDate||null,e.interval_days=null):mt.includes(this._scheduleType)?(e.schedule={...this._buildSchedule(),...this._recurrenceExtras()},e.interval_days=null,this._taskId&&(e.due_date=null)):(this._taskId&&(e.due_date=null),this._scheduleType!=="manual"&&this._intervalDays?(e.interval_days=parseInt(this._intervalDays,10),e.interval_unit=this._intervalUnit,e.interval_anchor=this._intervalAnchor,this._scheduleType==="time_based"&&(e.schedule={kind:"interval",...this._recurrenceExtras()})):this._taskId&&(e.interval_days=null,e.interval_anchor="completion")),e.notes=this._notes||null,e.documentation_url=this._documentationUrl||null,e.custom_icon=this._customIcon||null,e.priority=this._priority,e.labels=this._labels.split(",").map(p=>p.trim()).filter(Boolean),e.enabled=this._enabled,e.last_performed=this._lastPerformed||null,e.nfc_tag_id=this._nfcTagId||null,e.reading_unit=this._readingUnit.trim()||null,(this.parts.length||this._foreignOwners.length)&&(e.consumes_parts=Object.values(this._consumesParts).map(p=>p.entry_id?{part_id:p.part_id,quantity:p.quantity,entry_id:p.entry_id}:{part_id:p.part_id,quantity:p.quantity})),e.responsible_user_id=this._responsibleUserId,e.assignee_pool=this._assigneePool,e.required_completion_fields=this._requiredCompletion,e.rotation_strategy=this._assigneePool.length>=2&&this._rotationStrategy?this._rotationStrategy:null,this._scheduleType==="sensor_based"&&this._triggerType==="compound"){let p=this._compoundConditions.map(Cr).filter(c=>c!==null);if(p.length>0){let c={type:"compound",compound_logic:this._compoundLogic,conditions:p};this._autoCompleteOnRecovery&&(c.auto_complete_on_recovery=!0),this._triggerCombinator==="all"&&(c.trigger_combinator="all"),e.trigger_config=c}else this._taskId&&(e.trigger_config=null)}else if(this._scheduleType==="sensor_based"&&this._triggerEntityId){let p=this._triggerEntityIds.length>0?this._triggerEntityIds:[this._triggerEntityId],c={entity_id:p[0],entity_ids:p,type:this._triggerType};if(this._triggerAttribute&&(c.attribute=this._triggerAttribute),this._autoCompleteOnRecovery&&(c.auto_complete_on_recovery=!0),this._triggerCombinator==="all"&&(c.trigger_combinator="all"),p.length>1&&(c.entity_logic=this._triggerEntityLogic),this._triggerType==="threshold"){if(this._triggerAbove){let _=parseFloat(this._triggerAbove);isNaN(_)||(c.trigger_above=_)}if(this._triggerBelow){let _=parseFloat(this._triggerBelow);isNaN(_)||(c.trigger_below=_)}if(this._triggerEquals){let _=parseFloat(this._triggerEquals);isNaN(_)||(c.trigger_equals=_)}if(this._triggerNotEquals){let _=parseFloat(this._triggerNotEquals);isNaN(_)||(c.trigger_not_equals=_)}if(this._triggerForMinutes){let _=parseInt(this._triggerForMinutes,10);isNaN(_)||(c.trigger_for_minutes=_)}}else if(this._triggerType==="counter"){if(this._triggerTargetValue){let _=parseFloat(this._triggerTargetValue);isNaN(_)||(c.trigger_target_value=_)}if(c.trigger_delta_mode=this._triggerDeltaMode,this._triggerDeltaMode&&this._triggerBaselineValue){let _=parseFloat(this._triggerBaselineValue);!isNaN(_)&&_>=0&&(c.trigger_baseline_value=_)}}else if(this._triggerType==="state_change"){if(this._triggerFromState&&(c.trigger_from_state=this._triggerFromState),this._triggerToState&&(c.trigger_to_state=this._triggerToState),this._triggerTargetChanges){let _=parseInt(this._triggerTargetChanges,10);isNaN(_)||(c.trigger_target_changes=_)}}else if(this._triggerType==="runtime"){if(this._triggerRuntimeHours){let f=parseFloat(this._triggerRuntimeHours);isNaN(f)||(c.trigger_runtime_hours=f)}let _=this._triggerOnStates.split(",").map(f=>f.trim()).filter(Boolean);_.length>0&&(c.trigger_on_states=_)}e.trigger_config=c}else this._taskId&&(e.trigger_config=null);if(this.scheduleTimeEnabled&&this._scheduleType==="time_based"){let p=this._scheduleTime.trim();e.schedule_time=/^([01]\d|2[0-3]):[0-5]\d$/.test(p)?p:null}if(this.checklistsEnabled){let p=this._checklistText.split(`
|
`}_toggleRequired(e,t){let i=new Set(this._requiredCompletion);t?i.add(e):i.delete(e),this._requiredCompletion=[...i]}async _save(){if(!this._loading&&this._name.trim()){if(this._adaptiveSnapshot()!==this._adaptiveInitial){let e=parseInt(this._adaptiveMin,10),t=parseInt(this._adaptiveMax,10);if(!isNaN(e)&&!isNaN(t)&&e>t){this._error=`${s("adaptive_min_interval",this._lang)} > ${s("adaptive_max_interval",this._lang)}`;return}}this._loading=!0,this._error="";try{let e={type:this._taskId?"maintenance_supporter/task/update":"maintenance_supporter/task/create",entry_id:this._entryId,name:this._name,task_type:this._type,schedule_type:this._scheduleType,warning_days:Number.isNaN(parseInt(this._warningDays,10))?this.defaultWarningDays:Math.max(0,parseInt(this._warningDays,10))},t=this._earliestCompletionDays.trim();if(e.earliest_completion_days=t===""?null:Math.max(0,parseInt(t,10)||0),this._taskId&&(e.task_id=this._taskId),this._scheduleType==="one_time"?(e.due_date=this._dueDate||null,e.interval_days=null):mt.includes(this._scheduleType)?(e.schedule={...this._buildSchedule(),...this._recurrenceExtras()},e.interval_days=null,this._taskId&&(e.due_date=null)):(this._taskId&&(e.due_date=null),this._scheduleType!=="manual"&&this._intervalDays?(e.interval_days=parseInt(this._intervalDays,10),e.interval_unit=this._intervalUnit,e.interval_anchor=this._intervalAnchor,this._scheduleType==="time_based"&&(e.schedule={kind:"interval",...this._recurrenceExtras()})):this._taskId&&(e.interval_days=null,e.interval_anchor="completion")),e.notes=this._notes||null,e.documentation_url=this._documentationUrl||null,e.custom_icon=this._customIcon||null,e.priority=this._priority,e.labels=this._labels.split(",").map(p=>p.trim()).filter(Boolean),e.enabled=this._enabled,e.last_performed=this._lastPerformed||null,e.nfc_tag_id=this._nfcTagId||null,e.reading_unit=this._readingUnit.trim()||null,(this.parts.length||this._foreignOwners.length)&&(e.consumes_parts=Object.values(this._consumesParts).map(p=>p.entry_id?{part_id:p.part_id,quantity:p.quantity,entry_id:p.entry_id}:{part_id:p.part_id,quantity:p.quantity})),e.responsible_user_id=this._responsibleUserId,e.assignee_pool=this._assigneePool,e.required_completion_fields=this._requiredCompletion,e.rotation_strategy=this._assigneePool.length>=2&&this._rotationStrategy?this._rotationStrategy:null,this._scheduleType==="sensor_based"&&this._triggerType==="compound"){let p=this._compoundConditions.map(jr).filter(c=>c!==null);if(p.length>0){let c={type:"compound",compound_logic:this._compoundLogic,conditions:p};this._autoCompleteOnRecovery&&(c.auto_complete_on_recovery=!0),this._triggerCombinator==="all"&&(c.trigger_combinator="all"),e.trigger_config=c}else this._taskId&&(e.trigger_config=null)}else if(this._scheduleType==="sensor_based"&&this._triggerEntityId){let p=this._triggerEntityIds.length>0?this._triggerEntityIds:[this._triggerEntityId],c={entity_id:p[0],entity_ids:p,type:this._triggerType};if(this._triggerAttribute&&(c.attribute=this._triggerAttribute),this._autoCompleteOnRecovery&&(c.auto_complete_on_recovery=!0),this._triggerCombinator==="all"&&(c.trigger_combinator="all"),p.length>1&&(c.entity_logic=this._triggerEntityLogic),this._triggerType==="threshold"){if(this._triggerAbove){let u=parseFloat(this._triggerAbove);isNaN(u)||(c.trigger_above=u)}if(this._triggerBelow){let u=parseFloat(this._triggerBelow);isNaN(u)||(c.trigger_below=u)}if(this._triggerEquals){let u=parseFloat(this._triggerEquals);isNaN(u)||(c.trigger_equals=u)}if(this._triggerNotEquals){let u=parseFloat(this._triggerNotEquals);isNaN(u)||(c.trigger_not_equals=u)}if(this._triggerForMinutes){let u=parseInt(this._triggerForMinutes,10);isNaN(u)||(c.trigger_for_minutes=u)}}else if(this._triggerType==="counter"){if(this._triggerTargetValue){let u=parseFloat(this._triggerTargetValue);isNaN(u)||(c.trigger_target_value=u)}if(c.trigger_delta_mode=this._triggerDeltaMode,this._triggerDeltaMode&&this._triggerBaselineValue){let u=parseFloat(this._triggerBaselineValue);!isNaN(u)&&u>=0&&(c.trigger_baseline_value=u)}}else if(this._triggerType==="state_change"){if(this._triggerFromState&&(c.trigger_from_state=this._triggerFromState),this._triggerToState&&(c.trigger_to_state=this._triggerToState),this._triggerTargetChanges){let u=parseInt(this._triggerTargetChanges,10);isNaN(u)||(c.trigger_target_changes=u)}if(this._triggerForMinutes){let u=parseInt(this._triggerForMinutes,10);isNaN(u)||(c.trigger_for_minutes=u)}}else if(this._triggerType==="runtime"){if(this._triggerRuntimeHours){let f=parseFloat(this._triggerRuntimeHours);isNaN(f)||(c.trigger_runtime_hours=f)}let u=this._triggerOnStates.split(",").map(f=>f.trim()).filter(Boolean);u.length>0&&(c.trigger_on_states=u)}e.trigger_config=c}else this._taskId&&(e.trigger_config=null);if(this.scheduleTimeEnabled&&this._scheduleType==="time_based"){let p=this._scheduleTime.trim();e.schedule_time=/^([01]\d|2[0-3]):[0-5]\d$/.test(p)?p:null}if(this.checklistsEnabled){let p=this._checklistText.split(`
|
||||||
`).map(c=>c.trim()).filter(Boolean).slice(0,100);e.checklist=p.length?p:null}if(this.completionActionsEnabled){let p=this._actionService.trim();if(p&&/^[a-z][a-z0-9_]*\.[a-z0-9_]+$/.test(p)){let m={service:p},y=this._actionTargetEntity.trim();y&&(m.target={entity_id:y});let b=this._buildActionData();Object.keys(b).length>0&&(m.data=b),e.on_complete_action=m}else e.on_complete_action=null;let c={};this._qcNotes.trim()&&(c.notes=this._qcNotes.trim());let _=parseFloat(this._qcCost);!isNaN(_)&&_>=0&&(c.cost=_);let f=parseInt(this._qcDuration,10);!isNaN(f)&&f>=0&&(c.duration=f),this._qcFeedback&&(c.feedback=this._qcFeedback),e.quick_complete_defaults=Object.keys(c).length?c:null}let i=await this.hass.connection.sendMessagePromise(e),n=this._taskId||i?.task_id,o=this._environmentalEntity!==this._environmentalInitial||this._environmentalAttribute!==this._environmentalAttributeInitial;if(n&&this._scheduleType==="sensor_based"&&o)try{await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/task/set_environmental_entity",entry_id:this._entryId,task_id:n,environmental_entity:this._environmentalEntity||null,environmental_attribute:this._environmentalAttribute||null}),this._environmentalInitial=this._environmentalEntity,this._environmentalAttributeInitial=this._environmentalAttribute}catch{}if(n&&this._adaptiveSnapshot()!==this._adaptiveInitial){let p=parseFloat(this._adaptiveAlpha),c=parseInt(this._adaptiveMin,10),_=parseInt(this._adaptiveMax,10);try{await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/task/set_adaptive",entry_id:this._entryId,task_id:n,enabled:this._adaptiveEnabled,...p>=.1&&p<=.9?{ewa_alpha:p}:{},...!isNaN(c)&&c>=1?{min_interval_days:c}:{},...!isNaN(_)&&_>=1?{max_interval_days:_}:{},seasonal_enabled:this._adaptiveSeasonal,sensor_prediction_enabled:this._adaptivePrediction}),this._adaptiveInitial=this._adaptiveSnapshot()}catch{}}this._open=!1,this.dispatchEvent(new CustomEvent("task-saved"))}catch(e){this._error=j(e,this._lang,s("save_error",this._lang))}finally{this._loading=!1}}}_close(){this._open=!1,this._pickerProbeTimer!==void 0&&(clearTimeout(this._pickerProbeTimer),this._pickerProbeTimer=void 0),this._pickerProbeStrikes=0}_renderTriggerFields(){if(this._scheduleType!=="sensor_based")return h;let e=this._lang,t=this._triggerType==="compound";return l`
|
`).map(c=>c.trim()).filter(Boolean).slice(0,100);e.checklist=p.length?p:null}if(this.completionActionsEnabled){let p=this._actionService.trim();if(p&&/^[a-z][a-z0-9_]*\.[a-z0-9_]+$/.test(p)){let m={service:p},y=this._actionTargetEntity.trim();y&&(m.target={entity_id:y});let b=this._buildActionData();Object.keys(b).length>0&&(m.data=b),e.on_complete_action=m}else e.on_complete_action=null;let c={};this._qcNotes.trim()&&(c.notes=this._qcNotes.trim());let u=parseFloat(this._qcCost);!isNaN(u)&&u>=0&&(c.cost=u);let f=parseInt(this._qcDuration,10);!isNaN(f)&&f>=0&&(c.duration=f),this._qcFeedback&&(c.feedback=this._qcFeedback),e.quick_complete_defaults=Object.keys(c).length?c:null}let i=await this.hass.connection.sendMessagePromise(e),n=this._taskId||i?.task_id,o=this._environmentalEntity!==this._environmentalInitial||this._environmentalAttribute!==this._environmentalAttributeInitial;if(n&&this._scheduleType==="sensor_based"&&o)try{await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/task/set_environmental_entity",entry_id:this._entryId,task_id:n,environmental_entity:this._environmentalEntity||null,environmental_attribute:this._environmentalAttribute||null}),this._environmentalInitial=this._environmentalEntity,this._environmentalAttributeInitial=this._environmentalAttribute}catch{}if(n&&this._adaptiveSnapshot()!==this._adaptiveInitial){let p=parseFloat(this._adaptiveAlpha),c=parseInt(this._adaptiveMin,10),u=parseInt(this._adaptiveMax,10);try{await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/task/set_adaptive",entry_id:this._entryId,task_id:n,enabled:this._adaptiveEnabled,...p>=.1&&p<=.9?{ewa_alpha:p}:{},...!isNaN(c)&&c>=1?{min_interval_days:c}:{},...!isNaN(u)&&u>=1?{max_interval_days:u}:{},seasonal_enabled:this._adaptiveSeasonal,sensor_prediction_enabled:this._adaptivePrediction}),this._adaptiveInitial=this._adaptiveSnapshot()}catch{}}this._open=!1,this.dispatchEvent(new CustomEvent("task-saved"))}catch(e){this._error=N(e,this._lang,s("save_error",this._lang))}finally{this._loading=!1}}}_close(){this._open=!1,this._pickerProbeTimer!==void 0&&(clearTimeout(this._pickerProbeTimer),this._pickerProbeTimer=void 0),this._pickerProbeStrikes=0}_renderTriggerFields(){if(this._scheduleType!=="sensor_based")return h;let e=this._lang,t=this._triggerType==="compound";return l`
|
||||||
<h3>${s("trigger_configuration",e)}</h3>
|
<h3>${s("trigger_configuration",e)}</h3>
|
||||||
<div class="select-row">
|
<div class="select-row">
|
||||||
<label>${s("trigger_type",e)}</label>
|
<label>${s("trigger_type",e)}</label>
|
||||||
@@ -1456,7 +1417,7 @@ Test pressure`,checklist_help:"One step per line. Max 100 items.",err_too_long:"
|
|||||||
.value=${this._triggerType}
|
.value=${this._triggerType}
|
||||||
@change=${i=>this._triggerType=i.target.value}
|
@change=${i=>this._triggerType=i.target.value}
|
||||||
>
|
>
|
||||||
${Er.map(i=>l`<option value=${i} ?selected=${i===this._triggerType}>${s(i,e)}</option>`)}
|
${Lr.map(i=>l`<option value=${i} ?selected=${i===this._triggerType}>${s(i,e)}</option>`)}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
${t?this._renderCompoundEditor():l`
|
${t?this._renderCompoundEditor():l`
|
||||||
@@ -1518,7 +1479,7 @@ Test pressure`,checklist_help:"One step per line. Max 100 items.",err_too_long:"
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
`:h}
|
`:h}
|
||||||
`}_patchCondition(e,t){this._compoundConditions=this._compoundConditions.map((i,n)=>n===e?{...i,...t}:i)}_addCondition(){this._compoundConditions=[...this._compoundConditions,Sr()]}_removeCondition(e){this._compoundConditions=this._compoundConditions.filter((t,i)=>i!==e)}_renderCompoundEditor(){let e=this._lang;return l`
|
`}_patchCondition(e,t){this._compoundConditions=this._compoundConditions.map((i,n)=>n===e?{...i,...t}:i)}_addCondition(){this._compoundConditions=[...this._compoundConditions,Pr()]}_removeCondition(e){this._compoundConditions=this._compoundConditions.filter((t,i)=>i!==e)}_renderCompoundEditor(){let e=this._lang;return l`
|
||||||
<div class="select-row">
|
<div class="select-row">
|
||||||
<label>${s("compound_logic",e)}</label>
|
<label>${s("compound_logic",e)}</label>
|
||||||
<select
|
<select
|
||||||
@@ -1567,7 +1528,7 @@ Test pressure`,checklist_help:"One step per line. Max 100 items.",err_too_long:"
|
|||||||
.value=${e.type}
|
.value=${e.type}
|
||||||
@change=${o=>this._patchCondition(t,{type:o.target.value})}
|
@change=${o=>this._patchCondition(t,{type:o.target.value})}
|
||||||
>
|
>
|
||||||
${yi.map(o=>l`<option value=${o} ?selected=${o===e.type}>${s(o,i)}</option>`)}
|
${xi.map(o=>l`<option value=${o} ?selected=${o===e.type}>${s(o,i)}</option>`)}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
${this._renderConditionTypeFields(e,t)}
|
${this._renderConditionTypeFields(e,t)}
|
||||||
@@ -1711,12 +1672,12 @@ Test pressure`,checklist_help:"One step per line. Max 100 items.",err_too_long:"
|
|||||||
>
|
>
|
||||||
${["days","weeks","months","years"].map(t=>l`<option value=${t} ?selected=${t===this._intervalUnit}>${s("unit_"+t,e)}</option>`)}
|
${["days","weeks","months","years"].map(t=>l`<option value=${t} ?selected=${t===this._intervalUnit}>${s("unit_"+t,e)}</option>`)}
|
||||||
</select>
|
</select>
|
||||||
</div>`}_toggleWeekday(e){this._weekdays=this._weekdays.includes(e)?this._weekdays.filter(t=>t!==e):[...this._weekdays,e]}_previewScheduleDict(){if(this._scheduleType==="one_time")return this._dueDate?{kind:"one_time",due_date:this._dueDate}:null;if(mt.includes(this._scheduleType))return{...this._buildSchedule(),...this._recurrenceExtras()};let e=parseInt(this._intervalDays,10);return this._scheduleType==="manual"||!e||e<=0?null:{kind:"interval",every:e,unit:this._intervalUnit,anchor:this._intervalAnchor,...this._recurrenceExtras()}}updated(e){super.updated?.(e),this._scheduleEntityPickerProbe();for(let t of e.keys())if(g._PREVIEW_RELEVANT.has(String(t))){this._schedulePreviewRefresh();return}}_scheduleEntityPickerProbe(){this._entityPickerFallback||this._pickerProbeTimer!==void 0||!this._open||this._scheduleType!=="sensor_based"||(this._pickerProbeTimer=setTimeout(()=>this._probeEntityPickers(),1500))}_probeEntityPickers(){if(this._pickerProbeTimer=void 0,this._entityPickerFallback||!this._open)return;let e=this.shadowRoot?.querySelector("ha-form.entity-picker-form"),t=(this.shadowRoot?.querySelector(".content")?.offsetHeight??0)>0;if(!e||!t){this._pickerProbeStrikes=0;return}let i=(c,_,f=0)=>{if(!(!c||f>10)){(c.tagName?.toLowerCase()??"")==="ha-entity-picker"&&_.push(c);for(let m of[c.shadowRoot,c])if(m)for(let y of Array.from(m.children??[]))i(y,_,f+1)}},n=[...this.shadowRoot?.querySelectorAll("ha-form.entity-picker-form")??[]],o=[];for(let c of n)i(c,o);let p=o.length===0||o.some(c=>c.offsetHeight===0);if(e.offsetHeight===0||p){if(this._pickerProbeStrikes+=1,this._pickerProbeStrikes>=2){this._entityPickerFallback=!0;return}this._pickerProbeTimer=setTimeout(()=>this._probeEntityPickers(),700)}else this._pickerProbeStrikes=0}_schedulePreviewRefresh(){this._previewTimer&&clearTimeout(this._previewTimer),this._previewTimer=setTimeout(()=>{this._fetchSchedulePreview()},300)}async _fetchSchedulePreview(){let e=this._open?this._previewScheduleDict():null;if(!e){this._schedulePreview=[],this._schedulePreviewEnded=!1;return}let t=++this._previewSeq;try{let i=await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/schedule/preview",schedule:e,...this._lastPerformed?{last_performed:this._lastPerformed}:{}});if(t!==this._previewSeq)return;this._schedulePreview=i.occurrences||[],this._schedulePreviewEnded=!!i.series_ended}catch{}}_renderSchedulePreview(){if(this._schedulePreview.length===0)return h;let e=this._lang,t=this.scheduleTimeEnabled&&this._scheduleTime?` ${this._scheduleTime}`:"",i=this._schedulePreview.map((o,p)=>{let c=new Date(`${o}T12:00:00`).getDay();return`${Pe(c===0?6:c-1,e,"short")} ${G(o,e)}${p===0?t:""}`}).join(" \xB7 "),n=this._scheduleType==="time_based"&&this._intervalAnchor==="completion"?l`<div class="field-help">${s("schedule_preview_ontime",e)}</div>`:h;return l`
|
</div>`}_toggleWeekday(e){this._weekdays=this._weekdays.includes(e)?this._weekdays.filter(t=>t!==e):[...this._weekdays,e]}_previewScheduleDict(){if(this._scheduleType==="one_time")return this._dueDate?{kind:"one_time",due_date:this._dueDate}:null;if(mt.includes(this._scheduleType))return{...this._buildSchedule(),...this._recurrenceExtras()};let e=parseInt(this._intervalDays,10);return this._scheduleType==="manual"||!e||e<=0?null:{kind:"interval",every:e,unit:this._intervalUnit,anchor:this._intervalAnchor,...this._recurrenceExtras()}}updated(e){super.updated?.(e),this._scheduleEntityPickerProbe();for(let t of e.keys())if(g._PREVIEW_RELEVANT.has(String(t))){this._schedulePreviewRefresh();return}}_scheduleEntityPickerProbe(){this._entityPickerFallback||this._pickerProbeTimer!==void 0||!this._open||this._scheduleType!=="sensor_based"||(this._pickerProbeTimer=setTimeout(()=>this._probeEntityPickers(),1500))}_probeEntityPickers(){if(this._pickerProbeTimer=void 0,this._entityPickerFallback||!this._open)return;let e=this.shadowRoot?.querySelector("ha-form.entity-picker-form"),t=(this.shadowRoot?.querySelector(".content")?.offsetHeight??0)>0;if(!e||!t){this._pickerProbeStrikes=0;return}let i=(c,u,f=0)=>{if(!(!c||f>10)){(c.tagName?.toLowerCase()??"")==="ha-entity-picker"&&u.push(c);for(let m of[c.shadowRoot,c])if(m)for(let y of Array.from(m.children??[]))i(y,u,f+1)}},n=[...this.shadowRoot?.querySelectorAll("ha-form.entity-picker-form")??[]],o=[];for(let c of n)i(c,o);let p=o.length===0||o.some(c=>c.offsetHeight===0);if(e.offsetHeight===0||p){if(this._pickerProbeStrikes+=1,this._pickerProbeStrikes>=2){this._entityPickerFallback=!0;return}this._pickerProbeTimer=setTimeout(()=>this._probeEntityPickers(),700)}else this._pickerProbeStrikes=0}_schedulePreviewRefresh(){this._previewTimer&&clearTimeout(this._previewTimer),this._previewTimer=setTimeout(()=>{this._fetchSchedulePreview()},300)}async _fetchSchedulePreview(){let e=this._open?this._previewScheduleDict():null;if(!e){this._schedulePreview=[],this._schedulePreviewEnded=!1;return}let t=++this._previewSeq;try{let i=await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/schedule/preview",schedule:e,...this._lastPerformed?{last_performed:this._lastPerformed}:{}});if(t!==this._previewSeq)return;this._schedulePreview=i.occurrences||[],this._schedulePreviewEnded=!!i.series_ended}catch{}}_renderSchedulePreview(){if(this._schedulePreview.length===0)return h;let e=this._lang,t=this.scheduleTimeEnabled&&this._scheduleTime?` ${this._scheduleTime}`:"",i=this._schedulePreview.map((o,p)=>{let c=new Date(`${o}T12:00:00`).getDay();return`${Pe(c===0?6:c-1,e,"short")} ${G(o,e)}${p===0?t:""}`}).join(" \xB7 "),n=this._scheduleType==="time_based"&&this._intervalAnchor==="completion"?l`<div class="field-help">${s("schedule_preview_ontime",e)}</div>`:h;return l`
|
||||||
<div class="trigger-live-hint schedule-preview">
|
<div class="trigger-live-hint schedule-preview">
|
||||||
${s("schedule_preview_title",e)}: ${i}${this._schedulePreviewEnded?l` <span class="field-help">${s("schedule_preview_ends",e)}</span>`:h}
|
${s("schedule_preview_title",e)}: ${i}${this._schedulePreviewEnded?l` <span class="field-help">${s("schedule_preview_ends",e)}</span>`:h}
|
||||||
${n}
|
${n}
|
||||||
</div>
|
</div>
|
||||||
`}_buildSchedule(){let e=i=>{let n=parseInt(this._calOffset,10)||0;return n&&(i.offset=Math.max(-15,Math.min(n,15))),i};if(this._scheduleType==="weekdays")return e({kind:"weekdays",weekdays:[...this._weekdays].sort((i,n)=>i-n)});if(this._scheduleType==="nth_weekday")return e({kind:"nth_weekday",nth:parseInt(this._nth,10),weekday:parseInt(this._nthWeekday,10)});let t={kind:"day_of_month",day:this._domLastDay?-1:parseInt(this._domDay,10)||1};return this._domBusiness&&(t.business=!0),e(t)}_recurrenceExtras(){let e={};if(this._seasonMonths.length&&(e.season_months=[...this._seasonMonths].sort((t,i)=>t-i)),this._endsMode==="count"){let t=parseInt(this._endsCount,10);t>=1&&(e.ends={count:t})}else this._endsMode==="until"&&this._endsUntil&&(e.ends={until:this._endsUntil});return e}_toggleSeasonMonth(e){this._seasonMonths=this._seasonMonths.includes(e)?this._seasonMonths.filter(t=>t!==e):[...this._seasonMonths,e]}_renderRecurrenceExtras(){let e=this._lang;if(!(this._scheduleType==="time_based"||mt.includes(this._scheduleType)))return h;let i=Lr(e);return l`
|
`}_buildSchedule(){let e=i=>{let n=parseInt(this._calOffset,10)||0;return n&&(i.offset=Math.max(-15,Math.min(n,15))),i};if(this._scheduleType==="weekdays")return e({kind:"weekdays",weekdays:[...this._weekdays].sort((i,n)=>i-n)});if(this._scheduleType==="nth_weekday")return e({kind:"nth_weekday",nth:parseInt(this._nth,10),weekday:parseInt(this._nthWeekday,10)});let t={kind:"day_of_month",day:this._domLastDay?-1:parseInt(this._domDay,10)||1};return this._domBusiness&&(t.business=!0),e(t)}_recurrenceExtras(){let e={};if(this._seasonMonths.length&&(e.season_months=[...this._seasonMonths].sort((t,i)=>t-i)),this._endsMode==="count"){let t=parseInt(this._endsCount,10);t>=1&&(e.ends={count:t})}else this._endsMode==="until"&&this._endsUntil&&(e.ends={until:this._endsUntil});return e}_toggleSeasonMonth(e){this._seasonMonths=this._seasonMonths.includes(e)?this._seasonMonths.filter(t=>t!==e):[...this._seasonMonths,e]}_renderRecurrenceExtras(){let e=this._lang;if(!(this._scheduleType==="time_based"||mt.includes(this._scheduleType)))return h;let i=qr(e);return l`
|
||||||
<label class="field-label">${s("season_window_label",e)}</label>
|
<label class="field-label">${s("season_window_label",e)}</label>
|
||||||
<div class="field-help">${s("season_window_hint",e)}</div>
|
<div class="field-help">${s("season_window_hint",e)}</div>
|
||||||
<div class="weekday-chips season-chips">
|
<div class="weekday-chips season-chips">
|
||||||
@@ -1751,7 +1712,7 @@ Test pressure`,checklist_help:"One step per line. Max 100 items.",err_too_long:"
|
|||||||
.value=${this._endsUntil}
|
.value=${this._endsUntil}
|
||||||
@input=${n=>this._endsUntil=n.target.value}
|
@input=${n=>this._endsUntil=n.target.value}
|
||||||
></ms-textfield>`:h}
|
></ms-textfield>`:h}
|
||||||
`}_renderCalendarFields(){let e=this._lang,t=Ir(e);if(this._scheduleType==="weekdays")return l`
|
`}_renderCalendarFields(){let e=this._lang,t=Hr(e);if(this._scheduleType==="weekdays")return l`
|
||||||
<label class="field-label">${s("recurrence_on_days",e)}</label>
|
<label class="field-label">${s("recurrence_on_days",e)}</label>
|
||||||
<div class="weekday-chips">
|
<div class="weekday-chips">
|
||||||
${t.map((i,n)=>l`
|
${t.map((i,n)=>l`
|
||||||
@@ -1803,7 +1764,7 @@ Test pressure`,checklist_help:"One step per line. Max 100 items.",err_too_long:"
|
|||||||
max="15"
|
max="15"
|
||||||
.value=${this._calOffset}
|
.value=${this._calOffset}
|
||||||
@input=${t=>this._calOffset=t.target.value}
|
@input=${t=>this._calOffset=t.target.value}
|
||||||
></ms-textfield>`}_renderTriggerLiveHint(){if(this._triggerType==="compound")return h;let e=this._triggerEntityId||this._triggerEntityIds[0];if(!e||!this.hass?.states)return h;let t=this.hass.states[e];if(!t)return h;let i=this._lang,n=t.attributes?.unit_of_measurement,o=typeof n=="string"&&n?` ${n}`:"",p=this._triggerAttribute?t.attributes?.[this._triggerAttribute]:t.state,c=typeof p=="number"?p:parseFloat(String(p)),_=p!=="unknown"&&p!=="unavailable"&&p!=null&&!isNaN(c),f=y=>Number.isInteger(y)?String(y):String(Math.round(y*10)/10),m=[];if(this._triggerType==="threshold"){let y=parseFloat(this._triggerAbove),b=parseFloat(this._triggerBelow);if(isNaN(y)&&isNaN(b))return h;_&&m.push(s("trigger_hint_now",i).replace("{value}",f(c)+o)),isNaN(y)||m.push(s("trigger_hint_above",i).replace("{target}",f(y)+o)),isNaN(b)||m.push(s("trigger_hint_below",i).replace("{target}",f(b)+o))}else if(this._triggerType==="counter"){let y=parseFloat(this._triggerTargetValue);if(isNaN(y))return h;this._triggerDeltaMode?this._taskId?m.push(s("trigger_hint_counter_delta_edit",i).replace("{target}",f(y)+o)):_?m.push(s("trigger_hint_counter_delta",i).replace("{value}",f(c)+o).replace("{due}",f(c+y)+o).replace("{target}",f(y)+o)):m.push(s("trigger_hint_counter_delta_edit",i).replace("{target}",f(y)+o)):(_&&m.push(s("trigger_hint_now",i).replace("{value}",f(c)+o)),m.push(s("trigger_hint_counter_abs",i).replace("{target}",f(y)+o)))}else if(this._triggerType==="runtime"){let y=parseFloat(this._triggerRuntimeHours);if(isNaN(y))return h;m.push(s("trigger_hint_runtime",i).replace("{hours}",f(y))),m.push(s("trigger_hint_state_now",i).replace("{value}",String(t.state)))}else if(this._triggerType==="state_change"){let y=parseInt(this._triggerTargetChanges,10)||1,b=this._triggerToState.trim();m.push((b?s("trigger_hint_state_change_to",i).replace("{state}",b):s("trigger_hint_state_change",i)).replace("{count}",String(y))),m.push(s("trigger_hint_state_now",i).replace("{value}",String(t.state)))}return m.length?l`<div class="trigger-live-hint">${m.join(" ")}</div>`:h}_renderTriggerTypeFields(){let e=this._lang;return this._triggerType==="threshold"?l`
|
></ms-textfield>`}_renderTriggerLiveHint(){if(this._triggerType==="compound")return h;let e=this._triggerEntityId||this._triggerEntityIds[0];if(!e||!this.hass?.states)return h;let t=this.hass.states[e];if(!t)return h;let i=this._lang,n=t.attributes?.unit_of_measurement,o=typeof n=="string"&&n?` ${n}`:"",p=this._triggerAttribute?t.attributes?.[this._triggerAttribute]:t.state,c=typeof p=="number"?p:parseFloat(String(p)),u=p!=="unknown"&&p!=="unavailable"&&p!=null&&!isNaN(c),f=y=>Number.isInteger(y)?String(y):String(Math.round(y*10)/10),m=[];if(this._triggerType==="threshold"){let y=parseFloat(this._triggerAbove),b=parseFloat(this._triggerBelow);if(isNaN(y)&&isNaN(b))return h;u&&m.push(s("trigger_hint_now",i).replace("{value}",f(c)+o)),isNaN(y)||m.push(s("trigger_hint_above",i).replace("{target}",f(y)+o)),isNaN(b)||m.push(s("trigger_hint_below",i).replace("{target}",f(b)+o))}else if(this._triggerType==="counter"){let y=parseFloat(this._triggerTargetValue);if(isNaN(y))return h;this._triggerDeltaMode?this._taskId?m.push(s("trigger_hint_counter_delta_edit",i).replace("{target}",f(y)+o)):u?m.push(s("trigger_hint_counter_delta",i).replace("{value}",f(c)+o).replace("{due}",f(c+y)+o).replace("{target}",f(y)+o)):m.push(s("trigger_hint_counter_delta_edit",i).replace("{target}",f(y)+o)):(u&&m.push(s("trigger_hint_now",i).replace("{value}",f(c)+o)),m.push(s("trigger_hint_counter_abs",i).replace("{target}",f(y)+o)))}else if(this._triggerType==="runtime"){let y=parseFloat(this._triggerRuntimeHours);if(isNaN(y))return h;m.push(s("trigger_hint_runtime",i).replace("{hours}",f(y))),m.push(s("trigger_hint_state_now",i).replace("{value}",String(t.state)))}else if(this._triggerType==="state_change"){let y=parseInt(this._triggerTargetChanges,10)||1,b=this._triggerToState.trim();m.push((b?s("trigger_hint_state_change_to",i).replace("{state}",b):s("trigger_hint_state_change",i)).replace("{count}",String(y))),m.push(s("trigger_hint_state_now",i).replace("{value}",String(t.state)))}return m.length?l`<div class="trigger-live-hint">${m.join(" ")}</div>`:h}_renderTriggerTypeFields(){let e=this._lang;return this._triggerType==="threshold"?l`
|
||||||
<ms-textfield
|
<ms-textfield
|
||||||
label="${s("trigger_above",e)}"
|
label="${s("trigger_above",e)}"
|
||||||
type="number"
|
type="number"
|
||||||
@@ -1881,6 +1842,14 @@ Test pressure`,checklist_help:"One step per line. Max 100 items.",err_too_long:"
|
|||||||
@input=${t=>this._triggerTargetChanges=t.target.value}
|
@input=${t=>this._triggerTargetChanges=t.target.value}
|
||||||
></ms-textfield>
|
></ms-textfield>
|
||||||
<div class="field-help">${s("target_changes_help",e)}</div>
|
<div class="field-help">${s("target_changes_help",e)}</div>
|
||||||
|
<ms-textfield
|
||||||
|
label="${s("for_at_least_minutes",e)}"
|
||||||
|
type="number"
|
||||||
|
min="0"
|
||||||
|
.value=${this._triggerForMinutes}
|
||||||
|
@input=${t=>this._triggerForMinutes=t.target.value}
|
||||||
|
></ms-textfield>
|
||||||
|
<div class="field-help">${s("for_minutes_state_help",e)}</div>
|
||||||
`:this._triggerType==="runtime"?l`
|
`:this._triggerType==="runtime"?l`
|
||||||
<ms-textfield
|
<ms-textfield
|
||||||
label="${s("runtime_hours",e)}"
|
label="${s("runtime_hours",e)}"
|
||||||
@@ -1919,7 +1888,7 @@ Test pressure`,checklist_help:"One step per line. Max 100 items.",err_too_long:"
|
|||||||
.value=${this._type}
|
.value=${this._type}
|
||||||
@change=${i=>this._type=i.target.value}
|
@change=${i=>this._type=i.target.value}
|
||||||
>
|
>
|
||||||
${wr.map(i=>l`<option value=${i} ?selected=${i===this._type}>${s(i,e)}</option>`)}
|
${Tr.map(i=>l`<option value=${i} ?selected=${i===this._type}>${s(i,e)}</option>`)}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
${this._type==="reading"?l`
|
${this._type==="reading"?l`
|
||||||
@@ -1953,7 +1922,7 @@ Test pressure`,checklist_help:"One step per line. Max 100 items.",err_too_long:"
|
|||||||
.value=${this._priority}
|
.value=${this._priority}
|
||||||
@change=${i=>this._priority=i.target.value}
|
@change=${i=>this._priority=i.target.value}
|
||||||
>
|
>
|
||||||
${$r.map(i=>l`<option value=${i} ?selected=${i===this._priority}>${s("priority_"+i,e)}</option>`)}
|
${Cr.map(i=>l`<option value=${i} ?selected=${i===this._priority}>${s("priority_"+i,e)}</option>`)}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
@@ -1972,7 +1941,7 @@ Test pressure`,checklist_help:"One step per line. Max 100 items.",err_too_long:"
|
|||||||
.value=${this._scheduleType}
|
.value=${this._scheduleType}
|
||||||
@change=${i=>this._scheduleType=i.target.value}
|
@change=${i=>this._scheduleType=i.target.value}
|
||||||
>
|
>
|
||||||
${kr.map(i=>l`<option value=${i} ?selected=${i===this._scheduleType}>${s(i,e)}</option>`)}
|
${Ir.map(i=>l`<option value=${i} ?selected=${i===this._scheduleType}>${s(i,e)}</option>`)}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
${this._scheduleType==="time_based"?l`
|
${this._scheduleType==="time_based"?l`
|
||||||
@@ -2043,7 +2012,7 @@ Test pressure`,checklist_help:"One step per line. Max 100 items.",err_too_long:"
|
|||||||
`:h}
|
`:h}
|
||||||
<h3>${s("require_on_completion",e)}</h3>
|
<h3>${s("require_on_completion",e)}</h3>
|
||||||
<div class="required-completion">
|
<div class="required-completion">
|
||||||
${vi.map(i=>l`
|
${bi.map(i=>l`
|
||||||
<label class="req-option">
|
<label class="req-option">
|
||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
@@ -2109,7 +2078,7 @@ Test pressure`,checklist_help:"One step per line. Max 100 items.",err_too_long:"
|
|||||||
<ha-form
|
<ha-form
|
||||||
class="entity-picker-form"
|
class="entity-picker-form"
|
||||||
.hass=${this.hass}
|
.hass=${this.hass}
|
||||||
.schema=${[{name:"environmental_entity",selector:{entity:{domain:gi,device_class:mi}}}]}
|
.schema=${[{name:"environmental_entity",selector:{entity:{domain:fi,device_class:vi}}}]}
|
||||||
.data=${{environmental_entity:this._environmentalEntity}}
|
.data=${{environmental_entity:this._environmentalEntity}}
|
||||||
.computeLabel=${()=>s("environmental_entity_optional",e)}
|
.computeLabel=${()=>s("environmental_entity_optional",e)}
|
||||||
.computeHelper=${()=>s("environmental_entity_helper",e)}
|
.computeHelper=${()=>s("environmental_entity_helper",e)}
|
||||||
@@ -2473,7 +2442,7 @@ Test pressure`,checklist_help:"One step per line. Max 100 items.",err_too_long:"
|
|||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
`,d([x({attribute:!1})],g.prototype,"hass",2),d([x({type:Boolean,attribute:"checklists-enabled"})],g.prototype,"checklistsEnabled",2),d([x({type:Boolean,attribute:"schedule-time-enabled"})],g.prototype,"scheduleTimeEnabled",2),d([x({type:Boolean,attribute:"completion-actions-enabled"})],g.prototype,"completionActionsEnabled",2),d([x({type:Number,attribute:"default-warning-days"})],g.prototype,"defaultWarningDays",2),d([u()],g.prototype,"parts",2),d([u()],g.prototype,"_foreignOwners",2),d([u()],g.prototype,"_open",2),d([u()],g.prototype,"_entityPickerFallback",2),d([u()],g.prototype,"_loading",2),d([u()],g.prototype,"_error",2),d([u()],g.prototype,"_entryId",2),d([u()],g.prototype,"_taskId",2),d([u()],g.prototype,"_objectChoices",2),d([u()],g.prototype,"_name",2),d([u()],g.prototype,"_type",2),d([u()],g.prototype,"_scheduleType",2),d([u()],g.prototype,"_intervalDays",2),d([u()],g.prototype,"_intervalUnit",2),d([u()],g.prototype,"_dueDate",2),d([u()],g.prototype,"_warningDays",2),d([u()],g.prototype,"_earliestCompletionDays",2),d([u()],g.prototype,"_intervalAnchor",2),d([u()],g.prototype,"_weekdays",2),d([u()],g.prototype,"_nth",2),d([u()],g.prototype,"_nthWeekday",2),d([u()],g.prototype,"_domDay",2),d([u()],g.prototype,"_domLastDay",2),d([u()],g.prototype,"_domBusiness",2),d([u()],g.prototype,"_calOffset",2),d([u()],g.prototype,"_seasonMonths",2),d([u()],g.prototype,"_endsMode",2),d([u()],g.prototype,"_endsCount",2),d([u()],g.prototype,"_endsUntil",2),d([u()],g.prototype,"_schedulePreview",2),d([u()],g.prototype,"_schedulePreviewEnded",2),d([u()],g.prototype,"_notes",2),d([u()],g.prototype,"_documentationUrl",2),d([u()],g.prototype,"_customIcon",2),d([u()],g.prototype,"_priority",2),d([u()],g.prototype,"_labels",2),d([u()],g.prototype,"_enabled",2),d([u()],g.prototype,"_triggerEntityId",2),d([u()],g.prototype,"_triggerEntityIds",2),d([u()],g.prototype,"_triggerEntityLogic",2),d([u()],g.prototype,"_triggerAttribute",2),d([u()],g.prototype,"_triggerType",2),d([u()],g.prototype,"_triggerAbove",2),d([u()],g.prototype,"_triggerBelow",2),d([u()],g.prototype,"_triggerEquals",2),d([u()],g.prototype,"_triggerNotEquals",2),d([u()],g.prototype,"_triggerForMinutes",2),d([u()],g.prototype,"_triggerCombinator",2),d([u()],g.prototype,"_triggerTargetValue",2),d([u()],g.prototype,"_triggerDeltaMode",2),d([u()],g.prototype,"_triggerBaselineValue",2),d([u()],g.prototype,"_liveBaselineValue",2),d([u()],g.prototype,"_autoCompleteOnRecovery",2),d([u()],g.prototype,"_triggerFromState",2),d([u()],g.prototype,"_triggerToState",2),d([u()],g.prototype,"_triggerTargetChanges",2),d([u()],g.prototype,"_triggerRuntimeHours",2),d([u()],g.prototype,"_triggerOnStates",2),d([u()],g.prototype,"_compoundLogic",2),d([u()],g.prototype,"_compoundConditions",2),d([u()],g.prototype,"_suggestedAttributes",2),d([u()],g.prototype,"_availableAttributes",2),d([u()],g.prototype,"_entityDomain",2),d([u()],g.prototype,"_lastPerformed",2),d([u()],g.prototype,"_nfcTagId",2),d([u()],g.prototype,"_readingUnit",2),d([u()],g.prototype,"_consumesParts",2),d([u()],g.prototype,"_partsLoadFailed",2),d([u()],g.prototype,"_availableTags",2),d([u()],g.prototype,"_responsibleUserId",2),d([u()],g.prototype,"_assigneePool",2),d([u()],g.prototype,"_rotationStrategy",2),d([u()],g.prototype,"_availableUsers",2),d([u()],g.prototype,"_checklistText",2),d([u()],g.prototype,"_requiredCompletion",2),d([u()],g.prototype,"_scheduleTime",2),d([u()],g.prototype,"_actionService",2),d([u()],g.prototype,"_actionTargetEntity",2),d([u()],g.prototype,"_actionData",2),d([u()],g.prototype,"_actionDataJsonFallback",2),d([u()],g.prototype,"_actionTesting",2),d([u()],g.prototype,"_actionTestResult",2),d([u()],g.prototype,"_actionTestError",2),d([u()],g.prototype,"_qcNotes",2),d([u()],g.prototype,"_qcCost",2),d([u()],g.prototype,"_qcDuration",2),d([u()],g.prototype,"_qcFeedback",2),d([u()],g.prototype,"_environmentalEntity",2),d([u()],g.prototype,"_environmentalAttribute",2),d([u()],g.prototype,"_adaptiveEnabled",2),d([u()],g.prototype,"_adaptiveAlpha",2),d([u()],g.prototype,"_adaptiveMin",2),d([u()],g.prototype,"_adaptiveMax",2),d([u()],g.prototype,"_adaptiveSeasonal",2),d([u()],g.prototype,"_adaptivePrediction",2),d([u()],g.prototype,"_conditionAttrOptions",2);ft=g;customElements.get("maintenance-task-dialog")||customElements.define("maintenance-task-dialog",ft)});var $,xi=w(()=>{"use strict";P();U();R();oe();_t();gt();$=class extends A{constructor(){super(...arguments);this.entryId="";this.taskId="";this.taskName="";this.lang="en";this.checklist=[];this.adaptiveEnabled=!1;this.taskType="";this.readingUnit="";this.restockDefault=null;this.restockUnitCost=null;this.currencySymbol="";this.parts=[];this.consumesParts=[];this.consumesInfo=[];this.requiredFields=[];this._open=!1;this._notes="";this._cost="";this._duration="";this._loading=!1;this._error="";this._checklistState={};this._feedback="needed";this._photoDocId="";this._photoPreview="";this._photoUploading=!1;this._readingValue="";this._
Line truncated
|
`,d([x({attribute:!1})],g.prototype,"hass",2),d([x({type:Boolean,attribute:"checklists-enabled"})],g.prototype,"checklistsEnabled",2),d([x({type:Boolean,attribute:"schedule-time-enabled"})],g.prototype,"scheduleTimeEnabled",2),d([x({type:Boolean,attribute:"completion-actions-enabled"})],g.prototype,"completionActionsEnabled",2),d([x({type:Number,attribute:"default-warning-days"})],g.prototype,"defaultWarningDays",2),d([_()],g.prototype,"parts",2),d([_()],g.prototype,"_foreignOwners",2),d([_()],g.prototype,"_open",2),d([_()],g.prototype,"_entityPickerFallback",2),d([_()],g.prototype,"_loading",2),d([_()],g.prototype,"_error",2),d([_()],g.prototype,"_entryId",2),d([_()],g.prototype,"_taskId",2),d([_()],g.prototype,"_objectChoices",2),d([_()],g.prototype,"_name",2),d([_()],g.prototype,"_type",2),d([_()],g.prototype,"_scheduleType",2),d([_()],g.prototype,"_intervalDays",2),d([_()],g.prototype,"_intervalUnit",2),d([_()],g.prototype,"_dueDate",2),d([_()],g.prototype,"_warningDays",2),d([_()],g.prototype,"_earliestCompletionDays",2),d([_()],g.prototype,"_intervalAnchor",2),d([_()],g.prototype,"_weekdays",2),d([_()],g.prototype,"_nth",2),d([_()],g.prototype,"_nthWeekday",2),d([_()],g.prototype,"_domDay",2),d([_()],g.prototype,"_domLastDay",2),d([_()],g.prototype,"_domBusiness",2),d([_()],g.prototype,"_calOffset",2),d([_()],g.prototype,"_seasonMonths",2),d([_()],g.prototype,"_endsMode",2),d([_()],g.prototype,"_endsCount",2),d([_()],g.prototype,"_endsUntil",2),d([_()],g.prototype,"_schedulePreview",2),d([_()],g.prototype,"_schedulePreviewEnded",2),d([_()],g.prototype,"_notes",2),d([_()],g.prototype,"_documentationUrl",2),d([_()],g.prototype,"_customIcon",2),d([_()],g.prototype,"_priority",2),d([_()],g.prototype,"_labels",2),d([_()],g.prototype,"_enabled",2),d([_()],g.prototype,"_triggerEntityId",2),d([_()],g.prototype,"_triggerEntityIds",2),d([_()],g.prototype,"_triggerEntityLogic",2),d([_()],g.prototype,"_triggerAttribute",2),d([_()],g.prototype,"_triggerType",2),d([_()],g.prototype,"_triggerAbove",2),d([_()],g.prototype,"_triggerBelow",2),d([_()],g.prototype,"_triggerEquals",2),d([_()],g.prototype,"_triggerNotEquals",2),d([_()],g.prototype,"_triggerForMinutes",2),d([_()],g.prototype,"_triggerCombinator",2),d([_()],g.prototype,"_triggerTargetValue",2),d([_()],g.prototype,"_triggerDeltaMode",2),d([_()],g.prototype,"_triggerBaselineValue",2),d([_()],g.prototype,"_liveBaselineValue",2),d([_()],g.prototype,"_autoCompleteOnRecovery",2),d([_()],g.prototype,"_triggerFromState",2),d([_()],g.prototype,"_triggerToState",2),d([_()],g.prototype,"_triggerTargetChanges",2),d([_()],g.prototype,"_triggerRuntimeHours",2),d([_()],g.prototype,"_triggerOnStates",2),d([_()],g.prototype,"_compoundLogic",2),d([_()],g.prototype,"_compoundConditions",2),d([_()],g.prototype,"_suggestedAttributes",2),d([_()],g.prototype,"_availableAttributes",2),d([_()],g.prototype,"_entityDomain",2),d([_()],g.prototype,"_lastPerformed",2),d([_()],g.prototype,"_nfcTagId",2),d([_()],g.prototype,"_readingUnit",2),d([_()],g.prototype,"_consumesParts",2),d([_()],g.prototype,"_partsLoadFailed",2),d([_()],g.prototype,"_availableTags",2),d([_()],g.prototype,"_responsibleUserId",2),d([_()],g.prototype,"_assigneePool",2),d([_()],g.prototype,"_rotationStrategy",2),d([_()],g.prototype,"_availableUsers",2),d([_()],g.prototype,"_checklistText",2),d([_()],g.prototype,"_requiredCompletion",2),d([_()],g.prototype,"_scheduleTime",2),d([_()],g.prototype,"_actionService",2),d([_()],g.prototype,"_actionTargetEntity",2),d([_()],g.prototype,"_actionData",2),d([_()],g.prototype,"_actionDataJsonFallback",2),d([_()],g.prototype,"_actionTesting",2),d([_()],g.prototype,"_actionTestResult",2),d([_()],g.prototype,"_actionTestError",2),d([_()],g.prototype,"_qcNotes",2),d([_()],g.prototype,"_qcCost",2),d([_()],g.prototype,"_qcDuration",2),d([_()],g.prototype,"_qcFeedback",2),d([_()],g.prototype,"_environmentalEntity",2),d([_()],g.prototype,"_environmentalAttribute",2),d([_()],g.prototype,"_adaptiveEnabled",2),d([_()],g.prototype,"_adaptiveAlpha",2),d([_()],g.prototype,"_adaptiveMin",2),d([_()],g.prototype,"_adaptiveMax",2),d([_()],g.prototype,"_adaptiveSeasonal",2),d([_()],g.prototype,"_adaptivePrediction",2),d([_()],g.prototype,"_conditionAttrOptions",2);ft=g;customElements.get("maintenance-task-dialog")||customElements.define("maintenance-task-dialog",ft)});var $,$i=w(()=>{"use strict";P();U();R();oe();_t();gt();$=class extends A{constructor(){super(...arguments);this.entryId="";this.taskId="";this.taskName="";this.lang="en";this.checklist=[];this.adaptiveEnabled=!1;this.taskType="";this.readingUnit="";this.restockDefault=null;this.restockUnitCost=null;this.currencySymbol="";this.parts=[];this.consumesParts=[];this.consumesInfo=[];this.requiredFields=[];this._open=!1;this._notes="";this._cost="";this._duration="";this._loading=!1;this._error="";this._checklistState={};this._feedback="needed";this._photoDocId="";this._photoPreview="";this._photoUploading=!1;this._readingValue="";this._
Line truncated
|
||||||
type="button"
|
type="button"
|
||||||
class="cost-suggestion"
|
class="cost-suggestion"
|
||||||
@click=${()=>this._cost=t.toFixed(2)}
|
@click=${()=>this._cost=t.toFixed(2)}
|
||||||
@@ -2505,14 +2474,14 @@ Test pressure`,checklist_help:"One step per line. Max 100 items.",err_too_long:"
|
|||||||
${this.parts.map(t=>{let i=ee({part_id:t.id,entry_id:t.entry_id}),n=this._usedParts[i],o=n!==void 0,p=t.entry_id?{part_id:t.id,quantity:1,entry_id:t.entry_id}:{part_id:t.id,quantity:1};return l`<div class="used-part-row">
|
${this.parts.map(t=>{let i=ee({part_id:t.id,entry_id:t.entry_id}),n=this._usedParts[i],o=n!==void 0,p=t.entry_id?{part_id:t.id,quantity:1,entry_id:t.entry_id}:{part_id:t.id,quantity:1};return l`<div class="used-part-row">
|
||||||
<label class="used-part-check">
|
<label class="used-part-check">
|
||||||
<input type="checkbox" .checked=${o}
|
<input type="checkbox" .checked=${o}
|
||||||
@change=${c=>{let _={...this._usedParts};c.target.checked?_[i]=_[i]||p:delete _[i],this._usedParts=_}} />
|
@change=${c=>{let u={...this._usedParts};c.target.checked?u[i]=u[i]||p:delete u[i],this._usedParts=u}} />
|
||||||
<span
|
<span
|
||||||
>${t.name}${t.owner_name?l`<span class="used-part-owner"> (${t.owner_name})</span>`:h}${t.stock!==null&&t.stock!==void 0?` (${t.stock}${t.unit?" "+t.unit:""})`:""}</span
|
>${t.name}${t.owner_name?l`<span class="used-part-owner"> (${t.owner_name})</span>`:h}${t.stock!==null&&t.stock!==void 0?` (${t.stock}${t.unit?" "+t.unit:""})`:""}</span
|
||||||
>
|
>
|
||||||
</label>
|
</label>
|
||||||
${o?l`<input class="used-part-qty" type="number" min="0.01" max="999" step="0.01"
|
${o?l`<input class="used-part-qty" type="number" min="0.01" max="999" step="0.01"
|
||||||
.value=${String(n.quantity)}
|
.value=${String(n.quantity)}
|
||||||
@input=${c=>{let _=parseFloat(c.target.value);this._usedParts={...this._usedParts,[i]:{...p,quantity:Number.isFinite(_)&&_>=.01?_:1}}}} />`:h}
|
@input=${c=>{let u=parseFloat(c.target.value);this._usedParts={...this._usedParts,[i]:{...p,quantity:Number.isFinite(u)&&u>=.01?u:1}}}} />`:h}
|
||||||
</div>`})}
|
</div>`})}
|
||||||
</div>`:this.consumesInfo.length?l`<div class="consumes-hint">
|
</div>`:this.consumesInfo.length?l`<div class="consumes-hint">
|
||||||
${this.consumesInfo.map(t=>l`<div>${t}</div>`)}
|
${this.consumesInfo.map(t=>l`<div>${t}</div>`)}
|
||||||
@@ -2605,7 +2574,7 @@ Test pressure`,checklist_help:"One step per line. Max 100 items.",err_too_long:"
|
|||||||
</ha-button>
|
</ha-button>
|
||||||
</div>
|
</div>
|
||||||
</ha-dialog>
|
</ha-dialog>
|
||||||
`}};$.styles=[pi,S`
|
`}};$.styles=[_i,S`
|
||||||
.req-mark {
|
.req-mark {
|
||||||
color: var(--error-color, #f44336);
|
color: var(--error-color, #f44336);
|
||||||
margin-left: 2px;
|
margin-left: 2px;
|
||||||
@@ -2770,7 +2739,7 @@ Test pressure`,checklist_help:"One step per line. Max 100 items.",err_too_long:"
|
|||||||
color: var(--text-primary-color, #fff);
|
color: var(--text-primary-color, #fff);
|
||||||
border-color: var(--primary-color);
|
border-color: var(--primary-color);
|
||||||
}
|
}
|
||||||
`],d([x({attribute:!1})],$.prototype,"hass",2),d([x()],$.prototype,"entryId",2),d([x()],$.prototype,"taskId",2),d([x()],$.prototype,"taskName",2),d([x()],$.prototype,"lang",2),d([x({type:Array})],$.prototype,"checklist",2),d([x({type:Boolean})],$.prototype,"adaptiveEnabled",2),d([x()],$.prototype,"taskType",2),d([x()],$.prototype,"readingUnit",2),d([x({attribute:!1})],$.prototype,"restockDefault",2),d([x({attribute:!1})],$.prototype,"restockUnitCost",2),d([x()],$.prototype,"currencySymbol",2),d([x({attribute:!1})],$.prototype,"parts",2),d([x({attribute:!1})],$.prototype,"consumesParts",2),d([x({type:Array})],$.prototype,"consumesInfo",2),d([x({type:Array})],$.prototype,"requiredFields",2),d([u()],$.prototype,"_open",2),d([u()],$.prototype,"_notes",2),d([u()],$.prototype,"_cost",2),d([u()],$.prototype,"_duration",2),d([u()],$.prototype,"_loading",2),d([u()],$.prototype,"_error",2),d([u()],$.prototype,"_checklistState",2),d([u()],$.prototype,"_feedback",2),d([u()],$.prototype,"_photoDocId",2),d([u()],$.prototype,"_photoPreview",2),d([u()],$.prototype,"_photoUploading",2),d([u()],$.prototype,"_readingValue",2),d([u()],$.prototype,"_restockQty",2),d([u()],$.prototype,"_completedAt",2),d([u()],$.prototype,"_usedParts",2),d([x({attribute:!1})],$.prototype,"checklistPrefill",2);customElements.get("maintenance-complete-dialog")||customElements.define("maintenance-complete-dialog",$)});var z,wi=w(()=>{"use strict";P();U();R();oe();z=class extends A{constructor(){super(...arguments);this._open=!1;this._saving=!1;this._error="";this._draft=null;this._originalSnapshot=null;this._partOptions=null;this._partQty={};this._partQtyOriginal=""}get _lang(){return H(this.hass)}openEdit(e){this._draft={...e},this._originalSnapshot={...e},this._error="",this._open=!0,this._partOptions=null,this._partQty={},this._partQtyOriginal="",this._loadPartOptions()}async _loadPartOptions(){let e=this._draft;if(e)try{let t=await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/parts/overview"}),i=[];for(let o of t.parts||[]){let p=o.entry_id===e.entry_id,c=o.consumers.some(_=>_.entry_id===e.entry_id&&_.task_id===e.task_id);!p&&!c||i.push({part_id:o.part_id,name:o.name,entry_id:o.entry_id,foreign:!p,object_name:o.object_name})}for(let o of e.used_parts||[]){let p=o.entry_id||e.entry_id;i.some(c=>c.part_id===o.part_id&&c.entry_id===p)||i.push({part_id:o.part_id,name:o.name||o.part_id,entry_id:p,foreign:p!==e.entry_id,object_name:null})}let n={};for(let o of e.used_parts||[])n[`${o.entry_id||e.entry_id}:${o.part_id}`]=o.quantity??1;this._partOptions=i,this._partQty=n,this._partQtyOriginal=this._partSelectionKey()}catch{this._partOptions=[]}}_partSelectionKey(){return JSON.stringify(Object.entries(this._partQty).filter(([,e])=>e>0).sort(([e],[t])=>e.localeCompare(t)))}close(){this._open=!1,this._error="",this._draft=null,this._originalSnapshot=null}_set(e,t){this._draft&&(this._draft={...this._draft,[e]:t})}async _save(){if(!(!this._draft||!this._originalSnapshot)){this._saving=!0,this._error="";try{let e={type:"maintenance_supporter/task/history/update",entry_id:this._draft.entry_id,task_id:this._draft.task_id,original_timestamp:this._originalSnapshot.original_timestamp};if(this._draft.timestamp!==this._originalSnapshot.timestamp&&(e.timestamp=this._draft.timestamp),this._draft.notes!==this._originalSnapshot.notes&&(e.notes=this._draft.notes),this._draft.cost!==this._originalSnapshot.cost&&(e.cost=this._draft.cost),this._draft.duration!==this._originalSnapshot.duration&&(e.duration=this._draft.duration),this._draft.completed_by!==this._originalSnapshot.completed_by&&(e.completed_by=this._draft.completed_by),this._partOptions!==null&&this._partSelectionKey()!==this._partQtyOriginal&&(e.used_parts=(this._partOptions||[]).filter(i=>(this._partQty[`${i.entry_id}:${i.part_id}`]||0)>0).map(i=>({part_id:i.part_id,quantity:this._partQty[`${i.entry_id}:${i.part_id}`],...i.foreign?{entry_id:i.entry_id}:{}}))),Object.keys(e).filter(i=>!["type","entry_id","task_id","original_timestamp"].includes(i)).length===0){this.close();return}await this.hass.connection.sendMessagePromise(e),this.dispatchEvent(new CustomEvent("history-entry-saved",{detail:{entry_id:this._draft.entry_id,task_id:this._draft.task_id,new_timestamp:this._draft.timestamp},bubbles:!0,composed:!0})),this.close()}catch(e){this._error=j(e,this._lang)}finally{this._saving=!1}}}render(){if(!this._open||!this._draft)return h;let e=this._lang,t=this._draft;return l`
|
`],d([x({attribute:!1})],$.prototype,"hass",2),d([x()],$.prototype,"entryId",2),d([x()],$.prototype,"taskId",2),d([x()],$.prototype,"taskName",2),d([x()],$.prototype,"lang",2),d([x({type:Array})],$.prototype,"checklist",2),d([x({type:Boolean})],$.prototype,"adaptiveEnabled",2),d([x()],$.prototype,"taskType",2),d([x()],$.prototype,"readingUnit",2),d([x({attribute:!1})],$.prototype,"restockDefault",2),d([x({attribute:!1})],$.prototype,"restockUnitCost",2),d([x()],$.prototype,"currencySymbol",2),d([x({attribute:!1})],$.prototype,"parts",2),d([x({attribute:!1})],$.prototype,"consumesParts",2),d([x({type:Array})],$.prototype,"consumesInfo",2),d([x({type:Array})],$.prototype,"requiredFields",2),d([_()],$.prototype,"_open",2),d([_()],$.prototype,"_notes",2),d([_()],$.prototype,"_cost",2),d([_()],$.prototype,"_duration",2),d([_()],$.prototype,"_loading",2),d([_()],$.prototype,"_error",2),d([_()],$.prototype,"_checklistState",2),d([_()],$.prototype,"_feedback",2),d([_()],$.prototype,"_photoDocId",2),d([_()],$.prototype,"_photoPreview",2),d([_()],$.prototype,"_photoUploading",2),d([_()],$.prototype,"_readingValue",2),d([_()],$.prototype,"_restockQty",2),d([_()],$.prototype,"_completedAt",2),d([_()],$.prototype,"_usedParts",2),d([x({attribute:!1})],$.prototype,"checklistPrefill",2);customElements.get("maintenance-complete-dialog")||customElements.define("maintenance-complete-dialog",$)});var z,ki=w(()=>{"use strict";P();U();R();oe();z=class extends A{constructor(){super(...arguments);this._open=!1;this._saving=!1;this._error="";this._draft=null;this._originalSnapshot=null;this._partOptions=null;this._partQty={};this._partQtyOriginal=""}get _lang(){return j(this.hass)}openEdit(e){this._draft={...e},this._originalSnapshot={...e},this._error="",this._open=!0,this._partOptions=null,this._partQty={},this._partQtyOriginal="",this._loadPartOptions()}async _loadPartOptions(){let e=this._draft;if(e)try{let t=await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/parts/overview"}),i=[];for(let o of t.parts||[]){let p=o.entry_id===e.entry_id,c=o.consumers.some(u=>u.entry_id===e.entry_id&&u.task_id===e.task_id);!p&&!c||i.push({part_id:o.part_id,name:o.name,entry_id:o.entry_id,foreign:!p,object_name:o.object_name})}for(let o of e.used_parts||[]){let p=o.entry_id||e.entry_id;i.some(c=>c.part_id===o.part_id&&c.entry_id===p)||i.push({part_id:o.part_id,name:o.name||o.part_id,entry_id:p,foreign:p!==e.entry_id,object_name:null})}let n={};for(let o of e.used_parts||[])n[`${o.entry_id||e.entry_id}:${o.part_id}`]=o.quantity??1;this._partOptions=i,this._partQty=n,this._partQtyOriginal=this._partSelectionKey()}catch{this._partOptions=[]}}_partSelectionKey(){return JSON.stringify(Object.entries(this._partQty).filter(([,e])=>e>0).sort(([e],[t])=>e.localeCompare(t)))}close(){this._open=!1,this._error="",this._draft=null,this._originalSnapshot=null}_set(e,t){this._draft&&(this._draft={...this._draft,[e]:t})}async _save(){if(!(!this._draft||!this._originalSnapshot)){this._saving=!0,this._error="";try{let e={type:"maintenance_supporter/task/history/update",entry_id:this._draft.entry_id,task_id:this._draft.task_id,original_timestamp:this._originalSnapshot.original_timestamp};if(this._draft.timestamp!==this._originalSnapshot.timestamp&&(e.timestamp=this._draft.timestamp),this._draft.notes!==this._originalSnapshot.notes&&(e.notes=this._draft.notes),this._draft.cost!==this._originalSnapshot.cost&&(e.cost=this._draft.cost),this._draft.duration!==this._originalSnapshot.duration&&(e.duration=this._draft.duration),this._draft.completed_by!==this._originalSnapshot.completed_by&&(e.completed_by=this._draft.completed_by),this._partOptions!==null&&this._partSelectionKey()!==this._partQtyOriginal&&(e.used_parts=(this._partOptions||[]).filter(i=>(this._partQty[`${i.entry_id}:${i.part_id}`]||0)>0).map(i=>({part_id:i.part_id,quantity:this._partQty[`${i.entry_id}:${i.part_id}`],...i.foreign?{entry_id:i.entry_id}:{}}))),Object.keys(e).filter(i=>!["type","entry_id","task_id","original_timestamp"].includes(i)).length===0){this.close();return}await this.hass.connection.sendMessagePromise(e),this.dispatchEvent(new CustomEvent("history-entry-saved",{detail:{entry_id:this._draft.entry_id,task_id:this._draft.task_id,new_timestamp:this._draft.timestamp},bubbles:!0,composed:!0})),this.close()}catch(e){this._error=N(e,this._lang)}finally{this._saving=!1}}}render(){if(!this._open||!this._draft)return h;let e=this._lang,t=this._draft;return l`
|
||||||
<div class="backdrop" @click=${this.close}></div>
|
<div class="backdrop" @click=${this.close}></div>
|
||||||
<div class="dialog" role="dialog" aria-modal="true">
|
<div class="dialog" role="dialog" aria-modal="true">
|
||||||
<h2>${s("history_edit_title",e)||"Edit history entry"}</h2>
|
<h2>${s("history_edit_title",e)||"Edit history entry"}</h2>
|
||||||
@@ -2908,7 +2877,7 @@ Test pressure`,checklist_help:"One step per line. Max 100 items.",err_too_long:"
|
|||||||
.part-row-edit input[type="checkbox"] { width: auto; }
|
.part-row-edit input[type="checkbox"] { width: auto; }
|
||||||
.part-label { flex: 1; color: var(--primary-text-color); }
|
.part-label { flex: 1; color: var(--primary-text-color); }
|
||||||
.part-qty { width: 76px; }
|
.part-qty { width: 76px; }
|
||||||
`,d([x({attribute:!1})],z.prototype,"hass",2),d([u()],z.prototype,"_open",2),d([u()],z.prototype,"_saving",2),d([u()],z.prototype,"_error",2),d([u()],z.prototype,"_draft",2),d([u()],z.prototype,"_partOptions",2),d([u()],z.prototype,"_partQty",2);customElements.get("maintenance-history-edit-dialog")||customElements.define("maintenance-history-edit-dialog",z)});function ge(a){return a.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function $i(a){return!a.startsWith("data:image/svg+xml,")&&!a.startsWith("data:image/png;base64,")?"":ge(a)}function Pr(a){return a.replace(/[/\\:*?"<>|#%]+/g,"").replace(/\s+/g,"-").toLowerCase().substring(0,100)}var O,ki=w(()=>{"use strict";P();U();R();O=class extends A{constructor(){super(...arguments);this.lang="en";this._open=!1;this._loading=!1;this._error="";this._viewResult=null;this._completeResult=null;this._urlMode="companion";this._entryId="";this._taskId=null;this._objectName="";this._taskName="";this._generateSeq=0}openForObject(e,t){this._entryId=e,this._taskId=null,this._objectName=t,this._taskName="",this._urlMode="companion",this._error="",this._viewResult=null,this._completeResult=null,this._open=!0,this._generate()}openForTask(e,t,i,n){this._entryId=e,this._taskId=t,this._objectName=i,this._taskName=n,this._urlMode="companion",this._error="",this._viewResult=null,this._completeResult=null,this._open=!0,this._generate()}async _generate(){let e=++this._generateSeq;this._loading=!0,this._error="",this._viewResult=null,this._completeResult=null;try{let t={type:"maintenance_supporter/qr/generate",entry_id:this._entryId,url_mode:this._urlMode};this._taskId&&(t.task_id=this._taskId);let i=[this.hass.connection.sendMessagePromise({...t,action:"view"})];this._taskId&&i.push(this.hass.connection.sendMessagePromise({...t,action:"complete"}));let n=await Promise.all(i);if(e!==this._generateSeq)return;this._viewResult=n[0],n.length>1&&(this._completeResult=n[1])}catch(t){if(e!==this._generateSeq)return;let i=t?.code,n=t?.message;this._error=i==="no_url"||typeof n=="string"&&n.includes("No Home Assistant URL")?s("qr_error_no_url",this.lang):s("qr_error",this.lang)}finally{e===this._generateSeq&&(this._loading=!1)}}_setUrlMode(e){this._urlMode!==e&&(this._urlMode=e,this._generate())}_print(){if(!this._viewResult)return;let e=this._viewResult,t=e.label.task_name?`${e.label.object_name} \u2014 ${e.label.task_name}`:e.label.object_name,i=[e.label.manufacturer,e.label.model].filter(Boolean).join(" "),n=window.open("","_blank","width=600,height=500");if(!n)return;let o=this.lang||"en",p=ge(t),c=ge(i),_=!!this._completeResult,f=ge(s("qr_action_view",o)),m=ge(s("qr_action_complete",o));n.document.write(`<!DOCTYPE html><html><head><meta charset="utf-8">
|
`,d([x({attribute:!1})],z.prototype,"hass",2),d([_()],z.prototype,"_open",2),d([_()],z.prototype,"_saving",2),d([_()],z.prototype,"_error",2),d([_()],z.prototype,"_draft",2),d([_()],z.prototype,"_partOptions",2),d([_()],z.prototype,"_partQty",2);customElements.get("maintenance-history-edit-dialog")||customElements.define("maintenance-history-edit-dialog",z)});function Ei(a,r,e){let t=new Blob([a],{type:e}),i=URL.createObjectURL(t),n=document.createElement("a");n.href=i,n.download=r,n.target="_blank",n.rel="noopener",n.style.display="none",document.body.appendChild(n),n.dispatchEvent(new MouseEvent("click")),document.body.removeChild(n),setTimeout(()=>URL.revokeObjectURL(i),6e4)}var Si=w(()=>{"use strict"});function ge(a){return a.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function Ai(a){return!a.startsWith("data:image/svg+xml,")&&!a.startsWith("data:image/png;base64,")?"":ge(a)}function Mr(a){return a.replace(/[/\\:*?"<>|#%]+/g,"").replace(/\s+/g,"-").toLowerCase().substring(0,100)}var O,Ti=w(()=>{"use strict";P();U();R();Si();O=class extends A{constructor(){super(...arguments);this.lang="en";this._open=!1;this._loading=!1;this._error="";this._viewResult=null;this._completeResult=null;this._urlMode="companion";this._entryId="";this._taskId=null;this._objectName="";this._taskName="";this._generateSeq=0}openForObject(e,t){this._entryId=e,this._taskId=null,this._objectName=t,this._taskName="",this._urlMode="companion",this._error="",this._viewResult=null,this._completeResult=null,this._open=!0,this._generate()}openForTask(e,t,i,n){this._entryId=e,this._taskId=t,this._objectName=i,this._taskName=n,this._urlMode="companion",this._error="",this._viewResult=null,this._completeResult=null,this._open=!0,this._generate()}async _generate(){let e=++this._generateSeq;this._loading=!0,this._error="",this._viewResult=null,this._completeResult=null;try{let t={type:"maintenance_supporter/qr/generate",entry_id:this._entryId,url_mode:this._urlMode};this._taskId&&(t.task_id=this._taskId);let i=[this.hass.connection.sendMessagePromise({...t,action:"view"})];this._taskId&&i.push(this.hass.connection.sendMessagePromise({...t,action:"complete"}));let n=await Promise.all(i);if(e!==this._generateSeq)return;this._viewResult=n[0],n.length>1&&(this._completeResult=n[1])}catch(t){if(e!==this._generateSeq)return;let i=t?.code,n=t?.message;this._error=i==="no_url"||typeof n=="string"&&n.includes("No Home Assistant URL")?s("qr_error_no_url",this.lang):s("qr_error",this.lang)}finally{e===this._generateSeq&&(this._loading=!1)}}_setUrlMode(e){this._urlMode!==e&&(this._urlMode=e,this._generate())}_print(){if(!this._viewResult)return;let e=this._viewResult,t=e.label.task_name?`${e.label.object_name} \u2014 ${e.label.task_name}`:e.label.object_name,i=[e.label.manufacturer,e.label.model].filter(Boolean).join(" "),n=window.open("","_blank","width=600,height=500");if(!n)return;let o=this.lang||"en",p=ge(t),c=ge(i),u=!!this._completeResult,f=ge(s("qr_action_view",o)),m=ge(s("qr_action_complete",o));n.document.write(`<!DOCTYPE html><html><head><meta charset="utf-8">
|
||||||
<meta name="color-scheme" content="light">
|
<meta name="color-scheme" content="light">
|
||||||
<title>${p}</title>
|
<title>${p}</title>
|
||||||
<style>
|
<style>
|
||||||
@@ -2922,7 +2891,7 @@ Test pressure`,checklist_help:"One step per line. Max 100 items.",err_too_long:"
|
|||||||
.sub{color:#666;font-size:14px;margin-bottom:16px}
|
.sub{color:#666;font-size:14px;margin-bottom:16px}
|
||||||
.qr-row{display:flex;justify-content:center;gap:24px;margin:12px 0}
|
.qr-row{display:flex;justify-content:center;gap:24px;margin:12px 0}
|
||||||
.qr-col{display:flex;flex-direction:column;align-items:center;gap:6px}
|
.qr-col{display:flex;flex-direction:column;align-items:center;gap:6px}
|
||||||
.qr-col img{width:${_?"200px":"280px"}}
|
.qr-col img{width:${u?"200px":"280px"}}
|
||||||
.qr-label{font-size:13px;font-weight:500;color:#333}
|
.qr-label{font-size:13px;font-weight:500;color:#333}
|
||||||
.url{font-size:10px;color:#999;word-break:break-all;margin-top:8px;max-width:480px}
|
.url{font-size:10px;color:#999;word-break:break-all;margin-top:8px;max-width:480px}
|
||||||
</style></head><body>
|
</style></head><body>
|
||||||
@@ -2930,17 +2899,17 @@ Test pressure`,checklist_help:"One step per line. Max 100 items.",err_too_long:"
|
|||||||
${c?`<div class="sub">${c}</div>`:""}
|
${c?`<div class="sub">${c}</div>`:""}
|
||||||
<div class="qr-row">
|
<div class="qr-row">
|
||||||
<div class="qr-col">
|
<div class="qr-col">
|
||||||
<img src="${$i(this._viewResult.svg_data_uri)}" alt="QR Info" />
|
<img src="${Ai(this._viewResult.svg_data_uri)}" alt="QR Info" />
|
||||||
<div class="qr-label">${f}</div>
|
<div class="qr-label">${f}</div>
|
||||||
</div>
|
</div>
|
||||||
${_?`<div class="qr-col">
|
${u?`<div class="qr-col">
|
||||||
<img src="${$i(this._completeResult.svg_data_uri)}" alt="QR Complete" />
|
<img src="${Ai(this._completeResult.svg_data_uri)}" alt="QR Complete" />
|
||||||
<div class="qr-label">${m}</div>
|
<div class="qr-label">${m}</div>
|
||||||
</div>`:""}
|
</div>`:""}
|
||||||
</div>
|
</div>
|
||||||
<div class="url">${ge(this._viewResult.url)}</div>
|
<div class="url">${ge(this._viewResult.url)}</div>
|
||||||
<script>setTimeout(()=>window.print(),300)<\/script>
|
<script>setTimeout(()=>window.print(),300)<\/script>
|
||||||
</body></html>`),n.document.close()}_downloadSvg(e,t){let i=decodeURIComponent(e.svg_data_uri.replace("data:image/svg+xml,","")),n=new Blob([i],{type:"image/svg+xml"}),o=URL.createObjectURL(n),p=document.createElement("a");p.href=o;let c=this._taskName?`${this._objectName}-${this._taskName}`:this._objectName;p.download=`qr-${Pr(c)}-${t}.svg`,p.click(),URL.revokeObjectURL(o)}_close(){this._open=!1,this._viewResult=null,this._completeResult=null,this._error="",this._loading=!1}render(){if(!this._open)return l``;let e=this.lang||this.hass?.language||"en",t=this._taskName?`${s("qr_code",e)}: ${this._objectName} \u2014 ${this._taskName}`:`${s("qr_code",e)}: ${this._objectName}`,i=!!this._viewResult;return l`
|
</body></html>`),n.document.close()}_downloadSvg(e,t){let i=decodeURIComponent(e.svg_data_uri.replace("data:image/svg+xml,","")),n=this._taskName?`${this._objectName}-${this._taskName}`:this._objectName;Ei(i,`qr-${Mr(n)}-${t}.svg`,"image/svg+xml")}_close(){this._open=!1,this._viewResult=null,this._completeResult=null,this._error="",this._loading=!1}render(){if(!this._open)return l``;let e=this.lang||this.hass?.language||"en",t=this._taskName?`${s("qr_code",e)}: ${this._objectName} \u2014 ${this._taskName}`:`${s("qr_code",e)}: ${this._objectName}`,i=!!this._viewResult;return l`
|
||||||
<ha-dialog open @closed=${this._close}>
|
<ha-dialog open @closed=${this._close}>
|
||||||
<div class="dialog-title">${t}</div>
|
<div class="dialog-title">${t}</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
@@ -3119,23 +3088,23 @@ ${c?`<div class="sub">${c}</div>`:""}
|
|||||||
color: var(--text-primary-color, #fff);
|
color: var(--text-primary-color, #fff);
|
||||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
|
||||||
}
|
}
|
||||||
`,d([x({attribute:!1})],O.prototype,"hass",2),d([x()],O.prototype,"lang",2),d([u()],O.prototype,"_open",2),d([u()],O.prototype,"_loading",2),d([u()],O.prototype,"_error",2),d([u()],O.prototype,"_viewResult",2),d([u()],O.prototype,"_completeResult",2),d([u()],O.prototype,"_urlMode",2);customElements.get("maintenance-qr-dialog")||customElements.define("maintenance-qr-dialog",O)});function Ei(a,r){let e=a.interval_analysis,t=e?.weibull_beta,i=e?.weibull_eta;if(t==null||i==null||i<=0)return h;let n=a.interval_days??0,o=a.suggested_interval??n;return l`
|
`,d([x({attribute:!1})],O.prototype,"hass",2),d([x()],O.prototype,"lang",2),d([_()],O.prototype,"_open",2),d([_()],O.prototype,"_loading",2),d([_()],O.prototype,"_error",2),d([_()],O.prototype,"_viewResult",2),d([_()],O.prototype,"_completeResult",2),d([_()],O.prototype,"_urlMode",2);customElements.get("maintenance-qr-dialog")||customElements.define("maintenance-qr-dialog",O)});function Ci(a,r){let e=a.interval_analysis,t=e?.weibull_beta,i=e?.weibull_eta;if(t==null||i==null||i<=0)return h;let n=a.interval_days??0,o=a.suggested_interval??n;return l`
|
||||||
<div class="weibull-section">
|
<div class="weibull-section">
|
||||||
<div class="weibull-title">
|
<div class="weibull-title">
|
||||||
<ha-svg-icon aria-hidden="true" path="M3,14L3.5,14.07L8.07,9.5C7.89,8.85 8.06,8.11 8.59,7.59C9.37,6.8 10.63,6.8 11.41,7.59C11.94,8.11 12.11,8.85 11.93,9.5L14.5,12.07L15,12C15.18,12 15.35,12 15.5,12.07L19.07,8.5C19,8.35 19,8.18 19,8A2,2 0 0,1 21,6A2,2 0 0,1 23,8A2,2 0 0,1 21,10C20.82,10 20.65,10 20.5,9.93L16.93,13.5C17,13.65 17,13.82 17,14A2,2 0 0,1 15,16A2,2 0 0,1 13,14L13.07,13.5L10.5,10.93C10.18,11 9.82,11 9.5,10.93L4.93,15.5L5,16A2,2 0 0,1 3,18A2,2 0 0,1 1,16A2,2 0 0,1 3,14Z"></ha-svg-icon>
|
<ha-svg-icon aria-hidden="true" path="M3,14L3.5,14.07L8.07,9.5C7.89,8.85 8.06,8.11 8.59,7.59C9.37,6.8 10.63,6.8 11.41,7.59C11.94,8.11 12.11,8.85 11.93,9.5L14.5,12.07L15,12C15.18,12 15.35,12 15.5,12.07L19.07,8.5C19,8.35 19,8.18 19,8A2,2 0 0,1 21,6A2,2 0 0,1 23,8A2,2 0 0,1 21,10C20.82,10 20.65,10 20.5,9.93L16.93,13.5C17,13.65 17,13.82 17,14A2,2 0 0,1 15,16A2,2 0 0,1 13,14L13.07,13.5L10.5,10.93C10.18,11 9.82,11 9.5,10.93L4.93,15.5L5,16A2,2 0 0,1 3,18A2,2 0 0,1 1,16A2,2 0 0,1 3,14Z"></ha-svg-icon>
|
||||||
${s("weibull_reliability_curve",r)}
|
${s("weibull_reliability_curve",r)}
|
||||||
${Rr(t,r)}
|
${Or(t,r)}
|
||||||
</div>
|
</div>
|
||||||
${jr(t,i,n,o,r)}
|
${Dr(t,i,n,o,r)}
|
||||||
${Nr(e,r)}
|
${zr(e,r)}
|
||||||
${e?.confidence_interval_low!=null?Hr(e,a,r):h}
|
${e?.confidence_interval_low!=null?Fr(e,a,r):h}
|
||||||
</div>
|
</div>
|
||||||
`}function Rr(a,r){let e,t,i;return a<.8?(e="early_failures",t="M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z",i="beta_early_failures"):a<=1.2?(e="random_failures",t="M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M13,17H11V15H13V17M13,13H11V7H13V13Z",i="beta_random_failures"):a<=3.5?(e="wear_out",t="M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4M12,6A6,6 0 0,1 18,12H12V6Z",i="beta_wear_out"):(e="highly_predictable",t="M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M11,16.5L18,9.5L16.59,8.09L11,13.67L7.91,10.59L6.5,12L11,16.5Z",i="beta_highly_predictable"),l`
|
`}function Or(a,r){let e,t,i;return a<.8?(e="early_failures",t="M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z",i="beta_early_failures"):a<=1.2?(e="random_failures",t="M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M13,17H11V15H13V17M13,13H11V7H13V13Z",i="beta_random_failures"):a<=3.5?(e="wear_out",t="M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4M12,6A6,6 0 0,1 18,12H12V6Z",i="beta_wear_out"):(e="highly_predictable",t="M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M11,16.5L18,9.5L16.59,8.09L11,13.67L7.91,10.59L6.5,12L11,16.5Z",i="beta_highly_predictable"),l`
|
||||||
<span class="beta-badge ${e}">
|
<span class="beta-badge ${e}">
|
||||||
<ha-svg-icon path="${t}"></ha-svg-icon>
|
<ha-svg-icon path="${t}"></ha-svg-icon>
|
||||||
${s(i,r)} (\u03B2=${a.toFixed(2)})
|
${s(i,r)} (\u03B2=${a.toFixed(2)})
|
||||||
</span>
|
</span>
|
||||||
`}function jr(a,r,e,t,i){let b=Math.max(e,t,r,1)*1.3,k=50,E=[];for(let I=0;I<=k;I++){let L=I/k*b,te=1-Math.exp(-Math.pow(L/r,a)),fe=32+L/b*260,ve=136-te*128;E.push([fe,ve])}let D=E.map(([I,L])=>`${I.toFixed(1)},${L.toFixed(1)}`).join(" "),V="M32,136 "+E.map(([I,L])=>`L${I.toFixed(1)},${L.toFixed(1)}`).join(" ")+` L${E[k][0].toFixed(1)},136 Z`,M=32+e/b*260,le=1-Math.exp(-Math.pow(e/r,a)),de=136-le*128,v=((1-le)*100).toFixed(0),F=32+t/b*260,ce=[0,.25,.5,.75,1];return l`
|
`}function Dr(a,r,e,t,i){let b=Math.max(e,t,r,1)*1.3,k=50,E=[];for(let I=0;I<=k;I++){let L=I/k*b,te=1-Math.exp(-Math.pow(L/r,a)),fe=32+L/b*260,ve=136-te*128;E.push([fe,ve])}let D=E.map(([I,L])=>`${I.toFixed(1)},${L.toFixed(1)}`).join(" "),V="M32,136 "+E.map(([I,L])=>`L${I.toFixed(1)},${L.toFixed(1)}`).join(" ")+` L${E[k][0].toFixed(1)},136 Z`,M=32+e/b*260,le=1-Math.exp(-Math.pow(e/r,a)),de=136-le*128,v=((1-le)*100).toFixed(0),F=32+t/b*260,ce=[0,.25,.5,.75,1];return l`
|
||||||
<div class="weibull-chart">
|
<div class="weibull-chart">
|
||||||
<svg viewBox="0 0 ${300} ${160}" preserveAspectRatio="xMidYMid meet" role="img" aria-label="${s("chart_weibull",i)}">
|
<svg viewBox="0 0 ${300} ${160}" preserveAspectRatio="xMidYMid meet" role="img" aria-label="${s("chart_weibull",i)}">
|
||||||
${ce.map(I=>{let L=136-I*128;return _e`
|
${ce.map(I=>{let L=136-I*128;return _e`
|
||||||
@@ -3178,7 +3147,7 @@ ${c?`<div class="sub">${c}</div>`:""}
|
|||||||
${e>0?l`<span class="legend-item"><span class="legend-swatch" style="background:var(--primary-color, #03a9f4); opacity:0.5"></span> ${s("current_interval_marker",i)}</span>`:h}
|
${e>0?l`<span class="legend-item"><span class="legend-swatch" style="background:var(--primary-color, #03a9f4); opacity:0.5"></span> ${s("current_interval_marker",i)}</span>`:h}
|
||||||
${t>0&&t!==e?l`<span class="legend-item"><span class="legend-swatch" style="background:var(--success-color, #4caf50)"></span> ${s("recommended_marker",i)}</span>`:h}
|
${t>0&&t!==e?l`<span class="legend-item"><span class="legend-swatch" style="background:var(--success-color, #4caf50)"></span> ${s("recommended_marker",i)}</span>`:h}
|
||||||
</div>
|
</div>
|
||||||
`}function Nr(a,r){return l`
|
`}function zr(a,r){return l`
|
||||||
<div class="weibull-info-row">
|
<div class="weibull-info-row">
|
||||||
<div class="weibull-info-item">
|
<div class="weibull-info-item">
|
||||||
<span>${s("characteristic_life",r)}</span>
|
<span>${s("characteristic_life",r)}</span>
|
||||||
@@ -3191,7 +3160,7 @@ ${c?`<div class="sub">${c}</div>`:""}
|
|||||||
</div>
|
</div>
|
||||||
`:h}
|
`:h}
|
||||||
</div>
|
</div>
|
||||||
`}function Hr(a,r,e){let t=a.confidence_interval_low,i=a.confidence_interval_high,n=r.suggested_interval??r.interval_days??0,o=r.interval_days??0,p=Math.max(0,t-5),_=i+5-p,f=(t-p)/_*100,m=(i-t)/_*100,y=(n-p)/_*100,b=o>0?(o-p)/_*100:-1;return l`
|
`}function Fr(a,r,e){let t=a.confidence_interval_low,i=a.confidence_interval_high,n=r.suggested_interval??r.interval_days??0,o=r.interval_days??0,p=Math.max(0,t-5),u=i+5-p,f=(t-p)/u*100,m=(i-t)/u*100,y=(n-p)/u*100,b=o>0?(o-p)/u*100:-1;return l`
|
||||||
<div class="confidence-range">
|
<div class="confidence-range">
|
||||||
<div class="confidence-range-title">
|
<div class="confidence-range-title">
|
||||||
${s("confidence_interval",e)}: ${n} ${s("days",e)} (${t}\u2013${i})
|
${s("confidence_interval",e)}: ${n} ${s("days",e)} (${t}\u2013${i})
|
||||||
@@ -3206,7 +3175,7 @@ ${c?`<div class="sub">${c}</div>`:""}
|
|||||||
<span class="confidence-text high">${s("confidence_aggressive",e)} (${i}${s("days",e).charAt(0)})</span>
|
<span class="confidence-text high">${s("confidence_aggressive",e)} (${i}${s("days",e).charAt(0)})</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`}var Si=w(()=>{"use strict";P();R()});function Ai(a,r,e){let t=a.degradation_trend!=null&&a.degradation_trend!=="insufficient_data",i=a.days_until_threshold!=null,n=a.environmental_factor!=null&&a.environmental_factor!==1;if(!t&&!i&&!n)return h;let o=a.degradation_trend==="rising"?"M16,6L18.29,8.29L13.41,13.17L9.41,9.17L2,16.59L3.41,18L9.41,12L13.41,16L19.71,9.71L22,12V6H16Z":a.degradation_trend==="falling"?"M16,18L18.29,15.71L13.41,10.83L9.41,14.83L2,7.41L3.41,6L9.41,12L13.41,8L19.71,14.29L22,12V18H16Z":"M22,12L18,8V11H3V13H18V16L22,12Z";return l`
|
`}var Ii=w(()=>{"use strict";P();R()});function Li(a,r,e){let t=a.degradation_trend!=null&&a.degradation_trend!=="insufficient_data",i=a.days_until_threshold!=null,n=a.environmental_factor!=null&&a.environmental_factor!==1;if(!t&&!i&&!n)return h;let o=a.degradation_trend==="rising"?"M16,6L18.29,8.29L13.41,13.17L9.41,9.17L2,16.59L3.41,18L9.41,12L13.41,16L19.71,9.71L22,12V6H16Z":a.degradation_trend==="falling"?"M16,18L18.29,15.71L13.41,10.83L9.41,14.83L2,7.41L3.41,6L9.41,12L13.41,8L19.71,14.29L22,12V18H16Z":"M22,12L18,8V11H3V13H18V16L22,12Z";return l`
|
||||||
<div class="prediction-section">
|
<div class="prediction-section">
|
||||||
${a.sensor_prediction_urgency?l`
|
${a.sensor_prediction_urgency?l`
|
||||||
<div class="prediction-urgency-banner">
|
<div class="prediction-urgency-banner">
|
||||||
@@ -3241,12 +3210,12 @@ ${c?`<div class="sub">${c}</div>`:""}
|
|||||||
<ha-svg-icon path="M15,13V5A3,3 0 0,0 12,2A3,3 0 0,0 9,5V13A5,5 0 0,0 7,17A5,5 0 0,0 12,22A5,5 0 0,0 17,17A5,5 0 0,0 15,13M12,4A1,1 0 0,1 13,5V8H11V5A1,1 0 0,1 12,4Z"></ha-svg-icon>
|
<ha-svg-icon path="M15,13V5A3,3 0 0,0 12,2A3,3 0 0,0 9,5V13A5,5 0 0,0 7,17A5,5 0 0,0 12,22A5,5 0 0,0 17,17A5,5 0 0,0 15,13M12,4A1,1 0 0,1 13,5V8H11V5A1,1 0 0,1 12,4Z"></ha-svg-icon>
|
||||||
<span class="prediction-label">${s("environmental_adjustment",r)}</span>
|
<span class="prediction-label">${s("environmental_adjustment",r)}</span>
|
||||||
<span class="prediction-value">${a.environmental_factor.toFixed(2)}x</span>
|
<span class="prediction-value">${a.environmental_factor.toFixed(2)}x</span>
|
||||||
${a.environmental_entity?l`<span class="prediction-entity entity-link" @click=${p=>ci(p,a.environmental_entity)}>${a.environmental_entity}</span>`:h}
|
${a.environmental_entity?l`<span class="prediction-entity entity-link" @click=${p=>ui(p,a.environmental_entity)}>${a.environmental_entity}</span>`:h}
|
||||||
</div>
|
</div>
|
||||||
`:h}
|
`:h}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`}var Ti=w(()=>{"use strict";P();R()});function Ci(a,r,e,t){let i=Math.max(a||1,r);return l`
|
`}var Pi=w(()=>{"use strict";P();R()});function Ri(a,r,e,t){let i=Math.max(a||1,r);return l`
|
||||||
<div class="interval-comparison">
|
<div class="interval-comparison">
|
||||||
<div class="interval-bar">
|
<div class="interval-bar">
|
||||||
<div class="interval-label">
|
<div class="interval-label">
|
||||||
@@ -3264,13 +3233,13 @@ ${c?`<div class="sub">${c}</div>`:""}
|
|||||||
style="width: ${Math.min(r/i*100,100)}%"></div>
|
style="width: ${Math.min(r/i*100,100)}%"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`}var Ii=w(()=>{"use strict";P();R()});function Pi(a,r,e){if(!e.seasonal||!a.seasonal_factor||a.seasonal_factor===1)return h;let t=Li.map(p=>s(p,r)),i=new Date().getMonth(),n=a.seasonal_factors||a.interval_analysis?.seasonal_factors||null,o=n&&n.length===12?n:t.map((p,c)=>{let _=a.seasonal_factor||1,f=Math.sin((c-6)*Math.PI/6)*.3;return Math.max(.7,Math.min(1.3,_+f))});return l`
|
`}var Ni=w(()=>{"use strict";P();R()});function Hi(a,r,e){if(!e.seasonal||!a.seasonal_factor||a.seasonal_factor===1)return h;let t=ji.map(p=>s(p,r)),i=new Date().getMonth(),n=a.seasonal_factors||a.interval_analysis?.seasonal_factors||null,o=n&&n.length===12?n:t.map((p,c)=>{let u=a.seasonal_factor||1,f=Math.sin((c-6)*Math.PI/6)*.3;return Math.max(.7,Math.min(1.3,u+f))});return l`
|
||||||
<div class="seasonal-card-compact">
|
<div class="seasonal-card-compact">
|
||||||
<h4>${s("seasonal_awareness",r)}</h4>
|
<h4>${s("seasonal_awareness",r)}</h4>
|
||||||
<div class="seasonal-mini-chart">
|
<div class="seasonal-mini-chart">
|
||||||
${o.map((p,c)=>{let _=p*40,f=p<.9?"low":p>1.1?"high":"normal";return l`
|
${o.map((p,c)=>{let u=p*40,f=p<.9?"low":p>1.1?"high":"normal";return l`
|
||||||
<div class="seasonal-bar ${f} ${c===i?"current":""}"
|
<div class="seasonal-bar ${f} ${c===i?"current":""}"
|
||||||
style="height: ${_}px"
|
style="height: ${u}px"
|
||||||
title="${t[c]}: ${p.toFixed(2)}x">
|
title="${t[c]}: ${p.toFixed(2)}x">
|
||||||
</div>
|
</div>
|
||||||
`})}
|
`})}
|
||||||
@@ -3281,7 +3250,7 @@ ${c?`<div class="sub">${c}</div>`:""}
|
|||||||
<span class="legend-item"><span class="dot high"></span> ${s("longer",r)||"L\xE4nger"}</span>
|
<span class="legend-item"><span class="dot high"></span> ${s("longer",r)||"L\xE4nger"}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`}function Ri(a,r){return qr(a,r)}function qr(a,r){let e=a.seasonal_factors??a.interval_analysis?.seasonal_factors;if(!e||e.length!==12)return h;let t=a.interval_analysis?.seasonal_reason,i=new Date().getMonth(),n=300,o=100,p=8,_=o-p-4,f=Math.max(...e,1.5),m=n/12,y=m*.65,b=p+_-1/f*_;return l`
|
`}function qi(a,r){return Ur(a,r)}function Ur(a,r){let e=a.seasonal_factors??a.interval_analysis?.seasonal_factors;if(!e||e.length!==12)return h;let t=a.interval_analysis?.seasonal_reason,i=new Date().getMonth(),n=300,o=100,p=8,u=o-p-4,f=Math.max(...e,1.5),m=n/12,y=m*.65,b=p+u-1/f*u;return l`
|
||||||
<div class="seasonal-chart">
|
<div class="seasonal-chart">
|
||||||
<div class="seasonal-chart-title">
|
<div class="seasonal-chart-title">
|
||||||
<ha-svg-icon aria-hidden="true" path="M17.75 4.09L15.22 6.03L16.13 9.09L13.5 7.28L10.87 9.09L11.78 6.03L9.25 4.09L12.44 4L13.5 1L14.56 4L17.75 4.09M21.25 11L19.61 12.25L20.2 14.23L18.5 13.06L16.8 14.23L17.39 12.25L15.75 11L17.81 10.95L18.5 9L19.19 10.95L21.25 11M18.97 15.95C19.8 15.87 20.69 17.05 20.16 17.8C19.84 18.25 19.5 18.67 19.08 19.07C15.17 23 8.84 23 4.94 19.07C1.03 15.17 1.03 8.83 4.94 4.93C5.34 4.53 5.76 4.17 6.21 3.85C6.96 3.32 8.14 4.21 8.06 5.04C7.79 7.9 8.75 10.87 10.95 13.06C13.14 15.26 16.1 16.22 18.97 15.95Z"></ha-svg-icon>
|
<ha-svg-icon aria-hidden="true" path="M17.75 4.09L15.22 6.03L16.13 9.09L13.5 7.28L10.87 9.09L11.78 6.03L9.25 4.09L12.44 4L13.5 1L14.56 4L17.75 4.09M21.25 11L19.61 12.25L20.2 14.23L18.5 13.06L16.8 14.23L17.39 12.25L15.75 11L17.81 10.95L18.5 9L19.19 10.95L21.25 11M18.97 15.95C19.8 15.87 20.69 17.05 20.16 17.8C19.84 18.25 19.5 18.67 19.08 19.07C15.17 23 8.84 23 4.94 19.07C1.03 15.17 1.03 8.83 4.94 4.93C5.34 4.53 5.76 4.17 6.21 3.85C6.96 3.32 8.14 4.21 8.06 5.04C7.79 7.9 8.75 10.87 10.95 13.06C13.14 15.26 16.1 16.22 18.97 15.95Z"></ha-svg-icon>
|
||||||
@@ -3291,20 +3260,20 @@ ${c?`<div class="sub">${c}</div>`:""}
|
|||||||
<svg viewBox="0 0 ${n} ${o}" preserveAspectRatio="xMidYMid meet" role="img" aria-label="${s("chart_seasonal",r)}">
|
<svg viewBox="0 0 ${n} ${o}" preserveAspectRatio="xMidYMid meet" role="img" aria-label="${s("chart_seasonal",r)}">
|
||||||
<line x1="0" y1="${b.toFixed(1)}" x2="${n}" y2="${b.toFixed(1)}"
|
<line x1="0" y1="${b.toFixed(1)}" x2="${n}" y2="${b.toFixed(1)}"
|
||||||
stroke="var(--divider-color)" stroke-width="1" stroke-dasharray="4,3" />
|
stroke="var(--divider-color)" stroke-width="1" stroke-dasharray="4,3" />
|
||||||
${e.map((k,E)=>{let D=k/f*_,V=E*m+(m-y)/2,M=p+_-D,le=E===i,de=k<1?"var(--success-color, #4caf50)":k>1?"var(--warning-color, #ff9800)":"var(--secondary-text-color)";return _e`
|
${e.map((k,E)=>{let D=k/f*u,V=E*m+(m-y)/2,M=p+u-D,le=E===i,de=k<1?"var(--success-color, #4caf50)":k>1?"var(--warning-color, #ff9800)":"var(--secondary-text-color)";return _e`
|
||||||
<rect x="${V.toFixed(1)}" y="${M.toFixed(1)}"
|
<rect x="${V.toFixed(1)}" y="${M.toFixed(1)}"
|
||||||
width="${y.toFixed(1)}" height="${D.toFixed(1)}"
|
width="${y.toFixed(1)}" height="${D.toFixed(1)}"
|
||||||
fill="${de}" opacity="${le?1:.5}" rx="2" />
|
fill="${de}" opacity="${le?1:.5}" rx="2" />
|
||||||
`})}
|
`})}
|
||||||
</svg>
|
</svg>
|
||||||
<div class="seasonal-labels">
|
<div class="seasonal-labels">
|
||||||
${Li.map((k,E)=>l`<span class="seasonal-label ${E===i?"active-month":""}">${s(k,r)}</span>`)}
|
${ji.map((k,E)=>l`<span class="seasonal-label ${E===i?"active-month":""}">${s(k,r)}</span>`)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`}var Li,ji=w(()=>{"use strict";P();R();Li=["month_jan","month_feb","month_mar","month_apr","month_may","month_jun","month_jul","month_aug","month_sep","month_oct","month_nov","month_dec"]});var C,Ni=w(()=>{"use strict";P();U();R();oe();Si();Ti();Ii();ji();C=class extends A{constructor(){super(...arguments);this._open=!1;this._entryId=null;this._taskId=null;this._task=null;this._objectName="";this._busy=!1;this._error="";this._showSkip=!1;this._showReset=!1;this._showDetails=!1;this._showAdaptive=!1;this._skipReason="";this._resetDate="";this._features={adaptive:!1,predictions:!1,seasonal:!1,environmental:!1,budget:!1,groups:!1,checklists:!1,schedule_time:!1,completion_actions:!1};this._toast="";this._featuresLoaded=!1}get _lang(){return H(this.hass)}async openFor(e,t){this._entryId=e,this._taskId=t,this._error="",this._showSkip=!1,this._showReset=!1,this._showAdaptive=!1,this._skipReason="",this._resetDate=new Date().toISOString().slice(0,10),this._open=!0,await Promise.all([this._loadTask(),this._loadFeatures()])}async _loadFeatures(){if(!this._featuresLoaded)try{let e=await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/settings"});e?.features&&(this._features={...this._features,...e.features}),this._featuresLoaded=!0}catch{}}close(){this._open=!1,this._task=null,this._error=""}async _loadTask(){if(!(!this._entryId||!this._taskId))try{let e=await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/object",entry_id:this._entryId});this._objectName=e.object?.name||"";let t=(e.tasks||[]).find(i=>i.id===this._taskId);this._task=t??null}catch(e){this._error=j(e,this._lang)}}async _runWs(e){this._busy=!0,this._error="";try{return await this.hass.connection.sendMessagePromise(e),this._busy=!1,!0}catch(t){return this._error=j(t,this._lang),this._busy=!1,!1}}_notifyChanged(e){this.dispatchEvent(new CustomEvent("task-action-fired",{detail:{entry_id:this._entryId,task_id:this._taskId,action:e},bubbles:!0,composed:!0}))}_onComplete(){!this._entryId||!this._taskId||!this._task||Promise.resolve().then(()=>(B(),Q)).then(({openCompleteDialog:e})=>{e({entry_id:this._entryId,task_id:this._taskId,task_name:this._task.name,checklist:this._task.checklist||[],adaptive_enabled:!!this._task.adaptive_config?.enabled})&&(this._notifyChanged("complete"),this.close())})}async _onSkipConfirm(){if(!this._entryId||!this._taskId)return;await this._runWs({type:"maintenance_supporter/task/skip",entry_id:this._entryId,task_id:this._taskId,reason:this._skipReason.trim()||null})&&(this._notifyChanged("skip"),this.close())}async _onResetConfirm(){if(!this._entryId||!this._taskId)return;await this._runWs({type:"maintenance_supporter/task/reset",entry_id:this._entryId,task_id:this._taskId,date:this._resetDate||void 0})&&(this._notifyChanged("reset"),this.close())}_onEdit(){!this._entryId||!this._taskId||Promise.resolve().then(()=>(B(),Q)).then(({openEditTaskDialog:e})=>{e(this._entryId,this._taskId),this.close()})}_onQr(){!this._entryId||!this._taskId||!this._task||Promise.resolve().then(()=>(B(),Q)).then(({openQrDialog:e})=>{e({entry_id:this._entryId,task_id:this._taskId,task_name:this._task.name,object_name:this._objectName}),this.close()})}async _onDelete(){if(!this._entryId||!this._taskId)return;let e=s("delete_task_confirm",this._lang)||`Delete "${this._task?.name}"?`;if(!window.confirm(e))return;await this._runWs({type:"maintenance_supporter/task/delete",entry_id:this._entryId,task_id:this._taskId})&&(this._notifyChanged("delete"),this.close())}async _onArchive(){if(!this._entryId||!this._taskId)return;await this._runWs({type:"maintenance_supporter/task/archive",entry_id:this._entryId,task_id:this._taskId})&&(this._notifyChanged("archive"),this.close())}async _onUnarchive(){if(!this._entryId||!this._taskId)return;await this._runWs({type:"maintenance_supporter/task/unarchive",entry_id:this._entryId,task_id:this._taskId})&&(this._notifyChanged("unarchive"),this.close())}_onOpenInPanel(){if(!this._entryId||!this._taskId)return;let e=`/maintenance-supporter?entry_id=${encodeURIComponent(this._entryId)}&task_id=${encodeURIComponent(this._taskId)}`;history.pushState(null,"",e),window.dispatchEvent(new CustomEvent("location-changed")),this.close()}async _applySuggestion(){if(!this._entryId||!this._taskId||!this._task?.suggested_interval)return;await this._runWs({type:"maintenance_supporter/task/apply_suggestion",entry_id:this._entryId,task_id:this._taskId,interval:this._task.suggested_interval})&&(this._toast=s("suggestion_applied",this._lang)||"Applied",this._notifyChanged("apply_suggestion"),await this._loadTask(),setTimeout(()=>{this._toast=""},2500))}async _reanalyzeInterval(){if(!(!this._entryId||!this._taskId)){this._busy=!0,this._error="";try{let e=await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/task/analyze_interval",entry_id:this._entryId,task_id:this._taskId});this._toast=e.recommended_interval?`${s("reanalyze_result",this._lang)||"Recomputed"}: ${Be(e.recommended_inLine truncated
|
`}var ji,Mi=w(()=>{"use strict";P();R();ji=["month_jan","month_feb","month_mar","month_apr","month_may","month_jun","month_jul","month_aug","month_sep","month_oct","month_nov","month_dec"]});var C,Oi=w(()=>{"use strict";P();U();R();oe();Ii();Pi();Ni();Mi();C=class extends A{constructor(){super(...arguments);this._open=!1;this._entryId=null;this._taskId=null;this._task=null;this._objectName="";this._busy=!1;this._error="";this._showSkip=!1;this._showReset=!1;this._showDetails=!1;this._showAdaptive=!1;this._skipReason="";this._resetDate="";this._features={adaptive:!1,predictions:!1,seasonal:!1,environmental:!1,budget:!1,groups:!1,checklists:!1,schedule_time:!1,completion_actions:!1};this._toast="";this._featuresLoaded=!1}get _lang(){return j(this.hass)}async openFor(e,t){this._entryId=e,this._taskId=t,this._error="",this._showSkip=!1,this._showReset=!1,this._showAdaptive=!1,this._skipReason="",this._resetDate=new Date().toISOString().slice(0,10),this._open=!0,await Promise.all([this._loadTask(),this._loadFeatures()])}async _loadFeatures(){if(!this._featuresLoaded)try{let e=await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/settings"});e?.features&&(this._features={...this._features,...e.features}),this._featuresLoaded=!0}catch{}}close(){this._open=!1,this._task=null,this._error=""}async _loadTask(){if(!(!this._entryId||!this._taskId))try{let e=await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/object",entry_id:this._entryId});this._objectName=e.object?.name||"";let t=(e.tasks||[]).find(i=>i.id===this._taskId);this._task=t??null}catch(e){this._error=N(e,this._lang)}}async _runWs(e){this._busy=!0,this._error="";try{return await this.hass.connection.sendMessagePromise(e),this._busy=!1,!0}catch(t){return this._error=N(t,this._lang),this._busy=!1,!1}}_notifyChanged(e){this.dispatchEvent(new CustomEvent("task-action-fired",{detail:{entry_id:this._entryId,task_id:this._taskId,action:e},bubbles:!0,composed:!0}))}_onComplete(){!this._entryId||!this._taskId||!this._task||Promise.resolve().then(()=>(B(),Q)).then(({openCompleteDialog:e})=>{e({entry_id:this._entryId,task_id:this._taskId,task_name:this._task.name,checklist:this._task.checklist||[],adaptive_enabled:!!this._task.adaptive_config?.enabled})&&(this._notifyChanged("complete"),this.close())})}async _onSkipConfirm(){if(!this._entryId||!this._taskId)return;await this._runWs({type:"maintenance_supporter/task/skip",entry_id:this._entryId,task_id:this._taskId,reason:this._skipReason.trim()||null})&&(this._notifyChanged("skip"),this.close())}async _onResetConfirm(){if(!this._entryId||!this._taskId)return;await this._runWs({type:"maintenance_supporter/task/reset",entry_id:this._entryId,task_id:this._taskId,date:this._resetDate||void 0})&&(this._notifyChanged("reset"),this.close())}_onEdit(){!this._entryId||!this._taskId||Promise.resolve().then(()=>(B(),Q)).then(({openEditTaskDialog:e})=>{e(this._entryId,this._taskId),this.close()})}_onQr(){!this._entryId||!this._taskId||!this._task||Promise.resolve().then(()=>(B(),Q)).then(({openQrDialog:e})=>{e({entry_id:this._entryId,task_id:this._taskId,task_name:this._task.name,object_name:this._objectName}),this.close()})}async _onDelete(){if(!this._entryId||!this._taskId)return;let e=s("delete_task_confirm",this._lang)||`Delete "${this._task?.name}"?`;if(!window.confirm(e))return;await this._runWs({type:"maintenance_supporter/task/delete",entry_id:this._entryId,task_id:this._taskId})&&(this._notifyChanged("delete"),this.close())}async _onArchive(){if(!this._entryId||!this._taskId)return;await this._runWs({type:"maintenance_supporter/task/archive",entry_id:this._entryId,task_id:this._taskId})&&(this._notifyChanged("archive"),this.close())}async _onUnarchive(){if(!this._entryId||!this._taskId)return;await this._runWs({type:"maintenance_supporter/task/unarchive",entry_id:this._entryId,task_id:this._taskId})&&(this._notifyChanged("unarchive"),this.close())}_onOpenInPanel(){if(!this._entryId||!this._taskId)return;let e=`/maintenance-supporter?entry_id=${encodeURIComponent(this._entryId)}&task_id=${encodeURIComponent(this._taskId)}`;history.pushState(null,"",e),window.dispatchEvent(new CustomEvent("location-changed")),this.close()}async _applySuggestion(){if(!this._entryId||!this._taskId||!this._task?.suggested_interval)return;await this._runWs({type:"maintenance_supporter/task/apply_suggestion",entry_id:this._entryId,task_id:this._taskId,interval:this._task.suggested_interval})&&(this._toast=s("suggestion_applied",this._lang)||"Applied",this._notifyChanged("apply_suggestion"),await this._loadTask(),setTimeout(()=>{this._toast=""},2500))}async _reanalyzeInterval(){if(!(!this._entryId||!this._taskId)){this._busy=!0,this._error="";try{let e=await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/task/analyze_interval",entry_id:this._entryId,task_id:this._taskId});this._toast=e.recommended_interval?`${s("reanalyze_result",this._lang)||"Recomputed"}: ${Be(e.recommended_inLine truncated
|
||||||
<div class="recommendation-card">
|
<div class="recommendation-card">
|
||||||
<h4>${s("suggested_interval",t)}</h4>
|
<h4>${s("suggested_interval",t)}</h4>
|
||||||
${Ci(e.interval_days,e.suggested_interval,e.interval_confidence||"medium",t)}
|
${Ri(e.interval_days,e.suggested_interval,e.interval_confidence||"medium",t)}
|
||||||
<div class="recommendation-actions">
|
<div class="recommendation-actions">
|
||||||
<button class="btn primary"
|
<button class="btn primary"
|
||||||
@click=${this._applySuggestion} ?disabled=${this._busy}>
|
@click=${this._applySuggestion} ?disabled=${this._busy}>
|
||||||
@@ -3324,14 +3293,14 @@ ${c?`<div class="sub">${c}</div>`:""}
|
|||||||
<div class="adaptive-stack">
|
<div class="adaptive-stack">
|
||||||
${this._toast?l`<div class="toast">${this._toast}</div>`:h}
|
${this._toast?l`<div class="toast">${this._toast}</div>`:h}
|
||||||
${i?this._renderRecommendation(e):h}
|
${i?this._renderRecommendation(e):h}
|
||||||
${n?Ai(e,t,this._features):h}
|
${n?Li(e,t,this._features):h}
|
||||||
${o?Ei(e,t):h}
|
${o?Ci(e,t):h}
|
||||||
${p?l`
|
${p?l`
|
||||||
${Pi(e,t,this._features)}
|
${Hi(e,t,this._features)}
|
||||||
${e.seasonal_factors?.length===12||e.interval_analysis?.seasonal_factors?.length===12?Ri(e,t):h}
|
${e.seasonal_factors?.length===12||e.interval_analysis?.seasonal_factors?.length===12?qi(e,t):h}
|
||||||
`:h}
|
`:h}
|
||||||
</div>
|
</div>
|
||||||
`}_renderDetails(e){let t=this._lang,i=e.history||[],n=i.filter(c=>c.type==="completed"),o=n.reduce((c,_)=>c+(typeof _.cost=="number"?_.cost:0),0),p=(()=>{let c=n.map(_=>typeof _.duration=="number"?_.duration:null).filter(_=>_!=null);return c.length?Math.round(c.reduce((_,f)=>_+f,0)/c.length):null})();return l`
|
`}_renderDetails(e){let t=this._lang,i=e.history||[],n=i.filter(c=>c.type==="completed"),o=n.reduce((c,u)=>c+(typeof u.cost=="number"?u.cost:0),0),p=(()=>{let c=n.map(u=>typeof u.duration=="number"?u.duration:null).filter(u=>u!=null);return c.length?Math.round(c.reduce((u,f)=>u+f,0)/c.length):null})();return l`
|
||||||
<div class="details">
|
<div class="details">
|
||||||
<div class="stats-grid">
|
<div class="stats-grid">
|
||||||
<div class="stat">
|
<div class="stat">
|
||||||
@@ -3353,12 +3322,12 @@ ${c?`<div class="sub">${c}</div>`:""}
|
|||||||
</div>
|
</div>
|
||||||
${i.length===0?l`<div class="history-empty">${s("history_empty",t)||"No history yet."}</div>`:l`
|
${i.length===0?l`<div class="history-empty">${s("history_empty",t)||"No history yet."}</div>`:l`
|
||||||
<div class="history-list">
|
<div class="history-list">
|
||||||
${[...i].reverse().slice(0,20).map(c=>{let _=["completed","reset","skipped"].includes(c.type);return l`
|
${[...i].reverse().slice(0,20).map(c=>{let u=["completed","reset","skipped"].includes(c.type);return l`
|
||||||
<div class="history-entry">
|
<div class="history-entry">
|
||||||
<div class="history-line">
|
<div class="history-line">
|
||||||
<span class="history-type type-${c.type}">${s(c.type,t)}</span>
|
<span class="history-type type-${c.type}">${s(c.type,t)}</span>
|
||||||
<span class="history-date">${oi(c.timestamp,t)}</span>
|
<span class="history-date">${di(c.timestamp,t)}</span>
|
||||||
${_?l`<button class="history-edit"
|
${u?l`<button class="history-edit"
|
||||||
title="${s("history_edit_button",t)||"Edit"}"
|
title="${s("history_edit_button",t)||"Edit"}"
|
||||||
@click=${()=>this._onEditHistoryEntry(c)}>
|
@click=${()=>this._onEditHistoryEntry(c)}>
|
||||||
<ha-icon icon="mdi:pencil"></ha-icon>
|
<ha-icon icon="mdi:pencil"></ha-icon>
|
||||||
@@ -3390,7 +3359,7 @@ ${c?`<div class="sub">${c}</div>`:""}
|
|||||||
<div class="quick-info">
|
<div class="quick-info">
|
||||||
${t.next_due?l`<span><strong>${s("next_due",e)||"Next due"}:</strong> ${G(t.next_due,e)}</span>`:h}
|
${t.next_due?l`<span><strong>${s("next_due",e)||"Next due"}:</strong> ${G(t.next_due,e)}</span>`:h}
|
||||||
${t.last_performed?l`<span><strong>${s("last_performed",e)||"Last"}:</strong> ${G(t.last_performed,e)}</span>`:h}
|
${t.last_performed?l`<span><strong>${s("last_performed",e)||"Last"}:</strong> ${G(t.last_performed,e)}</span>`:h}
|
||||||
${t.schedule?.kind&&!["manual","one_time"].includes(t.schedule.kind)||t.interval_days!=null?l`<span><strong>${s("interval",e)||"Interval"}:</strong> ${di(t,e)}</span>`:h}
|
${t.schedule?.kind&&!["manual","one_time"].includes(t.schedule.kind)||t.interval_days!=null?l`<span><strong>${s("interval",e)||"Interval"}:</strong> ${pi(t,e)}</span>`:h}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -3662,7 +3631,7 @@ ${c?`<div class="sub">${c}</div>`:""}
|
|||||||
.weibull-section, .seasonal-card-compact { max-width: 100%; }
|
.weibull-section, .seasonal-card-compact { max-width: 100%; }
|
||||||
.weibull-chart svg { max-width: 100%; height: auto; }
|
.weibull-chart svg { max-width: 100%; height: auto; }
|
||||||
.details-toggle { gap: 12px; flex-wrap: wrap; }
|
.details-toggle { gap: 12px; flex-wrap: wrap; }
|
||||||
`],d([x({attribute:!1})],C.prototype,"hass",2),d([u()],C.prototype,"_open",2),d([u()],C.prototype,"_entryId",2),d([u()],C.prototype,"_taskId",2),d([u()],C.prototype,"_task",2),d([u()],C.prototype,"_objectName",2),d([u()],C.prototype,"_busy",2),d([u()],C.prototype,"_error",2),d([u()],C.prototype,"_showSkip",2),d([u()],C.prototype,"_showReset",2),d([u()],C.prototype,"_showDetails",2),d([u()],C.prototype,"_showAdaptive",2),d([u()],C.prototype,"_skipReason",2),d([u()],C.prototype,"_resetDate",2),d([u()],C.prototype,"_features",2),d([u()],C.prototype,"_toast",2);customElements.get("maintenance-task-quick-actions-dialog")||customElements.define("maintenance-task-quick-actions-dialog",C)});function Hi(a){return!!a&&/^https?:\/\//i.test(a)}var qi=w(()=>{"use strict"});var W,Mi=w(()=>{"use strict";P();qi();U();R();oe();W=class extends A{constructor(){super(...arguments);this._open=!1;this._entryId=null;this._data=null;this._busy=!1;this._error=""}get _lang(){return H(this.hass)}async openFor(e){this._entryId=e,this._error="",this._open=!0,await this._load()}close(){this._open=!1,this._data=null,this._error=""}async _load(){if(this._entryId)try{let e=await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/object",entry_id:this._entryId});this._data=e}catch(e){this._error=j(e,this._lang)}}_onEditObject(){!this._entryId||!this._data||Promise.resolve().then(()=>(B(),Q)).then(({openEditObjectDialog:e})=>{e(this._entryId,this._data.object),this.close()})}_onAddTask(){this._entryId&&Promise.resolve().then(()=>(B(),Q)).then(({openCreateTaskDialog:e})=>{e(),this.close()})}async _onDelete(){if(!this._entryId||!this._data)return;let e=s("delete_object_confirm",this._lang)||`Delete "${this._data.object.name}" and all its tasks?`;if(window.confirm(e)){this._busy=!0,this._error="";try{await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/object/delete",entry_id:this._entryId}),this.dispatchEvent(new CustomEvent("object-deleted",{detail:{entry_id:this._entryId},bubbles:!0,composed:!0})),this.close()}catch(t){this._error=j(t,this._lang)}finally{this._busy=!1}}}async _onArchiveObject(){if(!this._entryId||!this._data)return;let e=!!this._data.object.archived;if(!e){let t=s("confirm_archive_object",this._lang)||"Archive this object and its tasks?";if(!window.confirm(t))return}this._busy=!0,this._error="";try{await this.hass.connection.sendMessagePromise({type:e?"maintenance_supporter/object/unarchive":"maintenance_supporter/object/archive",entry_id:this._entryId}),this.dispatchEvent(new CustomEvent("object-changed",{detail:{entry_id:this._entryId},bubbles:!0,composed:!0})),this.close()}catch(t){this._error=j(t,this._lang)}finally{this._busy=!1}}_onTaskClick(e){this._entryId&&Promise.resolve().then(()=>(B(),Q)).then(({openTaskQuickActions:t})=>{t(this._entryId,e)})}render(){if(!this._open)return h;let e=this._lang,t=this._data,i=t?.object,n=t?.tasks||[],o=this.hass?.user?.is_admin??!0;return l`
|
`],d([x({attribute:!1})],C.prototype,"hass",2),d([_()],C.prototype,"_open",2),d([_()],C.prototype,"_entryId",2),d([_()],C.prototype,"_taskId",2),d([_()],C.prototype,"_task",2),d([_()],C.prototype,"_objectName",2),d([_()],C.prototype,"_busy",2),d([_()],C.prototype,"_error",2),d([_()],C.prototype,"_showSkip",2),d([_()],C.prototype,"_showReset",2),d([_()],C.prototype,"_showDetails",2),d([_()],C.prototype,"_showAdaptive",2),d([_()],C.prototype,"_skipReason",2),d([_()],C.prototype,"_resetDate",2),d([_()],C.prototype,"_features",2),d([_()],C.prototype,"_toast",2);customElements.get("maintenance-task-quick-actions-dialog")||customElements.define("maintenance-task-quick-actions-dialog",C)});function Di(a){return!!a&&/^https?:\/\//i.test(a)}var zi=w(()=>{"use strict"});var W,Fi=w(()=>{"use strict";P();zi();U();R();oe();W=class extends A{constructor(){super(...arguments);this._open=!1;this._entryId=null;this._data=null;this._busy=!1;this._error=""}get _lang(){return j(this.hass)}async openFor(e){this._entryId=e,this._error="",this._open=!0,await this._load()}close(){this._open=!1,this._data=null,this._error=""}async _load(){if(this._entryId)try{let e=await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/object",entry_id:this._entryId});this._data=e}catch(e){this._error=N(e,this._lang)}}_onEditObject(){!this._entryId||!this._data||Promise.resolve().then(()=>(B(),Q)).then(({openEditObjectDialog:e})=>{e(this._entryId,this._data.object),this.close()})}_onAddTask(){this._entryId&&Promise.resolve().then(()=>(B(),Q)).then(({openCreateTaskDialog:e})=>{e(),this.close()})}async _onDelete(){if(!this._entryId||!this._data)return;let e=s("delete_object_confirm",this._lang)||`Delete "${this._data.object.name}" and all its tasks?`;if(window.confirm(e)){this._busy=!0,this._error="";try{await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/object/delete",entry_id:this._entryId}),this.dispatchEvent(new CustomEvent("object-deleted",{detail:{entry_id:this._entryId},bubbles:!0,composed:!0})),this.close()}catch(t){this._error=N(t,this._lang)}finally{this._busy=!1}}}async _onArchiveObject(){if(!this._entryId||!this._data)return;let e=!!this._data.object.archived;if(!e){let t=s("confirm_archive_object",this._lang)||"Archive this object and its tasks?";if(!window.confirm(t))return}this._busy=!0,this._error="";try{await this.hass.connection.sendMessagePromise({type:e?"maintenance_supporter/object/unarchive":"maintenance_supporter/object/archive",entry_id:this._entryId}),this.dispatchEvent(new CustomEvent("object-changed",{detail:{entry_id:this._entryId},bubbles:!0,composed:!0})),this.close()}catch(t){this._error=N(t,this._lang)}finally{this._busy=!1}}_onTaskClick(e){this._entryId&&Promise.resolve().then(()=>(B(),Q)).then(({openTaskQuickActions:t})=>{t(this._entryId,e)})}render(){if(!this._open)return h;let e=this._lang,t=this._data,i=t?.object,n=t?.tasks||[],o=this.hass?.user?.is_admin??!0;return l`
|
||||||
<div class="backdrop" @click=${this.close}></div>
|
<div class="backdrop" @click=${this.close}></div>
|
||||||
<div class="dialog" role="dialog" aria-modal="true">
|
<div class="dialog" role="dialog" aria-modal="true">
|
||||||
${t&&i?l`
|
${t&&i?l`
|
||||||
@@ -3725,7 +3694,7 @@ ${c?`<div class="sub">${c}</div>`:""}
|
|||||||
${i.map(([n,o])=>l`
|
${i.map(([n,o])=>l`
|
||||||
<div class="meta-item">
|
<div class="meta-item">
|
||||||
<span class="meta-label">${n}</span>
|
<span class="meta-label">${n}</span>
|
||||||
<span class="meta-value">${Hi(o)?l`<a href="${o}" target="_blank" rel="noopener noreferrer">${o}</a>`:o}</span>
|
<span class="meta-value">${Di(o)?l`<a href="${o}" target="_blank" rel="noopener noreferrer">${o}</a>`:o}</span>
|
||||||
</div>
|
</div>
|
||||||
`)}
|
`)}
|
||||||
</div>
|
</div>
|
||||||
@@ -3788,7 +3757,7 @@ ${c?`<div class="sub">${c}</div>`:""}
|
|||||||
.btn ha-icon { --mdc-icon-size: 16px; }
|
.btn ha-icon { --mdc-icon-size: 16px; }
|
||||||
.loading { padding: 24px; text-align: center; color: var(--secondary-text-color); }
|
.loading { padding: 24px; text-align: center; color: var(--secondary-text-color); }
|
||||||
.error { padding: 8px; border-radius: 6px; background: rgba(211,47,47,0.1); color: var(--error-color); font-size: 13px; }
|
.error { padding: 8px; border-radius: 6px; background: rgba(211,47,47,0.1); color: var(--error-color); font-size: 13px; }
|
||||||
`,d([x({attribute:!1})],W.prototype,"hass",2),d([u()],W.prototype,"_open",2),d([u()],W.prototype,"_entryId",2),d([u()],W.prototype,"_data",2),d([u()],W.prototype,"_busy",2),d([u()],W.prototype,"_error",2);customElements.get("maintenance-object-quick-actions-dialog")||customElements.define("maintenance-object-quick-actions-dialog",W)});var Q={};Vi(Q,{openCompleteDialog:()=>Gr,openCreateObjectDialog:()=>Br,openCreateTaskDialog:()=>Vr,openEditObjectDialog:()=>Wr,openEditTaskDialog:()=>Kr,openHistoryEditDialog:()=>vt,openObjectQuickActions:()=>Qr,openQrDialog:()=>Yr,openTaskQuickActions:()=>yt});function Qe(){return document.querySelector("home-assistant")?.hass}function Ur(){return document.querySelector("home-assistant")?.shadowRoot??document.body}function J(a){let r=Ur(),e=r.querySelector(a)??document.body.querySelector(a);return e?e.parentNode!==r&&r.appendChild(e):(e=document.createElement(a),r.appendChild(e)),e}function Z(a){let r=Qe();if(!r)return!1;a.hass=r;let e=r.language||"en";return Re(e)||je(e).then(()=>{a.requestUpdate?.()}),!0}function Fi(a){return Ye||(Ye=a.connection.sendMessagePromise({type:"maintenance_supporter/settings"}).then(r=>({features:r.features??Oi.features,defaultWarningDays:r.general?.default_warning_days??7})).catch(()=>Oi),Ye)}function Br(){let a=J(Di);return Z(a)?(a.openCreate(),!0):!1}function Wr(a,r){let e=J(Di);return Z(e)?(e.openEdit(a,r),!0):!1}function Vr(){let a=J(zi);if(!Z(a))return!1;let r=Qe();return r?((async()=>{let e=await Fi(r),t=a;t.checklistsEnabled=e.features.checklists,t.scheduleTimeEnabled=e.features.schedule_time,t.completionActionsEnabled=e.features.completion_actions,t.defaultWarningDays=e.defaultWarningDays,t.openCreate()})(),!0):!1}function Kr(a,r){let e=J(zi);if(!Z(e))return!1;let t=Qe();return t?((async()=>{try{let[i,n]=await Promise.all([t.connection.sendMessagePromise({type:"maintenance_supporter/object",entry_id:a}),Fi(t)]),o=(i.tasks||[]).find(c=>c.id===r);if(!o){console.warn(`openEditTaskDialog: task ${r} not found in entry ${a}`);return}let p=e;p.checklistsEnabled=n.features.checklists,p.scheduleTimeEnabled=n.features.schedule_time,p.completionActionsEnabled=n.features.completion_actions,p.defaultWarningDays=n.defaultWarningDays,await p.openEdit(a,o)}catch(i){console.warn("openEditTaskDialog: failed to load task/features",i)}})(),!0):!1}function vt(a){let r=J(Mr);return Z(r)?(r.openEdit(a),!0):!1}function Gr(a){let r=J(Or);return Z(r)?(r.entryId=a.entry_id,r.taskId=a.task_id,r.taskName=a.task_name,r.checklist=a.checklist??[],r.adaptiveEnabled=!!a.adaptive_enabled,r.requiredFields=a.required_completion_fields??[],r.lang=Qe()?.language||"en",r.open(),!0):!1}function Yr(a){let r=J(Dr);return Z(r)?(r.openForTask(a.entry_id,a.task_id,a.object_name,a.task_name),!0):!1}function yt(a,r){let e=J(zr);return Z(e)?(e.openFor(a,r),!0):!1}function Qr(a){let r=J(Fr);return Z(r)?(r.openFor(a),!0):!1}var Di,zi,Mr,Or,Dr,zr,Fr,Oi,Ye,B=w(()=>{"use strict";_i();bi();xi();wi();ki();Ni();Mi();R();Di="maintenance-object-dialog",zi="maintenance-task-dialog",Mr="maintenance-history-edit-dialog",Or="maintenance-complete-dialog",Dr="maintenance-qr-dialog",zr="maintenance-task-quick-actions-dialog",Fr="maintenance-object-quick-actions-dialog";Oi={features:{adaptive:!1,predictions:!1,seasonal:!1,environmental:!1,budget:!1,groups:!1,checklists:!1,schedule_time:!1,completion_actions:!1},defaultWarningDays:7},Ye=null});P();U();var lr={days:1,weeks:7,months:30.4368,years:365.25};function Gt(a,r){return!a||a<=0?0:a*(lr[r||"days"]??1)}var Yt=5;function Te(a){let r=a.getFullYear(),e=String(a.getMonth()+1).padStart(2,"0"),t=String(a.getDate()).padStart(2,"0");return`${r}-${e}-${t}`}function dr(a,r){let e=[];for(let t=0;t<r;t++){let i=new Date(a);i.setDate(i.getDate()+t),i.setHours(0,0,0,0),e.push(Te(i))}return e}function Fe(a,r){let[e,t,i]=a.split("-").map(Number),n=new Date(e,t-1,i);return n.setDate(n.getDate()+r),Te(n)}function cr(a){if(!a||a.length===0)return null;let r=a.map(e=>e.cost).filter(e=>typeof e=="number");return r.length===0?null:r.reduce((e,t)=>e+t,0)/r.length}function pr(a){let{windowStart:r,windowEnd:e,task:t,entryId:i,objectName:n}=a,o=[],p=(m,y)=>({date:m,entry_id:i,task_id:t.id,task_name:t.name,object_name:n,status:y&&(t.status==="overdue"||t.status==="triggered")?"ok":t.status,days_until_due:y?null:t.days_until_due??null,projected:y,schedule_type:t.schedule_type,interval_days:t.interval_days??null,interval_unit:t.interval_unit??null,responsible_user_id:t.responsible_user_id??null,avg_cost:cr(t.history),adaptive_enabled:!!t.adaptive_config?.enabled,prediction_confidence:t.threshold_prediction_confidence??null}),c=Math.max(1,Math.round(Gt(t.interval_days,t.interval_unit)));if(t.status==="overdue"||t.status==="triggered"){if(o.push(p(r,!1)),t.schedule_type==="time_based"&&t.interval_days&&t.interval_days>0){let m=Fe(r,c),y=1;for(;m<=e&&y<Yt;)o.push(p(m,!0)),y++,m=Fe(m,c)}return o}let _=t.next_due;if(typeof _!="string"||!_)return o;let f=_.slice(0,10);if(f>=r&&f<=e
Line truncated
|
`,d([x({attribute:!1})],W.prototype,"hass",2),d([_()],W.prototype,"_open",2),d([_()],W.prototype,"_entryId",2),d([_()],W.prototype,"_data",2),d([_()],W.prototype,"_busy",2),d([_()],W.prototype,"_error",2);customElements.get("maintenance-object-quick-actions-dialog")||customElements.define("maintenance-object-quick-actions-dialog",W)});var Q={};Qi(Q,{openCompleteDialog:()=>es,openCreateObjectDialog:()=>Qr,openCreateTaskDialog:()=>Zr,openEditObjectDialog:()=>Jr,openEditTaskDialog:()=>Xr,openHistoryEditDialog:()=>vt,openObjectQuickActions:()=>is,openQrDialog:()=>ts,openTaskQuickActions:()=>yt});function Qe(){return document.querySelector("home-assistant")?.hass}function Yr(){return document.querySelector("home-assistant")?.shadowRoot??document.body}function J(a){let r=Yr(),e=r.querySelector(a)??document.body.querySelector(a);return e?e.parentNode!==r&&r.appendChild(e):(e=document.createElement(a),r.appendChild(e)),e}function Z(a){let r=Qe();if(!r)return!1;a.hass=r;let e=j(r);return Re(e)||Ne(e).then(()=>{a.requestUpdate?.()}),!0}function Vi(a){return Ye||(Ye=a.connection.sendMessagePromise({type:"maintenance_supporter/settings"}).then(r=>({features:r.features??Ui.features,defaultWarningDays:r.general?.default_warning_days??7})).catch(()=>Ui),Ye)}function Qr(){let a=J(Bi);return Z(a)?(a.openCreate(),!0):!1}function Jr(a,r){let e=J(Bi);return Z(e)?(e.openEdit(a,r),!0):!1}function Zr(){let a=J(Wi);if(!Z(a))return!1;let r=Qe();return r?((async()=>{let e=await Vi(r),t=a;t.checklistsEnabled=e.features.checklists,t.scheduleTimeEnabled=e.features.schedule_time,t.completionActionsEnabled=e.features.completion_actions,t.defaultWarningDays=e.defaultWarningDays,t.openCreate()})(),!0):!1}function Xr(a,r){let e=J(Wi);if(!Z(e))return!1;let t=Qe();return t?((async()=>{try{let[i,n]=await Promise.all([t.connection.sendMessagePromise({type:"maintenance_supporter/object",entry_id:a}),Vi(t)]),o=(i.tasks||[]).find(c=>c.id===r);if(!o){console.warn(`openEditTaskDialog: task ${r} not found in entry ${a}`);return}let p=e;p.checklistsEnabled=n.features.checklists,p.scheduleTimeEnabled=n.features.schedule_time,p.completionActionsEnabled=n.features.completion_actions,p.defaultWarningDays=n.defaultWarningDays,await p.openEdit(a,o)}catch(i){console.warn("openEditTaskDialog: failed to load task/features",i)}})(),!0):!1}function vt(a){let r=J(Br);return Z(r)?(r.openEdit(a),!0):!1}function es(a){let r=J(Wr);return Z(r)?(r.entryId=a.entry_id,r.taskId=a.task_id,r.taskName=a.task_name,r.checklist=a.checklist??[],r.adaptiveEnabled=!!a.adaptive_enabled,r.requiredFields=a.required_completion_fields??[],r.lang=Qe()?.language||"en",r.open(),!0):!1}function ts(a){let r=J(Vr);return Z(r)?(r.openForTask(a.entry_id,a.task_id,a.object_name,a.task_name),!0):!1}function yt(a,r){let e=J(Kr);return Z(e)?(e.openFor(a,r),!0):!1}function is(a){let r=J(Gr);return Z(r)?(r.openFor(a),!0):!1}var Bi,Wi,Br,Wr,Vr,Kr,Gr,Ui,Ye,B=w(()=>{"use strict";gi();wi();$i();ki();Ti();Oi();Fi();R();Bi="maintenance-object-dialog",Wi="maintenance-task-dialog",Br="maintenance-history-edit-dialog",Wr="maintenance-complete-dialog",Vr="maintenance-qr-dialog",Kr="maintenance-task-quick-actions-dialog",Gr="maintenance-object-quick-actions-dialog";Ui={features:{adaptive:!1,predictions:!1,seasonal:!1,environmental:!1,budget:!1,groups:!1,checklists:!1,schedule_time:!1,completion_actions:!1},defaultWarningDays:7},Ye=null});P();U();var ur={days:1,weeks:7,months:30.4368,years:365.25};function Gt(a,r){return!a||a<=0?0:a*(ur[r||"days"]??1)}var Yt=5;function Te(a){let r=a.getFullYear(),e=String(a.getMonth()+1).padStart(2,"0"),t=String(a.getDate()).padStart(2,"0");return`${r}-${e}-${t}`}function _r(a,r){let e=[];for(let t=0;t<r;t++){let i=new Date(a);i.setDate(i.getDate()+t),i.setHours(0,0,0,0),e.push(Te(i))}return e}function Fe(a,r){let[e,t,i]=a.split("-").map(Number),n=new Date(e,t-1,i);return n.setDate(n.getDate()+r),Te(n)}function hr(a){if(!a||a.length===0)return null;let r=a.map(e=>e.cost).filter(e=>typeof e=="number");return r.length===0?null:r.reduce((e,t)=>e+t,0)/r.length}function gr(a){let{windowStart:r,windowEnd:e,task:t,entryId:i,objectName:n}=a,o=[],p=(m,y)=>({date:m,entry_id:i,task_id:t.id,task_name:t.name,object_name:n,status:y&&(t.status==="overdue"||t.status==="triggered")?"ok":t.status,days_until_due:y?null:t.days_until_due??null,projected:y,schedule_type:t.schedule_type,interval_days:t.interval_days??null,interval_unit:t.interval_unit??null,responsible_user_id:t.responsible_user_id??null,avg_cost:hr(t.history),adaptive_enabled:!!t.adaptive_config?.enabled,prediction_confidence:t.threshold_prediction_confidence??null}),c=Math.max(1,Math.round(Gt(t.interval_days,t.interval_unit)));if(t.status==="overdue"||t.status==="triggered"){if(o.push(p(r,!1)),t.schedule_type==="time_based"&&t.interval_days&&t.interval_days>0){let m=Fe(r,c),y=1;for(;m<=e&&y<Yt;)o.push(p(m,!0)),y++,m=Fe(m,c)}return o}let u=t.next_due;if(typeof u!="string"||!u)return o;let f=u.slice(0,10);if(f>=r&&f<=e)o.push(p(f,
Line truncated
|
||||||
.cal-controls {
|
.cal-controls {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
@@ -3985,22 +3954,22 @@ ${c?`<div class="sub">${c}</div>`:""}
|
|||||||
.cal-pill-day { font-size: 17px; }
|
.cal-pill-day { font-size: 17px; }
|
||||||
.cal-user-filter { margin-left: 0; width: 100%; }
|
.cal-user-filter { margin-left: 0; width: 100%; }
|
||||||
}
|
}
|
||||||
`;R();function ui(a){let r=window;r.customCards=r.customCards||[],r.customCards.some(e=>e.type===a.type)||r.customCards.push(a)}B();var q=class extends A{constructor(){super(...arguments);this._config={type:"custom:maintenance-supporter-calendar-card"};this._objects=[];this._stats=null;this._windowDays=30;this._pastDays=0;this._userFilter="";this._objectFilter="";this._configuredObjects=[];this._unsub=null;this._dataLoaded=!1;this._lastConnection=null}static getConfigElement(){return document.createElement("maintenance-supporter-calendar-card-editor")}static getStubConfig(){return{type:"custom:maintenance-supporter-calendar-card",window_days:30,show_window_chips:!0,show_user_filter:!0}}setConfig(e){if(this._config={...e},e.past_days&&[30,90].includes(e.past_days)?this._pastDays=e.past_days:e.window_days&&[7,14,30,365].includes(e.window_days)&&(this._windowDays=e.window_days,this._pastDays=0),typeof e.user_filter=="string"&&(this._userFilter=e.user_filter),typeof e.object_filter=="string")this._objectFilter=e.object_filter,this._configuredObjects=[];else if(Array.isArray(e.object_filter)){let t=e.object_filter.filter(i=>typeof i=="string"&&i!=="");this._objectFilter=t.length===1?t[0]:"",this._configuredObjects=t.length>1?t:[]}}getCardSize(){return 6}get _lang(){return H(this.hass)}disconnectedCallback(){if(super.disconnectedCallback(),this._unsub){try{this._unsub()}catch{}this._unsub=null}this._dataLoaded=!1,this._lastConnection=null}updated(e){super.updated(e),e.has("hass")&&ai(this.hass?.locale);let t=this.hass?.language;if(t&&!Re(t)&&je(t).then(()=>this.requestUpdate()),e.has("hass")&&this.hass){if(!this._dataLoaded)this._dataLoaded=!0,this._lastConnection=this.hass.connection,this._loadData(),this._subscribe();else if(this.hass.connection!==this._lastConnection){if(this._lastConnection=this.hass.connection,this._unsub){try{this._unsub()}catch{}this._unsub=null}this._subscribe(),this._loadData()}}}async _loadData(){try{let[e,t]=await Promise.all([this.hass.connection.sendMessagePromise({type:"maintenance_supporter/objects"}),this.hass.connection.sendMessagePromise({type:"maintenance_supporter/statistics"})]);this._objects=e.objects,this._stats=t}catch{}}async _subscribe(){try{let e=await this.hass.connection.subscribeMessage(t=>{let i=t;this._objects=i.objects},{type:"maintenance_supporter/subscribe"});if(!this.isConnected){e();return}this._unsub=e}catch{}}_onEventClick(e){if(e.history_timestamp){this._openHistoryEntry(e);return}yt(e.entry_id,e.task_id)||this.dispatchEvent(new CustomEvent("ll-custom",{detail:{type:"maintenance-supporter:open-task",entry_id:e.entry_id,task_id:e.task_id},bubbles:!0,composed:!0}))}async _openHistoryEntry(e){try{let i=(await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/object",entry_id:e.entry_id})).tasks?.find(o=>o.id===e.task_id)?.history?.find(o=>o.timestamp===e.history_timestamp);if(!i||vt({entry_id:e.entry_id,task_id:e.task_id,original_timestamp:e.history_timestamp,type:i.type||"completed",timestamp:i.timestamp||e.history_timestamp,notes:i.notes??null,cost:i.cost??null,duration:i.duration??null,completed_by:i.completed_by??null,used_parts:i.used_parts??null}))return}catch{}this.dispatchEvent(new CustomEvent("ll-custom",{detail:{type:"maintenance-supporter:edit-history",entry_id:e.entry_id,task_id:e.task_id,original_timestamp:e.history_timestamp},bubbles:!0,composed:!0}))}render(){if(!this.hass)return h;let e=this._lang,t=this._config.show_window_chips!==!1,i=this._config.show_user_filter!==!1,n=this._config.title,o=null;this._userFilter&&(o=this._userFilter==="current_user"?this.hass?.user?.id??null:this._userFilter);let p=v=>{let F=v.toLowerCase();return this._objects.find(I=>I.entry_id===v||I.object.name.toLowerCase()===F)?.entry_id??null},c=new Set(this._configuredObjects.map(p).filter(v=>v!==null)),_=c.size?this._objects.filter(v=>c.has(v.entry_id)):this._objects,f=this._config.show_object_filter!==!1&&_.length>1,m=this._objectFilter?p(this._objectFilter):null,y=m&&_.some(v=>v.entry_id===m)?_.filter(v=>v.entry_id===m):_,b=new Date;b.setHours(0,0,0,0);let k=this._pastDays>0,E=k?Zt(y,b,this._pastDays,o):Jt(y,b,this._windowDays,o),D=Te(b),V=this._windowDays===365||k,M=V?E.filter(v=>v.events.length>0):E,le=v=>{let F=`cal-status-${v.status}`,ce=v.projected?"cal-event-projected":"",I=v.status==="overdue"&&v.days_until_due!=null?` (${li(v.days_until_due,e)})`:"",L=v.projected&&v.interval_days?l`<span class="cal-event-recur">${v.interval_unit&&v.interval_unit!=="days"?`${v.interval_days} ${s("unit_"+v.interval_unit,e)}`:s("cal_every_n_days",e).replace("{n}",String(v.interval_days))}</span>`:h,te=v.schedule_type==="sensor_based",fe=te?l`<ha-icon class="cal-event-icon cal-source-sensor"
|
`;R();function hi(a){let r=window;r.customCards=r.customCards||[],r.customCards.some(e=>e.type===a.type)||r.customCards.push(a)}B();var q=class extends A{constructor(){super(...arguments);this._config={type:"custom:maintenance-supporter-calendar-card"};this._objects=[];this._stats=null;this._windowDays=30;this._pastDays=0;this._userFilter="";this._objectFilter="";this._configuredObjects=[];this._unsub=null;this._dataLoaded=!1;this._lastConnection=null}static getConfigElement(){return document.createElement("maintenance-supporter-calendar-card-editor")}static getStubConfig(){return{type:"custom:maintenance-supporter-calendar-card",window_days:30,show_window_chips:!0,show_user_filter:!0}}setConfig(e){if(this._config={...e},e.past_days&&[30,90].includes(e.past_days)?this._pastDays=e.past_days:e.window_days&&[7,14,30,365].includes(e.window_days)&&(this._windowDays=e.window_days,this._pastDays=0),typeof e.user_filter=="string"&&(this._userFilter=e.user_filter),typeof e.object_filter=="string")this._objectFilter=e.object_filter,this._configuredObjects=[];else if(Array.isArray(e.object_filter)){let t=e.object_filter.filter(i=>typeof i=="string"&&i!=="");this._objectFilter=t.length===1?t[0]:"",this._configuredObjects=t.length>1?t:[]}}getCardSize(){return 6}get _lang(){return j(this.hass)}disconnectedCallback(){if(super.disconnectedCallback(),this._unsub){try{this._unsub()}catch{}this._unsub=null}this._dataLoaded=!1,this._lastConnection=null}updated(e){if(super.updated(e),oi(this,e),e.has("hass")&&this.hass){if(!this._dataLoaded)this._dataLoaded=!0,this._lastConnection=this.hass.connection,this._loadData(),this._subscribe();else if(this.hass.connection!==this._lastConnection){if(this._lastConnection=this.hass.connection,this._unsub){try{this._unsub()}catch{}this._unsub=null}this._subscribe(),this._loadData()}}}async _loadData(){try{let[e,t]=await Promise.all([this.hass.connection.sendMessagePromise({type:"maintenance_supporter/objects"}),this.hass.connection.sendMessagePromise({type:"maintenance_supporter/statistics"})]);this._objects=e.objects,this._stats=t}catch{}}async _subscribe(){try{let e=await this.hass.connection.subscribeMessage(t=>{let i=t;this._objects=i.objects},{type:"maintenance_supporter/subscribe"});if(!this.isConnected){e();return}this._unsub=e}catch{}}_onEventClick(e){if(e.history_timestamp){this._openHistoryEntry(e);return}yt(e.entry_id,e.task_id)||this.dispatchEvent(new CustomEvent("ll-custom",{detail:{type:"maintenance-supporter:open-task",entry_id:e.entry_id,task_id:e.task_id},bubbles:!0,composed:!0}))}async _openHistoryEntry(e){try{let i=(await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/object",entry_id:e.entry_id})).tasks?.find(o=>o.id===e.task_id)?.history?.find(o=>o.timestamp===e.history_timestamp);if(!i||vt({entry_id:e.entry_id,task_id:e.task_id,original_timestamp:e.history_timestamp,type:i.type||"completed",timestamp:i.timestamp||e.history_timestamp,notes:i.notes??null,cost:i.cost??null,duration:i.duration??null,completed_by:i.completed_by??null,used_parts:i.used_parts??null}))return}catch{}this.dispatchEvent(new CustomEvent("ll-custom",{detail:{type:"maintenance-supporter:edit-history",entry_id:e.entry_id,task_id:e.task_id,original_timestamp:e.history_timestamp},bubbles:!0,composed:!0}))}render(){if(!this.hass)return h;let e=this._lang,t=this._config.show_window_chips!==!1,i=this._config.show_user_filter!==!1,n=this._config.title,o=null;this._userFilter&&(o=this._userFilter==="current_user"?this.hass?.user?.id??null:this._userFilter);let p=v=>{let F=v.toLowerCase();return this._objects.find(I=>I.entry_id===v||I.object.name.toLowerCase()===F)?.entry_id??null},c=new Set(this._configuredObjects.map(p).filter(v=>v!==null)),u=c.size?this._objects.filter(v=>c.has(v.entry_id)):this._objects,f=this._config.show_object_filter!==!1&&u.length>1,m=this._objectFilter?p(this._objectFilter):null,y=m&&u.some(v=>v.entry_id===m)?u.filter(v=>v.entry_id===m):u,b=new Date;b.setHours(0,0,0,0);let k=this._pastDays>0,E=k?Zt(y,b,this._pastDays,o):Jt(y,b,this._windowDays,o),D=Te(b),V=this._windowDays===365||k,M=V?E.filter(v=>v.events.length>0):E,le=v=>{let F=`cal-status-${v.status}`,ce=v.projected?"cal-event-projected":"",I=v.status==="overdue"&&v.days_until_due!=null?` (${ci(v.days_until_due,e)})`:"",L=v.projected&&v.interval_days?l`<span class="cal-event-recur">${v.interval_unit&&v.interval_unit!=="days"?`${v.interval_days} ${s("unit_"+v.interval_unit,e)}`:s("cal_every_n_days",e).replace("{n}",String(v.interval_days))}</span>`:h,te=v.schedule_type==="sensor_based",fe=te?l`<ha-icon class="cal-event-icon cal-source-sensor"
|
||||||
title="${s("cal_source_sensor",e)}" icon="mdi:trending-up"></ha-icon>`:l`<ha-icon class="cal-event-icon cal-source-time"
|
title="${s("cal_source_sensor",e)}" icon="mdi:trending-up"></ha-icon>`:l`<ha-icon class="cal-event-icon cal-source-time"
|
||||||
title="${v.adaptive_enabled?s("cal_source_time_adaptive",e):s("cal_source_time",e)}"
|
title="${v.adaptive_enabled?s("cal_source_time_adaptive",e):s("cal_source_time",e)}"
|
||||||
icon="${v.adaptive_enabled?"mdi:clock-time-four-outline":"mdi:clock-outline"}"></ha-icon>`,ve=te&&v.prediction_confidence&&v.status!=="triggered"&&!v.projected?l`<span class="cal-event-prediction cal-conf-${v.prediction_confidence}">
|
icon="${v.adaptive_enabled?"mdi:clock-time-four-outline":"mdi:clock-outline"}"></ha-icon>`,ve=te&&v.prediction_confidence&&v.status!=="triggered"&&!v.projected?l`<span class="cal-event-prediction cal-conf-${v.prediction_confidence}">
|
||||||
${s("cal_predicted",e)} · ${s(`cal_confidence_${v.prediction_confidence}`,e)}
|
${s("cal_predicted",e)} · ${s(`cal_confidence_${v.prediction_confidence}`,e)}
|
||||||
</span>`:h,Ui=this._stats?.budget?.currency_symbol||ri,Bi=v.history_type?s(v.history_type,e):s(v.status,e);return l`
|
</span>`:h,Ki=this._stats?.budget?.currency_symbol||ai,Gi=v.history_type?s(v.history_type,e):s(v.status,e);return l`
|
||||||
<div class="cal-event ${ce}"
|
<div class="cal-event ${ce}"
|
||||||
@click=${()=>this._onEventClick(v)}>
|
@click=${()=>this._onEventClick(v)}>
|
||||||
${fe}
|
${fe}
|
||||||
<span class="cal-status-pill ${F}">${Bi}</span>
|
<span class="cal-status-pill ${F}">${Gi}</span>
|
||||||
<div class="cal-event-body">
|
<div class="cal-event-body">
|
||||||
<div class="cal-event-title">${v.object_name} · ${v.task_name}${I}</div>
|
<div class="cal-event-title">${v.object_name} · ${v.task_name}${I}</div>
|
||||||
${ve}
|
${ve}
|
||||||
${L}
|
${L}
|
||||||
</div>
|
</div>
|
||||||
${v.avg_cost!=null&&v.avg_cost>0?l`<span class="cal-event-cost">${v.avg_cost.toFixed(0)} ${Ui}</span>`:h}
|
${v.avg_cost!=null&&v.avg_cost>0?l`<span class="cal-event-cost">${v.avg_cost.toFixed(0)} ${Ki}</span>`:h}
|
||||||
</div>
|
</div>
|
||||||
`},de=v=>{let[F,ce,I]=v.date.split("-").map(Number),L=new Date(F,ce-1,I),te=v.date===D,fe=L.toLocaleDateString(e,{weekday:"short"}),ve=L.toLocaleDateString(e,{month:"long"});return l`
|
`},de=v=>{let[F,ce,I]=v.date.split("-").map(Number),L=new Date(F,ce-1,I),te=v.date===D,fe=L.toLocaleDateString(e,{weekday:"short"}),ve=L.toLocaleDateString(e,{month:"long"});return l`
|
||||||
<div class="cal-day-row">
|
<div class="cal-day-row">
|
||||||
@@ -4052,7 +4021,7 @@ ${c?`<div class="sub">${c}</div>`:""}
|
|||||||
.value=${m??""}
|
.value=${m??""}
|
||||||
@change=${v=>{this._objectFilter=v.target.value}}>
|
@change=${v=>{this._objectFilter=v.target.value}}>
|
||||||
<option value="">${s("all_objects",e)}</option>
|
<option value="">${s("all_objects",e)}</option>
|
||||||
${[..._].sort((v,F)=>v.object.name.localeCompare(F.object.name)).map(v=>l`<option value=${v.entry_id} ?selected=${v.entry_id===m}>${v.object.name}</option>`)}
|
${[...u].sort((v,F)=>v.object.name.localeCompare(F.object.name)).map(v=>l`<option value=${v.entry_id} ?selected=${v.entry_id===m}>${v.object.name}</option>`)}
|
||||||
</select>
|
</select>
|
||||||
`:h}
|
`:h}
|
||||||
</div>
|
</div>
|
||||||
@@ -4064,7 +4033,7 @@ ${c?`<div class="sub">${c}</div>`:""}
|
|||||||
`}};q.styles=[Ve,Xt,S`
|
`}};q.styles=[Ve,Xt,S`
|
||||||
:host { display: block; }
|
:host { display: block; }
|
||||||
ha-card { padding: 0; overflow: hidden; }
|
ha-card { padding: 0; overflow: hidden; }
|
||||||
`],d([x({attribute:!1})],q.prototype,"hass",2),d([u()],q.prototype,"_config",2),d([u()],q.prototype,"_objects",2),d([u()],q.prototype,"_stats",2),d([u()],q.prototype,"_windowDays",2),d([u()],q.prototype,"_pastDays",2),d([u()],q.prototype,"_userFilter",2),d([u()],q.prototype,"_objectFilter",2),d([u()],q.prototype,"_unsub",2);var Jr=[{value:7,key:"cal_editor_window_week"},{value:14,key:"cal_editor_window_fortnight"},{value:30,key:"cal_editor_window_month"},{value:365,key:"cal_editor_window_year"}],me=class extends A{constructor(){super(...arguments);this._config={type:"custom:maintenance-supporter-calendar-card"}}get _lang(){return H(this.hass)}setConfig(e){this._config={...e}}updated(){let e=this._lang;e&&!Re(e)&&je(e).then(()=>this.requestUpdate())}_valueChanged(e,t){let i={...this._config,[e]:t};e==="show_window_chips"&&t===!0&&delete i.show_window_chips,e==="show_user_filter"&&t===!0&&delete i.show_user_filter,e==="show_object_filter"&&t===!0&&delete i.show_object_filter,e==="title"&&(!t||typeof t=="string"&&t.trim()==="")&&delete i.title,e==="user_filter"&&t===""&&delete i.user_filter,this._config=i,this.dispatchEvent(new CustomEvent("config-changed",{detail:{config:i},bubbles:!0,composed:!0}))}render(){let e=this._lang,t=this._config.window_days??30,i=this._config.show_window_chips!==!1,n=this._config.show_user_filter!==!1,o=this._config.user_filter??"",p=this._config.title??"";return l`
|
`],d([x({attribute:!1})],q.prototype,"hass",2),d([_()],q.prototype,"_config",2),d([_()],q.prototype,"_objects",2),d([_()],q.prototype,"_stats",2),d([_()],q.prototype,"_windowDays",2),d([_()],q.prototype,"_pastDays",2),d([_()],q.prototype,"_userFilter",2),d([_()],q.prototype,"_objectFilter",2),d([_()],q.prototype,"_unsub",2);var rs=[{value:7,key:"cal_editor_window_week"},{value:14,key:"cal_editor_window_fortnight"},{value:30,key:"cal_editor_window_month"},{value:365,key:"cal_editor_window_year"}],me=class extends A{constructor(){super(...arguments);this._config={type:"custom:maintenance-supporter-calendar-card"}}get _lang(){return j(this.hass)}setConfig(e){this._config={...e}}updated(){let e=this._lang;e&&!Re(e)&&Ne(e).then(()=>this.requestUpdate())}_valueChanged(e,t){let i={...this._config,[e]:t};e==="show_window_chips"&&t===!0&&delete i.show_window_chips,e==="show_user_filter"&&t===!0&&delete i.show_user_filter,e==="show_object_filter"&&t===!0&&delete i.show_object_filter,e==="title"&&(!t||typeof t=="string"&&t.trim()==="")&&delete i.title,e==="user_filter"&&t===""&&delete i.user_filter,this._config=i,this.dispatchEvent(new CustomEvent("config-changed",{detail:{config:i},bubbles:!0,composed:!0}))}render(){let e=this._lang,t=this._config.window_days??30,i=this._config.show_window_chips!==!1,n=this._config.show_user_filter!==!1,o=this._config.user_filter??"",p=this._config.title??"";return l`
|
||||||
<div class="editor">
|
<div class="editor">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<label for="title">${s("card_title",e)}</label>
|
<label for="title">${s("card_title",e)}</label>
|
||||||
@@ -4081,7 +4050,7 @@ ${c?`<div class="sub">${c}</div>`:""}
|
|||||||
id="window"
|
id="window"
|
||||||
@change=${c=>this._valueChanged("window_days",Number(c.target.value))}
|
@change=${c=>this._valueChanged("window_days",Number(c.target.value))}
|
||||||
>
|
>
|
||||||
${Jr.map(c=>l`<option value="${c.value}" ?selected=${c.value===t}>${s(c.key,e)}</option>`)}
|
${rs.map(c=>l`<option value="${c.value}" ?selected=${c.value===t}>${s(c.key,e)}</option>`)}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="row toggle">
|
<div class="row toggle">
|
||||||
@@ -4150,7 +4119,7 @@ ${c?`<div class="sub">${c}</div>`:""}
|
|||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: var(--secondary-text-color, #666);
|
color: var(--secondary-text-color, #666);
|
||||||
}
|
}
|
||||||
`,d([x({attribute:!1})],me.prototype,"hass",2),d([u()],me.prototype,"_config",2);customElements.get("maintenance-supporter-calendar-card")||customElements.define("maintenance-supporter-calendar-card",q);customElements.get("maintenance-supporter-calendar-card-editor")||customElements.define("maintenance-supporter-calendar-card-editor",me);ui({type:"maintenance-supporter-calendar-card",name:"Maintenance Supporter \u2014 Calendar",description:"Rolling calendar of maintenance tasks with 7/14/30/365 day windows, source icons, and prediction-confidence pills.",preview:!0});export{q as MaintenanceCalendarCard};
|
`,d([x({attribute:!1})],me.prototype,"hass",2),d([_()],me.prototype,"_config",2);customElements.get("maintenance-supporter-calendar-card")||customElements.define("maintenance-supporter-calendar-card",q);customElements.get("maintenance-supporter-calendar-card-editor")||customElements.define("maintenance-supporter-calendar-card-editor",me);hi({type:"maintenance-supporter-calendar-card",name:"Maintenance Supporter \u2014 Calendar",description:"Rolling calendar of maintenance tasks with 7/14/30/365 day windows, source icons, and prediction-confidence pills.",preview:!0});export{q as MaintenanceCalendarCard};
|
||||||
/*! Bundled license information:
|
/*! Bundled license information:
|
||||||
|
|
||||||
@lit/reactive-element/css-tag.js:
|
@lit/reactive-element/css-tag.js:
|
||||||
|
|||||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -1,2 +1,2 @@
|
|||||||
/*! maintenance_supporter frontend 2.61.0 */
|
/*! maintenance_supporter frontend 2.63.1 */
|
||||||
var S="2.61.0";var l="maintenance-supporter",T=`ll-strategy-dashboard-${l}`,D="hui-maintenance-supporter-strategy-editor",C=`/maintenance_supporter_strategy/maintenance-dashboard-strategy.js?v=${S}`,m=null;function v(){return m||(m=import(C)),m}async function I(){let r=await v();if(!r.MaintenanceDashboardStrategy)throw new Error("[maintenance-supporter] strategy bundle loaded but did not export MaintenanceDashboardStrategy");return r.MaintenanceDashboardStrategy}var p=class extends HTMLElement{static getCreateSuggestions(c){return{title:"Maintenance Supporter",icon:"mdi:wrench-clock"}}static async getConfigElement(){return await v(),document.createElement(D)}static async generate(c,f){return(await I()).generate(c,f)}};function M(){try{customElements.define(T,p)}catch{}}M();var w=window;w.customStrategies=w.customStrategies||[];w.customStrategies.some(r=>r.type===l&&r.strategyType==="dashboard")||w.customStrategies.push({type:l,strategyType:"dashboard",name:"Maintenance Supporter",description:"Auto-generated dashboard. Group views by area, status, floor, or due date \u2014 picked from the strategy editor or YAML.",documentationURL:"https://github.com/iluebbe/maintenance_supporter#dashboard-strategy"});(()=>{let r=window;if(r.__msStrategyHealActive)return;r.__msStrategyHealActive=!0;let c=/^\/(auth|config|developer-tools|profile|hassio|history|logbook|map|media-browser|energy|todo|calendar)\b/,f=/Timeout waiting for strategy element ll-strategy-(dashboard-)?maintenance-supporter/i,g=`custom:${l}`;function R(a){let t=[document.documentElement],n=0;for(;t.length&&n<9e3;){let o=t.pop();if(n++,!o)continue;let e=o;if(e.nodeType===1&&e.tagName&&e.tagName.toLowerCase()===a)return e;e.shadowRoot&&t.push(e.shadowRoot);let i=o.children;if(i)for(let d of Array.from(i))t.push(d)}return null}function k(a){let t=a?.views;if(!Array.isArray(t)||!t.length)return null;let n=window.location.pathname.split("/").filter(Boolean).pop()||"",o=t.find(i=>i?.path===n);if(o)return o;let e=Number(n);return Number.isInteger(e)&&t[e]?t[e]:t[0]}function b(){try{let t=R("ha-panel-lovelace")?.lovelace;if(!t)return!1;let n=o=>o?.type;for(let o of[t.config,t.rawConfig]){if(!o)continue;if(n(o.strategy)===g)return!0;let e=k(o);if(e&&n(e.strategy)===g)return!0}return!1}catch{return!1}}function A(){let a=!1,t=0,n=!1,o=!1,e=[document.documentElement],i=0;for(;e.length&&i<9e3;){let d=e.pop();if(i++,!d)continue;let u=d;if(u.nodeType===1&&u.tagName){let s=u.tagName.toLowerCase();(s==="hui-view"||s==="hui-sections-view")&&(a=!0),(s==="ha-card"||s==="hui-card")&&t++,s==="hui-empty-state-card"&&(o=!0),s==="hui-error-card"&&f.test(u.textContent||"")&&(n=!0)}u.shadowRoot&&e.push(u.shadowRoot);let E=d.children;if(E)for(let s of Array.from(E))e.push(s)}return n?!0:o?!1:a&&t<3&&b()}let N="/maintenance_supporter_strategy_shim.js",y=0,_=0;function L(){let a=Date.now();a-_<5e3||y>=3||(_=a,y+=1,import(`${N}?heal=${a}`).catch(()=>{}).finally(()=>{let t=window.location.pathname+window.location.search;history.pushState(null,"","/lovelace"),window.dispatchEvent(new CustomEvent("location-changed")),window.setTimeout(()=>{history.pushState(null,"",t),window.dispatchEvent(new CustomEvent("location-changed"))},200)}))}function h(){if(c.test(window.location.pathname))return;let a=0,t=Date.now(),n=window.setInterval(()=>{a++;try{if(Date.now()-t<6e3)return;if(c.test(window.location.pathname)){window.clearInterval(n);return}A()?L():window.clearInterval(n),a>=30&&window.clearInterval(n)}catch{window.clearInterval(n)}},500)}try{document.readyState==="loading"?window.addEventListener("DOMContentLoaded",h):h(),window.addEventListener("location-changed",()=>{c.test(window.location.pathname)||h()})}catch{}})();
|
var S="2.63.1";var l="maintenance-supporter",T=`ll-strategy-dashboard-${l}`,D="hui-maintenance-supporter-strategy-editor",C=`/maintenance_supporter_strategy/maintenance-dashboard-strategy.js?v=${S}`,m=null;function v(){return m||(m=import(C)),m}async function I(){let r=await v();if(!r.MaintenanceDashboardStrategy)throw new Error("[maintenance-supporter] strategy bundle loaded but did not export MaintenanceDashboardStrategy");return r.MaintenanceDashboardStrategy}var p=class extends HTMLElement{static getCreateSuggestions(c){return{title:"Maintenance Supporter",icon:"mdi:wrench-clock"}}static async getConfigElement(){return await v(),document.createElement(D)}static async generate(c,f){return(await I()).generate(c,f)}};function M(){try{customElements.define(T,p)}catch{}}M();var w=window;w.customStrategies=w.customStrategies||[];w.customStrategies.some(r=>r.type===l&&r.strategyType==="dashboard")||w.customStrategies.push({type:l,strategyType:"dashboard",name:"Maintenance Supporter",description:"Auto-generated dashboard. Group views by area, status, floor, or due date \u2014 picked from the strategy editor or YAML.",documentationURL:"https://github.com/iluebbe/maintenance_supporter#dashboard-strategy"});(()=>{let r=window;if(r.__msStrategyHealActive)return;r.__msStrategyHealActive=!0;let c=/^\/(auth|config|developer-tools|profile|hassio|history|logbook|map|media-browser|energy|todo|calendar)\b/,f=/Timeout waiting for strategy element ll-strategy-(dashboard-)?maintenance-supporter/i,g=`custom:${l}`;function R(a){let t=[document.documentElement],n=0;for(;t.length&&n<9e3;){let o=t.pop();if(n++,!o)continue;let e=o;if(e.nodeType===1&&e.tagName&&e.tagName.toLowerCase()===a)return e;e.shadowRoot&&t.push(e.shadowRoot);let i=o.children;if(i)for(let d of Array.from(i))t.push(d)}return null}function k(a){let t=a?.views;if(!Array.isArray(t)||!t.length)return null;let n=window.location.pathname.split("/").filter(Boolean).pop()||"",o=t.find(i=>i?.path===n);if(o)return o;let e=Number(n);return Number.isInteger(e)&&t[e]?t[e]:t[0]}function b(){try{let t=R("ha-panel-lovelace")?.lovelace;if(!t)return!1;let n=o=>o?.type;for(let o of[t.config,t.rawConfig]){if(!o)continue;if(n(o.strategy)===g)return!0;let e=k(o);if(e&&n(e.strategy)===g)return!0}return!1}catch{return!1}}function A(){let a=!1,t=0,n=!1,o=!1,e=[document.documentElement],i=0;for(;e.length&&i<9e3;){let d=e.pop();if(i++,!d)continue;let u=d;if(u.nodeType===1&&u.tagName){let s=u.tagName.toLowerCase();(s==="hui-view"||s==="hui-sections-view")&&(a=!0),(s==="ha-card"||s==="hui-card")&&t++,s==="hui-empty-state-card"&&(o=!0),s==="hui-error-card"&&f.test(u.textContent||"")&&(n=!0)}u.shadowRoot&&e.push(u.shadowRoot);let E=d.children;if(E)for(let s of Array.from(E))e.push(s)}return n?!0:o?!1:a&&t<3&&b()}let N="/maintenance_supporter_strategy_shim.js",y=0,_=0;function L(){let a=Date.now();a-_<5e3||y>=3||(_=a,y+=1,import(`${N}?heal=${a}`).catch(()=>{}).finally(()=>{let t=window.location.pathname+window.location.search;history.pushState(null,"","/lovelace"),window.dispatchEvent(new CustomEvent("location-changed")),window.setTimeout(()=>{history.pushState(null,"",t),window.dispatchEvent(new CustomEvent("location-changed"))},200)}))}function h(){if(c.test(window.location.pathname))return;let a=0,t=Date.now(),n=window.setInterval(()=>{a++;try{if(Date.now()-t<6e3)return;if(c.test(window.location.pathname)){window.clearInterval(n);return}A()?L():window.clearInterval(n),a>=30&&window.clearInterval(n)}catch{window.clearInterval(n)}},500)}try{document.readyState==="loading"?window.addEventListener("DOMContentLoaded",h):h(),window.addEventListener("location-changed",()=>{c.test(window.location.pathname)||h()})}catch{}})();
|
||||||
+51
-23
@@ -1,42 +1,42 @@
|
|||||||
/*! maintenance_supporter frontend 2.61.0 */
|
/*! maintenance_supporter frontend 2.63.1 */
|
||||||
import{a as m}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-TGQTH4TY.js";import{a as d}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-JPOJFRHB.js";import{a,b as _,c as t,f as l,g as h,i as g,j as n,n as i,o as v,q as u}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-4JER2GPD.js";var r=class extends h{constructor(){super(...arguments);this._open=!1;this._loading=!1;this._adopting=!1;this._error="";this._sensors=[];this._selected=new Set;this._users=[];this._responsible="";this._localeReady=!1;this._userService=null;this._toggle=s=>{let o=new Set(this._selected);o.has(s)?o.delete(s):o.add(s),this._selected=o};this._toggleAll=()=>{this._selected.size===this._sensors.length?this._selected=new Set:this._selected=new Set(this._sensors.map(s=>s.entity_id))};this._adopt=async()=>{if(!(this._selected.size===0||this._adopting)){this._adopting=!0,this._error="";try{let s=this._sensors.filter(e=>this._selected.has(e.entity_id)).map(e=>({entity_id:e.entity_id,name:e.name,entry_id:e.suggested_entry_id??void 0,object_name:e.suggested_object_name,device_id:e.device_id??void 0,part_id:e.suggested_part_id??void 0,responsible_user_id:this._responsible||void 0})),o=await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/problem_sensors/adopt",selections:s});this.dispatchEvent(new CustomEvent("problem-sensors-adopted",{bubbles:!0,composed:!0,detail:o})),this._open=!1}catch(s){this._error=d(s,this._lang)}finally{this._adopting=!1}}}}get _lang(){return v(this.hass)}updated(s){s.has("hass")&&this.hass&&!this._localeReady&&(this._localeReady=!0,u(this._lang).then(()=>this.requestUpdate()))}async open(){this._open=!0,this._loading=!0,this._error="",this._sensors=[],this._selected=new Set,this._responsible="";try{this._userService?this._userService.updateHass(this.hass):this._userService=new m(this.hass);let[s,o]=await Promise.all([this.hass.connection.sendMessagePromise({type:"maintenance_supporter/problem_sensors/discover"}),this._userService.getUsers().catch(()=>[])]);this._sensors=s.sensors||[],this._selected=new Set(this._sensors.map(e=>e.entity_id)),this._users=o}catch(s){this._error=d(s,this._lang)}finally{this._loading=!1}}_close(){this._open=!1}render(){if(!this._open)return t``;let s=this._lang,o=this._sensors.length>0&&this._selected.size===this._sensors.length;return t`
|
import{a as f}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-BBM5E3UT.js";import{a as p}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-OGUFLW7I.js";import{a as o,b as _,c as i,f as l,g as h,k as g,l as n,p as t,r as u,t as v}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-FS5TZIDQ.js";var r=class extends h{constructor(){super(...arguments);this._open=!1;this._loading=!1;this._adopting=!1;this._error="";this._sensors=[];this._selected=new Set;this._users=[];this._responsible="";this._forMinutes="0";this._localeReady=!1;this._userService=null;this._toggle=s=>{let a=new Set(this._selected);a.has(s)?a.delete(s):a.add(s),this._selected=a};this._toggleAll=()=>{this._selected.size===this._sensors.length?this._selected=new Set:this._selected=new Set(this._sensors.map(s=>s.entity_id))};this._adopt=async()=>{if(!(this._selected.size===0||this._adopting)){this._adopting=!0,this._error="";try{let s=this._sensors.filter(e=>this._selected.has(e.entity_id)).map(e=>({entity_id:e.entity_id,name:e.name,entry_id:e.suggested_entry_id??void 0,object_name:e.suggested_object_name,device_id:e.device_id??void 0,part_id:e.suggested_part_id??void 0,responsible_user_id:this._responsible||void 0,for_minutes:parseInt(this._forMinutes,10)>0?parseInt(this._forMinutes,10):void 0})),a=await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/problem_sensors/adopt",selections:s});this.dispatchEvent(new CustomEvent("problem-sensors-adopted",{bubbles:!0,composed:!0,detail:a})),this._open=!1}catch(s){this._error=p(s,this._lang)}finally{this._adopting=!1}}}}get _lang(){return u(this.hass)}updated(s){s.has("hass")&&this.hass&&!this._localeReady&&(this._localeReady=!0,v(this._lang).then(()=>this.requestUpdate()))}async open(){this._open=!0,this._loading=!0,this._error="",this._sensors=[],this._selected=new Set,this._responsible="",this._forMinutes="0";try{this._userService?this._userService.updateHass(this.hass):this._userService=new f(this.hass);let[s,a]=await Promise.all([this.hass.connection.sendMessagePromise({type:"maintenance_supporter/problem_sensors/discover"}),this._userService.getUsers().catch(()=>[])]);this._sensors=s.sensors||[],this._selected=new Set(this._sensors.map(e=>e.entity_id)),this._users=a}catch(s){this._error=p(s,this._lang)}finally{this._loading=!1}}_close(){this._open=!1}render(){if(!this._open)return i``;let s=this._lang,a=this._sensors.length>0&&this._selected.size===this._sensors.length;return i`
|
||||||
<div class="overlay" @click=${this._close}>
|
<div class="overlay" @click=${this._close}>
|
||||||
<div class="card" @click=${e=>e.stopPropagation()}>
|
<div class="card" @click=${e=>e.stopPropagation()}>
|
||||||
<div class="title">${i("adopt_problem_title",s)}</div>
|
<div class="title">${t("adopt_problem_title",s)}</div>
|
||||||
<div class="hint">${i("adopt_problem_hint",s)}</div>
|
<div class="hint">${t("adopt_problem_hint",s)}</div>
|
||||||
${this._error?t`<div class="error">${this._error}</div>`:l}
|
${this._error?i`<div class="error">${this._error}</div>`:l}
|
||||||
|
|
||||||
${this._loading?t`<div class="loading">…</div>`:this._sensors.length===0?t`<div class="empty">${i("adopt_problem_none",s)}</div>`:t`
|
${this._loading?i`<div class="loading">…</div>`:this._sensors.length===0?i`<div class="empty">${t("adopt_problem_none",s)}</div>`:i`
|
||||||
<label class="select-all">
|
<label class="select-all">
|
||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
.checked=${o}
|
.checked=${a}
|
||||||
@change=${this._toggleAll}
|
@change=${this._toggleAll}
|
||||||
/>
|
/>
|
||||||
<span>${i("selected",s)}: ${this._selected.size} / ${this._sensors.length}</span>
|
<span>${t("selected",s)}: ${this._selected.size} / ${this._sensors.length}</span>
|
||||||
</label>
|
</label>
|
||||||
<div class="list">
|
<div class="list">
|
||||||
${this._sensors.map(e=>{let f=this._selected.has(e.entity_id),p=e.state==="on",c=[e.device_name,e.area_name].filter(Boolean).join(" \xB7 ");return t`
|
${this._sensors.map(e=>{let m=this._selected.has(e.entity_id),d=e.state==="on",c=[e.device_name,e.area_name].filter(Boolean).join(" \xB7 ");return i`
|
||||||
<label class="row">
|
<label class="row">
|
||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
.checked=${f}
|
.checked=${m}
|
||||||
@change=${()=>this._toggle(e.entity_id)}
|
@change=${()=>this._toggle(e.entity_id)}
|
||||||
/>
|
/>
|
||||||
<div class="row-main">
|
<div class="row-main">
|
||||||
<div class="row-top">
|
<div class="row-top">
|
||||||
<span class="row-name">${e.name}</span>
|
<span class="row-name">${e.name}</span>
|
||||||
<span class="chip ${p?"chip-active":"chip-ok"}">
|
<span class="chip ${d?"chip-active":"chip-ok"}">
|
||||||
${p?i("adopt_problem_active",s):i("adopt_problem_ok",s)}
|
${d?t("adopt_problem_active",s):t("adopt_problem_ok",s)}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
${c?t`<div class="row-sub">${c}</div>`:l}
|
${c?i`<div class="row-sub">${c}</div>`:l}
|
||||||
<div class="row-target">
|
<div class="row-target">
|
||||||
→ ${e.suggested_object_name}${e.suggested_entry_id?l:t` <span class="new-tag">${i("adopt_problem_new_object",s)}</span>`}
|
→ ${e.suggested_object_name}${e.suggested_entry_id?l:i` <span class="new-tag">${t("adopt_problem_new_object",s)}</span>`}
|
||||||
</div>
|
</div>
|
||||||
${e.suggested_part_name?t`<div class="row-part">
|
${e.suggested_part_name?i`<div class="row-part">
|
||||||
<ha-icon icon="mdi:package-variant-closed"></ha-icon>
|
<ha-icon icon="mdi:package-variant-closed"></ha-icon>
|
||||||
${i("adopt_problem_part",s).replace("{name}",e.suggested_part_name)}
|
${t("adopt_problem_part",s).replace("{name}",e.suggested_part_name)}
|
||||||
</div>`:l}
|
</div>`:l}
|
||||||
</div>
|
</div>
|
||||||
</label>
|
</label>
|
||||||
@@ -44,28 +44,43 @@ import{a as m}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-TGQTH4TY
|
|||||||
</div>
|
</div>
|
||||||
`}
|
`}
|
||||||
|
|
||||||
${!this._loading&&this._sensors.length>0&&this._users.length>0?t`
|
${!this._loading&&this._sensors.length>0?i`
|
||||||
<label class="responsible">
|
<label class="responsible">
|
||||||
<span>${i("adopt_problem_responsible",s)}</span>
|
<span>${t("for_at_least_minutes",s)}</span>
|
||||||
|
<input
|
||||||
|
class="for-input"
|
||||||
|
type="number"
|
||||||
|
min="0"
|
||||||
|
max="1440"
|
||||||
|
.value=${this._forMinutes}
|
||||||
|
@input=${e=>this._forMinutes=e.target.value}
|
||||||
|
/>
|
||||||
|
</label>
|
||||||
|
<div class="for-hint">${t("adopt_for_minutes_hint",s)}</div>
|
||||||
|
`:l}
|
||||||
|
|
||||||
|
${!this._loading&&this._sensors.length>0&&this._users.length>0?i`
|
||||||
|
<label class="responsible">
|
||||||
|
<span>${t("adopt_problem_responsible",s)}</span>
|
||||||
<select
|
<select
|
||||||
.value=${this._responsible}
|
.value=${this._responsible}
|
||||||
@change=${e=>{this._responsible=e.target.value}}
|
@change=${e=>{this._responsible=e.target.value}}
|
||||||
>
|
>
|
||||||
<option value="" ?selected=${!this._responsible}>${i("no_user_assigned",s)}</option>
|
<option value="" ?selected=${!this._responsible}>${t("no_user_assigned",s)}</option>
|
||||||
${this._users.map(e=>t`<option value=${e.id} ?selected=${e.id===this._responsible}>${e.name}</option>`)}
|
${this._users.map(e=>i`<option value=${e.id} ?selected=${e.id===this._responsible}>${e.name}</option>`)}
|
||||||
</select>
|
</select>
|
||||||
</label>
|
</label>
|
||||||
`:l}
|
`:l}
|
||||||
|
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
<ha-button appearance="plain" @click=${this._close}>
|
<ha-button appearance="plain" @click=${this._close}>
|
||||||
${i("cancel",s)}
|
${t("cancel",s)}
|
||||||
</ha-button>
|
</ha-button>
|
||||||
<ha-button
|
<ha-button
|
||||||
@click=${this._adopt}
|
@click=${this._adopt}
|
||||||
.disabled=${this._selected.size===0||this._adopting}
|
.disabled=${this._selected.size===0||this._adopting}
|
||||||
>
|
>
|
||||||
${i("adopt_problem_adopt",s)}
|
${t("adopt_problem_adopt",s)}
|
||||||
</ha-button>
|
</ha-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -203,6 +218,19 @@ import{a as m}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-TGQTH4TY
|
|||||||
color: var(--secondary-text-color);
|
color: var(--secondary-text-color);
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
}
|
}
|
||||||
|
.for-input {
|
||||||
|
width: 70px;
|
||||||
|
background: var(--card-background-color);
|
||||||
|
color: var(--primary-text-color);
|
||||||
|
border: 1px solid var(--divider-color);
|
||||||
|
border-radius: 4px;
|
||||||
|
padding: 4px 6px;
|
||||||
|
}
|
||||||
|
.for-hint {
|
||||||
|
font-size: 11px;
|
||||||
|
color: var(--secondary-text-color);
|
||||||
|
margin: -4px 0 2px;
|
||||||
|
}
|
||||||
.responsible select {
|
.responsible select {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
min-width: 140px;
|
min-width: 140px;
|
||||||
@@ -219,4 +247,4 @@ import{a as m}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-TGQTH4TY
|
|||||||
gap: 8px;
|
gap: 8px;
|
||||||
padding-top: 8px;
|
padding-top: 8px;
|
||||||
}
|
}
|
||||||
`,a([g({attribute:!1})],r.prototype,"hass",2),a([n()],r.prototype,"_open",2),a([n()],r.prototype,"_loading",2),a([n()],r.prototype,"_adopting",2),a([n()],r.prototype,"_error",2),a([n()],r.prototype,"_sensors",2),a([n()],r.prototype,"_selected",2),a([n()],r.prototype,"_users",2),a([n()],r.prototype,"_responsible",2);customElements.get("maintenance-adopt-problem-sensors-dialog")||customElements.define("maintenance-adopt-problem-sensors-dialog",r);export{r as MaintenanceAdoptProblemSensorsDialog};
|
`,o([g({attribute:!1})],r.prototype,"hass",2),o([n()],r.prototype,"_open",2),o([n()],r.prototype,"_loading",2),o([n()],r.prototype,"_adopting",2),o([n()],r.prototype,"_error",2),o([n()],r.prototype,"_sensors",2),o([n()],r.prototype,"_selected",2),o([n()],r.prototype,"_users",2),o([n()],r.prototype,"_responsible",2),o([n()],r.prototype,"_forMinutes",2);customElements.get("maintenance-adopt-problem-sensors-dialog")||customElements.define("maintenance-adopt-problem-sensors-dialog",r);export{r as MaintenanceAdoptProblemSensorsDialog};
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
/*! maintenance_supporter frontend 2.61.0 */
|
|
||||||
function m(n,t,e){let o=new Blob([n],{type:e}),r=URL.createObjectURL(o),a=document.createElement("a");a.href=r,a.download=t,a.target="_blank",a.rel="noopener",a.style.display="none",document.body.appendChild(a),a.dispatchEvent(new MouseEvent("click")),document.body.removeChild(a),setTimeout(()=>URL.revokeObjectURL(r),6e4)}function i(n,t){let e=document.createElement("a");e.href=n,e.download=t,e.target="_blank",e.rel="noopener",e.style.display="none",document.body.appendChild(e),e.dispatchEvent(new MouseEvent("click")),document.body.removeChild(e)}async function c(n,t,e=300){return(await n.connection.sendMessagePromise({type:"auth/sign_path",path:t,expires:e})).path}async function s(n,t,e=300){return c(n,`/api/maintenance_supporter/document/${t}`,e)}async function b(n,t,e=""){let o=window.open("about:blank","_blank");try{let r=await s(n,t);o&&(o.location.href=new URL(r+e,window.location.origin).href)}catch(r){throw o&&o.close(),r}}async function g(n,t,e){i(await s(n,t,30),e)}var d=[{key:"name",labelKey:"name",required:!0},{key:"manufacturer",labelKey:"manufacturer"},{key:"model",labelKey:"model"},{key:"serial_number",labelKey:"serial_number_label"},{key:"installation_date",labelKey:"installed"},{key:"warranty_expiry",labelKey:"warranty"},{key:"area_id",labelKey:"area"},{key:"documentation_url",labelKey:"documentation_url_label"},{key:"notes",labelKey:"object_notes_label"},{key:"task_count",labelKey:"tasks"},{key:"actions",labelKey:"actions"}],u=d.map(n=>n.key),l=["name","manufacturer","model","serial_number","installation_date","warranty_expiry","area_id","task_count","actions"];function _(n){if(!Array.isArray(n))return[...l];let t=new Set,e=[];for(let o of n)typeof o=="string"&&u.includes(o)&&!t.has(o)&&(t.add(o),e.push(o));return e.length?(e.includes("name")||e.unshift("name"),e):[...l]}export{m as a,i as b,c,s as d,b as e,g as f,d as g,l as h,_ as i};
|
|
||||||
+1
-1
@@ -1,2 +1,2 @@
|
|||||||
/*! maintenance_supporter frontend 2.61.0 */
|
/*! maintenance_supporter frontend 2.63.1 */
|
||||||
var r=class{constructor(s){this.usersCache=null;this.cacheTimestamp=0;this.CACHE_TTL_MS=6e4;this.hass=s}updateHass(s){this.hass=s}async getUsers(s=!1){let e=Date.now();if(!s&&this.usersCache&&e-this.cacheTimestamp<this.CACHE_TTL_MS)return this.usersCache;try{let t=await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/users/list"});return this.usersCache=t.users,this.cacheTimestamp=e,this.usersCache}catch(t){return console.error("Failed to fetch users:",t),this.usersCache||[]}}async assignUser(s,e,t){await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/task/assign_user",entry_id:s,task_id:e,user_id:t})}async getTasksByUser(s){return(await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/tasks/by_user",user_id:s})).tasks}getUserName(s){return!s||!this.usersCache?null:this.usersCache.find(t=>t.id===s)?.name||null}getUser(s){return!s||!this.usersCache?null:this.usersCache.find(e=>e.id===s)||null}getCurrentUserId(){return this.hass.user?.id||null}isCurrentUser(s){return s?s===this.getCurrentUserId():!1}clearCache(){this.usersCache=null,this.cacheTimestamp=0}};export{r as a};
|
var r=class{constructor(s){this.usersCache=null;this.cacheTimestamp=0;this.CACHE_TTL_MS=6e4;this.hass=s}updateHass(s){this.hass=s}async getUsers(s=!1){let e=Date.now();if(!s&&this.usersCache&&e-this.cacheTimestamp<this.CACHE_TTL_MS)return this.usersCache;try{let t=await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/users/list"});return this.usersCache=t.users,this.cacheTimestamp=e,this.usersCache}catch(t){return console.error("Failed to fetch users:",t),this.usersCache||[]}}async assignUser(s,e,t){await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/task/assign_user",entry_id:s,task_id:e,user_id:t})}async getTasksByUser(s){return(await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/tasks/by_user",user_id:s})).tasks}getUserName(s){return!s||!this.usersCache?null:this.usersCache.find(t=>t.id===s)?.name||null}getUser(s){return!s||!this.usersCache?null:this.usersCache.find(e=>e.id===s)||null}getCurrentUserId(){return this.hass.user?.id||null}isCurrentUser(s){return s?s===this.getCurrentUserId():!1}clearCache(){this.usersCache=null,this.cacheTimestamp=0}};export{r as a};
|
||||||
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
/*! maintenance_supporter frontend 2.61.0 */
|
/*! maintenance_supporter frontend 2.63.1 */
|
||||||
import{a as _,e as k}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-4Q4MHZO7.js";import{a as g}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-JPOJFRHB.js";import{a as s,b,c as a,f as d,g as v,i as n,j as l,n as r,z as m}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-4JER2GPD.js";var i=class extends v{constructor(){super(...arguments);this.entryId="";this.taskId="";this.taskName="";this.lang="en";this.checklist=[];this.adaptiveEnabled=!1;this.taskType="";this.readingUnit="";this.restockDefault=null;this.restockUnitCost=null;this.currencySymbol="";this.parts=[];this.consumesParts=[];this.consumesInfo=[];this.requiredFields=[];this._open=!1;this._notes="";this._cost="";this._duration="";this._loading=!1;this._error="";this._checklistState={};this._feedback="needed";this._photoDocId="";this._photoPreview="";this._photoUploading=!1;this._readingValue="";this._restockQty="";this._completedAt="";this._usedParts={};this.checklistPrefill={}}open(){this._open||(this._open=!0,this._notes="",this._cost="",this._duration="",this._error="",this._checklistState=Object.fromEntries(this.checklist.map((e,t)=>[String(t),!!this.checklistPrefill[e]]).filter(([,e])=>e)),this._feedback="needed",this._photoDocId="",this._photoPreview="",this._photoUploading=!1,this._readingValue="",this._restockQty=this.restockDefault!==null?String(this.restockDefault):"",this._completedAt="",this._usedParts=Object.fromEntries(this.consumesParts.map(e=>[_(e),{...e}])))}_toggleCheck(e){let t=String(e);this._checklistState={...this._checklistState,[t]:!this._checklistState[t]}}_setFeedback(e){this._feedback=e}async _onPhotoInput(e){let t=e.target,o=t.files?.[0];if(t.value="",!!o){this._photoUploading=!0,this._error="";try{let c=new FormData;c.append("entry_id",this.entryId),c.append("tags","photo"),c.append("file",o,o.name);let p=await fetch("/api/maintenance_supporter/document/upload",{method:"POST",headers:{Authorization:`Bearer ${this.hass.auth?.data?.access_token??""}`},body:c});if(!p.ok){this._error=p.status===413?r("doc_too_large",this.lang):r("doc_upload_failed",this.lang);return}let u=await p.json();u.id&&(this._photoDocId=u.id,this._photoPreview=URL.createObjectURL(o))}catch{this._error=r("doc_upload_failed",this.lang)}finally{this._photoUploading=!1}}}_removePhoto(){this._photoPreview&&URL.revokeObjectURL(this._photoPreview),this._photoDocId="",this._photoPreview=""}async _complete(){this._loading=!0,this._error="";try{let e={type:"maintenance_supporter/task/complete",entry_id:this.entryId,task_id:this.taskId};if(this._notes&&(e.notes=this._notes),this._cost){let t=parseFloat(this._cost);!isNaN(t)&&t>=0&&(e.cost=t)}if(this._duration){let t=parseInt(this._duration,10);!isNaN(t)&&t>=0&&(e.duration=t)}if(this.checklist.length>0&&(e.checklist_state=this._checklistState),this.adaptiveEnabled&&(e.feedback=this._feedback),this._photoDocId&&(e.photo_doc_id=this._photoDocId),this._completedAt){if(new Date(this._completedAt).getTime()>Date.now()){this._error=r("completed_at_future_error",this.lang),this._loading=!1;return}e.completed_at=this._completedAt.length===16?`${this._completedAt}:00`:this._completedAt}if(this._readingValue!==""){let t=parseFloat(this._readingValue);isNaN(t)||(e.reading_value=t)}if(this.restockDefault!==null&&this._restockQty!==""){let t=parseFloat(this._restockQty);!isNaN(t)&&t>=1&&(e.restock_quantity=t)}this.parts.length>0&&(e.used_parts=Object.values(this._usedParts).filter(t=>Number.isFinite(t.quantity)&&t.quantity>0).map(t=>t.entry_id?{part_id:t.part_id,quantity:t.quantity,entry_id:t.entry_id}:{part_id:t.part_id,quantity:t.quantity})),await this.hass.connection.sendMessagePromise(e),this._open=!1,this.dispatchEvent(new CustomEvent("task-completed"))}catch(e){this._error=g(e,this.lang,r("save_error",this.lang))}finally{this._loading=!1}}get _missingRequired(){let e={notes:this._notes.trim()!=="",cost:this._cost.trim()!=="",duration:this._duration.trim()!=="",photo:this._photoDocId!=="",user:!!this.hass?.user};return this.requiredFields.filter(t=>!e[t])}_req(e){return this.requiredFields.includes(e)?a`<span class="req-mark" aria-hidden="true">*</span>`:d}_partsCostSuggestion(){if(this.restockDefault!==null){let o=parseFloat(this._restockQty);return this.restockUnitCost==null||!Number.isFinite(o)||o<=0?null:Math.round(this.restockUnitCost*o*100)/100}if(!this.parts.length)return null;let e=0,t=!1;for(let o of Object.values(this._usedParts)){let c=this.parts.find(p=>_({part_id:p.id,entry_id:p.entry_id})===_(o));c?.cost!=null&&(e+=c.cost*(o.quantity||1),t=!0)}return t?Math.round(e*100)/100:null}_renderCostSuggestion(e){if(this._cost.trim()!=="")return d;let t=this._partsCostSuggestion();if(t==null||t<=0)return d;let o=`${t.toFixed(2)}${this.currencySymbol?` ${this.currencySymbol}`:""}`;return a`<button
|
import{a as _,e as k}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-VIX7PNOY.js";import{a as g}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-OGUFLW7I.js";import{B as m,a as s,b,c as a,f as d,g as v,k as n,l,p as r}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-FS5TZIDQ.js";var i=class extends v{constructor(){super(...arguments);this.entryId="";this.taskId="";this.taskName="";this.lang="en";this.checklist=[];this.adaptiveEnabled=!1;this.taskType="";this.readingUnit="";this.restockDefault=null;this.restockUnitCost=null;this.currencySymbol="";this.parts=[];this.consumesParts=[];this.consumesInfo=[];this.requiredFields=[];this._open=!1;this._notes="";this._cost="";this._duration="";this._loading=!1;this._error="";this._checklistState={};this._feedback="needed";this._photoDocId="";this._photoPreview="";this._photoUploading=!1;this._readingValue="";this._restockQty="";this._completedAt="";this._usedParts={};this.checklistPrefill={}}open(){this._open||(this._open=!0,this._notes="",this._cost="",this._duration="",this._error="",this._checklistState=Object.fromEntries(this.checklist.map((e,t)=>[String(t),!!this.checklistPrefill[e]]).filter(([,e])=>e)),this._feedback="needed",this._photoDocId="",this._photoPreview="",this._photoUploading=!1,this._readingValue="",this._restockQty=this.restockDefault!==null?String(this.restockDefault):"",this._completedAt="",this._usedParts=Object.fromEntries(this.consumesParts.map(e=>[_(e),{...e}])))}_toggleCheck(e){let t=String(e);this._checklistState={...this._checklistState,[t]:!this._checklistState[t]}}_setFeedback(e){this._feedback=e}async _onPhotoInput(e){let t=e.target,o=t.files?.[0];if(t.value="",!!o){this._photoUploading=!0,this._error="";try{let c=new FormData;c.append("entry_id",this.entryId),c.append("tags","photo"),c.append("file",o,o.name);let p=await fetch("/api/maintenance_supporter/document/upload",{method:"POST",headers:{Authorization:`Bearer ${this.hass.auth?.data?.access_token??""}`},body:c});if(!p.ok){this._error=p.status===413?r("doc_too_large",this.lang):r("doc_upload_failed",this.lang);return}let u=await p.json();u.id&&(this._photoDocId=u.id,this._photoPreview=URL.createObjectURL(o))}catch{this._error=r("doc_upload_failed",this.lang)}finally{this._photoUploading=!1}}}_removePhoto(){this._photoPreview&&URL.revokeObjectURL(this._photoPreview),this._photoDocId="",this._photoPreview=""}async _complete(){this._loading=!0,this._error="";try{let e={type:"maintenance_supporter/task/complete",entry_id:this.entryId,task_id:this.taskId};if(this._notes&&(e.notes=this._notes),this._cost){let t=parseFloat(this._cost);!isNaN(t)&&t>=0&&(e.cost=t)}if(this._duration){let t=parseInt(this._duration,10);!isNaN(t)&&t>=0&&(e.duration=t)}if(this.checklist.length>0&&(e.checklist_state=this._checklistState),this.adaptiveEnabled&&(e.feedback=this._feedback),this._photoDocId&&(e.photo_doc_id=this._photoDocId),this._completedAt){if(new Date(this._completedAt).getTime()>Date.now()){this._error=r("completed_at_future_error",this.lang),this._loading=!1;return}e.completed_at=this._completedAt.length===16?`${this._completedAt}:00`:this._completedAt}if(this._readingValue!==""){let t=parseFloat(this._readingValue);isNaN(t)||(e.reading_value=t)}if(this.restockDefault!==null&&this._restockQty!==""){let t=parseFloat(this._restockQty);!isNaN(t)&&t>=1&&(e.restock_quantity=t)}this.parts.length>0&&(e.used_parts=Object.values(this._usedParts).filter(t=>Number.isFinite(t.quantity)&&t.quantity>0).map(t=>t.entry_id?{part_id:t.part_id,quantity:t.quantity,entry_id:t.entry_id}:{part_id:t.part_id,quantity:t.quantity})),await this.hass.connection.sendMessagePromise(e),this._open=!1,this.dispatchEvent(new CustomEvent("task-completed"))}catch(e){this._error=g(e,this.lang,r("save_error",this.lang))}finally{this._loading=!1}}get _missingRequired(){let e={notes:this._notes.trim()!=="",cost:this._cost.trim()!=="",duration:this._duration.trim()!=="",photo:this._photoDocId!=="",user:!!this.hass?.user};return this.requiredFields.filter(t=>!e[t])}_req(e){return this.requiredFields.includes(e)?a`<span class="req-mark" aria-hidden="true">*</span>`:d}_partsCostSuggestion(){if(this.restockDefault!==null){let o=parseFloat(this._restockQty);return this.restockUnitCost==null||!Number.isFinite(o)||o<=0?null:Math.round(this.restockUnitCost*o*100)/100}if(!this.parts.length)return null;let e=0,t=!1;for(let o of Object.values(this._usedParts)){let c=this.parts.find(p=>_({part_id:p.id,entry_id:p.entry_id})===_(o));c?.cost!=null&&(e+=c.cost*(o.quantity||1),t=!0)}return t?Math.round(e*100)/100:null}_renderCostSuggestion(e){if(this._cost.trim()!=="")return d;let t=this._partsCostSuggestion();if(t==null||t<=0)return d;let o=`${t.toFixed(2)}${this.currencySymbol?` ${this.currencySymbol}`:""}`;return a`<button
|
||||||
type="button"
|
type="button"
|
||||||
class="cost-suggestion"
|
class="cost-suggestion"
|
||||||
@click=${()=>this._cost=t.toFixed(2)}
|
@click=${()=>this._cost=t.toFixed(2)}
|
||||||
+10
-49
@@ -1,9 +1,9 @@
|
|||||||
/*! maintenance_supporter frontend 2.61.0 */
|
/*! maintenance_supporter frontend 2.63.1 */
|
||||||
var Te=Object.defineProperty;var je=Object.getOwnPropertyDescriptor;var Xe=(o,e,t,r)=>{for(var a=r>1?void 0:r?je(e,t):e,i=o.length-1,n;i>=0;i--)(n=o[i])&&(a=(r?n(e,t,a):n(a))||a);return r&&a&&Te(e,t,a),a};var L=globalThis,M=L.ShadowRoot&&(L.ShadyCSS===void 0||L.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,G=Symbol(),ie=new WeakMap,$=class{constructor(e,t,r){if(this._$cssResult$=!0,r!==G)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(M&&e===void 0){let r=t!==void 0&&t.length===1;r&&(e=ie.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&ie.set(t,e))}return e}toString(){return this.cssText}},ne=o=>new $(typeof o=="string"?o:o+"",void 0,G),U=(o,...e)=>{let t=o.length===1?o[0]:e.reduce((r,a,i)=>r+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(a)+o[i+1],o[0]);return new $(t,o,G)},se=(o,e)=>{if(M)o.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(let t of e){let r=document.createElement("style"),a=L.litNonce;a!==void 0&&r.setAttribute("nonce",a),r.textContent=t.cssText,o.appendChild(r)}},V=M?o=>o:o=>o instanceof CSSStyleSheet?(e=>{let t="";for(let r of e.cssRules)t+=r.cssText;return ne(t)})(o):o;var{is:Ne,defineProperty:Pe,getOwnPropertyDescriptor:Re,getOwnPropertyNames:Oe,getOwnPropertySymbols:ze,getPrototypeOf:De}=Object,q=globalThis,le=q.trustedTypes,Le=le?le.emptyScript:"",Me=q.reactiveElementPolyfillSupport,C=(o,e)=>o,E={toAttribute(o,e){switch(e){case Boolean:o=o?Le:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,e){let t=o;switch(e){case Boolean:t=o!==null;break;case Number:t=o===null?null:Number(o);break;case Object:case Array:try{t=JSON.parse(o)}catch{t=null}}return t}},H=(o,e)=>!Ne(o,e),ce={attribute:!0,type:String,converter:E,reflect:!1,useDefault:!1,hasChanged:H};Symbol.metadata??=Symbol("metadata"),q.litPropertyMetadata??=new WeakMap;var g=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=ce){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let r=Symbol(),a=this.getPropertyDescriptor(e,r,t);a!==void 0&&Pe(this.prototype,e,a)}}static getPropertyDescriptor(e,t,r){let{get:a,set:i}=Re(this.prototype,e)??{get(){return this[t]},set(n){this[t]=n}};return{get:a,set(n){let l=a?.call(this);i?.call(this,n),this.requestUpdate(e,l,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??ce}static _$Ei(){if(this.hasOwnProperty(C("elementProperties")))return;let e=De(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(C("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(C("properties"))){let t=this.properties,r=[...Oe(t),...ze(t)];for(let a of r)this.createProperty(a,t[a])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[r,a]of t)this.elementProperties.set(r,a)}this._$Eh=new Map;for(let[t,r]of this.elementProperties){let a=this._$Eu(t,r);a!==void 0&&this._$Eh.set(a,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let r=new Set(e.flat(1/0).reverse());for(let a of r)t.unshift(V(a))}else e!==void 0&&t.push(V(e));return t}static _$Eu(e,t){let r=t.attribute;return r===!1?void 0:typeof r=="string"?r:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let r of t.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return se(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$ET(e,t){let r=this.constructor.elementProperties.get(e),a=Line truncated
|
var Ne=Object.defineProperty;var je=Object.getOwnPropertyDescriptor;var at=(o,e,t,r)=>{for(var a=r>1?void 0:r?je(e,t):e,i=o.length-1,n;i>=0;i--)(n=o[i])&&(a=(r?n(e,t,a):n(a))||a);return r&&a&&Ne(e,t,a),a};var L=globalThis,M=L.ShadowRoot&&(L.ShadyCSS===void 0||L.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,V=Symbol(),ne=new WeakMap,$=class{constructor(e,t,r){if(this._$cssResult$=!0,r!==V)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(M&&e===void 0){let r=t!==void 0&&t.length===1;r&&(e=ne.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&ne.set(t,e))}return e}toString(){return this.cssText}},se=o=>new $(typeof o=="string"?o:o+"",void 0,V),U=(o,...e)=>{let t=o.length===1?o[0]:e.reduce((r,a,i)=>r+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(a)+o[i+1],o[0]);return new $(t,o,V)},le=(o,e)=>{if(M)o.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(let t of e){let r=document.createElement("style"),a=L.litNonce;a!==void 0&&r.setAttribute("nonce",a),r.textContent=t.cssText,o.appendChild(r)}},G=M?o=>o:o=>o instanceof CSSStyleSheet?(e=>{let t="";for(let r of e.cssRules)t+=r.cssText;return se(t)})(o):o;var{is:Pe,defineProperty:Re,getOwnPropertyDescriptor:Oe,getOwnPropertyNames:De,getOwnPropertySymbols:ze,getPrototypeOf:Le}=Object,q=globalThis,ce=q.trustedTypes,Me=ce?ce.emptyScript:"",Ue=q.reactiveElementPolyfillSupport,E=(o,e)=>o,C={toAttribute(o,e){switch(e){case Boolean:o=o?Me:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,e){let t=o;switch(e){case Boolean:t=o!==null;break;case Number:t=o===null?null:Number(o);break;case Object:case Array:try{t=JSON.parse(o)}catch{t=null}}return t}},I=(o,e)=>!Pe(o,e),de={attribute:!0,type:String,converter:C,reflect:!1,useDefault:!1,hasChanged:I};Symbol.metadata??=Symbol("metadata"),q.litPropertyMetadata??=new WeakMap;var g=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=de){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let r=Symbol(),a=this.getPropertyDescriptor(e,r,t);a!==void 0&&Re(this.prototype,e,a)}}static getPropertyDescriptor(e,t,r){let{get:a,set:i}=Oe(this.prototype,e)??{get(){return this[t]},set(n){this[t]=n}};return{get:a,set(n){let l=a?.call(this);i?.call(this,n),this.requestUpdate(e,l,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??de}static _$Ei(){if(this.hasOwnProperty(E("elementProperties")))return;let e=Le(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(E("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(E("properties"))){let t=this.properties,r=[...De(t),...ze(t)];for(let a of r)this.createProperty(a,t[a])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[r,a]of t)this.elementProperties.set(r,a)}this._$Eh=new Map;for(let[t,r]of this.elementProperties){let a=this._$Eu(t,r);a!==void 0&&this._$Eh.set(a,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let r=new Set(e.flat(1/0).reverse());for(let a of r)t.unshift(G(a))}else e!==void 0&&t.push(G(e));return t}static _$Eu(e,t){let r=t.attribute;return r===!1?void 0:typeof r=="string"?r:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let r of t.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return le(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$ET(e,t){let r=this.constructor.elementProperties.get(e),a=Line truncated
|
||||||
\f\r]`,T=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_e=/-->/g,ue=/>/g,b=RegExp(`>|${K}(?:([^\\s"'>=/]+)(${K}*=${K}*(?:[^
|
\f\r]`,T=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ue=/-->/g,he=/>/g,b=RegExp(`>|${K}(?:([^\\s"'>=/]+)(${K}*=${K}*(?:[^
|
||||||
\f\r"'\`<>=]|("|')|))|$)`,"g"),he=/'/g,ge=/"/g,ye=/^(?:script|style|textarea|title)$/i,oe=o=>(e,...t)=>({_$litType$:o,strings:e,values:t}),it=oe(1),nt=oe(2),st=oe(3),x=Symbol.for("lit-noChange"),p=Symbol.for("lit-nothing"),me=new WeakMap,y=v.createTreeWalker(v,129);function ve(o,e){if(!te(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return pe!==void 0?pe.createHTML(e):e}var He=(o,e)=>{let t=o.length-1,r=[],a,i=e===2?"<svg>":e===3?"<math>":"",n=T;for(let l=0;l<t;l++){let s=o[l],d,_,c=-1,h=0;for(;h<s.length&&(n.lastIndex=h,_=n.exec(s),_!==null);)h=n.lastIndex,n===T?_[1]==="!--"?n=_e:_[1]!==void 0?n=ue:_[2]!==void 0?(ye.test(_[2])&&(a=RegExp("</"+_[2],"g")),n=b):_[3]!==void 0&&(n=b):n===b?_[0]===">"?(n=a??T,c=-1):_[1]===void 0?c=-2:(c=n.lastIndex-_[2].length,d=_[1],n=_[3]===void 0?b:_[3]==='"'?ge:he):n===ge||n===he?n=b:n===_e||n===ue?n=T:(n=b,a=void 0);let m=n===b&&o[l+1].startsWith("/>")?" ":"";i+=n===T?s+Ue:c>=0?(r.push(d),s.slice(0,c)+fe+s.slice(c)+f+m):s+f+(c===-2?l:m)}return[ve(o,i+(o[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),r]},P=class o{constructor({strings:e,_$litType$:t},r){let a;this.parts=[];let i=0,n=0,l=e.length-1,s=this.parts,[d,_]=He(e,t);if(this.el=o.createElement(d,r),y.currentNode=this.el.content,t===2||t===3){let c=this.el.content.firstChild;c.replaceWith(...c.childNodes)}for(;(a=y.nextNode())!==null&&s.length<l;){if(a.nodeType===1){if(a.hasAttributes())for(let c of a.getAttributeNames())if(c.endsWith(fe)){let h=_[n++],m=a.getAttribute(c).split(f),D=/([.?@])?(.*)/.exec(h);s.push({type:1,index:i,name:D[2],strings:m,ctor:D[1]==="."?Y:D[1]==="?"?J:D[1]==="@"?Z:S}),a.removeAttribute(c)}else c.startsWith(f)&&(s.push({type:6,index:i}),a.removeAttribute(c));if(ye.test(a.tagName)){let c=a.textContent.split(f),h=c.length-1;if(h>0){a.textContent=I?I.emptyScript:"";for(let m=0;m<h;m++)a.append(c[m],j()),y.nextNode(),s.push({type:2,index:++i});a.append(c[h],j())}}}else if(a.nodeType===8)if(a.data===be)s.push({type:2,index:i});else{let c=-1;for(;(c=a.data.indexOf(f,c+1))!==-1;)s.push({type:7,index:i}),c+=f.length-1}i++}}static createElement(e,t){let r=v.createElement("template");return r.innerHTML=e,r}};function k(o,e,t=o,r){if(e===x)return e;let a=r!==void 0?t._$Co?.[r]:t._$Cl,i=N(e)?void 0:e._$litDirective$;return a?.constructor!==i&&(a?._$AO?.(!1),i===void 0?a=void 0:(a=new i(o),a._$AT(o,t,r)),r!==void 0?(t._$Co??=[])[r]=a:t._$Cl=a),a!==void 0&&(e=k(o,a._$AS(o,e.values),a,r)),e}var Q=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:r}=this._$AD,a=(e?.creationScope??v).importNode(t,!0);y.currentNode=a;let i=y.nextNode(),n=0,l=0,s=r[0];for(;s!==void 0;){if(n===s.index){let d;s.type===2?d=new R(i,i.nextSibling,this,e):s.type===1?d=new s.ctor(i,s.name,s.strings,this,e):s.type===6&&(d=new X(i,this,e)),this._$AV.push(d),s=r[++l]}n!==s?.index&&(i=y.nextNode(),n++)}return y.currentNode=v,a}p(e){let t=0;for(let r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(e,r,t),t+=r.strings.length-2):r._$AI(e[t])),t++}},R=class o{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,r,a){this.type=2,this._$AH=p,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=r,this.options=a,this._$Cv=a?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=k(this,e,t),N(e)?e===p||e==null||e===""?(this._$AH!==p&&this._$AR(),this._$AH=p):e!==this._$AH&&e!==x&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):qe(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==p&&N(this._$AH)?this._$AA.nextSibling.data=e:this.T(v.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:r}=e,a=typeof r=="number"?this._$AC(e):(r.el===void 0&&(r.el=P.createElement(ve(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===a)this._$AH.p(t);else{let i=new Q(a,this),n=i.u(this.options);i.p(t),this.T(n),this._$AH=i}}_$AC(e){let t=me.get(e.strings);return t===void 0&&me.set(e.strings,t=new P(e)),t}k(e){te(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,r,a=0;for(let i of e)a===t.length?t.push(r=new o(this.O(j()),this.O(j()),this,this.options)):r=t[a],r._$AI(i),a++;a<t.length&&(this._$AR(r&&r._$AB.nextSibling,a),t.length=a)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let r=de(e).nextSibling;de(e).remove(),e=r}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},S=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,r,a,i){this.type=1,this._$AH=p,this._$AN=void 0,this.element=e,this.name=t,this._$AM=a,this.options=i,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):thisLine truncated
|
\f\r"'\`<>=]|("|')|))|$)`,"g"),ge=/'/g,me=/"/g,ve=/^(?:script|style|textarea|title)$/i,oe=o=>(e,...t)=>({_$litType$:o,strings:e,values:t}),dt=oe(1),pt=oe(2),_t=oe(3),x=Symbol.for("lit-noChange"),p=Symbol.for("lit-nothing"),fe=new WeakMap,y=v.createTreeWalker(v,129);function xe(o,e){if(!te(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return _e!==void 0?_e.createHTML(e):e}var He=(o,e)=>{let t=o.length-1,r=[],a,i=e===2?"<svg>":e===3?"<math>":"",n=T;for(let l=0;l<t;l++){let s=o[l],d,_,c=-1,h=0;for(;h<s.length&&(n.lastIndex=h,_=n.exec(s),_!==null);)h=n.lastIndex,n===T?_[1]==="!--"?n=ue:_[1]!==void 0?n=he:_[2]!==void 0?(ve.test(_[2])&&(a=RegExp("</"+_[2],"g")),n=b):_[3]!==void 0&&(n=b):n===b?_[0]===">"?(n=a??T,c=-1):_[1]===void 0?c=-2:(c=n.lastIndex-_[2].length,d=_[1],n=_[3]===void 0?b:_[3]==='"'?me:ge):n===me||n===ge?n=b:n===ue||n===he?n=T:(n=b,a=void 0);let m=n===b&&o[l+1].startsWith("/>")?" ":"";i+=n===T?s+qe:c>=0?(r.push(d),s.slice(0,c)+be+s.slice(c)+f+m):s+f+(c===-2?l:m)}return[xe(o,i+(o[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),r]},P=class o{constructor({strings:e,_$litType$:t},r){let a;this.parts=[];let i=0,n=0,l=e.length-1,s=this.parts,[d,_]=He(e,t);if(this.el=o.createElement(d,r),y.currentNode=this.el.content,t===2||t===3){let c=this.el.content.firstChild;c.replaceWith(...c.childNodes)}for(;(a=y.nextNode())!==null&&s.length<l;){if(a.nodeType===1){if(a.hasAttributes())for(let c of a.getAttributeNames())if(c.endsWith(be)){let h=_[n++],m=a.getAttribute(c).split(f),z=/([.?@])?(.*)/.exec(h);s.push({type:1,index:i,name:z[2],strings:m,ctor:z[1]==="."?Y:z[1]==="?"?J:z[1]==="@"?Z:S}),a.removeAttribute(c)}else c.startsWith(f)&&(s.push({type:6,index:i}),a.removeAttribute(c));if(ve.test(a.tagName)){let c=a.textContent.split(f),h=c.length-1;if(h>0){a.textContent=H?H.emptyScript:"";for(let m=0;m<h;m++)a.append(c[m],N()),y.nextNode(),s.push({type:2,index:++i});a.append(c[h],N())}}}else if(a.nodeType===8)if(a.data===ye)s.push({type:2,index:i});else{let c=-1;for(;(c=a.data.indexOf(f,c+1))!==-1;)s.push({type:7,index:i}),c+=f.length-1}i++}}static createElement(e,t){let r=v.createElement("template");return r.innerHTML=e,r}};function k(o,e,t=o,r){if(e===x)return e;let a=r!==void 0?t._$Co?.[r]:t._$Cl,i=j(e)?void 0:e._$litDirective$;return a?.constructor!==i&&(a?._$AO?.(!1),i===void 0?a=void 0:(a=new i(o),a._$AT(o,t,r)),r!==void 0?(t._$Co??=[])[r]=a:t._$Cl=a),a!==void 0&&(e=k(o,a._$AS(o,e.values),a,r)),e}var Q=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:r}=this._$AD,a=(e?.creationScope??v).importNode(t,!0);y.currentNode=a;let i=y.nextNode(),n=0,l=0,s=r[0];for(;s!==void 0;){if(n===s.index){let d;s.type===2?d=new R(i,i.nextSibling,this,e):s.type===1?d=new s.ctor(i,s.name,s.strings,this,e):s.type===6&&(d=new X(i,this,e)),this._$AV.push(d),s=r[++l]}n!==s?.index&&(i=y.nextNode(),n++)}return y.currentNode=v,a}p(e){let t=0;for(let r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(e,r,t),t+=r.strings.length-2):r._$AI(e[t])),t++}},R=class o{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,r,a){this.type=2,this._$AH=p,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=r,this.options=a,this._$Cv=a?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=k(this,e,t),j(e)?e===p||e==null||e===""?(this._$AH!==p&&this._$AR(),this._$AH=p):e!==this._$AH&&e!==x&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Ie(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==p&&j(this._$AH)?this._$AA.nextSibling.data=e:this.T(v.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:r}=e,a=typeof r=="number"?this._$AC(e):(r.el===void 0&&(r.el=P.createElement(xe(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===a)this._$AH.p(t);else{let i=new Q(a,this),n=i.u(this.options);i.p(t),this.T(n),this._$AH=i}}_$AC(e){let t=fe.get(e.strings);return t===void 0&&fe.set(e.strings,t=new P(e)),t}k(e){te(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,r,a=0;for(let i of e)a===t.length?t.push(r=new o(this.O(N()),this.O(N()),this,this.options)):r=t[a],r._$AI(i),a++;a<t.length&&(this._$AR(r&&r._$AB.nextSibling,a),t.length=a)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let r=pe(e).nextSibling;pe(e).remove(),e=r}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},S=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,r,a,i){this.type=1,this._$AH=p,this._$AN=void 0,this.element=e,this.name=t,this._$AM=a,this.options=i,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):thisLine truncated
|
||||||
Replace seal
|
Replace seal
|
||||||
Test pressure`,checklist_help:"One step per line. Max 100 items.",err_too_long:"{field}: too long (max {n} characters)",err_too_short:"{field}: too short (min {n} characters)",err_value_too_high:"{field}: too large (max {n})",err_value_too_low:"{field}: too small (min {n})",err_required:"{field}: required",err_wrong_type:"{field}: wrong type (expected: {type})",err_invalid_choice:"{field}: not an allowed value",err_invalid_value:"{field}: invalid value",feat_schedule_time:"Time-of-day scheduling",feat_schedule_time_desc:"Tasks become overdue at a specific time of day instead of midnight.",schedule_time_optional:"Due at time (optional, HH:MM)",schedule_time_help:"Empty = midnight (default). HA timezone.",at_time:"at",notes_optional:"Notes (optional)",cost_optional:"Cost (optional)",duration_minutes:"Duration in minutes (optional)",completed_at_optional:"Completed at (optional, empty = now)",completed_at_future_error:"The completion date cannot be in the future.",days:"days",day:"day",today:"Today",d_overdue:"d overdue",no_tasks:"No maintenance tasks yet. Create an object to get started.",no_tasks_short:"No tasks",no_history:"No history entries yet.",show_all:"Show all",cost_duration_chart:"Cost & Duration",installed:"Installed",confirm_delete_object:"Delete this object and all its tasks?",confirm_delete_task:"Delete this task?",min:"Min",max:"Max",save:"Save",saving:"Saving\u2026",edit_task:"Edit Task",new_task:"New Maintenance Task",task_name:"Task name",maintenance_type:"Maintenance type",priority:"Priority",labels:"Labels",labels_placeholder:"e.g. safety, seasonal, tenant-visible",labels_help:"Comma-separated tags for filtering and reporting.",priority_low:"Low",priority_normal:"Normal",priority_high:"High",all_priorities:"All priorities",schedule_type:"Schedule type",interval_days:"Interval (days)",warning_days:"Warning days",earliest_completion_days:"Earliest completion (days before due)",earliest_completion_days_help:"Leave empty to allow completing any time. 0 = only on/after the due date.",last_performed_optional:"Last performed (optional)",interval_anchor:"Interval anchor",anchor_completion:"From completion date",anchor_planned:"From planned date (no drift)",edit_object:"Edit Object",name:"Name",manufacturer_optional:"Manufacturer (optional)",model_optional:"Model (optional)",serial_number_optional:"Serial number (optional)",serial_number_label:"S/N",documentation_url_label:"Manual",object_notes_label:"Notes",sort_due_date:"Due date",sort_object:"Object name",sort_type:"Type",sort_task_name:"Task name",all_objects:"All objects",all_parts:"All parts",tasks_lower:"tasks",no_tasks_yet:"No tasks yet",add_first_task:"Add first task",trigger_configuration:"Trigger Configuration",entity_id:"Entity ID",comma_separated:"comma-separated",entity_logic:"Entity logic",entity_logic_any:"Any entity triggers",entity_logic_all:"All entities must trigger",entities:"entities",attribute_optional:"Attribute (optional, blank = state)",use_entity_state:"Use entity state (no attribute)",trigger_above:"Trigger above",trigger_below:"Trigger below",trigger_equals:"Trigger when equal to (=)",trigger_not_equals:"Trigger when different from (\u2260)",for_at_least_minutes:"For at least (minutes)",safety_interval_days:"Safety interval (days, optional)",safety_interval:"Safety interval (optional)",trigger_combinator:"Combine trigger and interval",trigger_combinator_any:"Trigger or interval (whichever first)",trigger_combinator_all:"Trigger and interval (both required)",delta_mode:"Delta mode",from_state_optional:"From state (optional)",to_state_optional:"To state (optional)",documentation_url_optional:"Documentation URL (optional)",object_notes_optional:"Notes (optional)",nfc_tag_id_optional:"NFC Tag ID (optional)",nfc_tags_empty_help:"No NFC tags registered in Home Assistant yet.",nfc_tags_open_settings:"Open Tags settings",nfc_tags_refresh:"Refresh",environmental_entity_optional:"Environmental sensor (optional)",environmental_entity_helper:"e.g. sensor.outdoor_temperature \u2014 adjusts the interval based on environmental conditions",adaptive_prediction_enabled:"Enable sensor-driven predictions",adaptive_seasonal_enabled:"Enable seasonal awareness",adaptive_max_interval:"Maximum interval (days)",adaptive_min_interval:"Minimum interval (days)",adaptive_ewa_alpha:"Learning rate (alpha)",adaptive_enabled:"Enable adaptive scheduling",adaptive_section_title:"Adaptive Scheduling",environmental_attribute_optional:"Environmental attribute (optional)",nfc_tag_id:"NFC Tag ID",nfc_linked:"NFC tag linked",nfc_link_hint:"Click to link NFC tag",responsible_user:"Responsible User",shared_with:"Shared with (rotation)",shared_with_help:"Pick multiple people to share this task; the responsible person rotates on each completion.",rotation_strategy:"Rotation",rotation_none:"No rotation",rotation_round_robin:"Round-robin",rotation_least_completed:"Least completed",rotation_random:"Random",no_user_assigned:"(No user assigned)",all_users:"All Users",m
Line truncated
|
Test pressure`,checklist_help:"One step per line. Max 100 items.",err_too_long:"{field}: too long (max {n} characters)",err_too_short:"{field}: too short (min {n} characters)",err_value_too_high:"{field}: too large (max {n})",err_value_too_low:"{field}: too small (min {n})",err_required:"{field}: required",err_wrong_type:"{field}: wrong type (expected: {type})",err_invalid_choice:"{field}: not an allowed value",err_invalid_value:"{field}: invalid value",feat_schedule_time:"Time-of-day scheduling",feat_schedule_time_desc:"Tasks become overdue at a specific time of day instead of midnight.",schedule_time_optional:"Due at time (optional, HH:MM)",schedule_time_help:"Empty = midnight (default). HA timezone.",at_time:"at",notes_optional:"Notes (optional)",cost_optional:"Cost (optional)",duration_minutes:"Duration in minutes (optional)",completed_at_optional:"Completed at (optional, empty = now)",completed_at_future_error:"The completion date cannot be in the future.",days:"days",day:"day",today:"Today",d_overdue:"d overdue",no_tasks:"No maintenance tasks yet. Create an object to get started.",no_tasks_short:"No tasks",no_history:"No history entries yet.",show_all:"Show all",cost_duration_chart:"Cost & Duration",installed:"Installed",confirm_delete_object:"Delete this object and all its tasks?",confirm_delete_task:"Delete this task?",min:"Min",max:"Max",save:"Save",saving:"Saving\u2026",edit_task:"Edit Task",new_task:"New Maintenance Task",task_name:"Task name",maintenance_type:"Maintenance type",priority:"Priority",labels:"Labels",labels_placeholder:"e.g. safety, seasonal, tenant-visible",labels_help:"Comma-separated tags for filtering and reporting.",priority_low:"Low",priority_normal:"Normal",priority_high:"High",all_priorities:"All priorities",schedule_type:"Schedule type",interval_days:"Interval (days)",warning_days:"Warning days",earliest_completion_days:"Earliest completion (days before due)",earliest_completion_days_help:"Leave empty to allow completing any time. 0 = only on/after the due date.",last_performed_optional:"Last performed (optional)",interval_anchor:"Interval anchor",anchor_completion:"From completion date",anchor_planned:"From planned date (no drift)",edit_object:"Edit Object",name:"Name",manufacturer_optional:"Manufacturer (optional)",model_optional:"Model (optional)",serial_number_optional:"Serial number (optional)",serial_number_label:"S/N",documentation_url_label:"Manual",object_notes_label:"Notes",sort_due_date:"Due date",sort_object:"Object name",sort_type:"Type",sort_task_name:"Task name",all_objects:"All objects",all_parts:"All parts",tasks_lower:"tasks",no_tasks_yet:"No tasks yet",add_first_task:"Add first task",trigger_configuration:"Trigger Configuration",entity_id:"Entity ID",comma_separated:"comma-separated",entity_logic:"Entity logic",entity_logic_any:"Any entity triggers",entity_logic_all:"All entities must trigger",entities:"entities",attribute_optional:"Attribute (optional, blank = state)",use_entity_state:"Use entity state (no attribute)",trigger_above:"Trigger above",trigger_below:"Trigger below",trigger_equals:"Trigger when equal to (=)",trigger_not_equals:"Trigger when different from (\u2260)",for_at_least_minutes:"For at least (minutes)",safety_interval_days:"Safety interval (days, optional)",safety_interval:"Safety interval (optional)",trigger_combinator:"Combine trigger and interval",trigger_combinator_any:"Trigger or interval (whichever first)",trigger_combinator_all:"Trigger and interval (both required)",delta_mode:"Delta mode",from_state_optional:"From state (optional)",to_state_optional:"To state (optional)",documentation_url_optional:"Documentation URL (optional)",object_notes_optional:"Notes (optional)",nfc_tag_id_optional:"NFC Tag ID (optional)",nfc_tags_empty_help:"No NFC tags registered in Home Assistant yet.",nfc_tags_open_settings:"Open Tags settings",nfc_tags_refresh:"Refresh",environmental_entity_optional:"Environmental sensor (optional)",environmental_entity_helper:"e.g. sensor.outdoor_temperature \u2014 adjusts the interval based on environmental conditions",adaptive_prediction_enabled:"Enable sensor-driven predictions",adaptive_seasonal_enabled:"Enable seasonal awareness",adaptive_max_interval:"Maximum interval (days)",adaptive_min_interval:"Minimum interval (days)",adaptive_ewa_alpha:"Learning rate (alpha)",adaptive_enabled:"Enable adaptive scheduling",adaptive_section_title:"Adaptive Scheduling",environmental_attribute_optional:"Environmental attribute (optional)",nfc_tag_id:"NFC Tag ID",nfc_linked:"NFC tag linked",nfc_link_hint:"Click to link NFC tag",responsible_user:"Responsible User",shared_with:"Shared with (rotation)",shared_with_help:"Pick multiple people to share this task; the responsible person rotates on each completion.",rotation_strategy:"Rotation",rotation_none:"No rotation",rotation_round_robin:"Round-robin",rotation_least_completed:"Least completed",rotation_random:"Random",no_user_assigned:"(No user assigned)",all_users:"All Users",m
Line truncated
|
||||||
.field { display: flex; flex-direction: column; gap: 4px; }
|
.field { display: flex; flex-direction: column; gap: 4px; }
|
||||||
.field-label { font-size: 12px; color: var(--secondary-text-color); }
|
.field-label { font-size: 12px; color: var(--secondary-text-color); }
|
||||||
.field-input {
|
.field-input {
|
||||||
@@ -14,7 +14,7 @@ Test pressure`,checklist_help:"One step per line. Max 100 items.",err_too_long:"
|
|||||||
font-family: inherit; width: 100%; box-sizing: border-box;
|
font-family: inherit; width: 100%; box-sizing: border-box;
|
||||||
}
|
}
|
||||||
.field-input:focus { outline: none; border-color: var(--primary-color); }
|
.field-input:focus { outline: none; border-color: var(--primary-color); }
|
||||||
`,co=U`
|
`,mo=U`
|
||||||
:host {
|
:host {
|
||||||
--maint-ok-color: var(--success-color, #4caf50);
|
--maint-ok-color: var(--success-color, #4caf50);
|
||||||
--maint-due-soon-color: var(--warning-color, #ff9800);
|
--maint-due-soon-color: var(--warning-color, #ff9800);
|
||||||
@@ -755,48 +755,9 @@ Test pressure`,checklist_help:"One step per line. Max 100 items.",err_too_long:"
|
|||||||
.confidence-dot.medium { background: var(--warning-color, #ff9800); }
|
.confidence-dot.medium { background: var(--warning-color, #ff9800); }
|
||||||
.confidence-dot.high { background: var(--success-color, #4caf50); }
|
.confidence-dot.high { background: var(--success-color, #4caf50); }
|
||||||
|
|
||||||
/* Feedback toggle buttons in complete dialog */
|
/* (The complete-dialog's .feedback-* rules live in complete-dialog.ts —
|
||||||
.feedback-section {
|
this sheet carried a dead byte-identical copy until the 2026-08 drift
|
||||||
display: flex;
|
audit; complete-dialog never imports sharedStyles.) */
|
||||||
flex-direction: column;
|
|
||||||
gap: 8px;
|
|
||||||
padding: 8px 0;
|
|
||||||
border-top: 1px solid var(--divider-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
.feedback-label {
|
|
||||||
font-weight: 500;
|
|
||||||
font-size: 13px;
|
|
||||||
color: var(--secondary-text-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
.feedback-buttons {
|
|
||||||
display: flex;
|
|
||||||
gap: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.feedback-btn {
|
|
||||||
flex: 1;
|
|
||||||
padding: 8px 12px;
|
|
||||||
border: 1px solid var(--divider-color);
|
|
||||||
border-radius: 8px;
|
|
||||||
background: var(--card-background-color, #fff);
|
|
||||||
color: var(--primary-text-color);
|
|
||||||
font-size: 13px;
|
|
||||||
cursor: pointer;
|
|
||||||
text-align: center;
|
|
||||||
transition: all 0.2s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.feedback-btn:hover {
|
|
||||||
background: var(--secondary-background-color, #f5f5f5);
|
|
||||||
}
|
|
||||||
|
|
||||||
.feedback-btn.selected {
|
|
||||||
background: var(--primary-color);
|
|
||||||
color: var(--text-primary-color, #fff);
|
|
||||||
border-color: var(--primary-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Seasonal chart */
|
/* Seasonal chart */
|
||||||
.seasonal-chart {
|
.seasonal-chart {
|
||||||
@@ -1157,7 +1118,7 @@ Test pressure`,checklist_help:"One step per line. Max 100 items.",err_too_long:"
|
|||||||
.stat-item .stat-label { font-size: 11px; white-space: normal; text-align: center; line-height: 1.2; }
|
.stat-item .stat-label { font-size: 11px; white-space: normal; text-align: center; line-height: 1.2; }
|
||||||
.stat-value { font-size: 20px; }
|
.stat-value { font-size: 20px; }
|
||||||
}
|
}
|
||||||
`;export{Xe as a,U as b,it as c,nt as d,x as e,p as f,A as g,vt as h,we as i,At as j,Ge as k,Ve as l,Xt as m,u as n,eo as o,to as p,oo as q,ro as r,Se as s,ao as t,io as u,Ae as v,$e as w,no as x,so as y,lo as z,co as A};
|
`;export{at as a,U as b,dt as c,pt as d,x as e,p as f,A as g,ae as h,At as i,Et as j,ke as k,Pt as l,Ge as m,Ke as n,so as o,u as p,lo as q,co as r,Xe as s,et as t,Ae as u,po as v,_o as w,$e as x,Ee as y,uo as z,ho as A,go as B,mo as C};
|
||||||
/*! Bundled license information:
|
/*! Bundled license information:
|
||||||
|
|
||||||
@lit/reactive-element/css-tag.js:
|
@lit/reactive-element/css-tag.js:
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
/*! maintenance_supporter frontend 2.63.1 */
|
||||||
|
import{b as i}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-IMKP65C5.js";async function l(e,n,t=300){return(await e.connection.sendMessagePromise({type:"auth/sign_path",path:n,expires:t})).path}async function r(e,n,t=300){return l(e,`/api/maintenance_supporter/document/${n}`,t)}async function y(e,n,t=""){let a=window.open("about:blank","_blank");try{let o=await r(e,n);a&&(a.location.href=new URL(o+t,window.location.origin).href)}catch(o){throw a&&a.close(),o}}async function p(e,n,t){i(await r(e,n,30),t)}function d(e){let n=URL.createObjectURL(new Blob([e],{type:"text/html"}));window.open(n,"_blank"),setTimeout(()=>URL.revokeObjectURL(n),6e4)}var c=[{key:"name",labelKey:"name",required:!0},{key:"manufacturer",labelKey:"manufacturer"},{key:"model",labelKey:"model"},{key:"serial_number",labelKey:"serial_number_label"},{key:"installation_date",labelKey:"installed"},{key:"warranty_expiry",labelKey:"warranty"},{key:"area_id",labelKey:"area"},{key:"documentation_url",labelKey:"documentation_url_label"},{key:"notes",labelKey:"object_notes_label"},{key:"task_count",labelKey:"tasks"},{key:"actions",labelKey:"actions"}],u=c.map(e=>e.key),s=["name","manufacturer","model","serial_number","installation_date","warranty_expiry","area_id","task_count","actions"];function g(e){if(!Array.isArray(e))return[...s];let n=new Set,t=[];for(let a of e)typeof a=="string"&&u.includes(a)&&!n.has(a)&&(n.add(a),t.push(a));return t.length?(t.includes("name")||t.unshift("name"),t):[...s]}export{l as a,r as b,y as c,p as d,d as e,c as f,s as g,g as h};
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
/*! maintenance_supporter frontend 2.63.1 */
|
||||||
|
function c(o,t,e){let l=new Blob([o],{type:e}),d=URL.createObjectURL(l),n=document.createElement("a");n.href=d,n.download=t,n.target="_blank",n.rel="noopener",n.style.display="none",document.body.appendChild(n),n.dispatchEvent(new MouseEvent("click")),document.body.removeChild(n),setTimeout(()=>URL.revokeObjectURL(d),6e4)}function r(o,t){let e=document.createElement("a");e.href=o,e.download=t,e.target="_blank",e.rel="noopener",e.style.display="none",document.body.appendChild(e),e.dispatchEvent(new MouseEvent("click")),document.body.removeChild(e)}export{c as a,r as b};
|
||||||
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
/*! maintenance_supporter frontend 2.61.0 */
|
/*! maintenance_supporter frontend 2.63.1 */
|
||||||
import{a as u}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-JPOJFRHB.js";import{a as r,b as _,c as l,f as o,g as p,i as d,j as s,n as i,o as h}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-4JER2GPD.js";var e=class extends p{constructor(){super(...arguments);this.objects=[];this._open=!1;this._loading=!1;this._error="";this._name="";this._manufacturer="";this._model="";this._serialNumber="";this._areaId="";this._installationDate="";this._warrantyExpiry="";this._documentationUrl="";this._notes="";this._haDeviceId="";this._parentEntryId="";this._entryId=null}get _lang(){return h(this.hass)}openCreate(){this._entryId=null,this._name="",this._manufacturer="",this._model="",this._serialNumber="",this._areaId="",this._installationDate="",this._warrantyExpiry="",this._documentationUrl="",this._notes="",this._haDeviceId="",this._parentEntryId="",this._error="",this._open=!0}openEdit(a,n){this._entryId=a,this._name=n.name||"",this._manufacturer=n.manufacturer||"",this._model=n.model||"",this._serialNumber=n.serial_number||"",this._areaId=n.area_id||"",this._installationDate=n.installation_date||"",this._warrantyExpiry=n.warranty_expiry||"",this._documentationUrl=n.documentation_url||"",this._notes=n.notes||"",this._haDeviceId=n.ha_device_id||"",this._parentEntryId=n.parent_entry_id||"",this._error="",this._open=!0}async _save(){if(!this._loading&&this._name.trim()){this._loading=!0,this._error="";try{this._entryId?await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/object/update",entry_id:this._entryId,name:this._name,manufacturer:this._manufacturer||null,model:this._model||null,serial_number:this._serialNumber||null,area_id:this._areaId||null,installation_date:this._installationDate||null,warranty_expiry:this._warrantyExpiry||null,documentation_url:this._documentationUrl.trim()||null,notes:this._notes.trim()||null,ha_device_id:this._haDeviceId||null,parent_entry_id:this._parentEntryId||null}):await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/object/create",name:this._name,manufacturer:this._manufacturer||null,model:this._model||null,serial_number:this._serialNumber||null,area_id:this._areaId||null,installation_date:this._installationDate||null,warranty_expiry:this._warrantyExpiry||null,documentation_url:this._documentationUrl.trim()||null,notes:this._notes.trim()||null,ha_device_id:this._haDeviceId||null,parent_entry_id:this._parentEntryId||null}),this._open=!1,this.dispatchEvent(new CustomEvent("object-saved"))}catch(a){this._error=u(a,this._lang,i("save_error",this._lang))}finally{this._loading=!1}}}_parentChoices(){return(this.objects||[]).filter(a=>a.entry_id!==this._entryId)}_close(){this._open=!1}render(){if(!this._open)return l``;let a=this._lang,n=this._entryId?i("edit_object",a):i("new_object",a);return l`
|
import{a as u}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-OGUFLW7I.js";import{a as r,b as _,c as l,f as o,g as p,k as d,l as s,p as i,r as h}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-FS5TZIDQ.js";var e=class extends p{constructor(){super(...arguments);this.objects=[];this._open=!1;this._loading=!1;this._error="";this._name="";this._manufacturer="";this._model="";this._serialNumber="";this._areaId="";this._installationDate="";this._warrantyExpiry="";this._documentationUrl="";this._notes="";this._haDeviceId="";this._parentEntryId="";this._entryId=null}get _lang(){return h(this.hass)}openCreate(){this._entryId=null,this._name="",this._manufacturer="",this._model="",this._serialNumber="",this._areaId="",this._installationDate="",this._warrantyExpiry="",this._documentationUrl="",this._notes="",this._haDeviceId="",this._parentEntryId="",this._error="",this._open=!0}openEdit(a,n){this._entryId=a,this._name=n.name||"",this._manufacturer=n.manufacturer||"",this._model=n.model||"",this._serialNumber=n.serial_number||"",this._areaId=n.area_id||"",this._installationDate=n.installation_date||"",this._warrantyExpiry=n.warranty_expiry||"",this._documentationUrl=n.documentation_url||"",this._notes=n.notes||"",this._haDeviceId=n.ha_device_id||"",this._parentEntryId=n.parent_entry_id||"",this._error="",this._open=!0}async _save(){if(!this._loading&&this._name.trim()){this._loading=!0,this._error="";try{this._entryId?await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/object/update",entry_id:this._entryId,name:this._name,manufacturer:this._manufacturer||null,model:this._model||null,serial_number:this._serialNumber||null,area_id:this._areaId||null,installation_date:this._installationDate||null,warranty_expiry:this._warrantyExpiry||null,documentation_url:this._documentationUrl.trim()||null,notes:this._notes.trim()||null,ha_device_id:this._haDeviceId||null,parent_entry_id:this._parentEntryId||null}):await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/object/create",name:this._name,manufacturer:this._manufacturer||null,model:this._model||null,serial_number:this._serialNumber||null,area_id:this._areaId||null,installation_date:this._installationDate||null,warranty_expiry:this._warrantyExpiry||null,documentation_url:this._documentationUrl.trim()||null,notes:this._notes.trim()||null,ha_device_id:this._haDeviceId||null,parent_entry_id:this._parentEntryId||null}),this._open=!1,this.dispatchEvent(new CustomEvent("object-saved"))}catch(a){this._error=u(a,this._lang,i("save_error",this._lang))}finally{this._loading=!1}}}_parentChoices(){return(this.objects||[]).filter(a=>a.entry_id!==this._entryId)}_close(){this._open=!1}render(){if(!this._open)return l``;let a=this._lang,n=this._entryId?i("edit_object",a):i("new_object",a);return l`
|
||||||
<ha-dialog open @closed=${this._close}>
|
<ha-dialog open @closed=${this._close}>
|
||||||
<div class="dialog-title">${n}</div>
|
<div class="dialog-title">${n}</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
+36
-28
@@ -1,13 +1,13 @@
|
|||||||
/*! maintenance_supporter frontend 2.61.0 */
|
/*! maintenance_supporter frontend 2.63.1 */
|
||||||
import{a as x,d as N,e as q}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-4Q4MHZO7.js";import{a as L}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-TGQTH4TY.js";import{a as P}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-JPOJFRHB.js";import{a,b as T,c as l,f as p,g as C,i as $,j as o,n as s,o as k,s as A,w as E}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-4JER2GPD.js";var I=["sensor","binary_sensor","number","input_number","input_boolean","switch","climate","vacuum","cover","fan","light","water_heater","humidifier","media_player","weather","air_quality","valve","lawn_mower","lock"],H=["sensor"],F=["temperature","humidity","pressure"];var M=["cleaning","inspection","replacement","calibration","service","reading","custom"],O=["low","normal","high"],U=["time_based","weekdays","nth_weekday","day_of_month","sensor_based","one_time","manual"],w=["weekdays","nth_weekday","day_of_month"],R=["threshold","counter","state_change","runtime"],j=[...R,"compound"],y={alpha:"0.3",min:"7",max:"365"};function B(){return{entityIds:"",type:"threshold",attribute:"",above:"",below:"",equals:"",notEquals:"",forMinutes:"0",targetValue:"",deltaMode:!1,fromState:"",toState:"",targetChanges:"",runtimeHours:"",onStates:"",carry:{}}}var V=new Set(["entity_id","entity_ids","type","attribute","trigger_above","trigger_below","trigger_equals","trigger_not_equals","trigger_for_minutes","trigger_target_value","trigger_delta_mode","trigger_from_state","trigger_to_state","trigger_target_changes","trigger_runtime_hours","trigger_on_states"]);function D(u){return{entityIds:(u.entity_ids||(u.entity_id?[u.entity_id]:[])).join(", "),type:u.type||"threshold",attribute:u.attribute||"",above:u.trigger_above?.toString()??"",below:u.trigger_below?.toString()??"",equals:u.trigger_equals?.toString()??"",notEquals:u.trigger_not_equals?.toString()??"",forMinutes:u.trigger_for_minutes?.toString()??"0",targetValue:u.trigger_target_value?.toString()??"",deltaMode:u.trigger_delta_mode||!1,fromState:u.trigger_from_state||"",toState:u.trigger_to_state||"",targetChanges:u.trigger_target_changes?.toString()??"",runtimeHours:u.trigger_runtime_hours?.toString()??"",onStates:(u.trigger_on_states||[]).join(", "),carry:Object.fromEntries(Object.entries(u).filter(([t])=>!V.has(t)&&!t.startsWith("_")))}}function z(u){let b=u.entityIds.split(",").map(i=>i.trim()).filter(Boolean);if(b.length===0)return null;let t={...u.carry||{},entity_id:b[0],entity_ids:b,type:u.type};if(u.attribute&&(t.attribute=u.attribute),u.type==="threshold"){let i=parseFloat(u.above);isNaN(i)||(t.trigger_above=i);let e=parseFloat(u.below);isNaN(e)||(t.trigger_below=e);let r=parseFloat(u.equals);isNaN(r)||(t.trigger_equals=r);let d=parseFloat(u.notEquals);isNaN(d)||(t.trigger_not_equals=d);let c=parseInt(u.forMinutes,10);isNaN(c)||(t.trigger_for_minutes=c)}else if(u.type==="counter"){let i=parseFloat(u.targetValue);isNaN(i)||(t.trigger_target_value=i),t.trigger_delta_mode=u.deltaMode}else if(u.type==="state_change"){u.fromState&&(t.trigger_from_state=u.fromState),u.toState&&(t.trigger_to_state=u.toState);let i=parseInt(u.targetChanges,10);isNaN(i)||(t.trigger_target_changes=i)}else if(u.type==="runtime"){let i=parseFloat(u.runtimeHours);isNaN(i)||(t.trigger_runtime_hours=i);let e=(u.onStates||"").split(",").map(r=>r.trim()).filter(Boolean);e.length>0&&(t.trigger_on_states=e)}return t}function W(u){return Array.from({length:7},(b,t)=>E(t,u,"short"))}function K(u){let b=new Intl.DateTimeFormat(u||"en",{month:"short"});return Array.from({length:12},(t,i)=>b.format(new Date(2021,i,1)))}var n=class n extends C{constructor(){super(...arguments);this.checklistsEnabled=!1;this.scheduleTimeEnabled=!1;this.completionActionsEnabled=!1;this.defaultWarningDays=7;this.parts=[];this._foreignOwners=[];this._open=!1;this._entityPickerFallback=!1;this._pickerProbeStrikes=0;this._loading=!1;this._error="";this._entryId="";this._taskId=null;this._objectChoices=[];this._name="";this._type="custom";this._scheduleType="time_based";this._intervalDays="30";this._intervalUnit="days";this._dueDate="";this._warningDays="7";this._earliestCompletionDays="";this._intervalAnchor="completion";this._weekdays=[];this._nth="1";this._nthWeekday="5";this._domDay="1";this._domLastDay=!1;this._domBusiness=!1;this._calOffset="0";this._seasonMonths=[];this._endsMode="never";this._endsCount="";this._endsUntil="";this._schedulePreview=[];this._schedulePreviewEnded=!1;this._previewSeq=0;this._notes="";this._documentationUrl="";this._customIcon="";this._priority="normal";this._labels="";this._enabled=!0;this._triggerEntityId="";this._triggerEntityIds=[];this._triggerEntityLogic="any";this._triggerAttribute="";this._triggerType="threshold";this._triggerAbove="";this._triggerBelow="";this._triggerEquals="";this._triggerNotEquals="";this._triggerForMinutes="0";this._triggerCombinator="any";this._triggerTargetValue="";this._triggerDeltaMode=!1;this._triggerBaselineValue="";this._liveBaselineValue=null;Line truncated
|
import{a as x,d as N,e as q}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-VIX7PNOY.js";import{a as L}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-BBM5E3UT.js";import{a as P}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-OGUFLW7I.js";import{a,b as T,c as l,f as p,g as C,k as $,l as o,p as s,r as k,u as A,y as E}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-FS5TZIDQ.js";var I=["sensor","binary_sensor","number","input_number","input_boolean","switch","climate","vacuum","cover","fan","light","water_heater","humidifier","media_player","weather","air_quality","valve","lawn_mower","lock"],H=["sensor"],F=["temperature","humidity","pressure"];var M=["cleaning","inspection","replacement","calibration","service","reading","custom"],O=["low","normal","high"],U=["time_based","weekdays","nth_weekday","day_of_month","sensor_based","one_time","manual"],w=["weekdays","nth_weekday","day_of_month"],R=["threshold","counter","state_change","runtime"],j=[...R,"compound"],y={alpha:"0.3",min:"7",max:"365"};function B(){return{entityIds:"",type:"threshold",attribute:"",above:"",below:"",equals:"",notEquals:"",forMinutes:"0",targetValue:"",deltaMode:!1,fromState:"",toState:"",targetChanges:"",runtimeHours:"",onStates:"",carry:{}}}var V=new Set(["entity_id","entity_ids","type","attribute","trigger_above","trigger_below","trigger_equals","trigger_not_equals","trigger_for_minutes","trigger_target_value","trigger_delta_mode","trigger_from_state","trigger_to_state","trigger_target_changes","trigger_runtime_hours","trigger_on_states"]);function D(u){return{entityIds:(u.entity_ids||(u.entity_id?[u.entity_id]:[])).join(", "),type:u.type||"threshold",attribute:u.attribute||"",above:u.trigger_above?.toString()??"",below:u.trigger_below?.toString()??"",equals:u.trigger_equals?.toString()??"",notEquals:u.trigger_not_equals?.toString()??"",forMinutes:u.trigger_for_minutes?.toString()??"0",targetValue:u.trigger_target_value?.toString()??"",deltaMode:u.trigger_delta_mode||!1,fromState:u.trigger_from_state||"",toState:u.trigger_to_state||"",targetChanges:u.trigger_target_changes?.toString()??"",runtimeHours:u.trigger_runtime_hours?.toString()??"",onStates:(u.trigger_on_states||[]).join(", "),carry:Object.fromEntries(Object.entries(u).filter(([t])=>!V.has(t)&&!t.startsWith("_")))}}function z(u){let b=u.entityIds.split(",").map(i=>i.trim()).filter(Boolean);if(b.length===0)return null;let t={...u.carry||{},entity_id:b[0],entity_ids:b,type:u.type};if(u.attribute&&(t.attribute=u.attribute),u.type==="threshold"){let i=parseFloat(u.above);isNaN(i)||(t.trigger_above=i);let e=parseFloat(u.below);isNaN(e)||(t.trigger_below=e);let r=parseFloat(u.equals);isNaN(r)||(t.trigger_equals=r);let _=parseFloat(u.notEquals);isNaN(_)||(t.trigger_not_equals=_);let c=parseInt(u.forMinutes,10);isNaN(c)||(t.trigger_for_minutes=c)}else if(u.type==="counter"){let i=parseFloat(u.targetValue);isNaN(i)||(t.trigger_target_value=i),t.trigger_delta_mode=u.deltaMode}else if(u.type==="state_change"){u.fromState&&(t.trigger_from_state=u.fromState),u.toState&&(t.trigger_to_state=u.toState);let i=parseInt(u.targetChanges,10);isNaN(i)||(t.trigger_target_changes=i)}else if(u.type==="runtime"){let i=parseFloat(u.runtimeHours);isNaN(i)||(t.trigger_runtime_hours=i);let e=(u.onStates||"").split(",").map(r=>r.trim()).filter(Boolean);e.length>0&&(t.trigger_on_states=e)}return t}function W(u){return Array.from({length:7},(b,t)=>E(t,u,"short"))}function K(u){let b=new Intl.DateTimeFormat(u||"en",{month:"short"});return Array.from({length:12},(t,i)=>b.format(new Date(2021,i,1)))}var n=class n extends C{constructor(){super(...arguments);this.checklistsEnabled=!1;this.scheduleTimeEnabled=!1;this.completionActionsEnabled=!1;this.defaultWarningDays=7;this.parts=[];this._foreignOwners=[];this._open=!1;this._entityPickerFallback=!1;this._pickerProbeStrikes=0;this._loading=!1;this._error="";this._entryId="";this._taskId=null;this._objectChoices=[];this._name="";this._type="custom";this._scheduleType="time_based";this._intervalDays="30";this._intervalUnit="days";this._dueDate="";this._warningDays="7";this._earliestCompletionDays="";this._intervalAnchor="completion";this._weekdays=[];this._nth="1";this._nthWeekday="5";this._domDay="1";this._domLastDay=!1;this._domBusiness=!1;this._calOffset="0";this._seasonMonths=[];this._endsMode="never";this._endsCount="";this._endsUntil="";this._schedulePreview=[];this._schedulePreviewEnded=!1;this._previewSeq=0;this._notes="";this._documentationUrl="";this._customIcon="";this._priority="normal";this._labels="";this._enabled=!0;this._triggerEntityId="";this._triggerEntityIds=[];this._triggerEntityLogic="any";this._triggerAttribute="";this._triggerType="threshold";this._triggerAbove="";this._triggerBelow="";this._triggerEquals="";this._triggerNotEquals="";this._triggerForMinutes="0";this._triggerCombinator="any";this._triggerTargetValue="";this._triggerDeltaMode=!1;this._triggerBaselineValue="";this._liveBaselineValue=null;Line truncated
|
||||||
`),this._requiredCompletion=[...i.required_completion_fields||[]],this._scheduleTime=i.schedule_time||"";let d=i.on_complete_action;if(d&&d.service){this._actionService=d.service;let _=d.target?.entity_id;this._actionTargetEntity=Array.isArray(_)?_[0]||"":_||"",this._actionData=d.data&&typeof d.data=="object"?{...d.data}:{},this._actionDataJsonFallback=""}else this._actionService="",this._actionTargetEntity="",this._actionData={},this._actionDataJsonFallback="";let c=i.quick_complete_defaults;this._qcNotes=c?.notes||"",this._qcCost=c?.cost!=null?String(c.cost):"",this._qcDuration=c?.duration!=null?String(c.duration):"",this._qcFeedback=c?.feedback||"";let h=i.adaptive_config||{};if(this._environmentalEntity=h.environmental_entity||"",this._environmentalAttribute=h.environmental_attribute||"",this._environmentalInitial=this._environmentalEntity,this._environmentalAttributeInitial=this._environmentalAttribute,this._adaptiveEnabled=!!h.enabled,this._adaptiveAlpha=h.ewa_alpha?.toString()??y.alpha,this._adaptiveMin=h.min_interval_days?.toString()??y.min,this._adaptiveMax=h.max_interval_days?.toString()??y.max,this._adaptiveSeasonal=h.seasonal_enabled!==!1,this._adaptivePrediction=h.sensor_prediction_enabled!==!1,this._adaptiveInitial=this._adaptiveSnapshot(),i.trigger_config){let _=i.trigger_config;this._triggerEntityId=_.entity_id||_.entity_ids&&_.entity_ids[0]||"",this._triggerEntityIds=_.entity_ids||(_.entity_id?[_.entity_id]:[]),this._triggerEntityLogic=_.entity_logic||"any",this._triggerAttribute=_.attribute||"",this._triggerType=_.type||"threshold",this._triggerAbove=_.trigger_above?.toString()||"",this._triggerBelow=_.trigger_below?.toString()||"",this._triggerEquals=_.trigger_equals?.toString()||"",this._triggerNotEquals=_.trigger_not_equals?.toString()||"",this._triggerForMinutes=_.trigger_for_minutes?.toString()||"0",this._triggerCombinator=_.trigger_combinator==="all"?"all":"any",this._triggerTargetValue=_.trigger_target_value?.toString()||"",this._triggerDeltaMode=_.trigger_delta_mode||!1,this._triggerBaselineValue=_.trigger_baseline_value?.toString()||"",this._liveBaselineValue=i.trigger_baseline_value??null,this._autoCompleteOnRecovery=_.auto_complete_on_recovery||!1,this._triggerFromState=_.trigger_from_state||"",this._triggerToState=_.trigger_to_state||"",this._triggerTargetChanges=_.trigger_target_changes?.toString()||"",this._triggerRuntimeHours=_.trigger_runtime_hours?.toString()||"",this._triggerOnStates=(_.trigger_on_states||[]).join(", "),_.type==="compound"?(this._compoundLogic=_.compound_logic==="OR"?"OR":"AND",this._compoundConditions=(_.conditions||[]).map(D)):(this._compoundLogic="AND",this._compoundConditions=[])}else this._resetTriggerFields();this._triggerEntityId&&this._fetchEntityAttributes(this._triggerEntityId),await Promise.all([this._loadUsers(),this._loadTags(),this._loadParts(),this._loadForeignPools()]),this._open=!0}_resetFields(){this._name="",this._type="custom",this._scheduleType="time_based",this._intervalDays="30",this._intervalUnit="days",this._dueDate="",this._warningDays=String(this.defaultWarningDays),this._earliestCompletionDays="",this._intervalAnchor="completion",this._weekdays=[],this._nth="1",this._nthWeekday="5",this._domDay="1",this._domLastDay=!1,this._domBusiness=!1,this._calOffset="0",this._seasonMonths=[],this._endsMode="never",this._endsCount="",this._endsUntil="",this._notes="",this._documentationUrl="",this._customIcon="",this._priority="normal",this._labels="",this._enabled=!0,this._lastPerformed="",this._nfcTagId="",this._readingUnit="",this._consumesParts={},this._responsibleUserId=null,this._assigneePool=[],this._rotationStrategy="",this._checklistText="",this._requiredCompletion=[],this._scheduleTime="",this._environmentalEntity="",this._environmentalAttribute="",this._environmentalInitial="",this._environmentalAttributeInitial="",this._adaptiveEnabled=!1,this._adaptiveAlpha=y.alpha,this._adaptiveMin=y.min,this._adaptiveMax=y.max,this._adaptiveSeasonal=!0,this._adaptivePrediction=!0,this._adaptiveInitial=this._adaptiveSnapshot(),this._actionService="",this._actionTargetEntity="",this._actionData={},this._actionDataJsonFallback="",this._actionTesting=!1,this._actionTestResult="",this._qcNotes="",this._qcCost="",this._qcDuration="",this._qcFeedback="",this._resetTriggerFields()}_resetTriggerFields(){this._triggerEntityId="",this._triggerEntityIds=[],this._triggerEntityLogic="any",this._triggerAttribute="",this._suggestedAttributes=[],this._availableAttributes=[],this._entityDomain="",this._triggerType="threshold",this._triggerAbove="",this._triggerBelow="",this._triggerEquals="",this._triggerNotEquals="",this._triggerForMinutes="0",this._triggerCombinator="any",this._triggerTargetValue="",this._triggerDeltaMode=!1,this._triggerBaselineValue="",this._liveBaselineValue=null,this._autoCompleteOnRecovery=!1,this._triggerFromState="",this._triggerToState="",this._triggerTargetChanges="",this._triggerRuntimeHours="",this._triggerOnStates="",this._compo
Line truncated
|
`),this._requiredCompletion=[...i.required_completion_fields||[]],this._scheduleTime=i.schedule_time||"";let _=i.on_complete_action;if(_&&_.service){this._actionService=_.service;let d=_.target?.entity_id;this._actionTargetEntity=Array.isArray(d)?d[0]||"":d||"",this._actionData=_.data&&typeof _.data=="object"?{..._.data}:{},this._actionDataJsonFallback=""}else this._actionService="",this._actionTargetEntity="",this._actionData={},this._actionDataJsonFallback="";let c=i.quick_complete_defaults;this._qcNotes=c?.notes||"",this._qcCost=c?.cost!=null?String(c.cost):"",this._qcDuration=c?.duration!=null?String(c.duration):"",this._qcFeedback=c?.feedback||"";let h=i.adaptive_config||{};if(this._environmentalEntity=h.environmental_entity||"",this._environmentalAttribute=h.environmental_attribute||"",this._environmentalInitial=this._environmentalEntity,this._environmentalAttributeInitial=this._environmentalAttribute,this._adaptiveEnabled=!!h.enabled,this._adaptiveAlpha=h.ewa_alpha?.toString()??y.alpha,this._adaptiveMin=h.min_interval_days?.toString()??y.min,this._adaptiveMax=h.max_interval_days?.toString()??y.max,this._adaptiveSeasonal=h.seasonal_enabled!==!1,this._adaptivePrediction=h.sensor_prediction_enabled!==!1,this._adaptiveInitial=this._adaptiveSnapshot(),i.trigger_config){let d=i.trigger_config;this._triggerEntityId=d.entity_id||d.entity_ids&&d.entity_ids[0]||"",this._triggerEntityIds=d.entity_ids||(d.entity_id?[d.entity_id]:[]),this._triggerEntityLogic=d.entity_logic||"any",this._triggerAttribute=d.attribute||"",this._triggerType=d.type||"threshold",this._triggerAbove=d.trigger_above?.toString()||"",this._triggerBelow=d.trigger_below?.toString()||"",this._triggerEquals=d.trigger_equals?.toString()||"",this._triggerNotEquals=d.trigger_not_equals?.toString()||"",this._triggerForMinutes=d.trigger_for_minutes?.toString()||"0",this._triggerCombinator=d.trigger_combinator==="all"?"all":"any",this._triggerTargetValue=d.trigger_target_value?.toString()||"",this._triggerDeltaMode=d.trigger_delta_mode||!1,this._triggerBaselineValue=d.trigger_baseline_value?.toString()||"",this._liveBaselineValue=i.trigger_baseline_value??null,this._autoCompleteOnRecovery=d.auto_complete_on_recovery||!1,this._triggerFromState=d.trigger_from_state||"",this._triggerToState=d.trigger_to_state||"",this._triggerTargetChanges=d.trigger_target_changes?.toString()||"",this._triggerRuntimeHours=d.trigger_runtime_hours?.toString()||"",this._triggerOnStates=(d.trigger_on_states||[]).join(", "),d.type==="compound"?(this._compoundLogic=d.compound_logic==="OR"?"OR":"AND",this._compoundConditions=(d.conditions||[]).map(D)):(this._compoundLogic="AND",this._compoundConditions=[])}else this._resetTriggerFields();this._triggerEntityId&&this._fetchEntityAttributes(this._triggerEntityId),await Promise.all([this._loadUsers(),this._loadTags(),this._loadParts(),this._loadForeignPools()]),this._open=!0}_resetFields(){this._name="",this._type="custom",this._scheduleType="time_based",this._intervalDays="30",this._intervalUnit="days",this._dueDate="",this._warningDays=String(this.defaultWarningDays),this._earliestCompletionDays="",this._intervalAnchor="completion",this._weekdays=[],this._nth="1",this._nthWeekday="5",this._domDay="1",this._domLastDay=!1,this._domBusiness=!1,this._calOffset="0",this._seasonMonths=[],this._endsMode="never",this._endsCount="",this._endsUntil="",this._notes="",this._documentationUrl="",this._customIcon="",this._priority="normal",this._labels="",this._enabled=!0,this._lastPerformed="",this._nfcTagId="",this._readingUnit="",this._consumesParts={},this._responsibleUserId=null,this._assigneePool=[],this._rotationStrategy="",this._checklistText="",this._requiredCompletion=[],this._scheduleTime="",this._environmentalEntity="",this._environmentalAttribute="",this._environmentalInitial="",this._environmentalAttributeInitial="",this._adaptiveEnabled=!1,this._adaptiveAlpha=y.alpha,this._adaptiveMin=y.min,this._adaptiveMax=y.max,this._adaptiveSeasonal=!0,this._adaptivePrediction=!0,this._adaptiveInitial=this._adaptiveSnapshot(),this._actionService="",this._actionTargetEntity="",this._actionData={},this._actionDataJsonFallback="",this._actionTesting=!1,this._actionTestResult="",this._qcNotes="",this._qcCost="",this._qcDuration="",this._qcFeedback="",this._resetTriggerFields()}_resetTriggerFields(){this._triggerEntityId="",this._triggerEntityIds=[],this._triggerEntityLogic="any",this._triggerAttribute="",this._suggestedAttributes=[],this._availableAttributes=[],this._entityDomain="",this._triggerType="threshold",this._triggerAbove="",this._triggerBelow="",this._triggerEquals="",this._triggerNotEquals="",this._triggerForMinutes="0",this._triggerCombinator="any",this._triggerTargetValue="",this._triggerDeltaMode=!1,this._triggerBaselineValue="",this._liveBaselineValue=null,this._autoCompleteOnRecovery=!1,this._triggerFromState="",this._triggerToState="",this._triggerTargetChanges="",this._triggerRuntimeHours="",this._triggerOnStates="",this._compo
Line truncated
|
||||||
<details class="ca-section">
|
<details class="ca-section">
|
||||||
<summary>${s("on_complete_action_title",t)}</summary>
|
<summary>${s("on_complete_action_title",t)}</summary>
|
||||||
<p class="field-help">${s("on_complete_action_desc",t)}</p>
|
<p class="field-help">${s("on_complete_action_desc",t)}</p>
|
||||||
<ha-service-picker
|
<ha-service-picker
|
||||||
.hass=${this.hass}
|
.hass=${this.hass}
|
||||||
.value=${this._actionService}
|
.value=${this._actionService}
|
||||||
@value-changed=${e=>{this._actionService=e.detail.value||"";let r=this._serviceSchema();if(r){let d=new Set(r.map(c=>c.name));this._actionData=Object.fromEntries(Object.entries(this._actionData).filter(([c])=>d.has(c)))}}}
|
@value-changed=${e=>{this._actionService=e.detail.value||"";let r=this._serviceSchema();if(r){let _=new Set(r.map(c=>c.name));this._actionData=Object.fromEntries(Object.entries(this._actionData).filter(([c])=>_.has(c)))}}}
|
||||||
></ha-service-picker>
|
></ha-service-picker>
|
||||||
<ha-form
|
<ha-form
|
||||||
.hass=${this.hass}
|
.hass=${this.hass}
|
||||||
@@ -76,13 +76,13 @@ import{a as x,d as N,e as q}from"/maintenance_supporter_panelfiles/panel-chunks/
|
|||||||
<option value="not_needed">${s("quick_complete_defaults_feedback_not_needed",t)}</option>
|
<option value="not_needed">${s("quick_complete_defaults_feedback_not_needed",t)}</option>
|
||||||
</select>
|
</select>
|
||||||
</details>
|
</details>
|
||||||
`}async _loadParts(){if(this.parts=[],!!this._entryId)try{let t=await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/object",entry_id:this._entryId});this.parts=t.parts||[],this._partsLoadFailed=!1}catch{this.parts=[],this._partsLoadFailed=!0}}async _loadForeignPools(){if(this._foreignOwners=[],!!this._entryId)try{let t=await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/objects"});this._foreignOwners=(t.objects||[]).filter(i=>i.entry_id!==this._entryId&&(i.parts||[]).length>0).map(i=>({entry_id:i.entry_id,name:i.object?.name||i.entry_id,parts:i.parts||[]})).sort((i,e)=>i.name.localeCompare(e.name))}catch{this._foreignOwners=[]}}async _loadTags(){try{let t=await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/tags/list"});this._availableTags=t.tags||[]}catch{this._availableTags=[]}}_fetchConditionAttributes(t){!t||!this.hass||this._conditionAttrOptions[t]||this._conditionAttrPending.has(t)||(this._conditionAttrPending.add(t),this.hass.connection.sendMessagePromise({type:"maintenance_supporter/entity/attributes",entity_id:t}).then(i=>{let e=i;this._conditionAttrOptions={...this._conditionAttrOptions,[t]:{suggested:e.suggested_attributes||[],available:e.available_attributes||[]}}}).catch(()=>{this._conditionAttrOptions={...this._conditionAttrOptions,[t]:{suggested:[],available:[]}}}))}async _fetchEntityAttributes(t){if(!t||!this.hass){this._suggestedAttributes=[],this._availableAttributes=[],this._entityDomain="";return}try{let i=await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/entity/attributes",entity_id:t});this._entityDomain=i.domain||"",this._suggestedAttributes=i.suggested_attributes||[],this._availableAttributes=i.available_attributes||[]}catch{this._suggestedAttributes=[],this._availableAttributes=[],this._entityDomain=""}}get _hasForeignPick(){return Object.values(this._consumesParts).some(t=>!!t.entry_id)}_renderConsumesRow(t,i){let e=x({part_id:t.id,entry_id:i}),r=this._consumesParts[e],d=i?{part_id:t.id,quantity:1,entry_id:i}:{part_id:t.id,quantity:1};return l`
|
`}async _loadParts(){if(this.parts=[],!!this._entryId)try{let t=await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/object",entry_id:this._entryId});this.parts=t.parts||[],this._partsLoadFailed=!1}catch{this.parts=[],this._partsLoadFailed=!0}}async _loadForeignPools(){if(this._foreignOwners=[],!!this._entryId)try{let t=await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/objects"});this._foreignOwners=(t.objects||[]).filter(i=>i.entry_id!==this._entryId&&(i.parts||[]).length>0).map(i=>({entry_id:i.entry_id,name:i.object?.name||i.entry_id,parts:i.parts||[]})).sort((i,e)=>i.name.localeCompare(e.name))}catch{this._foreignOwners=[]}}async _loadTags(){try{let t=await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/tags/list"});this._availableTags=t.tags||[]}catch{this._availableTags=[]}}_fetchConditionAttributes(t){!t||!this.hass||this._conditionAttrOptions[t]||this._conditionAttrPending.has(t)||(this._conditionAttrPending.add(t),this.hass.connection.sendMessagePromise({type:"maintenance_supporter/entity/attributes",entity_id:t}).then(i=>{let e=i;this._conditionAttrOptions={...this._conditionAttrOptions,[t]:{suggested:e.suggested_attributes||[],available:e.available_attributes||[]}}}).catch(()=>{this._conditionAttrOptions={...this._conditionAttrOptions,[t]:{suggested:[],available:[]}}}))}async _fetchEntityAttributes(t){if(!t||!this.hass){this._suggestedAttributes=[],this._availableAttributes=[],this._entityDomain="";return}try{let i=await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/entity/attributes",entity_id:t});this._entityDomain=i.domain||"",this._suggestedAttributes=i.suggested_attributes||[],this._availableAttributes=i.available_attributes||[]}catch{this._suggestedAttributes=[],this._availableAttributes=[],this._entityDomain=""}}get _hasForeignPick(){return Object.values(this._consumesParts).some(t=>!!t.entry_id)}_renderConsumesRow(t,i){let e=x({part_id:t.id,entry_id:i}),r=this._consumesParts[e],_=i?{part_id:t.id,quantity:1,entry_id:i}:{part_id:t.id,quantity:1};return l`
|
||||||
<div class="consumes-row">
|
<div class="consumes-row">
|
||||||
<label class="consumes-check">
|
<label class="consumes-check">
|
||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
.checked=${r!==void 0}
|
.checked=${r!==void 0}
|
||||||
@change=${c=>{let h={...this._consumesParts};c.target.checked?h[e]=h[e]||d:delete h[e],this._consumesParts=h}}
|
@change=${c=>{let h={...this._consumesParts};c.target.checked?h[e]=h[e]||_:delete h[e],this._consumesParts=h}}
|
||||||
/>
|
/>
|
||||||
<span>${t.name}${t.unit?` (${t.unit})`:""}</span>
|
<span>${t.name}${t.unit?` (${t.unit})`:""}</span>
|
||||||
</label>
|
</label>
|
||||||
@@ -93,11 +93,11 @@ import{a as x,d as N,e as q}from"/maintenance_supporter_panelfiles/panel-chunks/
|
|||||||
max="999"
|
max="999"
|
||||||
step="0.01"
|
step="0.01"
|
||||||
.value=${String(r.quantity)}
|
.value=${String(r.quantity)}
|
||||||
@input=${c=>{let h=parseFloat(c.target.value);this._consumesParts={...this._consumesParts,[e]:{...d,quantity:Number.isFinite(h)&&h>=.01?h:1}}}}
|
@input=${c=>{let h=parseFloat(c.target.value);this._consumesParts={...this._consumesParts,[e]:{..._,quantity:Number.isFinite(h)&&h>=.01?h:1}}}}
|
||||||
/>`:p}
|
/>`:p}
|
||||||
</div>
|
</div>
|
||||||
`}_toggleRequired(t,i){let e=new Set(this._requiredCompletion);i?e.add(t):e.delete(t),this._requiredCompletion=[...e]}async _save(){if(!this._loading&&this._name.trim()){if(this._adaptiveSnapshot()!==this._adaptiveInitial){let t=parseInt(this._adaptiveMin,10),i=parseInt(this._adaptiveMax,10);if(!isNaN(t)&&!isNaN(i)&&t>i){this._error=`${s("adaptive_min_interval",this._lang)} > ${s("adaptive_max_interval",this._lang)}`;return}}this._loading=!0,this._error="";try{let t={type:this._taskId?"maintenance_supporter/task/update":"maintenance_supporter/task/create",entry_id:this._entryId,name:this._name,task_type:this._type,schedule_type:this._scheduleType,warning_days:Number.isNaN(parseInt(this._warningDays,10))?this.defaultWarningDays:Math.max(0,parseInt(this._warningDays,10))},i=this._earliestCompletionDays.trim();if(t.earliest_completion_days=i===""?null:Math.max(0,parseInt(i,10)||0),this._taskId&&(t.task_id=this._taskId),this._scheduleType==="one_time"?(t.due_date=this._dueDate||null,t.interval_days=null):w.includes(this._scheduleType)?(t.schedule={...this._buildSchedule(),...this._recurrenceExtras()},t.interval_days=null,this._taskId&&(t.due_date=null)):(this._taskId&&(t.due_date=null),this._scheduleType!=="manual"&&this._intervalDays?(t.interval_days=parseInt(this._intervalDays,10),t.interval_unit=this._intervalUnit,t.interval_anchor=this._intervalAnchor,this._scheduleType==="time_based"&&(t.schedule={kind:"interval",...this._recurrenceExtras()})):this._taskId&&(t.interval_days=null,t.interval_anchor="completion")),t.notes=this._notes||null,t.documentation_url=this._documentationUrl||null,t.custom_icon=this._customIcon||null,t.priority=this._priority,t.labels=this._labels.split(",").map(c=>c.trim()).filter(Boolean),t.enabled=this._enabled,t.last_performed=this._lastPerformed||null,t.nfc_tag_id=this._nfcTagId||null,t.reading_unit=this._readingUnit.trim()||null,(this.parts.length||this._foreignOwners.length)&&(t.consumes_parts=Object.values(this._consumesParts).map(c=>c.entry_id?{part_id:c.part_id,quantity:c.quantity,entry_id:c.entry_id}:{part_id:c.part_id,quantity:c.quantity})),t.responsible_user_id=this._responsibleUserId,t.assignee_pool=this._assigneePool,t.required_completion_fields=this._requiredCompletion,t.rotation_strategy=this._assigneePool.length>=2&&this._rotationStrategy?this._rotationStrategy:null,this._scheduleType==="sensor_based"&&this._triggerType==="compound"){let c=this._compoundConditions.map(z).filter(h=>h!==null);if(c.length>0){let h={type:"compound",compound_logic:this._compoundLogic,conditions:c};this._autoCompleteOnRecovery&&(h.auto_complete_on_recovery=!0),this._triggerCombinator==="all"&&(h.trigger_combinator="all"),t.trigger_config=h}else this._taskId&&(t.trigger_config=null)}else if(this._scheduleType==="sensor_based"&&this._triggerEntityId){let c=this._triggerEntityIds.length>0?this._triggerEntityIds:[this._triggerEntityId],h={entity_id:c[0],entity_ids:c,type:this._triggerType};if(this._triggerAttribute&&(h.attribute=this._triggerAttribute),this._autoCompleteOnRecovery&&(h.auto_complete_on_recovery=!0),this._triggerCombinator==="all"&&(h.trigger_combinator="all"),c.length>1&&(h.entity_logic=this._triggerEntityLogic),this._triggerType==="threshold"){if(this._triggerAbove){let _=parseFloat(this._triggerAbove);isNaN(_)||(h.trigger_above=_)}if(this._triggerBelow){let _=parseFloat(this._triggerBelow);isNaN(_)||(h.trigger_below=_)}if(this._triggerEquals){let _=parseFloat(this._triggerEquals);isNaN(_)||(h.trigger_equals=_)}if(this._triggerNotEquals){let _=parseFloat(this._triggerNotEquals);isNaN(_)||(h.trigger_not_equals=_)}if(this._triggerForMinutes){let _=parseInt(this._triggerForMinutes,10);isNaN(_)||(h.trigger_for_minutes=_)}}else if(this._triggerType==="counter"){if(this._triggerTargetValue){let _=parseFloat(this._triggerTargetValue);isNaN(_)||(h.trigger_target_value=_)}if(h.trigger_delta_mode=this._triggerDeltaMode,this._triggerDeltaMode&&this._triggerBaselineValue){let _=parseFloat(this._triggerBaselineValue);!isNaN(_)&&_>=0&&(h.trigger_baseline_value=_)}}else if(this._triggerType==="state_change"){if(this._triggerFromState&&(h.trigger_from_state=this._triggerFromState),this._triggerToState&&(h.trigger_to_state=this._triggerToState),this._triggerTargetChanges){let _=parseInt(this._triggerTargetChanges,10);isNaN(_)||(h.trigger_target_changes=_)}}else if(this._triggerType==="runtime"){if(this._triggerRuntimeHours){let m=parseFloat(this._triggerRuntimeHours);isNaN(m)||(h.trigger_runtime_hours=m)}let _=this._triggerOnStates.split(",").map(m=>m.trim()).filter(Boolean);_.length>0&&(h.trigger_on_states=_)}t.trigger_config=h}else this._taskId&&(t.trigger_config=null);if(this.scheduleTimeEnabled&&this._scheduleType==="time_based"){let c=this._scheduleTime.trim();t.schedule_time=/^([01]\d|2[0-3]):[0-5]\d$/.test(c)?c:null}if(this.checklistsEnabled){let c=this._checklistText.split(`
|
`}_toggleRequired(t,i){let e=new Set(this._requiredCompletion);i?e.add(t):e.delete(t),this._requiredCompletion=[...e]}async _save(){if(!this._loading&&this._name.trim()){if(this._adaptiveSnapshot()!==this._adaptiveInitial){let t=parseInt(this._adaptiveMin,10),i=parseInt(this._adaptiveMax,10);if(!isNaN(t)&&!isNaN(i)&&t>i){this._error=`${s("adaptive_min_interval",this._lang)} > ${s("adaptive_max_interval",this._lang)}`;return}}this._loading=!0,this._error="";try{let t={type:this._taskId?"maintenance_supporter/task/update":"maintenance_supporter/task/create",entry_id:this._entryId,name:this._name,task_type:this._type,schedule_type:this._scheduleType,warning_days:Number.isNaN(parseInt(this._warningDays,10))?this.defaultWarningDays:Math.max(0,parseInt(this._warningDays,10))},i=this._earliestCompletionDays.trim();if(t.earliest_completion_days=i===""?null:Math.max(0,parseInt(i,10)||0),this._taskId&&(t.task_id=this._taskId),this._scheduleType==="one_time"?(t.due_date=this._dueDate||null,t.interval_days=null):w.includes(this._scheduleType)?(t.schedule={...this._buildSchedule(),...this._recurrenceExtras()},t.interval_days=null,this._taskId&&(t.due_date=null)):(this._taskId&&(t.due_date=null),this._scheduleType!=="manual"&&this._intervalDays?(t.interval_days=parseInt(this._intervalDays,10),t.interval_unit=this._intervalUnit,t.interval_anchor=this._intervalAnchor,this._scheduleType==="time_based"&&(t.schedule={kind:"interval",...this._recurrenceExtras()})):this._taskId&&(t.interval_days=null,t.interval_anchor="completion")),t.notes=this._notes||null,t.documentation_url=this._documentationUrl||null,t.custom_icon=this._customIcon||null,t.priority=this._priority,t.labels=this._labels.split(",").map(c=>c.trim()).filter(Boolean),t.enabled=this._enabled,t.last_performed=this._lastPerformed||null,t.nfc_tag_id=this._nfcTagId||null,t.reading_unit=this._readingUnit.trim()||null,(this.parts.length||this._foreignOwners.length)&&(t.consumes_parts=Object.values(this._consumesParts).map(c=>c.entry_id?{part_id:c.part_id,quantity:c.quantity,entry_id:c.entry_id}:{part_id:c.part_id,quantity:c.quantity})),t.responsible_user_id=this._responsibleUserId,t.assignee_pool=this._assigneePool,t.required_completion_fields=this._requiredCompletion,t.rotation_strategy=this._assigneePool.length>=2&&this._rotationStrategy?this._rotationStrategy:null,this._scheduleType==="sensor_based"&&this._triggerType==="compound"){let c=this._compoundConditions.map(z).filter(h=>h!==null);if(c.length>0){let h={type:"compound",compound_logic:this._compoundLogic,conditions:c};this._autoCompleteOnRecovery&&(h.auto_complete_on_recovery=!0),this._triggerCombinator==="all"&&(h.trigger_combinator="all"),t.trigger_config=h}else this._taskId&&(t.trigger_config=null)}else if(this._scheduleType==="sensor_based"&&this._triggerEntityId){let c=this._triggerEntityIds.length>0?this._triggerEntityIds:[this._triggerEntityId],h={entity_id:c[0],entity_ids:c,type:this._triggerType};if(this._triggerAttribute&&(h.attribute=this._triggerAttribute),this._autoCompleteOnRecovery&&(h.auto_complete_on_recovery=!0),this._triggerCombinator==="all"&&(h.trigger_combinator="all"),c.length>1&&(h.entity_logic=this._triggerEntityLogic),this._triggerType==="threshold"){if(this._triggerAbove){let d=parseFloat(this._triggerAbove);isNaN(d)||(h.trigger_above=d)}if(this._triggerBelow){let d=parseFloat(this._triggerBelow);isNaN(d)||(h.trigger_below=d)}if(this._triggerEquals){let d=parseFloat(this._triggerEquals);isNaN(d)||(h.trigger_equals=d)}if(this._triggerNotEquals){let d=parseFloat(this._triggerNotEquals);isNaN(d)||(h.trigger_not_equals=d)}if(this._triggerForMinutes){let d=parseInt(this._triggerForMinutes,10);isNaN(d)||(h.trigger_for_minutes=d)}}else if(this._triggerType==="counter"){if(this._triggerTargetValue){let d=parseFloat(this._triggerTargetValue);isNaN(d)||(h.trigger_target_value=d)}if(h.trigger_delta_mode=this._triggerDeltaMode,this._triggerDeltaMode&&this._triggerBaselineValue){let d=parseFloat(this._triggerBaselineValue);!isNaN(d)&&d>=0&&(h.trigger_baseline_value=d)}}else if(this._triggerType==="state_change"){if(this._triggerFromState&&(h.trigger_from_state=this._triggerFromState),this._triggerToState&&(h.trigger_to_state=this._triggerToState),this._triggerTargetChanges){let d=parseInt(this._triggerTargetChanges,10);isNaN(d)||(h.trigger_target_changes=d)}if(this._triggerForMinutes){let d=parseInt(this._triggerForMinutes,10);isNaN(d)||(h.trigger_for_minutes=d)}}else if(this._triggerType==="runtime"){if(this._triggerRuntimeHours){let m=parseFloat(this._triggerRuntimeHours);isNaN(m)||(h.trigger_runtime_hours=m)}let d=this._triggerOnStates.split(",").map(m=>m.trim()).filter(Boolean);d.length>0&&(h.trigger_on_states=d)}t.trigger_config=h}else this._taskId&&(t.trigger_config=null);if(this.scheduleTimeEnabled&&this._scheduleType==="time_based"){let c=this._scheduleTime.trim();t.schedule_time=/^([01]\d|2[0-3]):[0-5]\d$/.test(c)?c:null}if(this.checklistsEnabled){let c=this._checklistText.split(`
|
||||||
`).map(h=>h.trim()).filter(Boolean).slice(0,100);t.checklist=c.length?c:null}if(this.completionActionsEnabled){let c=this._actionService.trim();if(c&&/^[a-z][a-z0-9_]*\.[a-z0-9_]+$/.test(c)){let v={service:c},g=this._actionTargetEntity.trim();g&&(v.target={entity_id:g});let f=this._buildActionData();Object.keys(f).length>0&&(v.data=f),t.on_complete_action=v}else t.on_complete_action=null;let h={};this._qcNotes.trim()&&(h.notes=this._qcNotes.trim());let _=parseFloat(this._qcCost);!isNaN(_)&&_>=0&&(h.cost=_);let m=parseInt(this._qcDuration,10);!isNaN(m)&&m>=0&&(h.duration=m),this._qcFeedback&&(h.feedback=this._qcFeedback),t.quick_complete_defaults=Object.keys(h).length?h:null}let e=await this.hass.connection.sendMessagePromise(t),r=this._taskId||e?.task_id,d=this._environmentalEntity!==this._environmentalInitial||this._environmentalAttribute!==this._environmentalAttributeInitial;if(r&&this._scheduleType==="sensor_based"&&d)try{await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/task/set_environmental_entity",entry_id:this._entryId,task_id:r,environmental_entity:this._environmentalEntity||null,environmental_attribute:this._environmentalAttribute||null}),this._environmentalInitial=this._environmentalEntity,this._environmentalAttributeInitial=this._environmentalAttribute}catch{}if(r&&this._adaptiveSnapshot()!==this._adaptiveInitial){let c=parseFloat(this._adaptiveAlpha),h=parseInt(this._adaptiveMin,10),_=parseInt(this._adaptiveMax,10);try{await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/task/set_adaptive",entry_id:this._entryId,task_id:r,enabled:this._adaptiveEnabled,...c>=.1&&c<=.9?{ewa_alpha:c}:{},...!isNaN(h)&&h>=1?{min_interval_days:h}:{},...!isNaN(_)&&_>=1?{max_interval_days:_}:{},seasonal_enabled:this._adaptiveSeasonal,sensor_prediction_enabled:this._adaptivePrediction}),this._adaptiveInitial=this._adaptiveSnapshot()}catch{}}this._open=!1,this.dispatchEvent(new CustomEvent("task-saved"))}catch(t){this._error=P(t,this._lang,s("save_error",this._lang))}finally{this._loading=!1}}}_close(){this._open=!1,this._pickerProbeTimer!==void 0&&(clearTimeout(this._pickerProbeTimer),this._pickerProbeTimer=void 0),this._pickerProbeStrikes=0}_renderTriggerFields(){if(this._scheduleType!=="sensor_based")return p;let t=this._lang,i=this._triggerType==="compound";return l`
|
`).map(h=>h.trim()).filter(Boolean).slice(0,100);t.checklist=c.length?c:null}if(this.completionActionsEnabled){let c=this._actionService.trim();if(c&&/^[a-z][a-z0-9_]*\.[a-z0-9_]+$/.test(c)){let v={service:c},g=this._actionTargetEntity.trim();g&&(v.target={entity_id:g});let f=this._buildActionData();Object.keys(f).length>0&&(v.data=f),t.on_complete_action=v}else t.on_complete_action=null;let h={};this._qcNotes.trim()&&(h.notes=this._qcNotes.trim());let d=parseFloat(this._qcCost);!isNaN(d)&&d>=0&&(h.cost=d);let m=parseInt(this._qcDuration,10);!isNaN(m)&&m>=0&&(h.duration=m),this._qcFeedback&&(h.feedback=this._qcFeedback),t.quick_complete_defaults=Object.keys(h).length?h:null}let e=await this.hass.connection.sendMessagePromise(t),r=this._taskId||e?.task_id,_=this._environmentalEntity!==this._environmentalInitial||this._environmentalAttribute!==this._environmentalAttributeInitial;if(r&&this._scheduleType==="sensor_based"&&_)try{await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/task/set_environmental_entity",entry_id:this._entryId,task_id:r,environmental_entity:this._environmentalEntity||null,environmental_attribute:this._environmentalAttribute||null}),this._environmentalInitial=this._environmentalEntity,this._environmentalAttributeInitial=this._environmentalAttribute}catch{}if(r&&this._adaptiveSnapshot()!==this._adaptiveInitial){let c=parseFloat(this._adaptiveAlpha),h=parseInt(this._adaptiveMin,10),d=parseInt(this._adaptiveMax,10);try{await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/task/set_adaptive",entry_id:this._entryId,task_id:r,enabled:this._adaptiveEnabled,...c>=.1&&c<=.9?{ewa_alpha:c}:{},...!isNaN(h)&&h>=1?{min_interval_days:h}:{},...!isNaN(d)&&d>=1?{max_interval_days:d}:{},seasonal_enabled:this._adaptiveSeasonal,sensor_prediction_enabled:this._adaptivePrediction}),this._adaptiveInitial=this._adaptiveSnapshot()}catch{}}this._open=!1,this.dispatchEvent(new CustomEvent("task-saved"))}catch(t){this._error=P(t,this._lang,s("save_error",this._lang))}finally{this._loading=!1}}}_close(){this._open=!1,this._pickerProbeTimer!==void 0&&(clearTimeout(this._pickerProbeTimer),this._pickerProbeTimer=void 0),this._pickerProbeStrikes=0}_renderTriggerFields(){if(this._scheduleType!=="sensor_based")return p;let t=this._lang,i=this._triggerType==="compound";return l`
|
||||||
<h3>${s("trigger_configuration",t)}</h3>
|
<h3>${s("trigger_configuration",t)}</h3>
|
||||||
<div class="select-row">
|
<div class="select-row">
|
||||||
<label>${s("trigger_type",t)}</label>
|
<label>${s("trigger_type",t)}</label>
|
||||||
@@ -113,7 +113,7 @@ import{a as x,d as N,e as q}from"/maintenance_supporter_panelfiles/panel-chunks/
|
|||||||
<ms-textfield
|
<ms-textfield
|
||||||
label="${s("entity_id",t)} (${s("comma_separated",t)})"
|
label="${s("entity_id",t)} (${s("comma_separated",t)})"
|
||||||
.value=${this._triggerEntityIds.length>0?this._triggerEntityIds.join(", "):this._triggerEntityId}
|
.value=${this._triggerEntityIds.length>0?this._triggerEntityIds.join(", "):this._triggerEntityId}
|
||||||
@input=${e=>{let d=e.target.value.split(",").map(c=>c.trim()).filter(Boolean);this._triggerEntityId=d[0]||"",this._triggerEntityIds=d,d[0]&&this._fetchEntityAttributes(d[0])}}
|
@input=${e=>{let _=e.target.value.split(",").map(c=>c.trim()).filter(Boolean);this._triggerEntityId=_[0]||"",this._triggerEntityIds=_,_[0]&&this._fetchEntityAttributes(_[0])}}
|
||||||
></ms-textfield>
|
></ms-textfield>
|
||||||
`:l`
|
`:l`
|
||||||
<ha-form
|
<ha-form
|
||||||
@@ -198,25 +198,25 @@ import{a as x,d as N,e as q}from"/maintenance_supporter_panelfiles/panel-chunks/
|
|||||||
<ms-textfield
|
<ms-textfield
|
||||||
label="${s("entity_id",e)} (${s("comma_separated",e)})"
|
label="${s("entity_id",e)} (${s("comma_separated",e)})"
|
||||||
.value=${t.entityIds}
|
.value=${t.entityIds}
|
||||||
@input=${d=>this._patchCondition(i,{entityIds:d.target.value})}
|
@input=${_=>this._patchCondition(i,{entityIds:_.target.value})}
|
||||||
></ms-textfield>
|
></ms-textfield>
|
||||||
`:l`
|
`:l`
|
||||||
<ha-form
|
<ha-form
|
||||||
class="entity-picker-form"
|
class="entity-picker-form"
|
||||||
.hass=${this.hass}
|
.hass=${this.hass}
|
||||||
.schema=${[{name:"condition_entities",selector:{entity:{multiple:!0,domain:I}}}]}
|
.schema=${[{name:"condition_entities",selector:{entity:{multiple:!0,domain:I}}}]}
|
||||||
.data=${{condition_entities:t.entityIds.split(",").map(d=>d.trim()).filter(Boolean)}}
|
.data=${{condition_entities:t.entityIds.split(",").map(_=>_.trim()).filter(Boolean)}}
|
||||||
.computeLabel=${()=>s("entity_id",e)}
|
.computeLabel=${()=>s("entity_id",e)}
|
||||||
@value-changed=${d=>{let c=(d.detail.value.condition_entities||[]).filter(Boolean);this._patchCondition(i,{entityIds:c.join(", ")})}}
|
@value-changed=${_=>{let c=(_.detail.value.condition_entities||[]).filter(Boolean);this._patchCondition(i,{entityIds:c.join(", ")})}}
|
||||||
></ha-form>`}
|
></ha-form>`}
|
||||||
${this._renderConditionAttribute(t,i)}
|
${this._renderConditionAttribute(t,i)}
|
||||||
<div class="select-row">
|
<div class="select-row">
|
||||||
<label>${s("trigger_type",e)}</label>
|
<label>${s("trigger_type",e)}</label>
|
||||||
<select
|
<select
|
||||||
.value=${t.type}
|
.value=${t.type}
|
||||||
@change=${d=>this._patchCondition(i,{type:d.target.value})}
|
@change=${_=>this._patchCondition(i,{type:_.target.value})}
|
||||||
>
|
>
|
||||||
${R.map(d=>l`<option value=${d} ?selected=${d===t.type}>${s(d,e)}</option>`)}
|
${R.map(_=>l`<option value=${_} ?selected=${_===t.type}>${s(_,e)}</option>`)}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
${this._renderConditionTypeFields(t,i)}
|
${this._renderConditionTypeFields(t,i)}
|
||||||
@@ -323,7 +323,7 @@ import{a as x,d as N,e as q}from"/maintenance_supporter_panelfiles/panel-chunks/
|
|||||||
.value=${t.value}
|
.value=${t.value}
|
||||||
@input=${e=>t.onSelect(e.target.value.trim())}
|
@input=${e=>t.onSelect(e.target.value.trim())}
|
||||||
></ms-textfield>
|
></ms-textfield>
|
||||||
`}_renderEnvironmentalAttribute(t){this._fetchConditionAttributes(this._environmentalEntity);let i=this._conditionAttrOptions[this._environmentalEntity];return this._renderAttributeSelect({label:s("environmental_attribute_optional",t),value:this._environmentalAttribute,suggested:i?.suggested??[],available:i?.available??[],onSelect:e=>this._environmentalAttribute=e})}_renderConditionAttribute(t,i){let e=t.entityIds.split(",")[0]?.trim()||"";e&&this._fetchConditionAttributes(e);let r=e?this._conditionAttrOptions[e]:void 0;return this._renderAttributeSelect({label:s("attribute_optional",this._lang),value:t.attribute,suggested:r?.suggested??[],available:r?.available??[],onSelect:d=>this._patchCondition(i,{attribute:d})})}_renderConditionTypeFields(t,i){let e=this._lang;if(t.type==="threshold")return l`
|
`}_renderEnvironmentalAttribute(t){this._fetchConditionAttributes(this._environmentalEntity);let i=this._conditionAttrOptions[this._environmentalEntity];return this._renderAttributeSelect({label:s("environmental_attribute_optional",t),value:this._environmentalAttribute,suggested:i?.suggested??[],available:i?.available??[],onSelect:e=>this._environmentalAttribute=e})}_renderConditionAttribute(t,i){let e=t.entityIds.split(",")[0]?.trim()||"";e&&this._fetchConditionAttributes(e);let r=e?this._conditionAttrOptions[e]:void 0;return this._renderAttributeSelect({label:s("attribute_optional",this._lang),value:t.attribute,suggested:r?.suggested??[],available:r?.available??[],onSelect:_=>this._patchCondition(i,{attribute:_})})}_renderConditionTypeFields(t,i){let e=this._lang;if(t.type==="threshold")return l`
|
||||||
<ms-textfield label="${s("trigger_above",e)}" type="number" .value=${t.above}
|
<ms-textfield label="${s("trigger_above",e)}" type="number" .value=${t.above}
|
||||||
@input=${r=>this._patchCondition(i,{above:r.target.value})}></ms-textfield>
|
@input=${r=>this._patchCondition(i,{above:r.target.value})}></ms-textfield>
|
||||||
<ms-textfield label="${s("trigger_below",e)}" type="number" .value=${t.below}
|
<ms-textfield label="${s("trigger_below",e)}" type="number" .value=${t.below}
|
||||||
@@ -343,14 +343,14 @@ import{a as x,d as N,e as q}from"/maintenance_supporter_panelfiles/panel-chunks/
|
|||||||
${s("delta_mode",e)}
|
${s("delta_mode",e)}
|
||||||
</label>
|
</label>
|
||||||
`;if(t.type==="state_change"){let r=t.entityIds.split(",")[0]?.trim()||"";return l`
|
`;if(t.type==="state_change"){let r=t.entityIds.split(",")[0]?.trim()||"";return l`
|
||||||
${this._renderStateField({label:s("from_state_optional",e),value:t.fromState,entityId:r,onInput:d=>this._patchCondition(i,{fromState:d})})}
|
${this._renderStateField({label:s("from_state_optional",e),value:t.fromState,entityId:r,onInput:_=>this._patchCondition(i,{fromState:_})})}
|
||||||
${this._renderStateField({label:s("to_state_optional",e),value:t.toState,entityId:r,onInput:d=>this._patchCondition(i,{toState:d})})}
|
${this._renderStateField({label:s("to_state_optional",e),value:t.toState,entityId:r,onInput:_=>this._patchCondition(i,{toState:_})})}
|
||||||
<ms-textfield label="${s("target_changes",e)}" type="number" .value=${t.targetChanges}
|
<ms-textfield label="${s("target_changes",e)}" type="number" .value=${t.targetChanges}
|
||||||
@input=${d=>this._patchCondition(i,{targetChanges:d.target.value})}></ms-textfield>
|
@input=${_=>this._patchCondition(i,{targetChanges:_.target.value})}></ms-textfield>
|
||||||
`}if(t.type==="runtime"){let r=t.entityIds.split(",")[0]?.trim()||"";return l`
|
`}if(t.type==="runtime"){let r=t.entityIds.split(",")[0]?.trim()||"";return l`
|
||||||
<ms-textfield label="${s("runtime_hours",e)}" type="number" .value=${t.runtimeHours}
|
<ms-textfield label="${s("runtime_hours",e)}" type="number" .value=${t.runtimeHours}
|
||||||
@input=${d=>this._patchCondition(i,{runtimeHours:d.target.value})}></ms-textfield>
|
@input=${_=>this._patchCondition(i,{runtimeHours:_.target.value})}></ms-textfield>
|
||||||
${this._renderOnStatesField({value:t.onStates,entityId:r,onInput:d=>this._patchCondition(i,{onStates:d})})}
|
${this._renderOnStatesField({value:t.onStates,entityId:r,onInput:_=>this._patchCondition(i,{onStates:_})})}
|
||||||
`}return p}_renderUnitSelect(){let t=this._lang;return l`
|
`}return p}_renderUnitSelect(){let t=this._lang;return l`
|
||||||
<div class="select-row">
|
<div class="select-row">
|
||||||
<label>${s("interval_unit",t)}</label>
|
<label>${s("interval_unit",t)}</label>
|
||||||
@@ -360,7 +360,7 @@ import{a as x,d as N,e as q}from"/maintenance_supporter_panelfiles/panel-chunks/
|
|||||||
>
|
>
|
||||||
${["days","weeks","months","years"].map(i=>l`<option value=${i} ?selected=${i===this._intervalUnit}>${s("unit_"+i,t)}</option>`)}
|
${["days","weeks","months","years"].map(i=>l`<option value=${i} ?selected=${i===this._intervalUnit}>${s("unit_"+i,t)}</option>`)}
|
||||||
</select>
|
</select>
|
||||||
</div>`}_toggleWeekday(t){this._weekdays=this._weekdays.includes(t)?this._weekdays.filter(i=>i!==t):[...this._weekdays,t]}_previewScheduleDict(){if(this._scheduleType==="one_time")return this._dueDate?{kind:"one_time",due_date:this._dueDate}:null;if(w.includes(this._scheduleType))return{...this._buildSchedule(),...this._recurrenceExtras()};let t=parseInt(this._intervalDays,10);return this._scheduleType==="manual"||!t||t<=0?null:{kind:"interval",every:t,unit:this._intervalUnit,anchor:this._intervalAnchor,...this._recurrenceExtras()}}updated(t){super.updated?.(t),this._scheduleEntityPickerProbe();for(let i of t.keys())if(n._PREVIEW_RELEVANT.has(String(i))){this._schedulePreviewRefresh();return}}_scheduleEntityPickerProbe(){this._entityPickerFallback||this._pickerProbeTimer!==void 0||!this._open||this._scheduleType!=="sensor_based"||(this._pickerProbeTimer=setTimeout(()=>this._probeEntityPickers(),1500))}_probeEntityPickers(){if(this._pickerProbeTimer=void 0,this._entityPickerFallback||!this._open)return;let t=this.shadowRoot?.querySelector("ha-form.entity-picker-form"),i=(this.shadowRoot?.querySelector(".content")?.offsetHeight??0)>0;if(!t||!i){this._pickerProbeStrikes=0;return}let e=(h,_,m=0)=>{if(!(!h||m>10)){(h.tagName?.toLowerCase()??"")==="ha-entity-picker"&&_.push(h);for(let v of[h.shadowRoot,h])if(v)for(let g of Array.from(v.children??[]))e(g,_,m+1)}},r=[...this.shadowRoot?.querySelectorAll("ha-form.entity-picker-form")??[]],d=[];for(let h of r)e(h,d);let c=d.length===0||d.some(h=>h.offsetHeight===0);if(t.offsetHeight===0||c){if(this._pickerProbeStrikes+=1,this._pickerProbeStrikes>=2){this._entityPickerFallback=!0;return}this._pickerProbeTimer=setTimeout(()=>this._probeEntityPickers(),700)}else this._pickerProbeStrikes=0}_schedulePreviewRefresh(){this._previewTimer&&clearTimeout(this._previewTimer),this._previewTimer=setTimeout(()=>{this._fetchSchedulePreview()},300)}async _fetchSchedulePreview(){let t=this._open?this._previewScheduleDict():null;if(!t){this._schedulePreview=[],this._schedulePreviewEnded=!1;return}let i=++this._previewSeq;try{let e=await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/schedule/preview",schedule:t,...this._lastPerformed?{last_performed:this._lastPerformed}:{}});if(i!==this._previewSeq)return;this._schedulePreview=e.occurrences||[],this._schedulePreviewEnded=!!e.series_ended}catch{}}_renderSchedulePreview(){if(this._schedulePreview.length===0)return p;let t=this._lang,i=this.scheduleTimeEnabled&&this._scheduleTime?` ${this._scheduleTime}`:"",e=this._schedulePreview.map((d,c)=>{let h=new Date(`${d}T12:00:00`).getDay();return`${E(h===0?6:h-1,t,"short")} ${A(d,t)}${c===0?i:""}`}).join(" \xB7 "),r=this._scheduleType==="time_based"&&this._intervalAnchor==="completion"?l`<div class="field-help">${s("schedule_preview_ontime",t)}</div>`:p;return l`
|
</div>`}_toggleWeekday(t){this._weekdays=this._weekdays.includes(t)?this._weekdays.filter(i=>i!==t):[...this._weekdays,t]}_previewScheduleDict(){if(this._scheduleType==="one_time")return this._dueDate?{kind:"one_time",due_date:this._dueDate}:null;if(w.includes(this._scheduleType))return{...this._buildSchedule(),...this._recurrenceExtras()};let t=parseInt(this._intervalDays,10);return this._scheduleType==="manual"||!t||t<=0?null:{kind:"interval",every:t,unit:this._intervalUnit,anchor:this._intervalAnchor,...this._recurrenceExtras()}}updated(t){super.updated?.(t),this._scheduleEntityPickerProbe();for(let i of t.keys())if(n._PREVIEW_RELEVANT.has(String(i))){this._schedulePreviewRefresh();return}}_scheduleEntityPickerProbe(){this._entityPickerFallback||this._pickerProbeTimer!==void 0||!this._open||this._scheduleType!=="sensor_based"||(this._pickerProbeTimer=setTimeout(()=>this._probeEntityPickers(),1500))}_probeEntityPickers(){if(this._pickerProbeTimer=void 0,this._entityPickerFallback||!this._open)return;let t=this.shadowRoot?.querySelector("ha-form.entity-picker-form"),i=(this.shadowRoot?.querySelector(".content")?.offsetHeight??0)>0;if(!t||!i){this._pickerProbeStrikes=0;return}let e=(h,d,m=0)=>{if(!(!h||m>10)){(h.tagName?.toLowerCase()??"")==="ha-entity-picker"&&d.push(h);for(let v of[h.shadowRoot,h])if(v)for(let g of Array.from(v.children??[]))e(g,d,m+1)}},r=[...this.shadowRoot?.querySelectorAll("ha-form.entity-picker-form")??[]],_=[];for(let h of r)e(h,_);let c=_.length===0||_.some(h=>h.offsetHeight===0);if(t.offsetHeight===0||c){if(this._pickerProbeStrikes+=1,this._pickerProbeStrikes>=2){this._entityPickerFallback=!0;return}this._pickerProbeTimer=setTimeout(()=>this._probeEntityPickers(),700)}else this._pickerProbeStrikes=0}_schedulePreviewRefresh(){this._previewTimer&&clearTimeout(this._previewTimer),this._previewTimer=setTimeout(()=>{this._fetchSchedulePreview()},300)}async _fetchSchedulePreview(){let t=this._open?this._previewScheduleDict():null;if(!t){this._schedulePreview=[],this._schedulePreviewEnded=!1;return}let i=++this._previewSeq;try{let e=await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/schedule/preview",schedule:t,...this._lastPerformed?{last_performed:this._lastPerformed}:{}});if(i!==this._previewSeq)return;this._schedulePreview=e.occurrences||[],this._schedulePreviewEnded=!!e.series_ended}catch{}}_renderSchedulePreview(){if(this._schedulePreview.length===0)return p;let t=this._lang,i=this.scheduleTimeEnabled&&this._scheduleTime?` ${this._scheduleTime}`:"",e=this._schedulePreview.map((_,c)=>{let h=new Date(`${_}T12:00:00`).getDay();return`${E(h===0?6:h-1,t,"short")} ${A(_,t)}${c===0?i:""}`}).join(" \xB7 "),r=this._scheduleType==="time_based"&&this._intervalAnchor==="completion"?l`<div class="field-help">${s("schedule_preview_ontime",t)}</div>`:p;return l`
|
||||||
<div class="trigger-live-hint schedule-preview">
|
<div class="trigger-live-hint schedule-preview">
|
||||||
${s("schedule_preview_title",t)}: ${e}${this._schedulePreviewEnded?l` <span class="field-help">${s("schedule_preview_ends",t)}</span>`:p}
|
${s("schedule_preview_title",t)}: ${e}${this._schedulePreviewEnded?l` <span class="field-help">${s("schedule_preview_ends",t)}</span>`:p}
|
||||||
${r}
|
${r}
|
||||||
@@ -369,11 +369,11 @@ import{a as x,d as N,e as q}from"/maintenance_supporter_panelfiles/panel-chunks/
|
|||||||
<label class="field-label">${s("season_window_label",t)}</label>
|
<label class="field-label">${s("season_window_label",t)}</label>
|
||||||
<div class="field-help">${s("season_window_hint",t)}</div>
|
<div class="field-help">${s("season_window_hint",t)}</div>
|
||||||
<div class="weekday-chips season-chips">
|
<div class="weekday-chips season-chips">
|
||||||
${e.map((r,d)=>l`
|
${e.map((r,_)=>l`
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
class="season-chip ${this._seasonMonths.includes(d+1)?"selected":""}"
|
class="season-chip ${this._seasonMonths.includes(_+1)?"selected":""}"
|
||||||
@click=${()=>this._toggleSeasonMonth(d+1)}
|
@click=${()=>this._toggleSeasonMonth(_+1)}
|
||||||
>${r}</button>`)}
|
>${r}</button>`)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -414,13 +414,13 @@ import{a as x,d as N,e as q}from"/maintenance_supporter_panelfiles/panel-chunks/
|
|||||||
<div class="select-row">
|
<div class="select-row">
|
||||||
<label>${s("recurrence_occurrence",t)}</label>
|
<label>${s("recurrence_occurrence",t)}</label>
|
||||||
<select .value=${this._nth} @change=${r=>this._nth=r.target.value}>
|
<select .value=${this._nth} @change=${r=>this._nth=r.target.value}>
|
||||||
${e.map(([r,d])=>l`<option value=${r} ?selected=${r===this._nth}>${d}</option>`)}
|
${e.map(([r,_])=>l`<option value=${r} ?selected=${r===this._nth}>${_}</option>`)}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="select-row">
|
<div class="select-row">
|
||||||
<label>${s("recurrence_weekday",t)}</label>
|
<label>${s("recurrence_weekday",t)}</label>
|
||||||
<select .value=${this._nthWeekday} @change=${r=>this._nthWeekday=r.target.value}>
|
<select .value=${this._nthWeekday} @change=${r=>this._nthWeekday=r.target.value}>
|
||||||
${i.map((r,d)=>l`<option value=${String(d)} ?selected=${String(d)===this._nthWeekday}>${r}</option>`)}
|
${i.map((r,_)=>l`<option value=${String(_)} ?selected=${String(_)===this._nthWeekday}>${r}</option>`)}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
${this._renderCalOffsetField()}`}return this._scheduleType==="day_of_month"?l`
|
${this._renderCalOffsetField()}`}return this._scheduleType==="day_of_month"?l`
|
||||||
@@ -452,7 +452,7 @@ import{a as x,d as N,e as q}from"/maintenance_supporter_panelfiles/panel-chunks/
|
|||||||
max="15"
|
max="15"
|
||||||
.value=${this._calOffset}
|
.value=${this._calOffset}
|
||||||
@input=${i=>this._calOffset=i.target.value}
|
@input=${i=>this._calOffset=i.target.value}
|
||||||
></ms-textfield>`}_renderTriggerLiveHint(){if(this._triggerType==="compound")return p;let t=this._triggerEntityId||this._triggerEntityIds[0];if(!t||!this.hass?.states)return p;let i=this.hass.states[t];if(!i)return p;let e=this._lang,r=i.attributes?.unit_of_measurement,d=typeof r=="string"&&r?` ${r}`:"",c=this._triggerAttribute?i.attributes?.[this._triggerAttribute]:i.state,h=typeof c=="number"?c:parseFloat(String(c)),_=c!=="unknown"&&c!=="unavailable"&&c!=null&&!isNaN(h),m=g=>Number.isInteger(g)?String(g):String(Math.round(g*10)/10),v=[];if(this._triggerType==="threshold"){let g=parseFloat(this._triggerAbove),f=parseFloat(this._triggerBelow);if(isNaN(g)&&isNaN(f))return p;_&&v.push(s("trigger_hint_now",e).replace("{value}",m(h)+d)),isNaN(g)||v.push(s("trigger_hint_above",e).replace("{target}",m(g)+d)),isNaN(f)||v.push(s("trigger_hint_below",e).replace("{target}",m(f)+d))}else if(this._triggerType==="counter"){let g=parseFloat(this._triggerTargetValue);if(isNaN(g))return p;this._triggerDeltaMode?this._taskId?v.push(s("trigger_hint_counter_delta_edit",e).replace("{target}",m(g)+d)):_?v.push(s("trigger_hint_counter_delta",e).replace("{value}",m(h)+d).replace("{due}",m(h+g)+d).replace("{target}",m(g)+d)):v.push(s("trigger_hint_counter_delta_edit",e).replace("{target}",m(g)+d)):(_&&v.push(s("trigger_hint_now",e).replace("{value}",m(h)+d)),v.push(s("trigger_hint_counter_abs",e).replace("{target}",m(g)+d)))}else if(this._triggerType==="runtime"){let g=parseFloat(this._triggerRuntimeHours);if(isNaN(g))return p;v.push(s("trigger_hint_runtime",e).replace("{hours}",m(g))),v.push(s("trigger_hint_state_now",e).replace("{value}",String(i.state)))}else if(this._triggerType==="state_change"){let g=parseInt(this._triggerTargetChanges,10)||1,f=this._triggerToState.trim();v.push((f?s("trigger_hint_state_change_to",e).replace("{state}",f):s("trigger_hint_state_change",e)).replace("{count}",String(g))),v.push(s("trigger_hint_state_now",e).replace("{value}",String(i.state)))}return v.length?l`<div class="trigger-live-hint">${v.join(" ")}</div>`:p}_renderTriggerTypeFields(){let t=this._lang;return this._triggerType==="threshold"?l`
|
></ms-textfield>`}_renderTriggerLiveHint(){if(this._triggerType==="compound")return p;let t=this._triggerEntityId||this._triggerEntityIds[0];if(!t||!this.hass?.states)return p;let i=this.hass.states[t];if(!i)return p;let e=this._lang,r=i.attributes?.unit_of_measurement,_=typeof r=="string"&&r?` ${r}`:"",c=this._triggerAttribute?i.attributes?.[this._triggerAttribute]:i.state,h=typeof c=="number"?c:parseFloat(String(c)),d=c!=="unknown"&&c!=="unavailable"&&c!=null&&!isNaN(h),m=g=>Number.isInteger(g)?String(g):String(Math.round(g*10)/10),v=[];if(this._triggerType==="threshold"){let g=parseFloat(this._triggerAbove),f=parseFloat(this._triggerBelow);if(isNaN(g)&&isNaN(f))return p;d&&v.push(s("trigger_hint_now",e).replace("{value}",m(h)+_)),isNaN(g)||v.push(s("trigger_hint_above",e).replace("{target}",m(g)+_)),isNaN(f)||v.push(s("trigger_hint_below",e).replace("{target}",m(f)+_))}else if(this._triggerType==="counter"){let g=parseFloat(this._triggerTargetValue);if(isNaN(g))return p;this._triggerDeltaMode?this._taskId?v.push(s("trigger_hint_counter_delta_edit",e).replace("{target}",m(g)+_)):d?v.push(s("trigger_hint_counter_delta",e).replace("{value}",m(h)+_).replace("{due}",m(h+g)+_).replace("{target}",m(g)+_)):v.push(s("trigger_hint_counter_delta_edit",e).replace("{target}",m(g)+_)):(d&&v.push(s("trigger_hint_now",e).replace("{value}",m(h)+_)),v.push(s("trigger_hint_counter_abs",e).replace("{target}",m(g)+_)))}else if(this._triggerType==="runtime"){let g=parseFloat(this._triggerRuntimeHours);if(isNaN(g))return p;v.push(s("trigger_hint_runtime",e).replace("{hours}",m(g))),v.push(s("trigger_hint_state_now",e).replace("{value}",String(i.state)))}else if(this._triggerType==="state_change"){let g=parseInt(this._triggerTargetChanges,10)||1,f=this._triggerToState.trim();v.push((f?s("trigger_hint_state_change_to",e).replace("{state}",f):s("trigger_hint_state_change",e)).replace("{count}",String(g))),v.push(s("trigger_hint_state_now",e).replace("{value}",String(i.state)))}return v.length?l`<div class="trigger-live-hint">${v.join(" ")}</div>`:p}_renderTriggerTypeFields(){let t=this._lang;return this._triggerType==="threshold"?l`
|
||||||
<ms-textfield
|
<ms-textfield
|
||||||
label="${s("trigger_above",t)}"
|
label="${s("trigger_above",t)}"
|
||||||
type="number"
|
type="number"
|
||||||
@@ -530,6 +530,14 @@ import{a as x,d as N,e as q}from"/maintenance_supporter_panelfiles/panel-chunks/
|
|||||||
@input=${i=>this._triggerTargetChanges=i.target.value}
|
@input=${i=>this._triggerTargetChanges=i.target.value}
|
||||||
></ms-textfield>
|
></ms-textfield>
|
||||||
<div class="field-help">${s("target_changes_help",t)}</div>
|
<div class="field-help">${s("target_changes_help",t)}</div>
|
||||||
|
<ms-textfield
|
||||||
|
label="${s("for_at_least_minutes",t)}"
|
||||||
|
type="number"
|
||||||
|
min="0"
|
||||||
|
.value=${this._triggerForMinutes}
|
||||||
|
@input=${i=>this._triggerForMinutes=i.target.value}
|
||||||
|
></ms-textfield>
|
||||||
|
<div class="field-help">${s("for_minutes_state_help",t)}</div>
|
||||||
`:this._triggerType==="runtime"?l`
|
`:this._triggerType==="runtime"?l`
|
||||||
<ms-textfield
|
<ms-textfield
|
||||||
label="${s("runtime_hours",t)}"
|
label="${s("runtime_hours",t)}"
|
||||||
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
/*! maintenance_supporter frontend 2.61.0 */
|
/*! maintenance_supporter frontend 2.63.1 */
|
||||||
import{a as t,b as a,c as i,f as l,g as p,i as r}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-4JER2GPD.js";var e=class extends p{constructor(){super(...arguments);this.label="";this.value="";this.placeholder="";this.type="text";this.required=!1;this.disabled=!1}_onInput(n){let o=n.target.value;this.value=o,this.dispatchEvent(new CustomEvent("input",{bubbles:!0,composed:!0,detail:{value:o}}))}render(){return i`
|
import{a as t,b as a,c as i,f as l,g as p,k as r}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-FS5TZIDQ.js";var e=class extends p{constructor(){super(...arguments);this.label="";this.value="";this.placeholder="";this.type="text";this.required=!1;this.disabled=!1}_onInput(n){let o=n.target.value;this.value=o,this.dispatchEvent(new CustomEvent("input",{bubbles:!0,composed:!0,detail:{value:o}}))}render(){return i`
|
||||||
<label class="field">
|
<label class="field">
|
||||||
${this.label?i`<span class="label">${this.label}${this.required?i`<span class="req">*</span>`:l}</span>`:l}
|
${this.label?i`<span class="label">${this.label}${this.required?i`<span class="req">*</span>`:l}</span>`:l}
|
||||||
<input
|
<input
|
||||||
+25
-25
@@ -1,5 +1,5 @@
|
|||||||
/*! maintenance_supporter frontend 2.61.0 */
|
/*! maintenance_supporter frontend 2.63.1 */
|
||||||
import{a as x}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-JPOJFRHB.js";import{A as Y,a as h,b as H,c as r,d as T,f as l,g as E,i as D,j as _,k as z,n as i,o as P,p as N,q as G,s as S,t as B,v as K,x as U,y as Z}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-4JER2GPD.js";var g=class extends E{constructor(){super(...arguments);this._open=!1;this._saving=!1;this._error="";this._draft=null;this._originalSnapshot=null;this._partOptions=null;this._partQty={};this._partQtyOriginal=""}get _lang(){return P(this.hass)}openEdit(t){this._draft={...t},this._originalSnapshot={...t},this._error="",this._open=!0,this._partOptions=null,this._partQty={},this._partQtyOriginal="",this._loadPartOptions()}async _loadPartOptions(){let t=this._draft;if(t)try{let e=await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/parts/overview"}),s=[];for(let d of e.parts||[]){let c=d.entry_id===t.entry_id,p=d.consumers.some(u=>u.entry_id===t.entry_id&&u.task_id===t.task_id);!c&&!p||s.push({part_id:d.part_id,name:d.name,entry_id:d.entry_id,foreign:!c,object_name:d.object_name})}for(let d of t.used_parts||[]){let c=d.entry_id||t.entry_id;s.some(p=>p.part_id===d.part_id&&p.entry_id===c)||s.push({part_id:d.part_id,name:d.name||d.part_id,entry_id:c,foreign:c!==t.entry_id,object_name:null})}let o={};for(let d of t.used_parts||[])o[`${d.entry_id||t.entry_id}:${d.part_id}`]=d.quantity??1;this._partOptions=s,this._partQty=o,this._partQtyOriginal=this._partSelectionKey()}catch{this._partOptions=[]}}_partSelectionKey(){return JSON.stringify(Object.entries(this._partQty).filter(([,t])=>t>0).sort(([t],[e])=>t.localeCompare(e)))}close(){this._open=!1,this._error="",this._draft=null,this._originalSnapshot=null}_set(t,e){this._draft&&(this._draft={...this._draft,[t]:e})}async _save(){if(!(!this._draft||!this._originalSnapshot)){this._saving=!0,this._error="";try{let t={type:"maintenance_supporter/task/history/update",entry_id:this._draft.entry_id,task_id:this._draft.task_id,original_timestamp:this._originalSnapshot.original_timestamp};if(this._draft.timestamp!==this._originalSnapshot.timestamp&&(t.timestamp=this._draft.timestamp),this._draft.notes!==this._originalSnapshot.notes&&(t.notes=this._draft.notes),this._draft.cost!==this._originalSnapshot.cost&&(t.cost=this._draft.cost),this._draft.duration!==this._originalSnapshot.duration&&(t.duration=this._draft.duration),this._draft.completed_by!==this._originalSnapshot.completed_by&&(t.completed_by=this._draft.completed_by),this._partOptions!==null&&this._partSelectionKey()!==this._partQtyOriginal&&(t.used_parts=(this._partOptions||[]).filter(s=>(this._partQty[`${s.entry_id}:${s.part_id}`]||0)>0).map(s=>({part_id:s.part_id,quantity:this._partQty[`${s.entry_id}:${s.part_id}`],...s.foreign?{entry_id:s.entry_id}:{}}))),Object.keys(t).filter(s=>!["type","entry_id","task_id","original_timestamp"].includes(s)).length===0){this.close();return}await this.hass.connection.sendMessagePromise(t),this.dispatchEvent(new CustomEvent("history-entry-saved",{detail:{entry_id:this._draft.entry_id,task_id:this._draft.task_id,new_timestamp:this._draft.timestamp},bubbles:!0,composed:!0})),this.close()}catch(t){this._error=x(t,this._lang)}finally{this._saving=!1}}}render(){if(!this._open||!this._draft)return l;let t=this._lang,e=this._draft;return r`
|
import{a as x}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-OGUFLW7I.js";import{A as Z,C as Y,a as h,b as T,c as r,d as E,f as l,g as D,k as P,l as _,m as z,p as i,r as M,s as N,t as G,u as S,v as B,x as K,z as U}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-FS5TZIDQ.js";var g=class extends D{constructor(){super(...arguments);this._open=!1;this._saving=!1;this._error="";this._draft=null;this._originalSnapshot=null;this._partOptions=null;this._partQty={};this._partQtyOriginal=""}get _lang(){return M(this.hass)}openEdit(t){this._draft={...t},this._originalSnapshot={...t},this._error="",this._open=!0,this._partOptions=null,this._partQty={},this._partQtyOriginal="",this._loadPartOptions()}async _loadPartOptions(){let t=this._draft;if(t)try{let e=await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/parts/overview"}),s=[];for(let d of e.parts||[]){let c=d.entry_id===t.entry_id,p=d.consumers.some(u=>u.entry_id===t.entry_id&&u.task_id===t.task_id);!c&&!p||s.push({part_id:d.part_id,name:d.name,entry_id:d.entry_id,foreign:!c,object_name:d.object_name})}for(let d of t.used_parts||[]){let c=d.entry_id||t.entry_id;s.some(p=>p.part_id===d.part_id&&p.entry_id===c)||s.push({part_id:d.part_id,name:d.name||d.part_id,entry_id:c,foreign:c!==t.entry_id,object_name:null})}let o={};for(let d of t.used_parts||[])o[`${d.entry_id||t.entry_id}:${d.part_id}`]=d.quantity??1;this._partOptions=s,this._partQty=o,this._partQtyOriginal=this._partSelectionKey()}catch{this._partOptions=[]}}_partSelectionKey(){return JSON.stringify(Object.entries(this._partQty).filter(([,t])=>t>0).sort(([t],[e])=>t.localeCompare(e)))}close(){this._open=!1,this._error="",this._draft=null,this._originalSnapshot=null}_set(t,e){this._draft&&(this._draft={...this._draft,[t]:e})}async _save(){if(!(!this._draft||!this._originalSnapshot)){this._saving=!0,this._error="";try{let t={type:"maintenance_supporter/task/history/update",entry_id:this._draft.entry_id,task_id:this._draft.task_id,original_timestamp:this._originalSnapshot.original_timestamp};if(this._draft.timestamp!==this._originalSnapshot.timestamp&&(t.timestamp=this._draft.timestamp),this._draft.notes!==this._originalSnapshot.notes&&(t.notes=this._draft.notes),this._draft.cost!==this._originalSnapshot.cost&&(t.cost=this._draft.cost),this._draft.duration!==this._originalSnapshot.duration&&(t.duration=this._draft.duration),this._draft.completed_by!==this._originalSnapshot.completed_by&&(t.completed_by=this._draft.completed_by),this._partOptions!==null&&this._partSelectionKey()!==this._partQtyOriginal&&(t.used_parts=(this._partOptions||[]).filter(s=>(this._partQty[`${s.entry_id}:${s.part_id}`]||0)>0).map(s=>({part_id:s.part_id,quantity:this._partQty[`${s.entry_id}:${s.part_id}`],...s.foreign?{entry_id:s.entry_id}:{}}))),Object.keys(t).filter(s=>!["type","entry_id","task_id","original_timestamp"].includes(s)).length===0){this.close();return}await this.hass.connection.sendMessagePromise(t),this.dispatchEvent(new CustomEvent("history-entry-saved",{detail:{entry_id:this._draft.entry_id,task_id:this._draft.task_id,new_timestamp:this._draft.timestamp},bubbles:!0,composed:!0})),this.close()}catch(t){this._error=x(t,this._lang)}finally{this._saving=!1}}}render(){if(!this._open||!this._draft)return l;let t=this._lang,e=this._draft;return r`
|
||||||
<div class="backdrop" @click=${this.close}></div>
|
<div class="backdrop" @click=${this.close}></div>
|
||||||
<div class="dialog" role="dialog" aria-modal="true">
|
<div class="dialog" role="dialog" aria-modal="true">
|
||||||
<h2>${i("history_edit_title",t)||"Edit history entry"}</h2>
|
<h2>${i("history_edit_title",t)||"Edit history entry"}</h2>
|
||||||
@@ -61,7 +61,7 @@ import{a as x}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-JPOJFRHB
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`}};g.styles=H`
|
`}};g.styles=T`
|
||||||
:host { display: contents; }
|
:host { display: contents; }
|
||||||
.backdrop {
|
.backdrop {
|
||||||
position: fixed; inset: 0;
|
position: fixed; inset: 0;
|
||||||
@@ -137,7 +137,7 @@ import{a as x}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-JPOJFRHB
|
|||||||
.part-row-edit input[type="checkbox"] { width: auto; }
|
.part-row-edit input[type="checkbox"] { width: auto; }
|
||||||
.part-label { flex: 1; color: var(--primary-text-color); }
|
.part-label { flex: 1; color: var(--primary-text-color); }
|
||||||
.part-qty { width: 76px; }
|
.part-qty { width: 76px; }
|
||||||
`,h([D({attribute:!1})],g.prototype,"hass",2),h([_()],g.prototype,"_open",2),h([_()],g.prototype,"_saving",2),h([_()],g.prototype,"_error",2),h([_()],g.prototype,"_draft",2),h([_()],g.prototype,"_partOptions",2),h([_()],g.prototype,"_partQty",2);customElements.get("maintenance-history-edit-dialog")||customElements.define("maintenance-history-edit-dialog",g);function Q(a,n){let t=a.interval_analysis,e=t?.weibull_beta,s=t?.weibull_eta;if(e==null||s==null||s<=0)return l;let o=a.interval_days??0,d=a.suggested_interval??o;return r`
|
`,h([P({attribute:!1})],g.prototype,"hass",2),h([_()],g.prototype,"_open",2),h([_()],g.prototype,"_saving",2),h([_()],g.prototype,"_error",2),h([_()],g.prototype,"_draft",2),h([_()],g.prototype,"_partOptions",2),h([_()],g.prototype,"_partQty",2);customElements.get("maintenance-history-edit-dialog")||customElements.define("maintenance-history-edit-dialog",g);function Q(a,n){let t=a.interval_analysis,e=t?.weibull_beta,s=t?.weibull_eta;if(e==null||s==null||s<=0)return l;let o=a.interval_days??0,d=a.suggested_interval??o;return r`
|
||||||
<div class="weibull-section">
|
<div class="weibull-section">
|
||||||
<div class="weibull-title">
|
<div class="weibull-title">
|
||||||
<ha-svg-icon aria-hidden="true" path="M3,14L3.5,14.07L8.07,9.5C7.89,8.85 8.06,8.11 8.59,7.59C9.37,6.8 10.63,6.8 11.41,7.59C11.94,8.11 12.11,8.85 11.93,9.5L14.5,12.07L15,12C15.18,12 15.35,12 15.5,12.07L19.07,8.5C19,8.35 19,8.18 19,8A2,2 0 0,1 21,6A2,2 0 0,1 23,8A2,2 0 0,1 21,10C20.82,10 20.65,10 20.5,9.93L16.93,13.5C17,13.65 17,13.82 17,14A2,2 0 0,1 15,16A2,2 0 0,1 13,14L13.07,13.5L10.5,10.93C10.18,11 9.82,11 9.5,10.93L4.93,15.5L5,16A2,2 0 0,1 3,18A2,2 0 0,1 1,16A2,2 0 0,1 3,14Z"></ha-svg-icon>
|
<ha-svg-icon aria-hidden="true" path="M3,14L3.5,14.07L8.07,9.5C7.89,8.85 8.06,8.11 8.59,7.59C9.37,6.8 10.63,6.8 11.41,7.59C11.94,8.11 12.11,8.85 11.93,9.5L14.5,12.07L15,12C15.18,12 15.35,12 15.5,12.07L19.07,8.5C19,8.35 19,8.18 19,8A2,2 0 0,1 21,6A2,2 0 0,1 23,8A2,2 0 0,1 21,10C20.82,10 20.65,10 20.5,9.93L16.93,13.5C17,13.65 17,13.82 17,14A2,2 0 0,1 15,16A2,2 0 0,1 13,14L13.07,13.5L10.5,10.93C10.18,11 9.82,11 9.5,10.93L4.93,15.5L5,16A2,2 0 0,1 3,18A2,2 0 0,1 1,16A2,2 0 0,1 3,14Z"></ha-svg-icon>
|
||||||
@@ -153,10 +153,10 @@ import{a as x}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-JPOJFRHB
|
|||||||
<ha-svg-icon path="${e}"></ha-svg-icon>
|
<ha-svg-icon path="${e}"></ha-svg-icon>
|
||||||
${i(s,n)} (\u03B2=${a.toFixed(2)})
|
${i(s,n)} (\u03B2=${a.toFixed(2)})
|
||||||
</span>
|
</span>
|
||||||
`}function _t(a,n,t,e,s){let v=Math.max(t,e,n,1)*1.3,k=50,w=[];for(let y=0;y<=k;y++){let b=y/k*v,ct=1-Math.exp(-Math.pow(b/n,a)),pt=32+b/v*260,ht=136-ct*128;w.push([pt,ht])}let j=w.map(([y,b])=>`${y.toFixed(1)},${b.toFixed(1)}`).join(" "),W="M32,136 "+w.map(([y,b])=>`L${y.toFixed(1)},${b.toFixed(1)}`).join(" ")+` L${w[k][0].toFixed(1)},136 Z`,I=32+t/v*260,F=1-Math.exp(-Math.pow(t/n,a)),O=136-F*128,lt=((1-F)*100).toFixed(0),q=32+e/v*260,dt=[0,.25,.5,.75,1];return r`
|
`}function _t(a,n,t,e,s){let v=Math.max(t,e,n,1)*1.3,k=50,w=[];for(let y=0;y<=k;y++){let b=y/k*v,ct=1-Math.exp(-Math.pow(b/n,a)),pt=32+b/v*260,ht=136-ct*128;w.push([pt,ht])}let O=w.map(([y,b])=>`${y.toFixed(1)},${b.toFixed(1)}`).join(" "),W="M32,136 "+w.map(([y,b])=>`L${y.toFixed(1)},${b.toFixed(1)}`).join(" ")+` L${w[k][0].toFixed(1)},136 Z`,H=32+t/v*260,j=1-Math.exp(-Math.pow(t/n,a)),F=136-j*128,lt=((1-j)*100).toFixed(0),q=32+e/v*260,dt=[0,.25,.5,.75,1];return r`
|
||||||
<div class="weibull-chart">
|
<div class="weibull-chart">
|
||||||
<svg viewBox="0 0 ${300} ${160}" preserveAspectRatio="xMidYMid meet" role="img" aria-label="${i("chart_weibull",s)}">
|
<svg viewBox="0 0 ${300} ${160}" preserveAspectRatio="xMidYMid meet" role="img" aria-label="${i("chart_weibull",s)}">
|
||||||
${dt.map(y=>{let b=136-y*128;return T`
|
${dt.map(y=>{let b=136-y*128;return E`
|
||||||
<line x1="${32}" y1="${b.toFixed(1)}" x2="${292}" y2="${b.toFixed(1)}"
|
<line x1="${32}" y1="${b.toFixed(1)}" x2="${292}" y2="${b.toFixed(1)}"
|
||||||
stroke="var(--divider-color)" stroke-width="0.5" stroke-dasharray="${y===.5?"4,3":l}" />
|
stroke="var(--divider-color)" stroke-width="0.5" stroke-dasharray="${y===.5?"4,3":l}" />
|
||||||
<text x="${28}" y="${(b+3).toFixed(1)}" fill="var(--secondary-text-color)"
|
<text x="${28}" y="${(b+3).toFixed(1)}" fill="var(--secondary-text-color)"
|
||||||
@@ -168,19 +168,19 @@ import{a as x}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-JPOJFRHB
|
|||||||
<text x="${292}" y="${156}" fill="var(--secondary-text-color)" font-size="8" text-anchor="middle">${Math.round(v)}</text>
|
<text x="${292}" y="${156}" fill="var(--secondary-text-color)" font-size="8" text-anchor="middle">${Math.round(v)}</text>
|
||||||
|
|
||||||
<path d="${W}" fill="var(--primary-color, #03a9f4)" opacity="0.08" />
|
<path d="${W}" fill="var(--primary-color, #03a9f4)" opacity="0.08" />
|
||||||
<polyline points="${j}" fill="none"
|
<polyline points="${O}" fill="none"
|
||||||
stroke="var(--primary-color, #03a9f4)" stroke-width="2" />
|
stroke="var(--primary-color, #03a9f4)" stroke-width="2" />
|
||||||
|
|
||||||
${t>0?T`
|
${t>0?E`
|
||||||
<line x1="${I.toFixed(1)}" y1="${8}" x2="${I.toFixed(1)}" y2="${136 .toFixed(1)}"
|
<line x1="${H.toFixed(1)}" y1="${8}" x2="${H.toFixed(1)}" y2="${136 .toFixed(1)}"
|
||||||
stroke="var(--primary-color, #03a9f4)" stroke-width="1.5" stroke-dasharray="4,3" />
|
stroke="var(--primary-color, #03a9f4)" stroke-width="1.5" stroke-dasharray="4,3" />
|
||||||
<circle cx="${I.toFixed(1)}" cy="${O.toFixed(1)}" r="3"
|
<circle cx="${H.toFixed(1)}" cy="${F.toFixed(1)}" r="3"
|
||||||
fill="var(--primary-color, #03a9f4)" />
|
fill="var(--primary-color, #03a9f4)" />
|
||||||
<text x="${(I+4).toFixed(1)}" y="${(O-6).toFixed(1)}" fill="var(--primary-color, #03a9f4)"
|
<text x="${(H+4).toFixed(1)}" y="${(F-6).toFixed(1)}" fill="var(--primary-color, #03a9f4)"
|
||||||
font-size="9" font-weight="600">R=${lt}%</text>
|
font-size="9" font-weight="600">R=${lt}%</text>
|
||||||
`:l}
|
`:l}
|
||||||
|
|
||||||
${e>0&&e!==t?T`
|
${e>0&&e!==t?E`
|
||||||
<line x1="${q.toFixed(1)}" y1="${8}" x2="${q.toFixed(1)}" y2="${136 .toFixed(1)}"
|
<line x1="${q.toFixed(1)}" y1="${8}" x2="${q.toFixed(1)}" y2="${136 .toFixed(1)}"
|
||||||
stroke="var(--success-color, #4caf50)" stroke-width="1.5" stroke-dasharray="4,3" />
|
stroke="var(--success-color, #4caf50)" stroke-width="1.5" stroke-dasharray="4,3" />
|
||||||
`:l}
|
`:l}
|
||||||
@@ -209,13 +209,13 @@ import{a as x}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-JPOJFRHB
|
|||||||
</div>
|
</div>
|
||||||
`:l}
|
`:l}
|
||||||
</div>
|
</div>
|
||||||
`}function vt(a,n,t){let e=a.confidence_interval_low,s=a.confidence_interval_high,o=n.suggested_interval??n.interval_days??0,d=n.interval_days??0,c=Math.max(0,e-5),u=s+5-c,f=(e-c)/u*100,M=(s-e)/u*100,C=(o-c)/u*100,v=d>0?(d-c)/u*100:-1;return r`
|
`}function vt(a,n,t){let e=a.confidence_interval_low,s=a.confidence_interval_high,o=n.suggested_interval??n.interval_days??0,d=n.interval_days??0,c=Math.max(0,e-5),u=s+5-c,f=(e-c)/u*100,I=(s-e)/u*100,C=(o-c)/u*100,v=d>0?(d-c)/u*100:-1;return r`
|
||||||
<div class="confidence-range">
|
<div class="confidence-range">
|
||||||
<div class="confidence-range-title">
|
<div class="confidence-range-title">
|
||||||
${i("confidence_interval",t)}: ${o} ${i("days",t)} (${e}\u2013${s})
|
${i("confidence_interval",t)}: ${o} ${i("days",t)} (${e}\u2013${s})
|
||||||
</div>
|
</div>
|
||||||
<div class="confidence-bar">
|
<div class="confidence-bar">
|
||||||
<div class="confidence-fill" style="left:${f.toFixed(1)}%;width:${M.toFixed(1)}%"></div>
|
<div class="confidence-fill" style="left:${f.toFixed(1)}%;width:${I.toFixed(1)}%"></div>
|
||||||
${v>=0?r`<div class="confidence-marker current" style="left:${v.toFixed(1)}%"></div>`:l}
|
${v>=0?r`<div class="confidence-marker current" style="left:${v.toFixed(1)}%"></div>`:l}
|
||||||
<div class="confidence-marker recommended" style="left:${C.toFixed(1)}%"></div>
|
<div class="confidence-marker recommended" style="left:${C.toFixed(1)}%"></div>
|
||||||
</div>
|
</div>
|
||||||
@@ -299,7 +299,7 @@ import{a as x}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-JPOJFRHB
|
|||||||
<span class="legend-item"><span class="dot high"></span> ${i("longer",n)||"L\xE4nger"}</span>
|
<span class="legend-item"><span class="dot high"></span> ${i("longer",n)||"L\xE4nger"}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`}function it(a,n){return ft(a,n)}function ft(a,n){let t=a.seasonal_factors??a.interval_analysis?.seasonal_factors;if(!t||t.length!==12)return l;let e=a.interval_analysis?.seasonal_reason,s=new Date().getMonth(),o=300,d=100,c=8,u=d-c-4,f=Math.max(...t,1.5),M=o/12,C=M*.65,v=c+u-1/f*u;return r`
|
`}function it(a,n){return ft(a,n)}function ft(a,n){let t=a.seasonal_factors??a.interval_analysis?.seasonal_factors;if(!t||t.length!==12)return l;let e=a.interval_analysis?.seasonal_reason,s=new Date().getMonth(),o=300,d=100,c=8,u=d-c-4,f=Math.max(...t,1.5),I=o/12,C=I*.65,v=c+u-1/f*u;return r`
|
||||||
<div class="seasonal-chart">
|
<div class="seasonal-chart">
|
||||||
<div class="seasonal-chart-title">
|
<div class="seasonal-chart-title">
|
||||||
<ha-svg-icon aria-hidden="true" path="M17.75 4.09L15.22 6.03L16.13 9.09L13.5 7.28L10.87 9.09L11.78 6.03L9.25 4.09L12.44 4L13.5 1L14.56 4L17.75 4.09M21.25 11L19.61 12.25L20.2 14.23L18.5 13.06L16.8 14.23L17.39 12.25L15.75 11L17.81 10.95L18.5 9L19.19 10.95L21.25 11M18.97 15.95C19.8 15.87 20.69 17.05 20.16 17.8C19.84 18.25 19.5 18.67 19.08 19.07C15.17 23 8.84 23 4.94 19.07C1.03 15.17 1.03 8.83 4.94 4.93C5.34 4.53 5.76 4.17 6.21 3.85C6.96 3.32 8.14 4.21 8.06 5.04C7.79 7.9 8.75 10.87 10.95 13.06C13.14 15.26 16.1 16.22 18.97 15.95Z"></ha-svg-icon>
|
<ha-svg-icon aria-hidden="true" path="M17.75 4.09L15.22 6.03L16.13 9.09L13.5 7.28L10.87 9.09L11.78 6.03L9.25 4.09L12.44 4L13.5 1L14.56 4L17.75 4.09M21.25 11L19.61 12.25L20.2 14.23L18.5 13.06L16.8 14.23L17.39 12.25L15.75 11L17.81 10.95L18.5 9L19.19 10.95L21.25 11M18.97 15.95C19.8 15.87 20.69 17.05 20.16 17.8C19.84 18.25 19.5 18.67 19.08 19.07C15.17 23 8.84 23 4.94 19.07C1.03 15.17 1.03 8.83 4.94 4.93C5.34 4.53 5.76 4.17 6.21 3.85C6.96 3.32 8.14 4.21 8.06 5.04C7.79 7.9 8.75 10.87 10.95 13.06C13.14 15.26 16.1 16.22 18.97 15.95Z"></ha-svg-icon>
|
||||||
@@ -309,17 +309,17 @@ import{a as x}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-JPOJFRHB
|
|||||||
<svg viewBox="0 0 ${o} ${d}" preserveAspectRatio="xMidYMid meet" role="img" aria-label="${i("chart_seasonal",n)}">
|
<svg viewBox="0 0 ${o} ${d}" preserveAspectRatio="xMidYMid meet" role="img" aria-label="${i("chart_seasonal",n)}">
|
||||||
<line x1="0" y1="${v.toFixed(1)}" x2="${o}" y2="${v.toFixed(1)}"
|
<line x1="0" y1="${v.toFixed(1)}" x2="${o}" y2="${v.toFixed(1)}"
|
||||||
stroke="var(--divider-color)" stroke-width="1" stroke-dasharray="4,3" />
|
stroke="var(--divider-color)" stroke-width="1" stroke-dasharray="4,3" />
|
||||||
${t.map((k,w)=>{let j=k/f*u,W=w*M+(M-C)/2,I=c+u-j,F=w===s,O=k<1?"var(--success-color, #4caf50)":k>1?"var(--warning-color, #ff9800)":"var(--secondary-text-color)";return T`
|
${t.map((k,w)=>{let O=k/f*u,W=w*I+(I-C)/2,H=c+u-O,j=w===s,F=k<1?"var(--success-color, #4caf50)":k>1?"var(--warning-color, #ff9800)":"var(--secondary-text-color)";return E`
|
||||||
<rect x="${W.toFixed(1)}" y="${I.toFixed(1)}"
|
<rect x="${W.toFixed(1)}" y="${H.toFixed(1)}"
|
||||||
width="${C.toFixed(1)}" height="${j.toFixed(1)}"
|
width="${C.toFixed(1)}" height="${O.toFixed(1)}"
|
||||||
fill="${O}" opacity="${F?1:.5}" rx="2" />
|
fill="${F}" opacity="${j?1:.5}" rx="2" />
|
||||||
`})}
|
`})}
|
||||||
</svg>
|
</svg>
|
||||||
<div class="seasonal-labels">
|
<div class="seasonal-labels">
|
||||||
${tt.map((k,w)=>r`<span class="seasonal-label ${w===s?"active-month":""}">${i(k,n)}</span>`)}
|
${tt.map((k,w)=>r`<span class="seasonal-label ${w===s?"active-month":""}">${i(k,n)}</span>`)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`}var m=class extends E{constructor(){super(...arguments);this._open=!1;this._entryId=null;this._taskId=null;this._task=null;this._objectName="";this._busy=!1;this._error="";this._showSkip=!1;this._showReset=!1;this._showDetails=!1;this._showAdaptive=!1;this._skipReason="";this._resetDate="";this._features={adaptive:!1,predictions:!1,seasonal:!1,environmental:!1,budget:!1,groups:!1,checklists:!1,schedule_time:!1,completion_actions:!1};this._toast="";this._featuresLoaded=!1}get _lang(){return P(this.hass)}async openFor(t,e){this._entryId=t,this._taskId=e,this._error="",this._showSkip=!1,this._showReset=!1,this._showAdaptive=!1,this._skipReason="",this._resetDate=new Date().toISOString().slice(0,10),this._open=!0,await Promise.all([this._loadTask(),this._loadFeatures()])}async _loadFeatures(){if(!this._featuresLoaded)try{let t=await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/settings"});t?.features&&(this._features={...this._features,...t.features}),this._featuresLoaded=!0}catch{}}close(){this._open=!1,this._task=null,this._error=""}async _loadTask(){if(!(!this._entryId||!this._taskId))try{let t=await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/object",entry_id:this._entryId});this._objectName=t.object?.name||"";let e=(t.tasks||[]).find(s=>s.id===this._taskId);this._task=e??null}catch(t){this._error=x(t,this._lang)}}async _runWs(t){this._busy=!0,this._error="";try{return await this.hass.connection.sendMessagePromise(t),this._busy=!1,!0}catch(e){return this._error=x(e,this._lang),this._busy=!1,!1}}_notifyChanged(t){this.dispatchEvent(new CustomEvent("task-action-fired",{detail:{entry_id:this._entryId,task_id:this._taskId,action:t},bubbles:!0,composed:!0}))}_onComplete(){!this._entryId||!this._taskId||!this._task||import("/maintenance_supporter_panelfiles/panel-chunks/dialog-mount-J5DT4DR4.js").then(({openCompleteDialog:t})=>{t({entry_id:this._entryId,task_id:this._taskId,task_name:this._task.name,checklist:this._task.checklist||[],adaptive_enabled:!!this._task.adaptive_config?.enabled})&&(this._notifyChanged("complete"),this.close())})}async _onSkipConfirm(){if(!this._entryId||!this._taskId)return;await this._runWs({type:"maintenance_supporter/task/skip",entry_id:this._entryId,task_id:this._taskId,reason:this._skipReason.trim()||null})&&(this._notifyChanged("skip"),this.close())}async _onResetConfirm(){if(!this._entryId||!this._taskId)return;await this._runWs({type:"maintenance_supporter/task/reset",entry_id:this._entryId,task_id:this._taskId,date:this._resetDate||void 0})&&(this._notifyChanged("reset"),this.close())}_onEdit(){!this._entryId||!this._taskId||import("/maintenance_supporter_panelfiles/panel-chunks/dialog-mount-J5DT4DR4.js").then(({openEditTaskDialog:t})=>{t(this._entryId,this._taskId),this.close()})}_onQr(){!this._entryId||!this._taskId||!this._task||import("/maintenance_supporter_panelfiles/panel-chunks/dialog-mount-J5DT4DR4.js").then(({openQrDialog:t})=>{t({entry_id:this._entryId,task_id:this._taskId,task_name:this._task.name,object_name:this._objectName}),this.close()})}async _onDelete(){if(!this._entryId||!this._taskId)return;let t=i("delete_task_confirm",this._lang)||`Delete "${this._task?.name}"?`;if(!window.confirm(t))return;await this._runWs({type:"maintenance_supporter/task/delete",entry_id:this._entryId,task_id:this._taskId})&&(this._notifyChanged("delete"),this.close())}async _onArchive(){if(!this._entryId||!this._taskId)return;await this._runWs({type:"maintenance_supporter/task/archive",entry_id:this._entryId,task_id:this._taskId})&&(this._notifyChanged("archive"),this.close())}async _onUnarchive(){if(!this._entryId||!this._taskId)return;await this._runWs({type:"maintenance_supporter/task/unarchive",entry_id:this._entryId,task_id:this._taskId})&&(this._notifyChanged("unarchive"),this.close())}_onOpenInPanel(){if(!this._entryId||!this._taskId)return;let t=`/maintenance-supporter?entry_id=${encodeURIComponent(this._entryId)}&task_id=${encodeURIComponent(this._taskId)}`;history.pushState(null,"",t),window.dispatchEvent(new CustomEvent("location-changed")),this.close()}async _applySuggestion(){if(!this._entryId||!this._taskId||!this._task?.suggested_interval)return;await this._runWs({type:"maintenance_supporter/task/apply_suggestion",entry_id:this._entryId,task_id:this._taskId,interval:this._task.suggested_interval})&&(this._toast=i("suggestion_applied",this._lang)||"Applied",this._notifyChanged("apply_suggestion"),await this._loadTask(),setTimeout(()=>{this._toast=""},2500))}async _reanalyzeInterval(){if(!(!this._entryId||!this._taskId)){this._busy=!0,this._error="";try{let t=await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/task/analyze_interval",entry_id:this._entryId,task_id:this._taskId});this._toast=t.recommended_interval?`${i("reanalyze_result",this._lang)||"Recomputed"}: ${K(t.recommended_interval,"days",this._lang)} (${t.data_points} pts)`:i("reanalyze_insufficient_data",this._lang)||"Not enough data",
Line truncated
|
`}var m=class extends D{constructor(){super(...arguments);this._open=!1;this._entryId=null;this._taskId=null;this._task=null;this._objectName="";this._busy=!1;this._error="";this._showSkip=!1;this._showReset=!1;this._showDetails=!1;this._showAdaptive=!1;this._skipReason="";this._resetDate="";this._features={adaptive:!1,predictions:!1,seasonal:!1,environmental:!1,budget:!1,groups:!1,checklists:!1,schedule_time:!1,completion_actions:!1};this._toast="";this._featuresLoaded=!1}get _lang(){return M(this.hass)}async openFor(t,e){this._entryId=t,this._taskId=e,this._error="",this._showSkip=!1,this._showReset=!1,this._showAdaptive=!1,this._skipReason="",this._resetDate=new Date().toISOString().slice(0,10),this._open=!0,await Promise.all([this._loadTask(),this._loadFeatures()])}async _loadFeatures(){if(!this._featuresLoaded)try{let t=await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/settings"});t?.features&&(this._features={...this._features,...t.features}),this._featuresLoaded=!0}catch{}}close(){this._open=!1,this._task=null,this._error=""}async _loadTask(){if(!(!this._entryId||!this._taskId))try{let t=await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/object",entry_id:this._entryId});this._objectName=t.object?.name||"";let e=(t.tasks||[]).find(s=>s.id===this._taskId);this._task=e??null}catch(t){this._error=x(t,this._lang)}}async _runWs(t){this._busy=!0,this._error="";try{return await this.hass.connection.sendMessagePromise(t),this._busy=!1,!0}catch(e){return this._error=x(e,this._lang),this._busy=!1,!1}}_notifyChanged(t){this.dispatchEvent(new CustomEvent("task-action-fired",{detail:{entry_id:this._entryId,task_id:this._taskId,action:t},bubbles:!0,composed:!0}))}_onComplete(){!this._entryId||!this._taskId||!this._task||import("/maintenance_supporter_panelfiles/panel-chunks/dialog-mount-QPVIPMM3.js").then(({openCompleteDialog:t})=>{t({entry_id:this._entryId,task_id:this._taskId,task_name:this._task.name,checklist:this._task.checklist||[],adaptive_enabled:!!this._task.adaptive_config?.enabled})&&(this._notifyChanged("complete"),this.close())})}async _onSkipConfirm(){if(!this._entryId||!this._taskId)return;await this._runWs({type:"maintenance_supporter/task/skip",entry_id:this._entryId,task_id:this._taskId,reason:this._skipReason.trim()||null})&&(this._notifyChanged("skip"),this.close())}async _onResetConfirm(){if(!this._entryId||!this._taskId)return;await this._runWs({type:"maintenance_supporter/task/reset",entry_id:this._entryId,task_id:this._taskId,date:this._resetDate||void 0})&&(this._notifyChanged("reset"),this.close())}_onEdit(){!this._entryId||!this._taskId||import("/maintenance_supporter_panelfiles/panel-chunks/dialog-mount-QPVIPMM3.js").then(({openEditTaskDialog:t})=>{t(this._entryId,this._taskId),this.close()})}_onQr(){!this._entryId||!this._taskId||!this._task||import("/maintenance_supporter_panelfiles/panel-chunks/dialog-mount-QPVIPMM3.js").then(({openQrDialog:t})=>{t({entry_id:this._entryId,task_id:this._taskId,task_name:this._task.name,object_name:this._objectName}),this.close()})}async _onDelete(){if(!this._entryId||!this._taskId)return;let t=i("delete_task_confirm",this._lang)||`Delete "${this._task?.name}"?`;if(!window.confirm(t))return;await this._runWs({type:"maintenance_supporter/task/delete",entry_id:this._entryId,task_id:this._taskId})&&(this._notifyChanged("delete"),this.close())}async _onArchive(){if(!this._entryId||!this._taskId)return;await this._runWs({type:"maintenance_supporter/task/archive",entry_id:this._entryId,task_id:this._taskId})&&(this._notifyChanged("archive"),this.close())}async _onUnarchive(){if(!this._entryId||!this._taskId)return;await this._runWs({type:"maintenance_supporter/task/unarchive",entry_id:this._entryId,task_id:this._taskId})&&(this._notifyChanged("unarchive"),this.close())}_onOpenInPanel(){if(!this._entryId||!this._taskId)return;let t=`/maintenance-supporter?entry_id=${encodeURIComponent(this._entryId)}&task_id=${encodeURIComponent(this._taskId)}`;history.pushState(null,"",t),window.dispatchEvent(new CustomEvent("location-changed")),this.close()}async _applySuggestion(){if(!this._entryId||!this._taskId||!this._task?.suggested_interval)return;await this._runWs({type:"maintenance_supporter/task/apply_suggestion",entry_id:this._entryId,task_id:this._taskId,interval:this._task.suggested_interval})&&(this._toast=i("suggestion_applied",this._lang)||"Applied",this._notifyChanged("apply_suggestion"),await this._loadTask(),setTimeout(()=>{this._toast=""},2500))}async _reanalyzeInterval(){if(!(!this._entryId||!this._taskId)){this._busy=!0,this._error="";try{let t=await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/task/analyze_interval",entry_id:this._entryId,task_id:this._taskId});this._toast=t.recommended_interval?`${i("reanalyze_result",this._lang)||"Recomputed"}: ${K(t.recommended_interval,"days",this._lang)} (${t.data_points} pts)`:i("reanalyze_insufficient_data",this._lang)||"Not enough data",
Line truncated
|
||||||
<div class="recommendation-card">
|
<div class="recommendation-card">
|
||||||
<h4>${i("suggested_interval",e)}</h4>
|
<h4>${i("suggested_interval",e)}</h4>
|
||||||
${X(t.interval_days,t.suggested_interval,t.interval_confidence||"medium",e)}
|
${X(t.interval_days,t.suggested_interval,t.interval_confidence||"medium",e)}
|
||||||
@@ -403,7 +403,7 @@ import{a as x}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-JPOJFRHB
|
|||||||
<span class="task-name">${e.name}</span>
|
<span class="task-name">${e.name}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="object">
|
<div class="object">
|
||||||
<button class="link-inline" @click=${()=>{this._entryId&&import("/maintenance_supporter_panelfiles/panel-chunks/dialog-mount-J5DT4DR4.js").then(({openObjectQuickActions:o})=>{o(this._entryId),this.close()})}}>${this._objectName}</button>
|
<button class="link-inline" @click=${()=>{this._entryId&&import("/maintenance_supporter_panelfiles/panel-chunks/dialog-mount-QPVIPMM3.js").then(({openObjectQuickActions:o})=>{o(this._entryId),this.close()})}}>${this._objectName}</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="quick-info">
|
<div class="quick-info">
|
||||||
${e.next_due?r`<span><strong>${i("next_due",t)||"Next due"}:</strong> ${S(e.next_due,t)}</span>`:l}
|
${e.next_due?r`<span><strong>${i("next_due",t)||"Next due"}:</strong> ${S(e.next_due,t)}</span>`:l}
|
||||||
@@ -500,7 +500,7 @@ import{a as x}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-JPOJFRHB
|
|||||||
`}
|
`}
|
||||||
`:r`<div class="loading">${i("loading",t)||"Loading\u2026"}</div>`}
|
`:r`<div class="loading">${i("loading",t)||"Loading\u2026"}</div>`}
|
||||||
</div>
|
</div>
|
||||||
`}};m.styles=[Y,H`
|
`}};m.styles=[Y,T`
|
||||||
:host { display: contents; }
|
:host { display: contents; }
|
||||||
.backdrop {
|
.backdrop {
|
||||||
position: fixed; inset: 0; z-index: 100;
|
position: fixed; inset: 0; z-index: 100;
|
||||||
@@ -680,7 +680,7 @@ import{a as x}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-JPOJFRHB
|
|||||||
.weibull-section, .seasonal-card-compact { max-width: 100%; }
|
.weibull-section, .seasonal-card-compact { max-width: 100%; }
|
||||||
.weibull-chart svg { max-width: 100%; height: auto; }
|
.weibull-chart svg { max-width: 100%; height: auto; }
|
||||||
.details-toggle { gap: 12px; flex-wrap: wrap; }
|
.details-toggle { gap: 12px; flex-wrap: wrap; }
|
||||||
`],h([D({attribute:!1})],m.prototype,"hass",2),h([_()],m.prototype,"_open",2),h([_()],m.prototype,"_entryId",2),h([_()],m.prototype,"_taskId",2),h([_()],m.prototype,"_task",2),h([_()],m.prototype,"_objectName",2),h([_()],m.prototype,"_busy",2),h([_()],m.prototype,"_error",2),h([_()],m.prototype,"_showSkip",2),h([_()],m.prototype,"_showReset",2),h([_()],m.prototype,"_showDetails",2),h([_()],m.prototype,"_showAdaptive",2),h([_()],m.prototype,"_skipReason",2),h([_()],m.prototype,"_resetDate",2),h([_()],m.prototype,"_features",2),h([_()],m.prototype,"_toast",2);customElements.get("maintenance-task-quick-actions-dialog")||customElements.define("maintenance-task-quick-actions-dialog",m);function at(a){return!!a&&/^https?:\/\//i.test(a)}var $=class extends E{constructor(){super(...arguments);this._open=!1;this._entryId=null;this._data=null;this._busy=!1;this._error=""}get _lang(){return P(this.hass)}async openFor(t){this._entryId=t,this._error="",this._open=!0,await this._load()}close(){this._open=!1,this._data=null,this._error=""}async _load(){if(this._entryId)try{let t=await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/object",entry_id:this._entryId});this._data=t}catch(t){this._error=x(t,this._lang)}}_onEditObject(){!this._entryId||!this._data||import("/maintenance_supporter_panelfiles/panel-chunks/dialog-mount-J5DT4DR4.js").then(({openEditObjectDialog:t})=>{t(this._entryId,this._data.object),this.close()})}_onAddTask(){this._entryId&&import("/maintenance_supporter_panelfiles/panel-chunks/dialog-mount-J5DT4DR4.js").then(({openCreateTaskDialog:t})=>{t(),this.close()})}async _onDelete(){if(!this._entryId||!this._data)return;let t=i("delete_object_confirm",this._lang)||`Delete "${this._data.object.name}" and all its tasks?`;if(window.confirm(t)){this._busy=!0,this._error="";try{await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/object/delete",entry_id:this._entryId}),this.dispatchEvent(new CustomEvent("object-deleted",{detail:{entry_id:this._entryId},bubbles:!0,composed:!0})),this.close()}catch(e){this._error=x(e,this._lang)}finally{this._busy=!1}}}async _onArchiveObject(){if(!this._entryId||!this._data)return;let t=!!this._data.object.archived;if(!t){let e=i("confirm_archive_object",this._lang)||"Archive this object and its tasks?";if(!window.confirm(e))return}this._busy=!0,this._error="";try{await this.hass.connection.sendMessagePromise({type:t?"maintenance_supporter/object/unarchive":"maintenance_supporter/object/archive",entry_id:this._entryId}),this.dispatchEvent(new CustomEvent("object-changed",{detail:{entry_id:this._entryId},bubbles:!0,composed:!0})),this.close()}catch(e){this._error=x(e,this._lang)}finally{this._busy=!1}}_onTaskClick(t){this._entryId&&import("/maintenance_supporter_panelfiles/panel-chunks/dialog-mount-J5DT4DR4.js").then(({openTaskQuickActions:e})=>{e(this._entryId,t)})}render(){if(!this._open)return l;let t=this._lang,e=this._data,s=e?.object,o=e?.tasks||[],d=this.hass?.user?.is_admin??!0;return r`
|
`],h([P({attribute:!1})],m.prototype,"hass",2),h([_()],m.prototype,"_open",2),h([_()],m.prototype,"_entryId",2),h([_()],m.prototype,"_taskId",2),h([_()],m.prototype,"_task",2),h([_()],m.prototype,"_objectName",2),h([_()],m.prototype,"_busy",2),h([_()],m.prototype,"_error",2),h([_()],m.prototype,"_showSkip",2),h([_()],m.prototype,"_showReset",2),h([_()],m.prototype,"_showDetails",2),h([_()],m.prototype,"_showAdaptive",2),h([_()],m.prototype,"_skipReason",2),h([_()],m.prototype,"_resetDate",2),h([_()],m.prototype,"_features",2),h([_()],m.prototype,"_toast",2);customElements.get("maintenance-task-quick-actions-dialog")||customElements.define("maintenance-task-quick-actions-dialog",m);function at(a){return!!a&&/^https?:\/\//i.test(a)}var $=class extends D{constructor(){super(...arguments);this._open=!1;this._entryId=null;this._data=null;this._busy=!1;this._error=""}get _lang(){return M(this.hass)}async openFor(t){this._entryId=t,this._error="",this._open=!0,await this._load()}close(){this._open=!1,this._data=null,this._error=""}async _load(){if(this._entryId)try{let t=await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/object",entry_id:this._entryId});this._data=t}catch(t){this._error=x(t,this._lang)}}_onEditObject(){!this._entryId||!this._data||import("/maintenance_supporter_panelfiles/panel-chunks/dialog-mount-QPVIPMM3.js").then(({openEditObjectDialog:t})=>{t(this._entryId,this._data.object),this.close()})}_onAddTask(){this._entryId&&import("/maintenance_supporter_panelfiles/panel-chunks/dialog-mount-QPVIPMM3.js").then(({openCreateTaskDialog:t})=>{t(),this.close()})}async _onDelete(){if(!this._entryId||!this._data)return;let t=i("delete_object_confirm",this._lang)||`Delete "${this._data.object.name}" and all its tasks?`;if(window.confirm(t)){this._busy=!0,this._error="";try{await this.hass.connection.sendMessagePromise({type:"maintenance_supporter/object/delete",entry_id:this._entryId}),this.dispatchEvent(new CustomEvent("object-deleted",{detail:{entry_id:this._entryId},bubbles:!0,composed:!0})),this.close()}catch(e){this._error=x(e,this._lang)}finally{this._busy=!1}}}async _onArchiveObject(){if(!this._entryId||!this._data)return;let t=!!this._data.object.archived;if(!t){let e=i("confirm_archive_object",this._lang)||"Archive this object and its tasks?";if(!window.confirm(e))return}this._busy=!0,this._error="";try{await this.hass.connection.sendMessagePromise({type:t?"maintenance_supporter/object/unarchive":"maintenance_supporter/object/archive",entry_id:this._entryId}),this.dispatchEvent(new CustomEvent("object-changed",{detail:{entry_id:this._entryId},bubbles:!0,composed:!0})),this.close()}catch(e){this._error=x(e,this._lang)}finally{this._busy=!1}}_onTaskClick(t){this._entryId&&import("/maintenance_supporter_panelfiles/panel-chunks/dialog-mount-QPVIPMM3.js").then(({openTaskQuickActions:e})=>{e(this._entryId,t)})}render(){if(!this._open)return l;let t=this._lang,e=this._data,s=e?.object,o=e?.tasks||[],d=this.hass?.user?.is_admin??!0;return r`
|
||||||
<div class="backdrop" @click=${this.close}></div>
|
<div class="backdrop" @click=${this.close}></div>
|
||||||
<div class="dialog" role="dialog" aria-modal="true">
|
<div class="dialog" role="dialog" aria-modal="true">
|
||||||
${e&&s?r`
|
${e&&s?r`
|
||||||
@@ -747,7 +747,7 @@ import{a as x}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-JPOJFRHB
|
|||||||
</div>
|
</div>
|
||||||
`)}
|
`)}
|
||||||
</div>
|
</div>
|
||||||
`}};$.styles=H`
|
`}};$.styles=T`
|
||||||
:host { display: contents; }
|
:host { display: contents; }
|
||||||
.backdrop {
|
.backdrop {
|
||||||
position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,0.5);
|
position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,0.5);
|
||||||
@@ -806,4 +806,4 @@ import{a as x}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-JPOJFRHB
|
|||||||
.btn ha-icon { --mdc-icon-size: 16px; }
|
.btn ha-icon { --mdc-icon-size: 16px; }
|
||||||
.loading { padding: 24px; text-align: center; color: var(--secondary-text-color); }
|
.loading { padding: 24px; text-align: center; color: var(--secondary-text-color); }
|
||||||
.error { padding: 8px; border-radius: 6px; background: rgba(211,47,47,0.1); color: var(--error-color); font-size: 13px; }
|
.error { padding: 8px; border-radius: 6px; background: rgba(211,47,47,0.1); color: var(--error-color); font-size: 13px; }
|
||||||
`,h([D({attribute:!1})],$.prototype,"hass",2),h([_()],$.prototype,"_open",2),h([_()],$.prototype,"_entryId",2),h([_()],$.prototype,"_data",2),h([_()],$.prototype,"_busy",2),h([_()],$.prototype,"_error",2);customElements.get("maintenance-object-quick-actions-dialog")||customElements.define("maintenance-object-quick-actions-dialog",$);var nt="maintenance-object-dialog",rt="maintenance-task-dialog",yt="maintenance-history-edit-dialog",gt="maintenance-complete-dialog",bt="maintenance-qr-dialog",xt="maintenance-task-quick-actions-dialog",$t="maintenance-object-quick-actions-dialog";function V(){return document.querySelector("home-assistant")?.hass}function kt(){return document.querySelector("home-assistant")?.shadowRoot??document.body}function A(a){let n=kt(),t=n.querySelector(a)??document.body.querySelector(a);return t?t.parentNode!==n&&n.appendChild(t):(t=document.createElement(a),n.appendChild(t)),t}function L(a){let n=V();if(!n)return!1;a.hass=n;let t=n.language||"en";return N(t)||G(t).then(()=>{a.requestUpdate?.()}),!0}var st={features:{adaptive:!1,predictions:!1,seasonal:!1,environmental:!1,budget:!1,groups:!1,checklists:!1,schedule_time:!1,completion_actions:!1},defaultWarningDays:7},R=null;function ot(a){return R||(R=a.connection.sendMessagePromise({type:"maintenance_supporter/settings"}).then(n=>({features:n.features??st.features,defaultWarningDays:n.general?.default_warning_days??7})).catch(()=>st),R)}function _e(){let a=A(nt);return L(a)?(a.openCreate(),!0):!1}function me(a,n){let t=A(nt);return L(t)?(t.openEdit(a,n),!0):!1}function ve(){let a=A(rt);if(!L(a))return!1;let n=V();return n?((async()=>{let t=await ot(n),e=a;e.checklistsEnabled=t.features.checklists,e.scheduleTimeEnabled=t.features.schedule_time,e.completionActionsEnabled=t.features.completion_actions,e.defaultWarningDays=t.defaultWarningDays,e.openCreate()})(),!0):!1}function fe(a,n){let t=A(rt);if(!L(t))return!1;let e=V();return e?((async()=>{try{let[s,o]=await Promise.all([e.connection.sendMessagePromise({type:"maintenance_supporter/object",entry_id:a}),ot(e)]),d=(s.tasks||[]).find(p=>p.id===n);if(!d){console.warn(`openEditTaskDialog: task ${n} not found in entry ${a}`);return}let c=t;c.checklistsEnabled=o.features.checklists,c.scheduleTimeEnabled=o.features.schedule_time,c.completionActionsEnabled=o.features.completion_actions,c.defaultWarningDays=o.defaultWarningDays,await c.openEdit(a,d)}catch(s){console.warn("openEditTaskDialog: failed to load task/features",s)}})(),!0):!1}function ye(a){let n=A(yt);return L(n)?(n.openEdit(a),!0):!1}function ge(a){let n=A(gt);return L(n)?(n.entryId=a.entry_id,n.taskId=a.task_id,n.taskName=a.task_name,n.checklist=a.checklist??[],n.adaptiveEnabled=!!a.adaptive_enabled,n.requiredFields=a.required_completion_fields??[],n.lang=V()?.language||"en",n.open(),!0):!1}function be(a){let n=A(bt);return L(n)?(n.openForTask(a.entry_id,a.task_id,a.object_name,a.task_name),!0):!1}function xe(a,n){let t=A(xt);return L(t)?(t.openFor(a,n),!0):!1}function $e(a){let n=A($t);return L(n)?(n.openFor(a),!0):!1}export{at as a,Q as b,J as c,X as d,et as e,it as f,_e as g,me as h,ve as i,fe as j,ye as k,ge as l,be as m,xe as n,$e as o};
|
`,h([P({attribute:!1})],$.prototype,"hass",2),h([_()],$.prototype,"_open",2),h([_()],$.prototype,"_entryId",2),h([_()],$.prototype,"_data",2),h([_()],$.prototype,"_busy",2),h([_()],$.prototype,"_error",2);customElements.get("maintenance-object-quick-actions-dialog")||customElements.define("maintenance-object-quick-actions-dialog",$);var nt="maintenance-object-dialog",rt="maintenance-task-dialog",yt="maintenance-history-edit-dialog",gt="maintenance-complete-dialog",bt="maintenance-qr-dialog",xt="maintenance-task-quick-actions-dialog",$t="maintenance-object-quick-actions-dialog";function V(){return document.querySelector("home-assistant")?.hass}function kt(){return document.querySelector("home-assistant")?.shadowRoot??document.body}function A(a){let n=kt(),t=n.querySelector(a)??document.body.querySelector(a);return t?t.parentNode!==n&&n.appendChild(t):(t=document.createElement(a),n.appendChild(t)),t}function L(a){let n=V();if(!n)return!1;a.hass=n;let t=M(n);return N(t)||G(t).then(()=>{a.requestUpdate?.()}),!0}var st={features:{adaptive:!1,predictions:!1,seasonal:!1,environmental:!1,budget:!1,groups:!1,checklists:!1,schedule_time:!1,completion_actions:!1},defaultWarningDays:7},R=null;function ot(a){return R||(R=a.connection.sendMessagePromise({type:"maintenance_supporter/settings"}).then(n=>({features:n.features??st.features,defaultWarningDays:n.general?.default_warning_days??7})).catch(()=>st),R)}function _e(){let a=A(nt);return L(a)?(a.openCreate(),!0):!1}function me(a,n){let t=A(nt);return L(t)?(t.openEdit(a,n),!0):!1}function ve(){let a=A(rt);if(!L(a))return!1;let n=V();return n?((async()=>{let t=await ot(n),e=a;e.checklistsEnabled=t.features.checklists,e.scheduleTimeEnabled=t.features.schedule_time,e.completionActionsEnabled=t.features.completion_actions,e.defaultWarningDays=t.defaultWarningDays,e.openCreate()})(),!0):!1}function fe(a,n){let t=A(rt);if(!L(t))return!1;let e=V();return e?((async()=>{try{let[s,o]=await Promise.all([e.connection.sendMessagePromise({type:"maintenance_supporter/object",entry_id:a}),ot(e)]),d=(s.tasks||[]).find(p=>p.id===n);if(!d){console.warn(`openEditTaskDialog: task ${n} not found in entry ${a}`);return}let c=t;c.checklistsEnabled=o.features.checklists,c.scheduleTimeEnabled=o.features.schedule_time,c.completionActionsEnabled=o.features.completion_actions,c.defaultWarningDays=o.defaultWarningDays,await c.openEdit(a,d)}catch(s){console.warn("openEditTaskDialog: failed to load task/features",s)}})(),!0):!1}function ye(a){let n=A(yt);return L(n)?(n.openEdit(a),!0):!1}function ge(a){let n=A(gt);return L(n)?(n.entryId=a.entry_id,n.taskId=a.task_id,n.taskName=a.task_name,n.checklist=a.checklist??[],n.adaptiveEnabled=!!a.adaptive_enabled,n.requiredFields=a.required_completion_fields??[],n.lang=V()?.language||"en",n.open(),!0):!1}function be(a){let n=A(bt);return L(n)?(n.openForTask(a.entry_id,a.task_id,a.object_name,a.task_name),!0):!1}function xe(a,n){let t=A(xt);return L(t)?(t.openFor(a,n),!0):!1}function $e(a){let n=A($t);return L(n)?(n.openFor(a),!0):!1}export{at as a,Q as b,J as c,X as d,et as e,it as f,_e as g,me as h,ve as i,fe as j,ye as k,ge as l,be as m,xe as n,$e as o};
|
||||||
+2
-2
@@ -1,2 +1,2 @@
|
|||||||
/*! maintenance_supporter frontend 2.61.0 */
|
/*! maintenance_supporter frontend 2.63.1 */
|
||||||
import{n as a}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-4JER2GPD.js";var s={name:"name",task_type:"maintenance_type",schedule_type:"schedule_type",interval_days:"interval_days",interval_anchor:"interval_anchor",warning_days:"warning_days",last_performed:"last_performed_optional",notes:"notes_optional",documentation_url:"documentation_url_optional",custom_icon:"custom_icon_optional",nfc_tag_id:"nfc_tag_id_optional",responsible_user_id:"responsible_user",entity_slug:"entity_slug",entity_id:"entity_id",area_id:"area_id_optional",manufacturer:"manufacturer_optional",model:"model_optional",serial_number:"serial_number_optional",installation_date:"installation_date_optional",warranty_expiry:"warranty_expiry_optional",checklist:"checklist_steps_optional",reason:"reason",feedback:"feedback",cost:"cost",duration:"duration",description:"description_optional",group_name:"name",group_description:"description_optional",environmental_entity:"environmental_entity_optional",environmental_attribute:"environmental_attribute_optional",trigger_above:"trigger_above",trigger_below:"trigger_below",trigger_equals:"trigger_equals",trigger_not_equals:"trigger_not_equals",trigger_for_minutes:"trigger_for_minutes"};function c(r,o){let e=s[r];if(!e)return r;let t=a(e,o);return t&&t!==e?t:r}function d(r){let e=r.match(/data\['([^']+)'\]/)?.[1],t;return(t=r.match(/length of value must be at most (\d+)/))?{field:e,rule:"too_long",param:t[1]}:(t=r.match(/length of value must be at least (\d+)/))?{field:e,rule:"too_short",param:t[1]}:(t=r.match(/value must be at most (\S+)/))?{field:e,rule:"value_too_high",param:t[1]}:(t=r.match(/value must be at least (\S+)/))?{field:e,rule:"value_too_low",param:t[1]}:/required key not provided/.test(r)?{field:e,rule:"required"}:(t=r.match(/expected (\w+)/))?{field:e,rule:"wrong_type",param:t[1]}:/value must be one of/.test(r)?{field:e,rule:"invalid_choice"}:/not a valid value/.test(r)?{field:e,rule:"invalid_value"}:{field:e,rule:"unknown"}}function g(r,o,e){if(e=e??a("action_error",o),typeof r=="string")return r;if(typeof r!="object"||r===null)return e;let t=r,_=t.message||t.error?.message||"";if(!_)return e;let i=d(_),l=i.field?c(i.field,o):"",n=u=>a(u,o).replace("{field}",l).replace("{n}",i.param??"");switch(i.rule){case"too_long":return n("err_too_long");case"too_short":return n("err_too_short");case"value_too_high":return n("err_value_too_high");case"value_too_low":return n("err_value_too_low");case"required":return n("err_required");case"wrong_type":return n("err_wrong_type").replace("{type}",i.param??"");case"invalid_choice":return n("err_invalid_choice");case"invalid_value":return n("err_invalid_value");default:return _||e}}export{g as a};
|
import{p as a}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-FS5TZIDQ.js";var s={name:"name",task_type:"maintenance_type",schedule_type:"schedule_type",interval_days:"interval_days",interval_anchor:"interval_anchor",warning_days:"warning_days",last_performed:"last_performed_optional",notes:"notes_optional",documentation_url:"documentation_url_optional",custom_icon:"custom_icon_optional",nfc_tag_id:"nfc_tag_id_optional",responsible_user_id:"responsible_user",entity_slug:"entity_slug",entity_id:"entity_id",area_id:"area_id_optional",manufacturer:"manufacturer_optional",model:"model_optional",serial_number:"serial_number_optional",installation_date:"installation_date_optional",warranty_expiry:"warranty_expiry_optional",checklist:"checklist_steps_optional",reason:"reason",feedback:"feedback",cost:"cost",duration:"duration",description:"description_optional",group_name:"name",group_description:"description_optional",environmental_entity:"environmental_entity_optional",environmental_attribute:"environmental_attribute_optional",trigger_above:"trigger_above",trigger_below:"trigger_below",trigger_equals:"trigger_equals",trigger_not_equals:"trigger_not_equals",trigger_for_minutes:"trigger_for_minutes"};function c(r,o){let e=s[r];if(!e)return r;let t=a(e,o);return t&&t!==e?t:r}function d(r){let e=r.match(/data\['([^']+)'\]/)?.[1],t;return(t=r.match(/length of value must be at most (\d+)/))?{field:e,rule:"too_long",param:t[1]}:(t=r.match(/length of value must be at least (\d+)/))?{field:e,rule:"too_short",param:t[1]}:(t=r.match(/value must be at most (\S+)/))?{field:e,rule:"value_too_high",param:t[1]}:(t=r.match(/value must be at least (\S+)/))?{field:e,rule:"value_too_low",param:t[1]}:/required key not provided/.test(r)?{field:e,rule:"required"}:(t=r.match(/expected (\w+)/))?{field:e,rule:"wrong_type",param:t[1]}:/value must be one of/.test(r)?{field:e,rule:"invalid_choice"}:/not a valid value/.test(r)?{field:e,rule:"invalid_value"}:{field:e,rule:"unknown"}}function g(r,o,e){if(e=e??a("action_error",o),typeof r=="string")return r;if(typeof r!="object"||r===null)return e;let t=r,_=t.message||t.error?.message||"";if(!_)return e;let i=d(_),l=i.field?c(i.field,o):"",n=u=>a(u,o).replace("{field}",l).replace("{n}",i.param??"");switch(i.rule){case"too_long":return n("err_too_long");case"too_short":return n("err_too_short");case"value_too_high":return n("err_value_too_high");case"value_too_low":return n("err_value_too_low");case"required":return n("err_required");case"wrong_type":return n("err_wrong_type").replace("{type}",i.param??"");case"invalid_choice":return n("err_invalid_choice");case"invalid_value":return n("err_invalid_value");default:return _||e}}export{g as a};
|
||||||
+2
-2
@@ -1,2 +1,2 @@
|
|||||||
/*! maintenance_supporter frontend 2.61.0 */
|
/*! maintenance_supporter frontend 2.63.1 */
|
||||||
import{n as _}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-4JER2GPD.js";function u(e){return`${e.entry_id??""}\0${e.part_id}`}function l(e,r,s,c){let n=!!e.entry_id&&e.entry_id!==r,o=n?e.entry_id:r,a=s.find(p=>p.entry_id===o),t=(a?.parts||[]).find(p=>p.id===e.part_id)||null,d=n&&a?.object?.name||"",i=t?.name||_("shared_part_unknown",c);return{part:t,foreign:n,ownerName:d,label:d?`${i} (${d})`:i}}function P(e,r,s,c){let{part:n,label:o}=l(e,r,s,c),a=n&&n.stock!==null&&n.stock!==void 0?` (${n.stock}${n.unit?" "+n.unit:""})`:"",t=n?.storage_location?` \u2014 ${n.storage_location}`:"";return`${e.quantity}\xD7 ${o}${a}${t}`}function g(e,r,s,c){let o=(s.find(t=>t.entry_id===r)?.parts||[]).map(t=>({...t})),a=new Set(o.map(t=>u({part_id:t.id})));for(let t of e?.consumes_parts||[]){if(!t.entry_id||t.entry_id===r)continue;let d=u(t);if(a.has(d))continue;a.add(d);let{part:i,ownerName:p}=l(t,r,s,c);o.push({id:t.part_id,name:i?.name||_("shared_part_unknown",c),unit:i?.unit,stock:i?.stock??null,storage_location:i?.storage_location,entry_id:t.entry_id,owner_name:p})}return o}var f=["notes","cost","duration","photo","user"],m={notes:"notes_label",cost:"cost",duration:"duration",photo:"photo_label",user:"user_label"};export{u as a,P as b,g as c,f as d,m as e};
|
import{p as _}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-FS5TZIDQ.js";function u(e){return`${e.entry_id??""}\0${e.part_id}`}function l(e,r,s,c){let n=!!e.entry_id&&e.entry_id!==r,o=n?e.entry_id:r,a=s.find(p=>p.entry_id===o),t=(a?.parts||[]).find(p=>p.id===e.part_id)||null,d=n&&a?.object?.name||"",i=t?.name||_("shared_part_unknown",c);return{part:t,foreign:n,ownerName:d,label:d?`${i} (${d})`:i}}function P(e,r,s,c){let{part:n,label:o}=l(e,r,s,c),a=n&&n.stock!==null&&n.stock!==void 0?` (${n.stock}${n.unit?" "+n.unit:""})`:"",t=n?.storage_location?` \u2014 ${n.storage_location}`:"";return`${e.quantity}\xD7 ${o}${a}${t}`}function g(e,r,s,c){let o=(s.find(t=>t.entry_id===r)?.parts||[]).map(t=>({...t})),a=new Set(o.map(t=>u({part_id:t.id})));for(let t of e?.consumes_parts||[]){if(!t.entry_id||t.entry_id===r)continue;let d=u(t);if(a.has(d))continue;a.add(d);let{part:i,ownerName:p}=l(t,r,s,c);o.push({id:t.part_id,name:i?.name||_("shared_part_unknown",c),unit:i?.unit,stock:i?.stock??null,storage_location:i?.storage_location,entry_id:t.entry_id,owner_name:p})}return o}var f=["notes","cost","duration","photo","user"],m={notes:"notes_label",cost:"cost",duration:"duration",photo:"photo_label",user:"user_label"};export{u as a,P as b,g as c,f as d,m as e};
|
||||||
+17
-17
@@ -1,7 +1,7 @@
|
|||||||
/*! maintenance_supporter frontend 2.61.0 */
|
/*! maintenance_supporter frontend 2.63.1 */
|
||||||
import{a,b as v,c as n,f as g,g as b,i as m,j as c,n as t}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-4JER2GPD.js";function p(l){return l.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function x(l){return!l.startsWith("data:image/svg+xml,")&&!l.startsWith("data:image/png;base64,")?"":p(l)}function $(l){return l.replace(/[/\\:*?"<>|#%]+/g,"").replace(/\s+/g,"-").toLowerCase().substring(0,100)}var r=class extends b{constructor(){super(...arguments);this.lang="en";this._open=!1;this._loading=!1;this._error="";this._viewResult=null;this._completeResult=null;this._urlMode="companion";this._entryId="";this._taskId=null;this._objectName="";this._taskName="";this._generateSeq=0}openForObject(e,i){this._entryId=e,this._taskId=null,this._objectName=i,this._taskName="",this._urlMode="companion",this._error="",this._viewResult=null,this._completeResult=null,this._open=!0,this._generate()}openForTask(e,i,o,s){this._entryId=e,this._taskId=i,this._objectName=o,this._taskName=s,this._urlMode="companion",this._error="",this._viewResult=null,this._completeResult=null,this._open=!0,this._generate()}async _generate(){let e=++this._generateSeq;this._loading=!0,this._error="",this._viewResult=null,this._completeResult=null;try{let i={type:"maintenance_supporter/qr/generate",entry_id:this._entryId,url_mode:this._urlMode};this._taskId&&(i.task_id=this._taskId);let o=[this.hass.connection.sendMessagePromise({...i,action:"view"})];this._taskId&&o.push(this.hass.connection.sendMessagePromise({...i,action:"complete"}));let s=await Promise.all(o);if(e!==this._generateSeq)return;this._viewResult=s[0],s.length>1&&(this._completeResult=s[1])}catch(i){if(e!==this._generateSeq)return;let o=i?.code,s=i?.message;this._error=o==="no_url"||typeof s=="string"&&s.includes("No Home Assistant URL")?t("qr_error_no_url",this.lang):t("qr_error",this.lang)}finally{e===this._generateSeq&&(this._loading=!1)}}_setUrlMode(e){this._urlMode!==e&&(this._urlMode=e,this._generate())}_print(){if(!this._viewResult)return;let e=this._viewResult,i=e.label.task_name?`${e.label.object_name} \u2014 ${e.label.task_name}`:e.label.object_name,o=[e.label.manufacturer,e.label.model].filter(Boolean).join(" "),s=window.open("","_blank","width=600,height=500");if(!s)return;let h=this.lang||"en",d=p(i),u=p(o),_=!!this._completeResult,f=p(t("qr_action_view",h)),w=p(t("qr_action_complete",h));s.document.write(`<!DOCTYPE html><html><head><meta charset="utf-8">
|
import{a as x}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-IMKP65C5.js";import{a,b as v,c as n,f as p,g as b,k as h,l as c,p as t}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-FS5TZIDQ.js";function d(l){return l.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function f(l){return!l.startsWith("data:image/svg+xml,")&&!l.startsWith("data:image/png;base64,")?"":d(l)}function q(l){return l.replace(/[/\\:*?"<>|#%]+/g,"").replace(/\s+/g,"-").toLowerCase().substring(0,100)}var o=class extends b{constructor(){super(...arguments);this.lang="en";this._open=!1;this._loading=!1;this._error="";this._viewResult=null;this._completeResult=null;this._urlMode="companion";this._entryId="";this._taskId=null;this._objectName="";this._taskName="";this._generateSeq=0}openForObject(e,i){this._entryId=e,this._taskId=null,this._objectName=i,this._taskName="",this._urlMode="companion",this._error="",this._viewResult=null,this._completeResult=null,this._open=!0,this._generate()}openForTask(e,i,r,s){this._entryId=e,this._taskId=i,this._objectName=r,this._taskName=s,this._urlMode="companion",this._error="",this._viewResult=null,this._completeResult=null,this._open=!0,this._generate()}async _generate(){let e=++this._generateSeq;this._loading=!0,this._error="",this._viewResult=null,this._completeResult=null;try{let i={type:"maintenance_supporter/qr/generate",entry_id:this._entryId,url_mode:this._urlMode};this._taskId&&(i.task_id=this._taskId);let r=[this.hass.connection.sendMessagePromise({...i,action:"view"})];this._taskId&&r.push(this.hass.connection.sendMessagePromise({...i,action:"complete"}));let s=await Promise.all(r);if(e!==this._generateSeq)return;this._viewResult=s[0],s.length>1&&(this._completeResult=s[1])}catch(i){if(e!==this._generateSeq)return;let r=i?.code,s=i?.message;this._error=r==="no_url"||typeof s=="string"&&s.includes("No Home Assistant URL")?t("qr_error_no_url",this.lang):t("qr_error",this.lang)}finally{e===this._generateSeq&&(this._loading=!1)}}_setUrlMode(e){this._urlMode!==e&&(this._urlMode=e,this._generate())}_print(){if(!this._viewResult)return;let e=this._viewResult,i=e.label.task_name?`${e.label.object_name} \u2014 ${e.label.task_name}`:e.label.object_name,r=[e.label.manufacturer,e.label.model].filter(Boolean).join(" "),s=window.open("","_blank","width=600,height=500");if(!s)return;let g=this.lang||"en",u=d(i),m=d(r),_=!!this._completeResult,w=d(t("qr_action_view",g)),$=d(t("qr_action_complete",g));s.document.write(`<!DOCTYPE html><html><head><meta charset="utf-8">
|
||||||
<meta name="color-scheme" content="light">
|
<meta name="color-scheme" content="light">
|
||||||
<title>${d}</title>
|
<title>${u}</title>
|
||||||
<style>
|
<style>
|
||||||
/* Printable sheet \u2014 must not inherit the phone's dark theme. The QR images
|
/* Printable sheet \u2014 must not inherit the phone's dark theme. The QR images
|
||||||
carry their own white quiet zone and stay scannable either way, but the
|
carry their own white quiet zone and stay scannable either way, but the
|
||||||
@@ -17,25 +17,25 @@ import{a,b as v,c as n,f as g,g as b,i as m,j as c,n as t}from"/maintenance_supp
|
|||||||
.qr-label{font-size:13px;font-weight:500;color:#333}
|
.qr-label{font-size:13px;font-weight:500;color:#333}
|
||||||
.url{font-size:10px;color:#999;word-break:break-all;margin-top:8px;max-width:480px}
|
.url{font-size:10px;color:#999;word-break:break-all;margin-top:8px;max-width:480px}
|
||||||
</style></head><body>
|
</style></head><body>
|
||||||
<h2>${d}</h2>
|
<h2>${u}</h2>
|
||||||
${u?`<div class="sub">${u}</div>`:""}
|
${m?`<div class="sub">${m}</div>`:""}
|
||||||
<div class="qr-row">
|
<div class="qr-row">
|
||||||
<div class="qr-col">
|
<div class="qr-col">
|
||||||
<img src="${x(this._viewResult.svg_data_uri)}" alt="QR Info" />
|
<img src="${f(this._viewResult.svg_data_uri)}" alt="QR Info" />
|
||||||
<div class="qr-label">${f}</div>
|
<div class="qr-label">${w}</div>
|
||||||
</div>
|
</div>
|
||||||
${_?`<div class="qr-col">
|
${_?`<div class="qr-col">
|
||||||
<img src="${x(this._completeResult.svg_data_uri)}" alt="QR Complete" />
|
<img src="${f(this._completeResult.svg_data_uri)}" alt="QR Complete" />
|
||||||
<div class="qr-label">${w}</div>
|
<div class="qr-label">${$}</div>
|
||||||
</div>`:""}
|
</div>`:""}
|
||||||
</div>
|
</div>
|
||||||
<div class="url">${p(this._viewResult.url)}</div>
|
<div class="url">${d(this._viewResult.url)}</div>
|
||||||
<script>setTimeout(()=>window.print(),300)<\/script>
|
<script>setTimeout(()=>window.print(),300)<\/script>
|
||||||
</body></html>`),s.document.close()}_downloadSvg(e,i){let o=decodeURIComponent(e.svg_data_uri.replace("data:image/svg+xml,","")),s=new Blob([o],{type:"image/svg+xml"}),h=URL.createObjectURL(s),d=document.createElement("a");d.href=h;let u=this._taskName?`${this._objectName}-${this._taskName}`:this._objectName;d.download=`qr-${$(u)}-${i}.svg`,d.click(),URL.revokeObjectURL(h)}_close(){this._open=!1,this._viewResult=null,this._completeResult=null,this._error="",this._loading=!1}render(){if(!this._open)return n``;let e=this.lang||this.hass?.language||"en",i=this._taskName?`${t("qr_code",e)}: ${this._objectName} \u2014 ${this._taskName}`:`${t("qr_code",e)}: ${this._objectName}`,o=!!this._viewResult;return n`
|
</body></html>`),s.document.close()}_downloadSvg(e,i){let r=decodeURIComponent(e.svg_data_uri.replace("data:image/svg+xml,","")),s=this._taskName?`${this._objectName}-${this._taskName}`:this._objectName;x(r,`qr-${q(s)}-${i}.svg`,"image/svg+xml")}_close(){this._open=!1,this._viewResult=null,this._completeResult=null,this._error="",this._loading=!1}render(){if(!this._open)return n``;let e=this.lang||this.hass?.language||"en",i=this._taskName?`${t("qr_code",e)}: ${this._objectName} \u2014 ${this._taskName}`:`${t("qr_code",e)}: ${this._objectName}`,r=!!this._viewResult;return n`
|
||||||
<ha-dialog open @closed=${this._close}>
|
<ha-dialog open @closed=${this._close}>
|
||||||
<div class="dialog-title">${i}</div>
|
<div class="dialog-title">${i}</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
${this._loading?n`<div class="loading">${t("qr_generating",e)}</div>`:this._error?n`<div class="error">${this._error}</div>`:o?n`
|
${this._loading?n`<div class="loading">${t("qr_generating",e)}</div>`:this._error?n`<div class="error">${this._error}</div>`:r?n`
|
||||||
<div class="qr-pair">
|
<div class="qr-pair">
|
||||||
<div class="qr-item">
|
<div class="qr-item">
|
||||||
<img
|
<img
|
||||||
@@ -64,10 +64,10 @@ ${u?`<div class="sub">${u}</div>`:""}
|
|||||||
${t("qr_download",e)}
|
${t("qr_download",e)}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
`:g}
|
`:p}
|
||||||
</div>
|
</div>
|
||||||
<div class="url-display">${this._viewResult.url}</div>
|
<div class="url-display">${this._viewResult.url}</div>
|
||||||
`:g}
|
`:p}
|
||||||
<div class="action-row">
|
<div class="action-row">
|
||||||
<label>${t("qr_url_mode",e)}</label>
|
<label>${t("qr_url_mode",e)}</label>
|
||||||
<div class="action-toggle">
|
<div class="action-toggle">
|
||||||
@@ -86,13 +86,13 @@ ${u?`<div class="sub">${u}</div>`:""}
|
|||||||
</ha-button>
|
</ha-button>
|
||||||
<ha-button
|
<ha-button
|
||||||
@click=${this._print}
|
@click=${this._print}
|
||||||
.disabled=${!o}
|
.disabled=${!r}
|
||||||
>
|
>
|
||||||
${t("qr_print",e)}
|
${t("qr_print",e)}
|
||||||
</ha-button>
|
</ha-button>
|
||||||
</div>
|
</div>
|
||||||
</ha-dialog>
|
</ha-dialog>
|
||||||
`}};r.styles=v`
|
`}};o.styles=v`
|
||||||
.dialog-title {
|
.dialog-title {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
@@ -210,4 +210,4 @@ ${u?`<div class="sub">${u}</div>`:""}
|
|||||||
color: var(--text-primary-color, #fff);
|
color: var(--text-primary-color, #fff);
|
||||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
|
||||||
}
|
}
|
||||||
`,a([m({attribute:!1})],r.prototype,"hass",2),a([m()],r.prototype,"lang",2),a([c()],r.prototype,"_open",2),a([c()],r.prototype,"_loading",2),a([c()],r.prototype,"_error",2),a([c()],r.prototype,"_viewResult",2),a([c()],r.prototype,"_completeResult",2),a([c()],r.prototype,"_urlMode",2);customElements.get("maintenance-qr-dialog")||customElements.define("maintenance-qr-dialog",r);export{r as a};
|
`,a([h({attribute:!1})],o.prototype,"hass",2),a([h()],o.prototype,"lang",2),a([c()],o.prototype,"_open",2),a([c()],o.prototype,"_loading",2),a([c()],o.prototype,"_error",2),a([c()],o.prototype,"_viewResult",2),a([c()],o.prototype,"_completeResult",2),a([c()],o.prototype,"_urlMode",2);customElements.get("maintenance-qr-dialog")||customElements.define("maintenance-qr-dialog",o);export{o as a};
|
||||||
+2
@@ -0,0 +1,2 @@
|
|||||||
|
/*! maintenance_supporter frontend 2.63.1 */
|
||||||
|
import{a}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-FBQXAJIT.js";import"/maintenance_supporter_panelfiles/panel-chunks/chunk-VIX7PNOY.js";import"/maintenance_supporter_panelfiles/panel-chunks/chunk-OGUFLW7I.js";import"/maintenance_supporter_panelfiles/panel-chunks/chunk-FS5TZIDQ.js";export{a as MaintenanceCompleteDialog};
|
||||||
-2
@@ -1,2 +0,0 @@
|
|||||||
/*! maintenance_supporter frontend 2.61.0 */
|
|
||||||
import{a}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-P4GKDOK3.js";import"/maintenance_supporter_panelfiles/panel-chunks/chunk-4Q4MHZO7.js";import"/maintenance_supporter_panelfiles/panel-chunks/chunk-JPOJFRHB.js";import"/maintenance_supporter_panelfiles/panel-chunks/chunk-4JER2GPD.js";export{a as MaintenanceCompleteDialog};
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
/*! maintenance_supporter frontend 2.61.0 */
|
|
||||||
import{g as a,h as b,i as c,j as d,k as e,l as f,m as g,n as h,o as i}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-LVFV6HYC.js";import"/maintenance_supporter_panelfiles/panel-chunks/chunk-4LG4SJUR.js";import"/maintenance_supporter_panelfiles/panel-chunks/chunk-H5KOKMZN.js";import"/maintenance_supporter_panelfiles/panel-chunks/chunk-EW357W3K.js";import"/maintenance_supporter_panelfiles/panel-chunks/chunk-P4GKDOK3.js";import"/maintenance_supporter_panelfiles/panel-chunks/chunk-4Q4MHZO7.js";import"/maintenance_supporter_panelfiles/panel-chunks/chunk-TRENHXOS.js";import"/maintenance_supporter_panelfiles/panel-chunks/chunk-TGQTH4TY.js";import"/maintenance_supporter_panelfiles/panel-chunks/chunk-JPOJFRHB.js";import"/maintenance_supporter_panelfiles/panel-chunks/chunk-4JER2GPD.js";export{f as openCompleteDialog,a as openCreateObjectDialog,c as openCreateTaskDialog,b as openEditObjectDialog,d as openEditTaskDialog,e as openHistoryEditDialog,i as openObjectQuickActions,g as openQrDialog,h as openTaskQuickActions};
|
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
/*! maintenance_supporter frontend 2.63.1 */
|
||||||
|
import{g as a,h as b,i as c,j as d,k as e,l as f,m as g,n as h,o as i}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-NWIQAC7B.js";import"/maintenance_supporter_panelfiles/panel-chunks/chunk-JIB2VNVZ.js";import"/maintenance_supporter_panelfiles/panel-chunks/chunk-JY37H466.js";import"/maintenance_supporter_panelfiles/panel-chunks/chunk-NOHIK75N.js";import"/maintenance_supporter_panelfiles/panel-chunks/chunk-FBQXAJIT.js";import"/maintenance_supporter_panelfiles/panel-chunks/chunk-VIX7PNOY.js";import"/maintenance_supporter_panelfiles/panel-chunks/chunk-VWJA3YLV.js";import"/maintenance_supporter_panelfiles/panel-chunks/chunk-IMKP65C5.js";import"/maintenance_supporter_panelfiles/panel-chunks/chunk-BBM5E3UT.js";import"/maintenance_supporter_panelfiles/panel-chunks/chunk-OGUFLW7I.js";import"/maintenance_supporter_panelfiles/panel-chunks/chunk-FS5TZIDQ.js";export{f as openCompleteDialog,a as openCreateObjectDialog,c as openCreateTaskDialog,b as openEditObjectDialog,d as openEditTaskDialog,e as openHistoryEditDialog,i as openObjectQuickActions,g as openQrDialog,h as openTaskQuickActions};
|
||||||
-2
@@ -1,2 +0,0 @@
|
|||||||
/*! maintenance_supporter frontend 2.61.0 */
|
|
||||||
import{a}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-4LG4SJUR.js";import"/maintenance_supporter_panelfiles/panel-chunks/chunk-EW357W3K.js";import"/maintenance_supporter_panelfiles/panel-chunks/chunk-JPOJFRHB.js";import"/maintenance_supporter_panelfiles/panel-chunks/chunk-4JER2GPD.js";export{a as MaintenanceObjectDialog};
|
|
||||||
+2
@@ -0,0 +1,2 @@
|
|||||||
|
/*! maintenance_supporter frontend 2.63.1 */
|
||||||
|
import{a}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-JIB2VNVZ.js";import"/maintenance_supporter_panelfiles/panel-chunks/chunk-NOHIK75N.js";import"/maintenance_supporter_panelfiles/panel-chunks/chunk-OGUFLW7I.js";import"/maintenance_supporter_panelfiles/panel-chunks/chunk-FS5TZIDQ.js";export{a as MaintenanceObjectDialog};
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
/*! maintenance_supporter frontend 2.63.1 */
|
||||||
|
import{a}from"/maintenance_supporter_panelfiles/panel-chunks/chunk-VWJA3YLV.js";import"/maintenance_supporter_panelfiles/panel-chunks/chunk-IMKP65C5.js";import"/maintenance_supporter_panelfiles/panel-chunks/chunk-FS5TZIDQ.js";export{a as MaintenanceQrDialog};
|
||||||
Loaded 100 of 197 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user