diff --git a/README.md b/README.md
index 50105a87..97b98920 100644
--- a/README.md
+++ b/README.md
@@ -3,7 +3,7 @@
[![Build Status](https://github.com/aneisch/home-assistant-config/actions/workflows/check-ha-release-compatibility.yml/badge.svg)](https://github.com/aneisch/home-assistant-config/actions)
[![GitHub last commit](https://img.shields.io/github/last-commit/aneisch/home-assistant-config)](https://github.com/aneisch/home-assistant-config/commits/master)
[![GitHub commit activity](https://img.shields.io/github/commit-activity/y/aneisch/home-assistant-config)](https://github.com/aneisch/home-assistant-config/graphs/commit-activity)
-[![HA Version](https://img.shields.io/badge/Running%20Home%20Assistant-2024.10.1%20(Latest)-brightgreen)](https://github.com/home-assistant/home-assistant/releases/latest)
+[![HA Version](https://img.shields.io/badge/Running%20Home%20Assistant-2024.11.2%20(Latest)-brightgreen)](https://github.com/home-assistant/home-assistant/releases/latest)
I do my best to keep [Home Assistant](https://github.com/home-assistant/home-assistant) on the [latest release](https://github.com/home-assistant/home-assistant/releases/latest). I'm heavily utilizing [AppDaemon](http://appdaemon.readthedocs.io/en/latest/) and [NodeRed](https://flows.nodered.org/node/node-red-contrib-home-assistant-websocket) for advanced/templated automations. See [Appdaemon config](https://github.com/aneisch/home-assistant-config/tree/master/extras/appdaemon) and my NodeRed screenshots below for details. Most of my setup is run as Docker containers (see [docker-compose](https://github.com/aneisch/home-assistant-config/tree/master/extras/docker-compose) for container list).
@@ -27,6 +27,7 @@ My Home Assistant installation runs on a [Gen7 i3 NUC](https://amzn.to/2K0vab6)
- 2 GE 12730 / ZW4002
- 1 Kwikset 910
- 1 Leviton DZPA1
+ - 1 None None
- 1 Nortek Security + Control LLC WADWAZ-1
- 1 Nortek Security + Control LLC WAPIRZ-1
- 1 Zooz ZAC36
@@ -35,8 +36,7 @@ My Home Assistant installation runs on a [Gen7 i3 NUC](https://amzn.to/2K0vab6)
- 6 Zooz ZEN30
- 3 Zooz ZEN37 800LR
- 1 Zooz ZEN55 LR
- - 2 Zooz ZEN71
- - 2 Zooz ZEN71 800LR
+ - 4 Zooz ZEN71
- 1 Zooz ZEN77
- 5 Zooz ZSE42
- MQTT remote and local server (via [Docker](https://github.com/aneisch/home-assistant-config/tree/master/extras/docker-compose))
@@ -58,17 +58,17 @@ Home Assistant and other containers have ingress handled automatically by [Traef
## Some statistics about my installation:
Description | value
-- | --
-Lines of ESPHome YAML | 3246
-Lines of Home Assistant YAML | 10611
-[Integrations](https://www.home-assistant.io/integrations/) in use | 64
+Lines of ESPHome YAML | 3297
+Lines of Home Assistant YAML | 10787
+[Integrations](https://www.home-assistant.io/integrations/) in use | 66
Zigbee devices in [`zha`](https://www.home-assistant.io/integrations/zha/) | 26
Z-Wave devices in [`zwave_js`](https://www.home-assistant.io/integrations/zwave_js/) | 37
Description | value
-- | --
-Entities in the [`automation`](https://www.home-assistant.io/components/automation) domain | 134
-Entities in the [`binary_sensor`](https://www.home-assistant.io/components/binary_sensor) domain | 170
-Entities in the [`button`](https://www.home-assistant.io/components/button) domain | 46
+Entities in the [`automation`](https://www.home-assistant.io/components/automation) domain | 135
+Entities in the [`binary_sensor`](https://www.home-assistant.io/components/binary_sensor) domain | 175
+Entities in the [`button`](https://www.home-assistant.io/components/button) domain | 53
Entities in the [`camera`](https://www.home-assistant.io/components/camera) domain | 16
Entities in the [`climate`](https://www.home-assistant.io/components/climate) domain | 1
Entities in the [`conversation`](https://www.home-assistant.io/components/conversation) domain | 2
@@ -78,7 +78,7 @@ Entities in the [`datetime`](https://www.home-assistant.io/components/datetime)
Entities in the [`device_tracker`](https://www.home-assistant.io/components/device_tracker) domain | 6
Entities in the [`event`](https://www.home-assistant.io/components/event) domain | 14
Entities in the [`fan`](https://www.home-assistant.io/components/fan) domain | 3
-Entities in the [`group`](https://www.home-assistant.io/components/group) domain | 19
+Entities in the [`group`](https://www.home-assistant.io/components/group) domain | 21
Entities in the [`image`](https://www.home-assistant.io/components/image) domain | 8
Entities in the [`input_boolean`](https://www.home-assistant.io/components/input_boolean) domain | 31
Entities in the [`input_datetime`](https://www.home-assistant.io/components/input_datetime) domain | 33
@@ -87,26 +87,26 @@ Entities in the [`input_select`](https://www.home-assistant.io/components/input_
Entities in the [`input_text`](https://www.home-assistant.io/components/input_text) domain | 17
Entities in the [`light`](https://www.home-assistant.io/components/light) domain | 39
Entities in the [`lock`](https://www.home-assistant.io/components/lock) domain | 4
-Entities in the [`media_player`](https://www.home-assistant.io/components/media_player) domain | 19
+Entities in the [`media_player`](https://www.home-assistant.io/components/media_player) domain | 20
Entities in the [`notify`](https://www.home-assistant.io/components/notify) domain | 2
-Entities in the [`number`](https://www.home-assistant.io/components/number) domain | 16
+Entities in the [`number`](https://www.home-assistant.io/components/number) domain | 18
Entities in the [`person`](https://www.home-assistant.io/components/person) domain | 2
Entities in the [`plant`](https://www.home-assistant.io/components/plant) domain | 1
Entities in the [`remote`](https://www.home-assistant.io/components/remote) domain | 4
Entities in the [`script`](https://www.home-assistant.io/components/script) domain | 52
Entities in the [`select`](https://www.home-assistant.io/components/select) domain | 4
-Entities in the [`sensor`](https://www.home-assistant.io/components/sensor) domain | 562
+Entities in the [`sensor`](https://www.home-assistant.io/components/sensor) domain | 569
Entities in the [`setter`](https://www.home-assistant.io/components/setter) domain | 1
Entities in the [`siren`](https://www.home-assistant.io/components/siren) domain | 1
Entities in the [`sun`](https://www.home-assistant.io/components/sun) domain | 1
-Entities in the [`switch`](https://www.home-assistant.io/components/switch) domain | 191
+Entities in the [`switch`](https://www.home-assistant.io/components/switch) domain | 197
Entities in the [`timer`](https://www.home-assistant.io/components/timer) domain | 7
Entities in the [`tts`](https://www.home-assistant.io/components/tts) domain | 1
Entities in the [`update`](https://www.home-assistant.io/components/update) domain | 83
Entities in the [`vacuum`](https://www.home-assistant.io/components/vacuum) domain | 1
Entities in the [`weather`](https://www.home-assistant.io/components/weather) domain | 1
-Entities in the [`zone`](https://www.home-assistant.io/components/zone) domain | 7
-**Total state objects** | **1547**
+Entities in the [`zone`](https://www.home-assistant.io/components/zone) domain | 8
+**Total state objects** | **1579**
## The HACS integrations/plugins that I use:
**Appdaemon**:
diff --git a/configuration.yaml b/configuration.yaml
index 74f2970a..5aa79786 100644
--- a/configuration.yaml
+++ b/configuration.yaml
@@ -14,7 +14,7 @@ homeassistant:
alexa: !include packages/alexa.yaml
#aarlo: !include packages/aarlo.yaml
aquarium: !include packages/aquarium.yaml
- #christmas: !include packages/christmas.yaml
+ christmas: !include packages/christmas.yaml
# covid: !include packages/covid.yaml
frigate: !include packages/frigate.yaml
door_otp: !include packages/door_otp.yaml
diff --git a/custom_components/alexa_media/.translations/de.json b/custom_components/alexa_media/.translations/de.json
index b7d96f96..4a20c5e0 100644
--- a/custom_components/alexa_media/.translations/de.json
+++ b/custom_components/alexa_media/.translations/de.json
@@ -1,7 +1,7 @@
{
"config": {
"abort": {
- "forgot_password": "Die \"Passwort vergessen Funktion\" wurde erkannt. Amazon verlangt möglicherweise Maßnahmen bevor ein erneuter Anmeldeversuch unternommen werden kann.",
+ "forgot_password": "Die \"Passwort vergessen Seite\" wurde erkannt. Amazon verlangt möglicherweise Maßnahmen bevor ein erneuter Anmeldeversuch unternommen werden kann.",
"login_failed": "Alexa Media Player konnte nicht angemeldet werden.",
"reauth_successful": "Alexa Media Player erfolgreich authentifiziert"
},
@@ -9,7 +9,7 @@
"2fa_key_invalid": "Ungültiger 2-Faktor Schlüssel",
"connection_error": "Verbindungsfehler; Netzwerk prüfen und erneut versuchen",
"identifier_exists": "Diese E-Mail-Adresse ist bereits registriert",
- "invalid_credentials": "Falsche Zugangsdaten",
+ "invalid_credentials": "Ungültige Zugangsdaten",
"invalid_url": "URL ist ungültig: {message}",
"unable_to_connect_hass_url": "Es kann keine Verbindung zur Home Assistant-URL hergestellt werden. Bitte überprüfen Sie die externe URL unter Konfiguration -> Allgemein",
"unknown_error": "Unbekannter Fehler: {message}"
@@ -39,7 +39,7 @@
"include_devices": "Eingebundene Geräte (Komma getrennt)",
"otp_secret": "Integrierter 2FA-App-Schlüssel (automatisch generierte 2FA-Code)",
"password": "Passwort",
- "queue_delay": "Sekunden zu warten, um Befehle in die Warteschlange zu stellen",
+ "queue_delay": "Zu wartende Sekunden, um Befehle in die Warteschlange zu stellen",
"scan_interval": "Sekunden zwischen den Scans",
"securitycode": "2FA-Code (empfohlen, um Anmeldeprobleme zu vermeiden)",
"url": "Amazon Region (z.B. amazon.de)"
@@ -56,10 +56,10 @@
"debug": "Erweitertes Debugging",
"exclude_devices": "Ausgeschlossene Geräte (Komma getrennt)",
"extended_entity_discovery": "Schließen Sie Geräte ein, die über Echo verbunden sind",
- "hass_url": "Öffentliche URL zum Zugriff auf Home Assistant (einschließlich '/' am Ende)",
+ "hass_url": "Öffentliche URL für den Zugriff auf Home Assistant (einschließlich '/' am Ende)",
"include_devices": "Eingebundene Geräte (Komma getrennt)",
- "public_url": "Öffentliche URL zum Zugriff auf Home Assistant (einschließlich '/' am Ende)",
- "queue_delay": "Sekunden zu warten, um Befehle in die Warteschlange zu stellen",
+ "public_url": "Öffentliche URL für den Zugriff auf Home Assistant (einschließlich '/' am Ende)",
+ "queue_delay": "Zu wartende Sekunden, um Befehle in die Warteschlange zu stellen",
"scan_interval": "Sekunden zwischen den Scans"
},
"description": "Erforderlich *",
@@ -73,7 +73,7 @@
"fields": {
"email": {
"description": "Zu löschende Accounts. Falls leer, werden alle gelöscht.",
- "name": "E-Mail Adresse"
+ "name": "E-Mail-Adresse"
},
"entries": {
"description": "Zu löschende Einträge von 1 bis 50. Falls leer, lösche 50.",
@@ -83,21 +83,21 @@
"name": "Lösche Alexa Stimmbefehl-Historie."
},
"force_logout": {
- "description": "Logout erzwingen. Primär für Debugging notwendig.",
+ "description": "Logout erzwingen. Primär für Debugging genutzt.",
"fields": {
"email": {
- "description": "Zu löschende Accounts. Falls leer werden alle gelöscht.",
- "name": "E-Mail Adresse"
+ "description": "Zu löschende Accounts. Falls leer werden alle gelöscht.",
+ "name": "E-Mail-Adresse"
}
},
"name": "Logout erzwingen"
},
"update_last_called": {
- "description": "Erzwinge Updates der zuletzt aufgerufenen Echo Geräte für jeden Alexa Account ",
+ "description": "Erzwinge Updates der zuletzt aufgerufenen Echo Geräte für jeden Alexa Account.",
"fields": {
"email": {
"description": "Liste der zu aktualisierenden Alexa-Konten. Wenn leer, werden alle bekannten Konten aktualisiert.",
- "name": "E-Mail Adresse"
+ "name": "E-Mail-Adresse"
}
},
"name": "Aktualisiere den zuletzt aufgerufenen Sensor"
diff --git a/custom_components/alexa_media/__init__.py b/custom_components/alexa_media/__init__.py
index d561e3c5..925f152a 100644
--- a/custom_components/alexa_media/__init__.py
+++ b/custom_components/alexa_media/__init__.py
@@ -153,9 +153,10 @@ async def async_setup(hass, config, discovery_info=None):
hass.config_entries.async_update_entry(
entry,
data={
+ CONF_URL: account[CONF_URL],
CONF_EMAIL: account[CONF_EMAIL],
CONF_PASSWORD: account[CONF_PASSWORD],
- CONF_URL: account[CONF_URL],
+ CONF_PUBLIC_URL: account[CONF_PUBLIC_URL],
CONF_INCLUDE_DEVICES: account[CONF_INCLUDE_DEVICES],
CONF_EXCLUDE_DEVICES: account[CONF_EXCLUDE_DEVICES],
CONF_SCAN_INTERVAL: account[
@@ -186,7 +187,7 @@ async def async_setup(hass, config, discovery_info=None):
CONF_URL: account[CONF_URL],
CONF_EMAIL: account[CONF_EMAIL],
CONF_PASSWORD: account[CONF_PASSWORD],
- CONF_PUBLIC_URL: account[CONF_PUBLIC_URL],
+ CONF_PUBLIC_URL: account.get(CONF_PUBLIC_URL, ""),
CONF_INCLUDE_DEVICES: account[CONF_INCLUDE_DEVICES],
CONF_EXCLUDE_DEVICES: account[CONF_EXCLUDE_DEVICES],
CONF_SCAN_INTERVAL: account[CONF_SCAN_INTERVAL].total_seconds(),
@@ -371,6 +372,11 @@ async def setup_alexa(hass, config_entry, login_obj: AlexaLogin):
# pylint: disable=too-many-statements,too-many-locals
"""Set up a alexa api based on host parameter."""
+ # Initialize throttling state and lock
+ last_dnd_update_times: dict[str, datetime] = {}
+ pending_dnd_updates: dict[str, bool] = {}
+ dnd_update_lock = asyncio.Lock()
+
async def async_update_data() -> Optional[AlexaEntityData]:
# noqa pylint: disable=too-many-branches
"""Fetch data from API endpoint.
@@ -644,31 +650,17 @@ async def async_update_data() -> Optional[AlexaEntityData]:
cleaned_config = config.copy()
cleaned_config.pop(CONF_PASSWORD, None)
# CONF_PASSWORD contains sensitive info which is no longer needed
- for component in ALEXA_COMPONENTS:
- entry_setup = len(
- hass.data[DATA_ALEXAMEDIA]["accounts"][email]["entities"][component]
+ # Load multiple platforms in parallel using async_forward_entry_setups
+ _LOGGER.debug("Loading platforms: %s", ", ".join(ALEXA_COMPONENTS))
+ try:
+ await hass.config_entries.async_forward_entry_setups(
+ config_entry, ALEXA_COMPONENTS
)
- if not entry_setup:
- _LOGGER.debug("Loading config entry for %s", component)
- try:
- await hass.config_entries.async_forward_entry_setups(
- config_entry, [component]
- )
- except (asyncio.TimeoutError, TimeoutException) as ex:
- raise ConfigEntryNotReady(
- f"Timeout while loading config entry for {component}"
- ) from ex
- else:
- _LOGGER.debug("Loading %s", component)
- hass.async_create_task(
- async_load_platform(
- hass,
- component,
- DOMAIN,
- {CONF_NAME: DOMAIN, "config": cleaned_config},
- cleaned_config,
- )
- )
+ except (asyncio.TimeoutError, TimeoutException) as ex:
+ _LOGGER.error(f"Error while loading platforms: {ex}")
+ raise ConfigEntryNotReady(
+ f"Timeout while loading platforms: {ex}"
+ ) from ex
hass.data[DATA_ALEXAMEDIA]["accounts"][email]["new_devices"] = False
# prune stale devices
@@ -843,12 +835,67 @@ async def update_bluetooth_state(login_obj, device_serial):
)
return None
- @util.Throttle(MIN_TIME_BETWEEN_SCANS, MIN_TIME_BETWEEN_FORCED_SCANS)
+ async def schedule_update_dnd_state(email: str):
+ """Schedule an update_dnd_state call after MIN_TIME_BETWEEN_FORCED_SCANS."""
+ await asyncio.sleep(MIN_TIME_BETWEEN_FORCED_SCANS)
+ async with dnd_update_lock:
+ if pending_dnd_updates.get(email, False):
+ pending_dnd_updates[email] = False
+ _LOGGER.debug(
+ "Executing scheduled forced DND update for %s", hide_email(email)
+ )
+ # Assume login_obj can be retrieved or passed appropriately
+ login_obj = hass.data[DATA_ALEXAMEDIA]["accounts"][email]["login_obj"]
+ await update_dnd_state(login_obj)
+
@_catch_login_errors
async def update_dnd_state(login_obj) -> None:
- """Update the dnd state on ws dnd combo event."""
- dnd = await AlexaAPI.get_dnd_state(login_obj)
+ """Update the DND state on websocket DND combo event."""
+ email = login_obj.email
+ now = datetime.utcnow()
+
+ async with dnd_update_lock:
+ last_run = last_dnd_update_times.get(email)
+ cooldown = timedelta(seconds=MIN_TIME_BETWEEN_SCANS)
+ if last_run and (now - last_run) < cooldown:
+ # If within cooldown, mark a pending update if not already marked
+ if not pending_dnd_updates.get(email, False):
+ pending_dnd_updates[email] = True
+ _LOGGER.debug(
+ "Throttling active for %s, scheduling a forced DND update.",
+ hide_email(email),
+ )
+ asyncio.create_task(schedule_update_dnd_state(email))
+ else:
+ _LOGGER.debug(
+ "Throttling active for %s, forced DND update already scheduled.",
+ hide_email(email),
+ )
+ return
+
+ # Update the last run time
+ last_dnd_update_times[email] = now
+
+ _LOGGER.debug("Updating DND state for %s", hide_email(email))
+
+ try:
+ # Fetch the DND state using the Alexa API
+ dnd = await AlexaAPI.get_dnd_state(login_obj)
+ except asyncio.TimeoutError:
+ _LOGGER.error(
+ "Timeout occurred while fetching DND state for %s", hide_email(email)
+ )
+ return
+ except Exception as e:
+ _LOGGER.error(
+ "Unexpected error while fetching DND state for %s: %s",
+ hide_email(email),
+ e,
+ )
+ return
+
+ # Check if DND data is valid and dispatch an update event
if dnd is not None and "doNotDisturbDeviceStatusList" in dnd:
async_dispatcher_send(
hass,
@@ -856,8 +903,8 @@ async def update_dnd_state(login_obj) -> None:
{"dnd_update": dnd["doNotDisturbDeviceStatusList"]},
)
return
- _LOGGER.debug("%s: get_dnd_state failed: dnd:%s", hide_email(email), dnd)
- return
+ else:
+ _LOGGER.debug("%s: get_dnd_state failed: dnd:%s", hide_email(email), dnd)
async def http2_connect() -> HTTP2EchoClient:
"""Open HTTP2 Push connection.
@@ -1363,7 +1410,7 @@ async def async_remove_entry(hass, entry) -> bool:
login_obj = AlexaLogin(
url="",
email=email,
- password="",
+ password="", # nosec
outputpath=hass.config.path,
)
# Delete cookiefile
diff --git a/custom_components/alexa_media/alarm_control_panel.py b/custom_components/alexa_media/alarm_control_panel.py
index 92e9e8f3..f93b974c 100644
--- a/custom_components/alexa_media/alarm_control_panel.py
+++ b/custom_components/alexa_media/alarm_control_panel.py
@@ -12,12 +12,8 @@
from typing import List, Optional
from alexapy import hide_email, hide_serial
-from homeassistant.const import (
- CONF_EMAIL,
- STATE_ALARM_ARMED_AWAY,
- STATE_ALARM_DISARMED,
- STATE_UNAVAILABLE,
-)
+from homeassistant.components.alarm_control_panel import AlarmControlPanelEntity
+from homeassistant.const import CONF_EMAIL, STATE_UNAVAILABLE
from homeassistant.exceptions import ConfigEntryNotReady
from homeassistant.helpers.update_coordinator import CoordinatorEntity
@@ -34,13 +30,12 @@
from .helpers import _catch_login_errors, add_devices
try:
- from homeassistant.components.alarm_control_panel import (
- AlarmControlPanelEntity as AlarmControlPanel,
- )
-except ImportError:
- from homeassistant.components.alarm_control_panel import AlarmControlPanel
-
+ from homeassistant.components.alarm_control_panel import AlarmControlPanelState
+ STATE_ALARM_ARMED_AWAY = AlarmControlPanelState.ARMED_AWAY
+ STATE_ALARM_DISARMED = AlarmControlPanelState.DISARMED
+except ImportError:
+ from homeassistant.const import STATE_ALARM_ARMED_AWAY, STATE_ALARM_DISARMED
_LOGGER = logging.getLogger(__name__)
DEPENDENCIES = [ALEXA_DOMAIN]
@@ -135,7 +130,7 @@ async def async_unload_entry(hass, entry) -> bool:
return True
-class AlexaAlarmControlPanel(AlarmControlPanel, AlexaMedia, CoordinatorEntity):
+class AlexaAlarmControlPanel(AlarmControlPanelEntity, AlexaMedia, CoordinatorEntity):
"""Implementation of Alexa Media Player alarm control panel."""
def __init__(self, login, coordinator, guard_entity, media_players=None) -> None:
@@ -224,8 +219,6 @@ def state(self):
)
if _state == "ARMED_AWAY":
return STATE_ALARM_ARMED_AWAY
- if _state == "ARMED_STAY":
- return STATE_ALARM_DISARMED
return STATE_ALARM_DISARMED
@property
diff --git a/custom_components/alexa_media/config_flow.py b/custom_components/alexa_media/config_flow.py
index a026c163..194cf4b1 100644
--- a/custom_components/alexa_media/config_flow.py
+++ b/custom_components/alexa_media/config_flow.py
@@ -165,9 +165,11 @@ async def async_step_user(self, user_input=None):
""" External URL for cloud connected services """
try:
- DEFAULT_PUBLIC_URL: str = get_url(self.hass, allow_internal=False)
+ url: str = get_url(self.hass, allow_internal=False)
except NoURLAvailableError:
DEFAULT_PUBLIC_URL = ""
+ else:
+ DEFAULT_PUBLIC_URL = url if url.endswith("/") else url + "/"
self.proxy_schema = OrderedDict(
[
@@ -768,6 +770,8 @@ def _save_user_input_to_config(self, user_input=None) -> None:
if CONF_URL in user_input:
self.config[CONF_URL] = user_input[CONF_URL]
if CONF_PUBLIC_URL in user_input:
+ if not user_input[CONF_PUBLIC_URL].endswith("/"):
+ user_input[CONF_PUBLIC_URL] = user_input[CONF_PUBLIC_URL] + "/"
self.config[CONF_PUBLIC_URL] = user_input[CONF_PUBLIC_URL]
if CONF_SCAN_INTERVAL in user_input:
self.config[CONF_SCAN_INTERVAL] = (
@@ -951,6 +955,10 @@ async def async_step_init(
user_input[CONF_OTPSECRET] = self.config_entry.data[CONF_OTPSECRET]
if CONF_OAUTH in self.config_entry.data:
user_input[CONF_OAUTH] = self.config_entry.data[CONF_OAUTH]
+ """Ensure public_url ends with trailing slash"""
+ if CONF_PUBLIC_URL in self.config_entry.data:
+ if not user_input[CONF_PUBLIC_URL].endswith("/"):
+ user_input[CONF_PUBLIC_URL] = user_input[CONF_PUBLIC_URL] + "/"
self.hass.config_entries.async_update_entry(
self.config_entry, data=user_input, options=self.config_entry.options
diff --git a/custom_components/alexa_media/const.py b/custom_components/alexa_media/const.py
index 679ff8ff..9ffe6e13 100644
--- a/custom_components/alexa_media/const.py
+++ b/custom_components/alexa_media/const.py
@@ -15,7 +15,7 @@
PERCENTAGE,
)
-__version__ = "4.13.2"
+__version__ = "4.13.8"
PROJECT_URL = "https://github.com/alandtse/alexa_media_player/"
ISSUE_URL = f"{PROJECT_URL}issues"
NOTIFY_URL = f"{PROJECT_URL}wiki/Configuration%3A-Notification-Component#use-the-notifyalexa_media-service"
diff --git a/custom_components/alexa_media/helpers.py b/custom_components/alexa_media/helpers.py
index e6da7fee..e15a0c96 100644
--- a/custom_components/alexa_media/helpers.py
+++ b/custom_components/alexa_media/helpers.py
@@ -225,30 +225,37 @@ def report_relogin_required(hass, login, email) -> bool:
def _existing_serials(hass, login_obj) -> list:
+ """Retrieve existing serial numbers for a given login object."""
email: str = login_obj.email
- existing_serials = (
- list(
+ if (
+ DATA_ALEXAMEDIA in hass.data
+ and "accounts" in hass.data[DATA_ALEXAMEDIA]
+ and email in hass.data[DATA_ALEXAMEDIA]["accounts"]
+ ):
+ existing_serials = list(
hass.data[DATA_ALEXAMEDIA]["accounts"][email]["entities"][
"media_player"
].keys()
)
- if "entities" in (hass.data[DATA_ALEXAMEDIA]["accounts"][email])
- else []
- )
- for serial in existing_serials:
- device = hass.data[DATA_ALEXAMEDIA]["accounts"][email]["devices"][
- "media_player"
- ][serial]
- if "appDeviceList" in device and device["appDeviceList"]:
- apps = list(
- map(
- lambda x: x["serialNumber"] if "serialNumber" in x else None,
- device["appDeviceList"],
- )
- )
- # _LOGGER.debug("Combining %s with %s",
- # existing_serials, apps)
- existing_serials = existing_serials + apps
+ device_data = (
+ hass.data[DATA_ALEXAMEDIA]["accounts"][email]
+ .get("devices", {})
+ .get("media_player", {})
+ )
+ for serial in existing_serials[:]:
+ device = device_data.get(serial, {})
+ if "appDeviceList" in device and device["appDeviceList"]:
+ apps = [
+ x["serialNumber"]
+ for x in device["appDeviceList"]
+ if "serialNumber" in x
+ ]
+ existing_serials.extend(apps)
+ else:
+ _LOGGER.warning(
+ "No accounts data found for %s. Skipping serials retrieval.", email
+ )
+ existing_serials = []
return existing_serials
@@ -279,7 +286,10 @@ async def calculate_uuid(hass, email: str, url: str) -> dict:
# increment uuid for second accounts
+ return_index
# hash email/url in case HA uuid duplicated
- + int(hashlib.md5((email.lower() + url.lower()).encode()).hexdigest(), 16)
+ + int(
+ hashlib.sha256((email.lower() + url.lower()).encode()).hexdigest(),
+ 16, # nosec
+ )
)[-32:]
result["index"] = return_index
_LOGGER.debug("%s: Returning uuid %s", hide_email(email), result)
diff --git a/custom_components/alexa_media/manifest.json b/custom_components/alexa_media/manifest.json
index 1b34116b..0afbba13 100644
--- a/custom_components/alexa_media/manifest.json
+++ b/custom_components/alexa_media/manifest.json
@@ -8,6 +8,6 @@
"iot_class": "cloud_polling",
"issue_tracker": "https://github.com/alandtse/alexa_media_player/issues",
"loggers": ["alexapy", "authcaptureproxy"],
- "requirements": ["alexapy==1.29.2", "packaging>=20.3", "wrapt>=1.14.0"],
- "version": "4.13.2"
+ "requirements": ["alexapy==1.29.4", "packaging>=20.3", "wrapt>=1.14.0"],
+ "version": "4.13.8"
}
diff --git a/custom_components/alexa_media/media_player.py b/custom_components/alexa_media/media_player.py
index b5455f9b..83d21324 100644
--- a/custom_components/alexa_media/media_player.py
+++ b/custom_components/alexa_media/media_player.py
@@ -776,8 +776,12 @@ async def async_select_source(self, source):
else:
await self.alexa_api.set_bluetooth(devices["address"])
self._source = source
+ # Safely access 'http2' setting
if not (
- self.hass.data[DATA_ALEXAMEDIA]["accounts"][self._login.email]["http2"]
+ self.hass.data.get(DATA_ALEXAMEDIA, {})
+ .get("accounts", {})
+ .get(self._login.email, {})
+ .get("http2")
):
await self.async_update()
@@ -922,35 +926,47 @@ async def async_update(self):
except AttributeError:
pass
email = self._login.email
+
+ # Check if DATA_ALEXAMEDIA and 'accounts' exist
+ accounts_data = self.hass.data.get(DATA_ALEXAMEDIA, {}).get("accounts", {})
if (
self.entity_id is None # Device has not initialized yet
- or email not in self.hass.data[DATA_ALEXAMEDIA]["accounts"]
+ or email not in accounts_data
or self._login.session.closed
):
self._assumed_state = True
self.available = False
return
- device = self.hass.data[DATA_ALEXAMEDIA]["accounts"][email]["devices"][
- "media_player"
- ][self.device_serial_number]
+
+ # Safely access the device
+ device = accounts_data[email]["devices"]["media_player"].get(
+ self.device_serial_number
+ )
+ if not device:
+ _LOGGER.warning(
+ "Device serial number %s not found for account %s. Skipping update.",
+ self.device_serial_number,
+ hide_email(email),
+ )
+ self.available = False
+ return
+
+ # Safely access websocket_commands
seen_commands = (
- self.hass.data[DATA_ALEXAMEDIA]["accounts"][email][
- "websocket_commands"
- ].keys()
- if "websocket_commands"
- in (self.hass.data[DATA_ALEXAMEDIA]["accounts"][email])
+ accounts_data[email]["websocket_commands"].keys()
+ if "websocket_commands" in accounts_data[email]
else None
)
- await self.refresh( # pylint: disable=unexpected-keyword-arg
- device, no_throttle=True
- )
- push_enabled = (
- self.hass.data[DATA_ALEXAMEDIA]["accounts"].get(email, {}).get("http2")
- )
+
+ await self.refresh(device, no_throttle=True)
+
+ # Safely access 'http2' setting
+ push_enabled = accounts_data[email].get("http2")
+
if (
self.state in [MediaPlayerState.PLAYING]
and
- # only enable polling if websocket not connected
+ # Only enable polling if websocket not connected
(
not push_enabled
or not seen_commands
@@ -970,7 +986,7 @@ async def async_update(self):
):
_LOGGER.debug(
"%s: %s playing; scheduling update in %s seconds",
- hide_email(self._login.email),
+ hide_email(email),
self.name,
PLAY_SCAN_INTERVAL,
)
@@ -983,9 +999,8 @@ async def async_update(self):
self._should_poll = False
if not push_enabled:
_LOGGER.debug(
- "%s: Disabling polling and scheduling last update in"
- " 300 seconds for %s",
- hide_email(self._login.email),
+ "%s: Disabling polling and scheduling last update in 300 seconds for %s",
+ hide_email(email),
self.name,
)
async_call_later(
@@ -996,7 +1011,7 @@ async def async_update(self):
else:
_LOGGER.debug(
"%s: Disabling polling for %s",
- hide_email(self._login.email),
+ hide_email(email),
self.name,
)
self._last_update = util.utcnow()
diff --git a/custom_components/alexa_media/translations/de.json b/custom_components/alexa_media/translations/de.json
index b7d96f96..4a20c5e0 100644
--- a/custom_components/alexa_media/translations/de.json
+++ b/custom_components/alexa_media/translations/de.json
@@ -1,7 +1,7 @@
{
"config": {
"abort": {
- "forgot_password": "Die \"Passwort vergessen Funktion\" wurde erkannt. Amazon verlangt möglicherweise Maßnahmen bevor ein erneuter Anmeldeversuch unternommen werden kann.",
+ "forgot_password": "Die \"Passwort vergessen Seite\" wurde erkannt. Amazon verlangt möglicherweise Maßnahmen bevor ein erneuter Anmeldeversuch unternommen werden kann.",
"login_failed": "Alexa Media Player konnte nicht angemeldet werden.",
"reauth_successful": "Alexa Media Player erfolgreich authentifiziert"
},
@@ -9,7 +9,7 @@
"2fa_key_invalid": "Ungültiger 2-Faktor Schlüssel",
"connection_error": "Verbindungsfehler; Netzwerk prüfen und erneut versuchen",
"identifier_exists": "Diese E-Mail-Adresse ist bereits registriert",
- "invalid_credentials": "Falsche Zugangsdaten",
+ "invalid_credentials": "Ungültige Zugangsdaten",
"invalid_url": "URL ist ungültig: {message}",
"unable_to_connect_hass_url": "Es kann keine Verbindung zur Home Assistant-URL hergestellt werden. Bitte überprüfen Sie die externe URL unter Konfiguration -> Allgemein",
"unknown_error": "Unbekannter Fehler: {message}"
@@ -39,7 +39,7 @@
"include_devices": "Eingebundene Geräte (Komma getrennt)",
"otp_secret": "Integrierter 2FA-App-Schlüssel (automatisch generierte 2FA-Code)",
"password": "Passwort",
- "queue_delay": "Sekunden zu warten, um Befehle in die Warteschlange zu stellen",
+ "queue_delay": "Zu wartende Sekunden, um Befehle in die Warteschlange zu stellen",
"scan_interval": "Sekunden zwischen den Scans",
"securitycode": "2FA-Code (empfohlen, um Anmeldeprobleme zu vermeiden)",
"url": "Amazon Region (z.B. amazon.de)"
@@ -56,10 +56,10 @@
"debug": "Erweitertes Debugging",
"exclude_devices": "Ausgeschlossene Geräte (Komma getrennt)",
"extended_entity_discovery": "Schließen Sie Geräte ein, die über Echo verbunden sind",
- "hass_url": "Öffentliche URL zum Zugriff auf Home Assistant (einschließlich '/' am Ende)",
+ "hass_url": "Öffentliche URL für den Zugriff auf Home Assistant (einschließlich '/' am Ende)",
"include_devices": "Eingebundene Geräte (Komma getrennt)",
- "public_url": "Öffentliche URL zum Zugriff auf Home Assistant (einschließlich '/' am Ende)",
- "queue_delay": "Sekunden zu warten, um Befehle in die Warteschlange zu stellen",
+ "public_url": "Öffentliche URL für den Zugriff auf Home Assistant (einschließlich '/' am Ende)",
+ "queue_delay": "Zu wartende Sekunden, um Befehle in die Warteschlange zu stellen",
"scan_interval": "Sekunden zwischen den Scans"
},
"description": "Erforderlich *",
@@ -73,7 +73,7 @@
"fields": {
"email": {
"description": "Zu löschende Accounts. Falls leer, werden alle gelöscht.",
- "name": "E-Mail Adresse"
+ "name": "E-Mail-Adresse"
},
"entries": {
"description": "Zu löschende Einträge von 1 bis 50. Falls leer, lösche 50.",
@@ -83,21 +83,21 @@
"name": "Lösche Alexa Stimmbefehl-Historie."
},
"force_logout": {
- "description": "Logout erzwingen. Primär für Debugging notwendig.",
+ "description": "Logout erzwingen. Primär für Debugging genutzt.",
"fields": {
"email": {
- "description": "Zu löschende Accounts. Falls leer werden alle gelöscht.",
- "name": "E-Mail Adresse"
+ "description": "Zu löschende Accounts. Falls leer werden alle gelöscht.",
+ "name": "E-Mail-Adresse"
}
},
"name": "Logout erzwingen"
},
"update_last_called": {
- "description": "Erzwinge Updates der zuletzt aufgerufenen Echo Geräte für jeden Alexa Account ",
+ "description": "Erzwinge Updates der zuletzt aufgerufenen Echo Geräte für jeden Alexa Account.",
"fields": {
"email": {
"description": "Liste der zu aktualisierenden Alexa-Konten. Wenn leer, werden alle bekannten Konten aktualisiert.",
- "name": "E-Mail Adresse"
+ "name": "E-Mail-Adresse"
}
},
"name": "Aktualisiere den zuletzt aufgerufenen Sensor"
diff --git a/custom_components/alexa_media/translations/fr.json b/custom_components/alexa_media/translations/fr.json
index 738df4fa..59a2bbd3 100644
--- a/custom_components/alexa_media/translations/fr.json
+++ b/custom_components/alexa_media/translations/fr.json
@@ -34,7 +34,7 @@
"debug": "Débogage avancé",
"email": "Adresse Email",
"exclude_devices": "Appareil exclu (séparé par des virgules)",
- "extended_entity_discovery": "Include devices connected via Echo",
+ "extended_entity_discovery": "Inclure les appareils connectés via Echo",
"hass_url": "URL pour accéder à Home Assistant",
"include_devices": "Appareil inclus (séparé par des virgules)",
"otp_secret": "Clé d'application 2FA (2 facteurs) intégrée (génère automatiquement des codes 2FA). Il ne s'agit pas d'un code à six chiffres.",
@@ -62,8 +62,8 @@
"queue_delay": "Secondes à attendre pour mettre les commandes en file d'attente ensemble",
"scan_interval": "Secondes entre les analyses"
},
- "description": "Required *",
- "title": "Alexa Media Player - Reconfiguration"
+ "description": "Requis *",
+ "title": "Alexa Media Player – Reconfiguration"
}
}
},
diff --git a/custom_components/alexa_media/translations/ru.json b/custom_components/alexa_media/translations/ru.json
index 68678eb2..b252617e 100644
--- a/custom_components/alexa_media/translations/ru.json
+++ b/custom_components/alexa_media/translations/ru.json
@@ -34,7 +34,7 @@
"debug": "Расширенные возможности отладки",
"email": "Адрес электронной почты",
"exclude_devices": "Исключенные устройства (через запятую)",
- "extended_entity_discovery": "Include devices connected via Echo",
+ "extended_entity_discovery": "Включить устройства, подключенные через Echo",
"hass_url": "URL-адрес для доступа к Home Assistant",
"include_devices": "Включенные устройства (разделенное запятыми)",
"otp_secret": "Встроенный ключ приложения 2FA (автоматически генерирует коды 2FA). Это не шесть цифр.",
@@ -62,8 +62,8 @@
"queue_delay": "Секунды ожидания, чтобы выполнить команды вместе",
"scan_interval": "Секунды между сканированиями"
},
- "description": "Required *",
- "title": "Alexa Media Player - Reconfiguration"
+ "description": "Необходимый *",
+ "title": "Alexa Media Player - Перенастройка"
}
}
},
diff --git a/custom_components/alexa_media/translations/zh-Hans.json b/custom_components/alexa_media/translations/zh-Hans.json
index f316e723..18c6ea10 100644
--- a/custom_components/alexa_media/translations/zh-Hans.json
+++ b/custom_components/alexa_media/translations/zh-Hans.json
@@ -37,7 +37,7 @@
"extended_entity_discovery": "包括通过 Echo 连接的设备",
"hass_url": "Url to access Home Assistant",
"include_devices": "Included device (comma separated)",
- "otp_secret": "内置 2FA App Key(自动生成 2FA 代码)。这不是六位数长。",
+ "otp_secret": "内置 2FA 应用程序密钥(自动生成 2FA 代码)。该密钥长度不为六位数字。",
"password": "密码",
"queue_delay": "Seconds to wait to queue commands together",
"scan_interval": "Seconds between scans",
@@ -62,8 +62,8 @@
"queue_delay": "Seconds to wait to queue commands together",
"scan_interval": "Seconds between scans"
},
- "description": "Required *",
- "title": "Alexa Media Player - Reconfiguration"
+ "description": "必需的 *",
+ "title": "Alexa 媒体播放器 - 重新配置"
}
}
},
@@ -72,7 +72,7 @@
"description": "清除每个 Alexa 帐户的 Alexa Voice 历史记录中的最后条目。",
"fields": {
"email": {
- "description": "Accounts to clear. Empty will clear all.",
+ "description": "要清除的帐户。清空将清除所有帐户。",
"name": "电子邮件地址"
},
"entries": {
@@ -86,7 +86,7 @@
"description": "强制帐户注销。主要用于调试。",
"fields": {
"email": {
- "description": "Accounts to clear. Empty will clear all.",
+ "description": "要清除的帐户。清空将清除所有帐户。",
"name": "电子邮件地址"
}
},
@@ -100,7 +100,7 @@
"name": "电子邮件地址"
}
},
- "name": "Update Last Called Sensor"
+ "name": "更新上次呼叫传感器"
}
}
}
diff --git a/custom_components/dahua/__init__.py b/custom_components/dahua/__init__.py
index 56a92c70..88809e0f 100644
--- a/custom_components/dahua/__init__.py
+++ b/custom_components/dahua/__init__.py
@@ -14,9 +14,11 @@
from aiohttp import ClientError, ClientResponseError, ClientSession, TCPConnector
from homeassistant.config_entries import ConfigEntry
-from homeassistant.core import CALLBACK_TYPE, Config, HomeAssistant
+from homeassistant.core import CALLBACK_TYPE, HomeAssistant
from homeassistant.exceptions import ConfigEntryNotReady, PlatformNotReady
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed
+from homeassistant.helpers.aiohttp_client import async_get_clientsession
+from homeassistant.helpers.typing import ConfigType
from homeassistant.const import EVENT_HOMEASSISTANT_STOP
from custom_components.dahua.thread import DahuaEventThread, DahuaVtoEventThread
@@ -41,10 +43,15 @@
SCAN_INTERVAL_SECONDS = timedelta(seconds=30)
+SSL_CONTEXT = ssl.create_default_context()
+SSL_CONTEXT.set_ciphers("DEFAULT")
+SSL_CONTEXT.check_hostname = False
+SSL_CONTEXT.verify_mode = ssl.CERT_NONE
+
_LOGGER: logging.Logger = logging.getLogger(__package__)
-async def async_setup(hass: HomeAssistant, config: Config):
+async def async_setup(hass: HomeAssistant, config: ConfigType):
"""
Set up this integration with the UI. YAML is not supported.
https://developers.home-assistant.io/docs/asyncio_working_with_async/
@@ -82,9 +89,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):
for platform in PLATFORMS:
if entry.options.get(platform, True):
coordinator.platforms.append(platform)
- hass.async_create_task(
- hass.config_entries.async_forward_entry_setup(entry, platform)
- )
+ await hass.config_entries.async_forward_entry_setups(entry, [platform])
entry.add_update_listener(async_reload_entry)
@@ -102,11 +107,7 @@ def __init__(self, hass: HomeAssistant, events: list, address: str, port: int, r
password: str, name: str, channel: int) -> None:
"""Initialize the coordinator."""
# Self signed certs are used over HTTPS so we'll disable SSL verification
- ssl_context = ssl.create_default_context()
- ssl_context.set_ciphers("DEFAULT")
- ssl_context.check_hostname = False
- ssl_context.verify_mode = ssl.CERT_NONE
- connector = TCPConnector(enable_cleanup_closed=True, ssl=ssl_context)
+ connector = TCPConnector(enable_cleanup_closed=True, ssl=SSL_CONTEXT)
self._session = ClientSession(connector=connector)
# The client used to communicate with Dahua devices
@@ -119,6 +120,7 @@ def __init__(self, hass: HomeAssistant, events: list, address: str, port: int, r
self.events: list = events
self._supports_coaxial_control = False
self._supports_disarming_linkage = False
+ self._supports_event_notifications = False
self._supports_smart_motion_detection = False
self._supports_lighting = False
self._supports_floodlightmode = False
@@ -246,6 +248,13 @@ async def _async_update_data(self):
self._supports_disarming_linkage = False
_LOGGER.info("Device supports disarming linkage=%s", self._supports_disarming_linkage)
+ try:
+ await self.client.async_get_event_notifications()
+ self._supports_event_notifications = True
+ except ClientError:
+ self._supports_event_notifications = False
+ _LOGGER.info("Device supports event notifications=%s", self._supports_event_notifications)
+
# Smart motion detection is enabled/disabled/fetched differently on Dahua devices compared to Amcrest
# The following lines are for Dahua devices
try:
@@ -260,7 +269,7 @@ async def _async_update_data(self):
is_flood_light = self.is_flood_light()
_LOGGER.info("Device is a floodlight=%s", is_flood_light)
-
+
self._supports_floodlightmode = self.supports_floodlightmode()
try:
@@ -319,6 +328,8 @@ async def _async_update_data(self):
asyncio.ensure_future(self.client.async_get_config_lighting(self._channel, self._profile_mode)))
if self._supports_disarming_linkage:
coros.append(asyncio.ensure_future(self.client.async_get_disarming_linkage()))
+ if self._supports_event_notifications:
+ coros.append(asyncio.ensure_future(self.client.async_get_event_notifications()))
if self._supports_coaxial_control:
coros.append(asyncio.ensure_future(self.client.async_get_coaxial_control_io_status()))
if self._supports_smart_motion_detection:
@@ -536,14 +547,15 @@ def supports_security_light(self) -> bool:
"""
Returns true if this camera has the red/blue flashing security light feature. For example, the
IPC-HDW3849HP-AS-PV does https://dahuawiki.com/Template:NameConvention
+ Addressed issue https://github.com/rroller/dahua/pull/405
"""
- return "-AS-PV" in self.model or self.model == "AD410"
+ return "-AS-PV" in self.model or self.model == "AD410" or self.model.startswith("IP8M-2796E")
def is_doorbell(self) -> bool:
""" Returns true if this is a doorbell (VTO) """
m = self.model.upper()
return m.startswith("VTO") or m.startswith("DH-VTO") or (
- "NVR" not in m and m.startswith("DHI")) or self.is_amcrest_doorbell() or self.is_empiretech_doorbell() or self.is_avaloidgoliath_doorbell()
+ "NVR" not in m and m.startswith("DHI")) or self.is_amcrest_doorbell() or self.is_empiretech_doorbell() or self.is_avaloidgoliath_doorbell()
def is_amcrest_doorbell(self) -> bool:
""" Returns true if this is an Amcrest doorbell """
@@ -581,7 +593,7 @@ def supports_illuminator(self) -> bool:
IPC-HDW3849HP-AS-PV does
"""
return not (
- self.is_amcrest_doorbell() or self.is_flood_light()) and "table.Lighting_V2[{0}][0][0].Mode".format(
+ self.is_amcrest_doorbell() or self.is_flood_light()) and "table.Lighting_V2[{0}][0][0].Mode".format(
self._channel) in self.data
def is_motion_detection_enabled(self) -> bool:
@@ -592,6 +604,10 @@ def is_disarming_linkage_enabled(self) -> bool:
""" Returns true if disarming linkage is enable """
return self.data.get("table.DisableLinkage.Enable", "").lower() == "true"
+ def is_event_notifications_enabled(self) -> bool:
+ """ Returns true if event notifications is enable """
+ return self.data.get("table.DisableEventNotify.Enable", "").lower() == "false"
+
def is_smart_motion_detection_enabled(self) -> bool:
""" Returns true if smart motion detection is enabled """
if self.supports_smart_motion_detection_amcrest():
@@ -653,7 +669,7 @@ def is_illuminator_on(self) -> bool:
def is_flood_light_on(self) -> bool:
if self._supports_floodlightmode:
- #'coaxialControlIO.cgi?action=getStatus&channel=1'
+ # 'coaxialControlIO.cgi?action=getStatus&channel=1'
return self.data.get("status.status.WhiteLight", "") == "On"
else:
"""Return true if the amcrest flood light light is on"""
diff --git a/custom_components/dahua/client.py b/custom_components/dahua/client.py
index bd2eefaa..7a49e115 100644
--- a/custom_components/dahua/client.py
+++ b/custom_components/dahua/client.py
@@ -604,6 +604,18 @@ async def async_set_disarming_linkage(self, channel: int, enabled: bool) -> dict
url = "/cgi-bin/configManager.cgi?action=setConfig&DisableLinkage[{0}].Enable={1}".format(channel, value)
return await self.get(url)
+ async def async_set_event_notifications(self, channel: int, enabled: bool) -> dict:
+ """
+ async_set_event_notifications will set the camera's disarming event notifications (Event -> Disarming -> Event Notifications in the UI)
+ """
+
+ value = "true"
+ if enabled:
+ value = "false"
+
+ url = "/cgi-bin/configManager.cgi?action=setConfig&DisableEventNotify[{0}].Enable={1}".format(channel, value)
+ return await self.get(url)
+
async def async_set_record_mode(self, channel: int, mode: str) -> dict:
"""
async_set_record_mode sets the record mode.
@@ -629,10 +641,18 @@ async def async_get_disarming_linkage(self) -> dict:
"""
url = "/cgi-bin/configManager.cgi?action=getConfig&name=DisableLinkage"
- try:
- return await self.get(url)
- except aiohttp.ClientResponseError as e:
- return {"table.DisableLinkage.Enable": "false"}
+ return await self.get(url)
+
+ async def async_get_event_notifications(self) -> dict:
+ """
+ async_get_event_notifications will return false if the event notifications in disarmed state are enabled
+
+ returns
+ table.DisableEventNotify.Enable=false
+ """
+
+ url = "/cgi-bin/configManager.cgi?action=getConfig&name=DisableEventNotify"
+ return await self.get(url)
async def async_access_control_open_door(self, door_id: int = 1) -> dict:
"""
diff --git a/custom_components/dahua/config_flow.py b/custom_components/dahua/config_flow.py
index c2ebd626..1fe18376 100644
--- a/custom_components/dahua/config_flow.py
+++ b/custom_components/dahua/config_flow.py
@@ -30,6 +30,12 @@
https://developers.home-assistant.io/docs/data_entry_flow_index/
"""
+SSL_CONTEXT = ssl.create_default_context()
+#SSL_CONTEXT.minimum_version = ssl.TLSVersion.TLSv1_2
+SSL_CONTEXT.set_ciphers("DEFAULT")
+SSL_CONTEXT.check_hostname = False
+SSL_CONTEXT.verify_mode = ssl.CERT_NONE
+
_LOGGER: logging.Logger = logging.getLogger(__package__)
DEFAULT_EVENTS = ["VideoMotion", "CrossLineDetection", "AlarmLocal", "VideoLoss", "VideoBlind", "AudioMutation",
@@ -177,11 +183,7 @@ async def _show_config_form_name(self, user_input): # pylint: disable=unused-ar
async def _test_credentials(self, username, password, address, port, rtsp_port, channel):
"""Return name and serialNumber if credentials is valid."""
# Self signed certs are used over HTTPS so we'll disable SSL verification
- ssl_context = ssl.create_default_context()
- ssl_context.set_ciphers("DEFAULT")
- ssl_context.check_hostname = False
- ssl_context.verify_mode = ssl.CERT_NONE
- connector = TCPConnector(enable_cleanup_closed=True, ssl=ssl_context)
+ connector = TCPConnector(enable_cleanup_closed=True, ssl=SSL_CONTEXT)
session = ClientSession(connector=connector)
try:
client = DahuaClient(username, password, address, port, rtsp_port, session)
diff --git a/custom_components/dahua/const.py b/custom_components/dahua/const.py
index 5438d7c7..ec75962b 100644
--- a/custom_components/dahua/const.py
+++ b/custom_components/dahua/const.py
@@ -14,6 +14,7 @@
INFRARED_ICON = "mdi:weather-night"
DISARMING_ICON = "mdi:alarm-check"
VOLUME_HIGH_ICON = "mdi:volume-high"
+BELL_ICON = "mdi:bell-ring"
# Device classes - https://www.home-assistant.io/integrations/binary_sensor/#device-class
MOTION_SENSOR_DEVICE_CLASS = "motion"
diff --git a/custom_components/dahua/manifest.json b/custom_components/dahua/manifest.json
index ecc54b65..4f7bf2ca 100644
--- a/custom_components/dahua/manifest.json
+++ b/custom_components/dahua/manifest.json
@@ -5,7 +5,7 @@
"documentation": "https://github.com/rroller/dahua",
"issue_tracker": "https://github.com/rroller/dahua/issues",
"dependencies": [],
- "version": "0.9.60",
+ "version": "0.9.68",
"config_flow": true,
"codeowners": [
"@rroller"
diff --git a/custom_components/dahua/switch.py b/custom_components/dahua/switch.py
index a654488e..16eca97d 100644
--- a/custom_components/dahua/switch.py
+++ b/custom_components/dahua/switch.py
@@ -4,7 +4,7 @@
from homeassistant.components.switch import SwitchEntity
from custom_components.dahua import DahuaDataUpdateCoordinator
-from .const import DOMAIN, DISARMING_ICON, MOTION_DETECTION_ICON, SIREN_ICON
+from .const import DOMAIN, DISARMING_ICON, MOTION_DETECTION_ICON, SIREN_ICON, BELL_ICON
from .entity import DahuaBaseEntity
from .client import SIREN_TYPE
@@ -27,6 +27,7 @@ async def async_setup_entry(hass: HomeAssistant, entry, async_add_devices):
try:
await coordinator.client.async_get_disarming_linkage()
devices.append(DahuaDisarmingLinkageBinarySwitch(coordinator, entry))
+ devices.append(DahuaDisarmingEventNotificationsLinkageBinarySwitch(coordinator, entry))
except ClientError as exception:
pass
@@ -117,6 +118,46 @@ def is_on(self):
"""
return self._coordinator.is_disarming_linkage_enabled()
+class DahuaDisarmingEventNotificationsLinkageBinarySwitch(DahuaBaseEntity, SwitchEntity):
+ """will set the camera's event notifications when device is disarmed (Event -> Disarming -> Event Notifications in the UI)"""
+
+ async def async_turn_on(self, **kwargs): # pylint: disable=unused-argument
+ """Turn on/enable event notifications"""
+ channel = self._coordinator.get_channel()
+ await self._coordinator.client.async_set_event_notifications(channel, True)
+ await self._coordinator.async_refresh()
+
+ async def async_turn_off(self, **kwargs): # pylint: disable=unused-argument
+ """Turn off/disable event notifications"""
+ channel = self._coordinator.get_channel()
+ await self._coordinator.client.async_set_event_notifications(channel, False)
+ await self._coordinator.async_refresh()
+
+ @property
+ def name(self):
+ """Return the name of the switch."""
+ return self._coordinator.get_device_name() + " " + "Event Notifications"
+
+ @property
+ def unique_id(self):
+ """
+ A unique identifier for this entity. Needs to be unique within a platform (ie light.hue). Should not be
+ configurable by the user or be changeable see
+ https://developers.home-assistant.io/docs/entity_registry_index/#unique-id-requirements
+ """
+ return self._coordinator.get_serial_number() + "_event_notifications"
+
+ @property
+ def icon(self):
+ """Return the icon of this switch."""
+ return BELL_ICON
+
+ @property
+ def is_on(self):
+ """
+ Return true if the switch is on.
+ """
+ return self._coordinator.is_event_notifications_enabled()
class DahuaSmartMotionDetectionBinarySwitch(DahuaBaseEntity, SwitchEntity):
"""Enables or disables the Smart Motion Detection option in the camera"""
diff --git a/custom_components/dahua/translations/bg.json b/custom_components/dahua/translations/bg.json
new file mode 100644
index 00000000..809801a8
--- /dev/null
+++ b/custom_components/dahua/translations/bg.json
@@ -0,0 +1,47 @@
+{
+ "config": {
+ "step": {
+ "user": {
+ "title": "Добавяне на камера Dahua",
+ "description": "Примерен адрес: 192.168.1.108",
+ "data": {
+ "username": "Потребителско име",
+ "password": "Парола",
+ "address": "Адрес",
+ "port": "Порт",
+ "rtsp_port": "RTSP порт",
+ "streams": "RTSP потоци",
+ "events": "Събития",
+ "channel": "Канал (единичните камери са 0, NVR са индексът, базиран на 0)"
+ }
+ },
+ "name": {
+ "title": "Конфигуриране на името на устройството",
+ "data": {
+ "name": "Име на устройството"
+ }
+ }
+ },
+ "error": {
+ "auth": "Потребителско име, парола или адрес са грешни."
+ },
+ "abort": {
+ "single_instance_allowed": "Разрешен е само един екземпляр.",
+ "already_configured": "Разрешено е само едно копие на устройство."
+ }
+ },
+ "options": {
+ "step": {
+ "user": {
+ "data": {
+ "binary_sensor": "Двоичен сензор е активиран",
+ "sensor": "Сензорът е активиран",
+ "switch": "Превключването е разрешено",
+ "light": "Светлината е активирана",
+ "select": "Изборът е активиран",
+ "camera": "Камерата е активирана"
+ }
+ }
+ }
+ }
+}
diff --git a/custom_components/dahua/translations/it.json b/custom_components/dahua/translations/it.json
new file mode 100644
index 00000000..ff05f4c6
--- /dev/null
+++ b/custom_components/dahua/translations/it.json
@@ -0,0 +1,47 @@
+{
+ "config": {
+ "step": {
+ "user": {
+ "title": "Aggiungi Telecamera Dahua",
+ "description": "Esempio di indirizzo: 192.168.1.108",
+ "data": {
+ "username": "Utente",
+ "password": "Password",
+ "address": "Indirizzo",
+ "port": "Porta",
+ "rtsp_port": "Porta RTSP",
+ "streams": "Stream RTSP",
+ "events": "Eventi",
+ "channel": "Canale (Telecamere Singole 0, Numero Base per NVR 0)"
+ }
+ },
+ "name": {
+ "title": "Configura Nome Dispositivo",
+ "data": {
+ "name": "Nome Dispositivo"
+ }
+ }
+ },
+ "error": {
+ "auth": "Utente, Password e/o Indirizzo errati."
+ },
+ "abort": {
+ "single_instance_allowed": "Solo una istanza è consentita.",
+ "already_configured": "Solo una istanza è consentita."
+ }
+ },
+ "options": {
+ "step": {
+ "user": {
+ "data": {
+ "binary_sensor": "Binary sensor abilitato",
+ "sensor": "Sensore abilitato",
+ "switch": "Switch abilitato",
+ "light": "Luce abilitata",
+ "select": "Select abilitato",
+ "camera": "Telecamera abilitata"
+ }
+ }
+ }
+ }
+}
diff --git a/custom_components/frigate/__init__.py b/custom_components/frigate/__init__.py
index e4ebc96f..fa121f7d 100644
--- a/custom_components/frigate/__init__.py
+++ b/custom_components/frigate/__init__.py
@@ -4,6 +4,7 @@
For more details about this integration, please refer to
https://github.com/blakeblackshear/frigate-hass-integration
"""
+
from __future__ import annotations
from collections.abc import Callable
@@ -17,6 +18,7 @@
from custom_components.frigate.config_flow import get_config_entry_title
from homeassistant.components.mqtt.models import ReceiveMessage
from homeassistant.components.mqtt.subscription import (
+ EntitySubscription,
async_prepare_subscribe_topics,
async_subscribe_topics,
async_unsubscribe_topics,
@@ -24,11 +26,12 @@
from homeassistant.components.switch import DOMAIN as SWITCH_DOMAIN
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import ATTR_MODEL, CONF_HOST, CONF_URL
-from homeassistant.core import Config, HomeAssistant, callback, valid_entity_id
+from homeassistant.core import HomeAssistant, callback, valid_entity_id
from homeassistant.exceptions import ConfigEntryNotReady
from homeassistant.helpers import device_registry as dr, entity_registry as er
from homeassistant.helpers.aiohttp_client import async_get_clientsession
from homeassistant.helpers.entity import Entity
+from homeassistant.helpers.typing import ConfigType
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed
from homeassistant.loader import async_get_integration
from homeassistant.util import slugify
@@ -171,7 +174,7 @@ def decode_if_necessary(data: str | bytes) -> str:
return data.decode("utf-8") if isinstance(data, bytes) else data
-async def async_setup(hass: HomeAssistant, config: Config) -> bool:
+async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
"""Set up this integration using YAML is not supported."""
integration = await async_get_integration(hass, DOMAIN)
_LOGGER.info(
@@ -190,7 +193,7 @@ async def async_setup(hass: HomeAssistant, config: Config) -> bool:
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
"""Set up this integration using UI."""
client = FrigateApiClient(
- entry.data.get(CONF_URL),
+ str(entry.data.get(CONF_URL)),
async_get_clientsession(hass),
)
coordinator = FrigateDataUpdateCoordinator(hass, client=client)
@@ -217,7 +220,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
model = f"{(await async_get_integration(hass, DOMAIN)).version}/{server_version}"
- ws_event_proxy = WSEventProxy(config["mqtt"]["topic_prefix"])
+ ws_event_proxy = WSEventProxy(hass, config["mqtt"]["topic_prefix"])
entry.async_on_unload(lambda: ws_event_proxy.unsubscribe_all(hass))
hass.data[DOMAIN][entry.entry_id] = {
@@ -319,7 +322,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
return True
-class FrigateDataUpdateCoordinator(DataUpdateCoordinator): # type: ignore[misc]
+class FrigateDataUpdateCoordinator(DataUpdateCoordinator):
"""Class to manage fetching data from the API."""
def __init__(self, hass: HomeAssistant, client: FrigateApiClient):
@@ -345,6 +348,11 @@ async def async_unload_entry(hass: HomeAssistant, config_entry: ConfigEntry) ->
await hass.config_entries.async_unload_platforms(config_entry, PLATFORMS)
)
if unload_ok:
+ await (
+ hass.data[DOMAIN][config_entry.entry_id]
+ .get(ATTR_COORDINATOR)
+ .async_shutdown()
+ )
hass.data[DOMAIN].pop(config_entry.entry_id)
return unload_ok
@@ -364,11 +372,13 @@ async def async_migrate_entry(hass: HomeAssistant, config_entry: ConfigEntry) ->
data = {**config_entry.data}
data[CONF_URL] = data.pop(CONF_HOST)
hass.config_entries.async_update_entry(
- config_entry, data=data, title=get_config_entry_title(data[CONF_URL])
+ config_entry,
+ data=data,
+ title=get_config_entry_title(data[CONF_URL]),
+ version=2,
)
- config_entry.version = 2
- @callback # type: ignore[misc]
+ @callback
def update_unique_id(entity_entry: er.RegistryEntry) -> dict[str, str] | None:
"""Update unique ID of entity entry."""
@@ -422,7 +432,7 @@ def update_unique_id(entity_entry: er.RegistryEntry) -> dict[str, str] | None:
return True
-class FrigateEntity(Entity): # type: ignore[misc]
+class FrigateEntity(Entity):
"""Base class for Frigate entities."""
_attr_has_entity_name = True
@@ -456,7 +466,7 @@ def __init__(
"""Construct a FrigateMQTTEntity."""
super().__init__(config_entry)
self._frigate_config = frigate_config
- self._sub_state = None
+ self._sub_state: dict[str, EntitySubscription] | None = None
self._available = False
self._topic_map = topic_map
@@ -468,21 +478,20 @@ async def async_added_to_hass(self) -> None:
"qos": 0,
}
- state = async_prepare_subscribe_topics(
+ self._sub_state = async_prepare_subscribe_topics(
self.hass,
self._sub_state,
self._topic_map,
)
- self._sub_state = await async_subscribe_topics(self.hass, state)
+ await async_subscribe_topics(self.hass, self._sub_state)
await super().async_added_to_hass()
async def async_will_remove_from_hass(self) -> None:
"""Cleanup prior to hass removal."""
- async_unsubscribe_topics(self.hass, self._sub_state)
- self._sub_state = None
+ self._sub_state = async_unsubscribe_topics(self.hass, self._sub_state)
await super().async_will_remove_from_hass()
- @callback # type: ignore[misc]
+ @callback
def _availability_message_received(self, msg: ReceiveMessage) -> None:
"""Handle a new received MQTT availability message."""
self._available = decode_if_necessary(msg.payload) == "online"
diff --git a/custom_components/frigate/api.py b/custom_components/frigate/api.py
index c9709e4c..a8763e0c 100644
--- a/custom_components/frigate/api.py
+++ b/custom_components/frigate/api.py
@@ -1,4 +1,5 @@
"""Frigate API client."""
+
from __future__ import annotations
import asyncio
diff --git a/custom_components/frigate/binary_sensor.py b/custom_components/frigate/binary_sensor.py
index e7325c85..c575403a 100644
--- a/custom_components/frigate/binary_sensor.py
+++ b/custom_components/frigate/binary_sensor.py
@@ -1,8 +1,9 @@
"""Binary sensor platform for Frigate."""
+
from __future__ import annotations
import logging
-from typing import Any, cast
+from typing import Any
from homeassistant.components.binary_sensor import (
BinarySensorDeviceClass,
@@ -11,9 +12,11 @@
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_URL
from homeassistant.core import HomeAssistant, callback
+from homeassistant.helpers.device_registry import DeviceInfo
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from . import (
+ FrigateEntity,
FrigateMQTTEntity,
ReceiveMessage,
decode_if_necessary,
@@ -36,10 +39,9 @@ async def async_setup_entry(
) -> None:
"""Binary sensor entry setup."""
frigate_config = hass.data[DOMAIN][entry.entry_id][ATTR_CONFIG]
+ entities: list[FrigateEntity] = []
- entities = []
-
- # add object sensors for cameras and zones
+ # Add object sensors for cameras and zones.
entities.extend(
[
FrigateObjectOccupancySensor(entry, frigate_config, cam_name, obj)
@@ -47,7 +49,7 @@ async def async_setup_entry(
]
)
- # add audio sensors for cameras
+ # Add audio sensors for cameras.
entities.extend(
[
FrigateAudioSensor(entry, frigate_config, cam_name, audio)
@@ -55,7 +57,7 @@ async def async_setup_entry(
]
)
- # add generic motion sensors for cameras
+ # Add generic motion sensors for cameras.
entities.extend(
[
FrigateMotionSensor(entry, frigate_config, cam_name)
@@ -66,7 +68,7 @@ async def async_setup_entry(
async_add_entities(entities)
-class FrigateObjectOccupancySensor(FrigateMQTTEntity, BinarySensorEntity): # type: ignore[misc]
+class FrigateObjectOccupancySensor(FrigateMQTTEntity, BinarySensorEntity):
"""Frigate Occupancy Sensor class."""
def __init__(
@@ -98,7 +100,7 @@ def __init__(
},
)
- @callback # type: ignore[misc]
+ @callback
def _state_message_received(self, msg: ReceiveMessage) -> None:
"""Handle a new received MQTT state message."""
try:
@@ -117,7 +119,7 @@ def unique_id(self) -> str:
)
@property
- def device_info(self) -> dict[str, Any]:
+ def device_info(self) -> DeviceInfo:
"""Return device information."""
return {
"identifiers": {
@@ -141,9 +143,9 @@ def is_on(self) -> bool:
return self._is_on
@property
- def device_class(self) -> str:
+ def device_class(self) -> BinarySensorDeviceClass:
"""Return the device class."""
- return cast(str, BinarySensorDeviceClass.OCCUPANCY)
+ return BinarySensorDeviceClass.OCCUPANCY
@property
def icon(self) -> str:
@@ -151,7 +153,7 @@ def icon(self) -> str:
return get_dynamic_icon_from_type(self._obj_name, self._is_on)
-class FrigateAudioSensor(FrigateMQTTEntity, BinarySensorEntity): # type: ignore[misc]
+class FrigateAudioSensor(FrigateMQTTEntity, BinarySensorEntity):
"""Frigate Audio Sensor class."""
def __init__(
@@ -182,7 +184,7 @@ def __init__(
},
)
- @callback # type: ignore[misc]
+ @callback
def _state_message_received(self, msg: ReceiveMessage) -> None:
"""Handle a new received MQTT state message."""
self._is_on = decode_if_necessary(msg.payload) == "ON"
@@ -198,7 +200,7 @@ def unique_id(self) -> str:
)
@property
- def device_info(self) -> dict[str, Any]:
+ def device_info(self) -> DeviceInfo:
"""Return device information."""
return {
"identifiers": {
@@ -222,9 +224,9 @@ def is_on(self) -> bool:
return self._is_on
@property
- def device_class(self) -> str:
+ def device_class(self) -> BinarySensorDeviceClass:
"""Return the device class."""
- return cast(str, BinarySensorDeviceClass.SOUND)
+ return BinarySensorDeviceClass.SOUND
@property
def icon(self) -> str:
@@ -232,7 +234,7 @@ def icon(self) -> str:
return get_dynamic_icon_from_type("sound", self._is_on)
-class FrigateMotionSensor(FrigateMQTTEntity, BinarySensorEntity): # type: ignore[misc]
+class FrigateMotionSensor(FrigateMQTTEntity, BinarySensorEntity):
"""Frigate Motion Sensor class."""
_attr_name = "Motion"
@@ -263,7 +265,7 @@ def __init__(
},
)
- @callback # type: ignore[misc]
+ @callback
def _state_message_received(self, msg: ReceiveMessage) -> None:
"""Handle a new received MQTT state message."""
self._is_on = decode_if_necessary(msg.payload) == "ON"
@@ -279,7 +281,7 @@ def unique_id(self) -> str:
)
@property
- def device_info(self) -> dict[str, Any]:
+ def device_info(self) -> DeviceInfo:
"""Return device information."""
return {
"identifiers": {
@@ -298,6 +300,6 @@ def is_on(self) -> bool:
return self._is_on
@property
- def device_class(self) -> str:
+ def device_class(self) -> BinarySensorDeviceClass:
"""Return the device class."""
- return cast(str, BinarySensorDeviceClass.MOTION)
+ return BinarySensorDeviceClass.MOTION
diff --git a/custom_components/frigate/camera.py b/custom_components/frigate/camera.py
index cd8c6b39..13cabe36 100644
--- a/custom_components/frigate/camera.py
+++ b/custom_components/frigate/camera.py
@@ -1,11 +1,11 @@
"""Support for Frigate cameras."""
+
from __future__ import annotations
import datetime
import logging
from typing import Any, cast
-import aiohttp
import async_timeout
from jinja2 import Template
import voluptuous as vol
@@ -19,6 +19,7 @@
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers import entity_platform
from homeassistant.helpers.aiohttp_client import async_get_clientsession
+from homeassistant.helpers.entity import DeviceInfo
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.update_coordinator import CoordinatorEntity
@@ -117,7 +118,9 @@ async def async_setup_entry(
)
-class FrigateCamera(FrigateMQTTEntity, CoordinatorEntity, Camera): # type: ignore[misc]
+class FrigateCamera(
+ FrigateMQTTEntity, CoordinatorEntity[FrigateDataUpdateCoordinator], Camera
+):
"""Representation of a Frigate camera."""
# sets the entity name to same as device name ex: camera.front_doorbell
@@ -236,13 +239,13 @@ def __init__(
else:
self._restream_type = "none"
- @callback # type: ignore[misc]
+ @callback
def _state_message_received(self, msg: ReceiveMessage) -> None:
"""Handle a new received MQTT state message."""
self._attr_is_recording = decode_if_necessary(msg.payload) == "ON"
self.async_write_ha_state()
- @callback # type: ignore[misc]
+ @callback
def _motion_message_received(self, msg: ReceiveMessage) -> None:
"""Handle a new received MQTT extra message."""
self._attr_motion_detection_enabled = decode_if_necessary(msg.payload) == "ON"
@@ -271,7 +274,7 @@ def unique_id(self) -> str:
)
@property
- def device_info(self) -> dict[str, Any]:
+ def device_info(self) -> DeviceInfo:
"""Return the device information."""
return {
"identifiers": {
@@ -305,7 +308,7 @@ async def async_camera_image(
self, width: int | None = None, height: int | None = None
) -> bytes | None:
"""Return bytes of camera image."""
- websession = cast(aiohttp.ClientSession, async_get_clientsession(self.hass))
+ websession = async_get_clientsession(self.hass)
image_url = str(
URL(self._url)
@@ -325,7 +328,7 @@ async def stream_source(self) -> str | None:
async def async_handle_web_rtc_offer(self, offer_sdp: str) -> str | None:
"""Handle the WebRTC offer and return an answer."""
- websession = cast(aiohttp.ClientSession, async_get_clientsession(self.hass))
+ websession = async_get_clientsession(self.hass)
url = f"{self._url}/api/go2rtc/webrtc?src={self._cam_name}"
payload = {"type": "offer", "sdp": offer_sdp}
async with websession.post(url, json=payload) as resp:
@@ -378,7 +381,7 @@ async def ptz(self, action: str, argument: str) -> None:
)
-class BirdseyeCamera(FrigateEntity, Camera): # type: ignore[misc]
+class BirdseyeCamera(FrigateEntity, Camera):
"""Representation of the Frigate birdseye camera."""
# sets the entity name to same as device name ex: camera.front_doorbell
@@ -426,7 +429,7 @@ def unique_id(self) -> str:
)
@property
- def device_info(self) -> dict[str, Any]:
+ def device_info(self) -> DeviceInfo:
"""Return the device information."""
return {
"identifiers": {
@@ -448,7 +451,7 @@ async def async_camera_image(
self, width: int | None = None, height: int | None = None
) -> bytes | None:
"""Return bytes of camera image."""
- websession = cast(aiohttp.ClientSession, async_get_clientsession(self.hass))
+ websession = async_get_clientsession(self.hass)
image_url = str(
URL(self._url)
diff --git a/custom_components/frigate/config_flow.py b/custom_components/frigate/config_flow.py
index 6f10f7ae..cc9a38a2 100644
--- a/custom_components/frigate/config_flow.py
+++ b/custom_components/frigate/config_flow.py
@@ -1,8 +1,9 @@
"""Adds config flow for Frigate."""
+
from __future__ import annotations
import logging
-from typing import Any, Dict, cast
+from typing import Any
import voluptuous as vol
from voluptuous.validators import All, Range
@@ -38,7 +39,7 @@ def get_config_entry_title(url_str: str) -> str:
return str(url)[len(url.scheme + "://") :]
-class FrigateFlowHandler(config_entries.ConfigFlow, domain=DOMAIN): # type: ignore[call-arg,misc]
+class FrigateFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
"""Config flow for Frigate."""
VERSION = 2
@@ -46,7 +47,7 @@ class FrigateFlowHandler(config_entries.ConfigFlow, domain=DOMAIN): # type: ign
async def async_step_user(
self, user_input: dict[str, Any] | None = None
- ) -> dict[str, Any]:
+ ) -> config_entries.ConfigFlowResult:
"""Handle a flow initialized by the user."""
if user_input is None:
@@ -69,43 +70,35 @@ async def async_step_user(
# Search for duplicates with the same Frigate CONF_HOST value.
for existing_entry in self._async_current_entries(include_ignore=False):
if existing_entry.data.get(CONF_URL) == user_input[CONF_URL]:
- return cast(
- Dict[str, Any], self.async_abort(reason="already_configured")
- )
-
- return cast(
- Dict[str, Any],
- self.async_create_entry(
- title=get_config_entry_title(user_input[CONF_URL]), data=user_input
- ),
+ return self.async_abort(reason="already_configured")
+
+ return self.async_create_entry(
+ title=get_config_entry_title(user_input[CONF_URL]), data=user_input
)
def _show_config_form(
self,
user_input: dict[str, Any] | None = None,
errors: dict[str, Any] | None = None,
- ) -> dict[str, Any]:
+ ) -> config_entries.ConfigFlowResult:
"""Show the configuration form."""
if user_input is None:
user_input = {}
- return cast(
- Dict[str, Any],
- self.async_show_form(
- step_id="user",
- data_schema=vol.Schema(
- {
- vol.Required(
- CONF_URL, default=user_input.get(CONF_URL, DEFAULT_HOST)
- ): str
- }
- ),
- errors=errors,
+ return self.async_show_form(
+ step_id="user",
+ data_schema=vol.Schema(
+ {
+ vol.Required(
+ CONF_URL, default=user_input.get(CONF_URL, DEFAULT_HOST)
+ ): str
+ }
),
+ errors=errors,
)
@staticmethod
- @callback # type: ignore[misc]
+ @callback
def async_get_options_flow(
config_entry: config_entries.ConfigEntry,
) -> FrigateOptionsFlowHandler:
@@ -113,7 +106,7 @@ def async_get_options_flow(
return FrigateOptionsFlowHandler(config_entry)
-class FrigateOptionsFlowHandler(config_entries.OptionsFlow): # type: ignore[misc]
+class FrigateOptionsFlowHandler(config_entries.OptionsFlow):
"""Frigate options flow."""
def __init__(self, config_entry: config_entries.ConfigEntry):
@@ -122,17 +115,13 @@ def __init__(self, config_entry: config_entries.ConfigEntry):
async def async_step_init(
self, user_input: dict[str, Any] | None = None
- ) -> dict[str, Any]:
+ ) -> config_entries.ConfigFlowResult:
"""Manage the options."""
if user_input is not None:
- return cast(
- Dict[str, Any], self.async_create_entry(title="", data=user_input)
- )
+ return self.async_create_entry(title="", data=user_input)
if not self.show_advanced_options:
- return cast(
- Dict[str, Any], self.async_abort(reason="only_advanced_options")
- )
+ return self.async_abort(reason="only_advanced_options")
schema: dict[Any, Any] = {
# Whether to enable webrtc as the medium for camera streaming
@@ -186,7 +175,4 @@ async def async_step_init(
): All(int, Range(min=0)),
}
- return cast(
- Dict[str, Any],
- self.async_show_form(step_id="init", data_schema=vol.Schema(schema)),
- )
+ return self.async_show_form(step_id="init", data_schema=vol.Schema(schema))
diff --git a/custom_components/frigate/const.py b/custom_components/frigate/const.py
index 6b5dc2dc..91757fb9 100644
--- a/custom_components/frigate/const.py
+++ b/custom_components/frigate/const.py
@@ -1,4 +1,5 @@
"""Constants for frigate."""
+
# Base component constants
NAME = "Frigate"
DOMAIN = "frigate"
diff --git a/custom_components/frigate/image.py b/custom_components/frigate/image.py
index 7d6c5567..05c19dfb 100644
--- a/custom_components/frigate/image.py
+++ b/custom_components/frigate/image.py
@@ -1,4 +1,5 @@
"""Support for Frigate images."""
+
from __future__ import annotations
import datetime
@@ -40,7 +41,7 @@ async def async_setup_entry(
)
-class FrigateMqttSnapshots(FrigateMQTTEntity, ImageEntity): # type: ignore[misc]
+class FrigateMqttSnapshots(FrigateMQTTEntity, ImageEntity):
"""Frigate best image class."""
def __init__(
@@ -76,12 +77,13 @@ def __init__(
)
ImageEntity.__init__(self, hass)
- @callback # type: ignore[misc]
+ @callback
def _state_message_received(self, msg: ReceiveMessage) -> None:
"""Handle a new received MQTT state message."""
- self._last_image_timestamp = datetime.datetime.now()
- self._last_image = msg.payload
- self.async_write_ha_state()
+ if isinstance(msg.payload, bytes):
+ self._last_image_timestamp = datetime.datetime.now()
+ self._last_image = msg.payload
+ self.async_write_ha_state()
@property
def unique_id(self) -> str:
@@ -118,6 +120,8 @@ def image_last_updated(self) -> datetime.datetime | None:
def image(
self,
- ) -> bytes | None: # pragma: no cover (HA currently does not support a direct way to test this)
+ ) -> (
+ bytes | None
+ ): # pragma: no cover (HA currently does not support a direct way to test this)
"""Return bytes of image."""
return self._last_image
diff --git a/custom_components/frigate/manifest.json b/custom_components/frigate/manifest.json
index 23eb00d3..7e43698a 100644
--- a/custom_components/frigate/manifest.json
+++ b/custom_components/frigate/manifest.json
@@ -13,6 +13,6 @@
"documentation": "https://github.com/blakeblackshear/frigate",
"iot_class": "local_push",
"issue_tracker": "https://github.com/blakeblackshear/frigate-hass-integration/issues",
- "requirements": ["pytz"],
- "version": "5.4.0"
+ "requirements": ["hass-web-proxy-lib==0.0.6", "pytz"],
+ "version": "5.4.1"
}
diff --git a/custom_components/frigate/media_source.py b/custom_components/frigate/media_source.py
index 77e881e4..fdfbf6e8 100644
--- a/custom_components/frigate/media_source.py
+++ b/custom_components/frigate/media_source.py
@@ -1,4 +1,5 @@
"""Frigate Media Source."""
+
from __future__ import annotations
import datetime as dt
@@ -10,14 +11,7 @@
from dateutil.relativedelta import relativedelta
import pytz
-from homeassistant.components.media_player.const import (
- MEDIA_CLASS_DIRECTORY,
- MEDIA_CLASS_IMAGE,
- MEDIA_CLASS_MOVIE,
- MEDIA_CLASS_VIDEO,
- MEDIA_TYPE_IMAGE,
- MEDIA_TYPE_VIDEO,
-)
+from homeassistant.components.media_player.const import MediaClass, MediaType
from homeassistant.components.media_source.error import MediaSourceError, Unresolvable
from homeassistant.components.media_source.models import (
BrowseMediaSource,
@@ -25,7 +19,6 @@
MediaSourceItem,
PlayMedia,
)
-from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from homeassistant.helpers import system_info
from homeassistant.helpers.template import DATE_STR_FORMAT
@@ -67,7 +60,7 @@ def as_dict(self) -> dict:
return {"event": self.event}
-class FrigateBrowseMediaSource(BrowseMediaSource): # type: ignore[misc]
+class FrigateBrowseMediaSource(BrowseMediaSource):
"""Represent a browsable Frigate media file."""
children: list[FrigateBrowseMediaSource] | None
@@ -174,15 +167,15 @@ def mime_type(self) -> str:
def media_type(self) -> str:
"""Get media type for this frigate media type."""
if self == FrigateMediaType.CLIPS:
- return str(MEDIA_TYPE_VIDEO)
- return str(MEDIA_TYPE_IMAGE)
+ return str(MediaType.VIDEO)
+ return str(MediaType.IMAGE)
@property
def media_class(self) -> str:
"""Get media class for this frigate media type."""
if self == FrigateMediaType.CLIPS:
- return str(MEDIA_CLASS_VIDEO)
- return str(MEDIA_CLASS_IMAGE)
+ return str(MediaClass.VIDEO)
+ return str(MediaClass.IMAGE)
@property
def extension(self) -> str:
@@ -259,7 +252,7 @@ def mime_type(self) -> str:
return self.frigate_media_type.mime_type
-def _to_int_or_none(data: str) -> int | None:
+def _to_int_or_none(data: str | int) -> int | None:
"""Convert to an integer or None."""
return int(data) if data is not None else None
@@ -436,9 +429,11 @@ def __str__(self) -> str:
self._empty_if_none(val)
for val in (
self.camera,
- f"{self.year_month_day}"
- if self.year_month_day is not None
- else None,
+ (
+ f"{self.year_month_day}"
+ if self.year_month_day is not None
+ else None
+ ),
f"{self.hour:02}" if self.hour is not None else None,
)
]
@@ -492,12 +487,12 @@ def mime_type(self) -> str:
@property
def media_class(self) -> str:
"""Get media class for this identifier."""
- return str(MEDIA_CLASS_MOVIE)
+ return str(MediaClass.MOVIE)
@property
def media_type(self) -> str:
"""Get media type for this identifier."""
- return str(MEDIA_TYPE_VIDEO)
+ return str(MediaType.VIDEO)
@attr.s(frozen=True)
@@ -519,7 +514,7 @@ def from_raw_data(cls, summary_data: list[dict[str, Any]]) -> EventSummaryData:
return cls(summary_data, cameras, labels, zones)
-class FrigateMediaSource(MediaSource): # type: ignore[misc]
+class FrigateMediaSource(MediaSource):
"""Provide Frigate camera recordings as media sources."""
name: str = "Frigate"
@@ -531,9 +526,7 @@ def __init__(self, hass: HomeAssistant):
def _is_allowed_as_media_source(self, instance_id: str) -> bool:
"""Whether a given frigate instance is allowed as a media source."""
- config_entry: ConfigEntry = get_config_entry_for_frigate_instance_id(
- self.hass, instance_id
- )
+ config_entry = get_config_entry_for_frigate_instance_id(self.hass, instance_id)
return (
config_entry.options.get(CONF_MEDIA_BROWSER_ENABLE, True) is True
if config_entry
@@ -587,19 +580,20 @@ async def async_browse_media(
) -> BrowseMediaSource:
"""Browse media."""
- if item.identifier is None:
+ if not item.identifier:
base = BrowseMediaSource(
domain=DOMAIN,
identifier="",
- media_class=MEDIA_CLASS_DIRECTORY,
- children_media_class=MEDIA_CLASS_VIDEO,
- media_content_type=MEDIA_TYPE_VIDEO,
+ media_class=MediaClass.DIRECTORY,
+ children_media_class=MediaClass.VIDEO,
+ media_content_type=MediaType.VIDEO,
title=NAME,
can_play=False,
can_expand=True,
thumbnail=None,
children=[],
)
+ base.children = []
for config_entry in self.hass.config_entries.async_entries(DOMAIN):
frigate_instance_id = get_frigate_instance_id_for_config_entry(
self.hass, config_entry
@@ -620,8 +614,8 @@ async def async_browse_media(
[
BrowseMediaSource(
domain=DOMAIN,
- identifier=clips_identifier,
- media_class=MEDIA_CLASS_DIRECTORY,
+ identifier=str(clips_identifier),
+ media_class=MediaClass.DIRECTORY,
children_media_class=clips_identifier.media_class,
media_content_type=clips_identifier.media_type,
title=f"Clips [{config_entry.title}]",
@@ -632,8 +626,8 @@ async def async_browse_media(
),
BrowseMediaSource(
domain=DOMAIN,
- identifier=recording_identifier,
- media_class=MEDIA_CLASS_DIRECTORY,
+ identifier=str(recording_identifier),
+ media_class=MediaClass.DIRECTORY,
children_media_class=recording_identifier.media_class,
media_content_type=recording_identifier.media_type,
title=f"Recordings [{config_entry.title}]",
@@ -644,8 +638,8 @@ async def async_browse_media(
),
BrowseMediaSource(
domain=DOMAIN,
- identifier=snapshots_identifier,
- media_class=MEDIA_CLASS_DIRECTORY,
+ identifier=str(snapshots_identifier),
+ media_class=MediaClass.DIRECTORY,
children_media_class=snapshots_identifier.media_class,
media_content_type=snapshots_identifier.media_type,
title=f"Snapshots [{config_entry.title}]",
@@ -760,8 +754,8 @@ def _browse_events(
base = BrowseMediaSource(
domain=DOMAIN,
- identifier=identifier,
- media_class=MEDIA_CLASS_DIRECTORY,
+ identifier=str(identifier),
+ media_class=MediaClass.DIRECTORY,
children_media_class=identifier.media_class,
media_content_type=identifier.media_type,
title=title,
@@ -770,6 +764,7 @@ def _browse_events(
thumbnail=None,
children=[],
)
+ base.children = []
event_items = self._build_event_response(identifier, events)
@@ -781,7 +776,7 @@ def _browse_events(
else:
base.children.extend(event_items)
- drilldown_sources = []
+ drilldown_sources: list[BrowseMediaSource] = []
drilldown_sources.extend(
self._build_date_sources(summary_data, identifier, len(base.children))
)
@@ -812,9 +807,11 @@ def _browse_events(
base.children.append(
BrowseMediaSource(
domain=DOMAIN,
- identifier=attr.evolve(identifier, name=f"{identifier.name}.all"),
- media_class=MEDIA_CLASS_DIRECTORY,
- children_media_class=MEDIA_CLASS_DIRECTORY,
+ identifier=str(
+ attr.evolve(identifier, name=f"{identifier.name}.all")
+ ),
+ media_class=MediaClass.DIRECTORY,
+ children_media_class=MediaClass.DIRECTORY,
media_content_type=identifier.media_type,
title=f"All ({count})",
can_play=False,
@@ -828,8 +825,8 @@ def _browse_events(
@classmethod
def _build_event_response(
cls, identifier: EventSearchIdentifier, events: list[dict[str, Any]]
- ) -> BrowseMediaSource:
- children = []
+ ) -> list[FrigateBrowseMediaSource]:
+ children: list[FrigateBrowseMediaSource] = []
for event in events:
start_time = event.get("start_time")
end_time = event.get("end_time")
@@ -849,16 +846,18 @@ def _build_event_response(
children.append(
FrigateBrowseMediaSource(
domain=DOMAIN,
- identifier=EventIdentifier(
- identifier.frigate_instance_id,
- frigate_media_type=identifier.frigate_media_type,
- camera=event["camera"],
- id=event["id"],
+ identifier=str(
+ EventIdentifier(
+ identifier.frigate_instance_id,
+ frigate_media_type=identifier.frigate_media_type,
+ camera=event["camera"],
+ id=event["id"],
+ )
),
media_class=identifier.media_class,
media_content_type=identifier.media_type,
- title=f"{dt.datetime.fromtimestamp(event['start_time'], DEFAULT_TIME_ZONE).strftime(DATE_STR_FORMAT)} [{duration}s, {event['label'].capitalize()} {int((event['data'].get('top_score') or event['top_score'] or 0)*100)}%]",
- can_play=identifier.media_type == MEDIA_TYPE_VIDEO,
+ title=f"{dt.datetime.fromtimestamp(event['start_time'], DEFAULT_TIME_ZONE).strftime(DATE_STR_FORMAT)} [{duration}s, {event['label'].capitalize()} {int((event['data'].get('top_score') or event['top_score'] or 0) * 100)}%]",
+ can_play=identifier.media_type == MediaType.VIDEO,
can_expand=False,
thumbnail=f"/api/frigate/{identifier.frigate_instance_id}/thumbnail/{event['id']}",
frigate=FrigateBrowseMediaMetadata(event=event),
@@ -871,7 +870,7 @@ def _build_camera_sources(
summary_data: EventSummaryData,
identifier: EventSearchIdentifier,
shown_event_count: int,
- ) -> BrowseMediaSource:
+ ) -> list[BrowseMediaSource]:
sources = []
for camera in summary_data.cameras:
count = self._count_by(
@@ -886,13 +885,15 @@ def _build_camera_sources(
sources.append(
BrowseMediaSource(
domain=DOMAIN,
- identifier=attr.evolve(
- identifier,
- name=f"{identifier.name}.{camera}",
- camera=camera,
+ identifier=str(
+ attr.evolve(
+ identifier,
+ name=f"{identifier.name}.{camera}",
+ camera=camera,
+ )
),
- media_class=MEDIA_CLASS_DIRECTORY,
- children_media_class=MEDIA_CLASS_DIRECTORY,
+ media_class=MediaClass.DIRECTORY,
+ children_media_class=MediaClass.DIRECTORY,
media_content_type=identifier.media_type,
title=f"{get_friendly_name(camera)} ({count})",
can_play=False,
@@ -907,7 +908,7 @@ def _build_label_sources(
summary_data: EventSummaryData,
identifier: EventSearchIdentifier,
shown_event_count: int,
- ) -> BrowseMediaSource:
+ ) -> list[BrowseMediaSource]:
sources = []
for label in summary_data.labels:
count = self._count_by(
@@ -922,13 +923,15 @@ def _build_label_sources(
sources.append(
BrowseMediaSource(
domain=DOMAIN,
- identifier=attr.evolve(
- identifier,
- name=f"{identifier.name}.{label}",
- label=label,
+ identifier=str(
+ attr.evolve(
+ identifier,
+ name=f"{identifier.name}.{label}",
+ label=label,
+ )
),
- media_class=MEDIA_CLASS_DIRECTORY,
- children_media_class=MEDIA_CLASS_DIRECTORY,
+ media_class=MediaClass.DIRECTORY,
+ children_media_class=MediaClass.DIRECTORY,
media_content_type=identifier.media_type,
title=f"{get_friendly_name(label)} ({count})",
can_play=False,
@@ -943,7 +946,7 @@ def _build_zone_sources(
summary_data: EventSummaryData,
identifier: EventSearchIdentifier,
shown_event_count: int,
- ) -> BrowseMediaSource:
+ ) -> list[BrowseMediaSource]:
"""Build zone media sources."""
sources = []
for zone in summary_data.zones:
@@ -953,13 +956,15 @@ def _build_zone_sources(
sources.append(
BrowseMediaSource(
domain=DOMAIN,
- identifier=attr.evolve(
- identifier,
- name=f"{identifier.name}.{zone}",
- zone=zone,
+ identifier=str(
+ attr.evolve(
+ identifier,
+ name=f"{identifier.name}.{zone}",
+ zone=zone,
+ )
),
- media_class=MEDIA_CLASS_DIRECTORY,
- children_media_class=MEDIA_CLASS_DIRECTORY,
+ media_class=MediaClass.DIRECTORY,
+ children_media_class=MediaClass.DIRECTORY,
media_content_type=identifier.media_type,
title=f"{get_friendly_name(zone)} ({count})",
can_play=False,
@@ -974,7 +979,7 @@ def _build_date_sources(
summary_data: EventSummaryData,
identifier: EventSearchIdentifier,
shown_event_count: int,
- ) -> BrowseMediaSource:
+ ) -> list[BrowseMediaSource]:
"""Build data media sources."""
sources = []
@@ -1053,14 +1058,16 @@ def _build_date_sources(
sources.append(
BrowseMediaSource(
domain=DOMAIN,
- identifier=attr.evolve(
- identifier,
- name=f"{identifier.name}.{current_date.strftime('%Y-%m')}",
- after=start_of_current_month,
- before=start_of_next_month,
+ identifier=str(
+ attr.evolve(
+ identifier,
+ name=f"{identifier.name}.{current_date.strftime('%Y-%m')}",
+ after=start_of_current_month,
+ before=start_of_next_month,
+ )
),
- media_class=MEDIA_CLASS_DIRECTORY,
- children_media_class=MEDIA_CLASS_DIRECTORY,
+ media_class=MediaClass.DIRECTORY,
+ children_media_class=MediaClass.DIRECTORY,
media_content_type=identifier.media_type,
title=f"{current_date.strftime('%B')} ({count_current})",
can_play=False,
@@ -1094,14 +1101,16 @@ def _build_date_sources(
sources.append(
BrowseMediaSource(
domain=DOMAIN,
- identifier=attr.evolve(
- identifier,
- name=f"{identifier.name}.{current_date.strftime('%Y-%m-%d')}",
- after=start_of_current_day,
- before=start_of_next_day,
+ identifier=str(
+ attr.evolve(
+ identifier,
+ name=f"{identifier.name}.{current_date.strftime('%Y-%m-%d')}",
+ after=start_of_current_day,
+ before=start_of_next_day,
+ )
),
- media_class=MEDIA_CLASS_DIRECTORY,
- children_media_class=MEDIA_CLASS_DIRECTORY,
+ media_class=MediaClass.DIRECTORY,
+ children_media_class=MediaClass.DIRECTORY,
media_content_type=identifier.media_type,
title=f"{current_date.strftime('%B %d')} ({count_current})",
can_play=False,
@@ -1118,13 +1127,15 @@ def _build_date_sources(
sources.append(
BrowseMediaSource(
domain=DOMAIN,
- identifier=attr.evolve(
- identifier,
- name=f"{identifier.name}.today",
- after=start_of_today,
+ identifier=str(
+ attr.evolve(
+ identifier,
+ name=f"{identifier.name}.today",
+ after=start_of_today,
+ )
),
- media_class=MEDIA_CLASS_DIRECTORY,
- children_media_class=MEDIA_CLASS_DIRECTORY,
+ media_class=MediaClass.DIRECTORY,
+ children_media_class=MediaClass.DIRECTORY,
media_content_type=identifier.media_type,
title=f"Today ({count_today})",
can_play=False,
@@ -1137,14 +1148,16 @@ def _build_date_sources(
sources.append(
BrowseMediaSource(
domain=DOMAIN,
- identifier=attr.evolve(
- identifier,
- name=f"{identifier.name}.yesterday",
- after=start_of_yesterday,
- before=start_of_today,
+ identifier=str(
+ attr.evolve(
+ identifier,
+ name=f"{identifier.name}.yesterday",
+ after=start_of_yesterday,
+ before=start_of_today,
+ )
),
- media_class=MEDIA_CLASS_DIRECTORY,
- children_media_class=MEDIA_CLASS_DIRECTORY,
+ media_class=MediaClass.DIRECTORY,
+ children_media_class=MediaClass.DIRECTORY,
media_content_type=identifier.media_type,
title=f"Yesterday ({count_yesterday})",
can_play=False,
@@ -1160,13 +1173,15 @@ def _build_date_sources(
sources.append(
BrowseMediaSource(
domain=DOMAIN,
- identifier=attr.evolve(
- identifier,
- name=f"{identifier.name}.this_month",
- after=start_of_month,
+ identifier=str(
+ attr.evolve(
+ identifier,
+ name=f"{identifier.name}.this_month",
+ after=start_of_month,
+ )
),
- media_class=MEDIA_CLASS_DIRECTORY,
- children_media_class=MEDIA_CLASS_DIRECTORY,
+ media_class=MediaClass.DIRECTORY,
+ children_media_class=MediaClass.DIRECTORY,
media_content_type=identifier.media_type,
title=f"This Month ({count_this_month})",
can_play=False,
@@ -1179,14 +1194,16 @@ def _build_date_sources(
sources.append(
BrowseMediaSource(
domain=DOMAIN,
- identifier=attr.evolve(
- identifier,
- name=f"{identifier.name}.last_month",
- after=start_of_last_month,
- before=start_of_month,
+ identifier=str(
+ attr.evolve(
+ identifier,
+ name=f"{identifier.name}.last_month",
+ after=start_of_last_month,
+ before=start_of_month,
+ )
),
- media_class=MEDIA_CLASS_DIRECTORY,
- children_media_class=MEDIA_CLASS_DIRECTORY,
+ media_class=MediaClass.DIRECTORY,
+ children_media_class=MediaClass.DIRECTORY,
media_content_type=identifier.media_type,
title=f"Last Month ({count_last_month})",
can_play=False,
@@ -1202,13 +1219,15 @@ def _build_date_sources(
sources.append(
BrowseMediaSource(
domain=DOMAIN,
- identifier=attr.evolve(
- identifier,
- name=f"{identifier.name}.this_year",
- after=start_of_year,
+ identifier=str(
+ attr.evolve(
+ identifier,
+ name=f"{identifier.name}.this_year",
+ after=start_of_year,
+ )
),
- media_class=MEDIA_CLASS_DIRECTORY,
- children_media_class=MEDIA_CLASS_DIRECTORY,
+ media_class=MediaClass.DIRECTORY,
+ children_media_class=MediaClass.DIRECTORY,
media_content_type=identifier.media_type,
title="This Year",
can_play=False,
@@ -1239,9 +1258,9 @@ def _get_recording_base_media_source(
"""Get the base BrowseMediaSource object for a recording identifier."""
return BrowseMediaSource(
domain=DOMAIN,
- identifier=identifier,
- media_class=MEDIA_CLASS_DIRECTORY,
- children_media_class=MEDIA_CLASS_DIRECTORY,
+ identifier=str(identifier),
+ media_class=MediaClass.DIRECTORY,
+ children_media_class=MediaClass.DIRECTORY,
media_content_type=identifier.media_type,
title="Recordings",
can_play=False,
@@ -1255,17 +1274,20 @@ def _get_camera_recording_folders(
) -> BrowseMediaSource:
"""List cameras for recordings."""
base = self._get_recording_base_media_source(identifier)
+ base.children = []
for camera in config["cameras"].keys():
base.children.append(
BrowseMediaSource(
domain=DOMAIN,
- identifier=attr.evolve(
- identifier,
- camera=camera,
+ identifier=str(
+ attr.evolve(
+ identifier,
+ camera=camera,
+ )
),
- media_class=MEDIA_CLASS_DIRECTORY,
- children_media_class=MEDIA_CLASS_DIRECTORY,
+ media_class=MediaClass.DIRECTORY,
+ children_media_class=MediaClass.DIRECTORY,
media_content_type=identifier.media_type,
title=get_friendly_name(camera),
can_play=False,
@@ -1281,6 +1303,7 @@ def _get_recording_days(
) -> BrowseMediaSource:
"""List year-month-day options for camera."""
base = self._get_recording_base_media_source(identifier)
+ base.children = []
for day_item in recording_days:
try:
@@ -1293,12 +1316,14 @@ def _get_recording_days(
base.children.append(
BrowseMediaSource(
domain=DOMAIN,
- identifier=attr.evolve(
- identifier,
- year_month_day=day_item["day"],
+ identifier=str(
+ attr.evolve(
+ identifier,
+ year_month_day=day_item["day"],
+ )
),
- media_class=MEDIA_CLASS_DIRECTORY,
- children_media_class=MEDIA_CLASS_DIRECTORY,
+ media_class=MediaClass.DIRECTORY,
+ children_media_class=MediaClass.DIRECTORY,
media_content_type=identifier.media_type,
title=day_item["day"],
can_play=False,
@@ -1314,6 +1339,8 @@ def _get_recording_hours(
) -> BrowseMediaSource:
"""Browse Frigate recordings."""
base = self._get_recording_base_media_source(identifier)
+ base.children = []
+
hour_items: list[dict[str, Any]] = next(
(
hours["hours"]
@@ -1334,7 +1361,7 @@ def _get_recording_hours(
base.children.append(
BrowseMediaSource(
domain=DOMAIN,
- identifier=attr.evolve(identifier, hour=hour_data["hour"]),
+ identifier=str(attr.evolve(identifier, hour=hour_data["hour"])),
media_class=identifier.media_class,
media_content_type=identifier.media_type,
title=title,
diff --git a/custom_components/frigate/number.py b/custom_components/frigate/number.py
index 9292344a..5866438c 100644
--- a/custom_components/frigate/number.py
+++ b/custom_components/frigate/number.py
@@ -1,4 +1,5 @@
"""Number platform for frigate."""
+
from __future__ import annotations
import logging
@@ -13,6 +14,7 @@
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from . import (
+ FrigateEntity,
FrigateMQTTEntity,
ReceiveMessage,
get_cameras,
@@ -42,9 +44,9 @@ async def async_setup_entry(
"""Sensor entry setup."""
frigate_config = hass.data[DOMAIN][entry.entry_id][ATTR_CONFIG]
- entities = []
+ entities: list[FrigateEntity] = []
- # add motion configurations for cameras
+ # Add motion sensors for cameras.
for cam_name in get_cameras(frigate_config):
entities.extend(
[FrigateMotionContourArea(entry, frigate_config, cam_name, False)]
@@ -56,7 +58,7 @@ async def async_setup_entry(
async_add_entities(entities)
-class FrigateMotionContourArea(FrigateMQTTEntity, NumberEntity): # type: ignore[misc]
+class FrigateMotionContourArea(FrigateMQTTEntity, NumberEntity):
"""FrigateMotionContourArea class."""
_attr_entity_category = EntityCategory.CONFIG
@@ -100,7 +102,7 @@ def __init__(
},
)
- @callback # type: ignore[misc]
+ @callback
def _state_message_received(self, msg: ReceiveMessage) -> None:
"""Handle a new received MQTT state message."""
try:
@@ -149,7 +151,7 @@ def icon(self) -> str:
return ICON_SPEEDOMETER
-class FrigateMotionThreshold(FrigateMQTTEntity, NumberEntity): # type: ignore[misc]
+class FrigateMotionThreshold(FrigateMQTTEntity, NumberEntity):
"""FrigateMotionThreshold class."""
_attr_entity_category = EntityCategory.CONFIG
@@ -193,7 +195,7 @@ def __init__(
},
)
- @callback # type: ignore[misc]
+ @callback
def _state_message_received(self, msg: ReceiveMessage) -> None:
"""Handle a new received MQTT state message."""
try:
diff --git a/custom_components/frigate/sensor.py b/custom_components/frigate/sensor.py
index 6a20e1e2..08d66de5 100644
--- a/custom_components/frigate/sensor.py
+++ b/custom_components/frigate/sensor.py
@@ -1,4 +1,5 @@
"""Sensor platform for frigate."""
+
from __future__ import annotations
import logging
@@ -49,7 +50,7 @@ async def async_setup_entry(
frigate_config = hass.data[DOMAIN][entry.entry_id][ATTR_CONFIG]
coordinator = hass.data[DOMAIN][entry.entry_id][ATTR_COORDINATOR]
- entities = []
+ entities: list[FrigateEntity] = []
for key, value in coordinator.data.items():
if key == "detection_fps":
entities.append(FrigateFpsSensor(coordinator, entry))
@@ -100,7 +101,7 @@ async def async_setup_entry(
async_add_entities(entities)
-class FrigateFpsSensor(FrigateEntity, CoordinatorEntity): # type: ignore[misc]
+class FrigateFpsSensor(FrigateEntity, CoordinatorEntity[FrigateDataUpdateCoordinator]):
"""Frigate Sensor class."""
_attr_entity_category = EntityCategory.DIAGNOSTIC
@@ -155,7 +156,9 @@ def icon(self) -> str:
return ICON_SPEEDOMETER
-class FrigateStatusSensor(FrigateEntity, CoordinatorEntity): # type: ignore[misc]
+class FrigateStatusSensor(
+ FrigateEntity, CoordinatorEntity[FrigateDataUpdateCoordinator]
+):
"""Frigate Status Sensor class."""
_attr_entity_category = EntityCategory.DIAGNOSTIC
@@ -198,7 +201,9 @@ def icon(self) -> str:
return ICON_SERVER
-class DetectorSpeedSensor(FrigateEntity, CoordinatorEntity): # type: ignore[misc]
+class DetectorSpeedSensor(
+ FrigateEntity, CoordinatorEntity[FrigateDataUpdateCoordinator]
+):
"""Frigate Detector Speed class."""
_attr_entity_category = EntityCategory.DIAGNOSTIC
@@ -265,7 +270,7 @@ def icon(self) -> str:
return ICON_SPEEDOMETER
-class GpuLoadSensor(FrigateEntity, CoordinatorEntity): # type: ignore[misc]
+class GpuLoadSensor(FrigateEntity, CoordinatorEntity[FrigateDataUpdateCoordinator]):
"""Frigate GPU Load class."""
_attr_entity_category = EntityCategory.DIAGNOSTIC
@@ -332,7 +337,7 @@ def icon(self) -> str:
return ICON_SPEEDOMETER
-class CameraFpsSensor(FrigateEntity, CoordinatorEntity): # type: ignore[misc]
+class CameraFpsSensor(FrigateEntity, CoordinatorEntity[FrigateDataUpdateCoordinator]):
"""Frigate Camera Fps class."""
_attr_entity_category = EntityCategory.DIAGNOSTIC
@@ -408,7 +413,7 @@ def icon(self) -> str:
return ICON_SPEEDOMETER
-class CameraSoundSensor(FrigateEntity, CoordinatorEntity): # type: ignore[misc]
+class CameraSoundSensor(FrigateEntity, CoordinatorEntity[FrigateDataUpdateCoordinator]):
"""Frigate Camera Sound Level class."""
def __init__(
@@ -513,7 +518,7 @@ def __init__(
},
)
- @callback # type: ignore[misc]
+ @callback
def _state_message_received(self, msg: ReceiveMessage) -> None:
"""Handle a new received MQTT state message."""
try:
@@ -566,7 +571,7 @@ def icon(self) -> str:
return self._icon
-class DeviceTempSensor(FrigateEntity, CoordinatorEntity): # type: ignore[misc]
+class DeviceTempSensor(FrigateEntity, CoordinatorEntity[FrigateDataUpdateCoordinator]):
"""Frigate Coral Temperature Sensor class."""
_attr_entity_category = EntityCategory.DIAGNOSTIC
@@ -632,7 +637,9 @@ def icon(self) -> str:
return ICON_CORAL
-class CameraProcessCpuSensor(FrigateEntity, CoordinatorEntity): # type: ignore[misc]
+class CameraProcessCpuSensor(
+ FrigateEntity, CoordinatorEntity[FrigateDataUpdateCoordinator]
+):
"""Cpu usage for camera processes class."""
_attr_entity_category = EntityCategory.DIAGNOSTIC
diff --git a/custom_components/frigate/switch.py b/custom_components/frigate/switch.py
index e724bfd8..324c89d0 100644
--- a/custom_components/frigate/switch.py
+++ b/custom_components/frigate/switch.py
@@ -1,4 +1,5 @@
"""Sensor platform for frigate."""
+
from __future__ import annotations
import logging
@@ -75,7 +76,7 @@ async def async_setup_entry(
async_add_entities(entities)
-class FrigateSwitch(FrigateMQTTEntity, SwitchEntity): # type: ignore[misc]
+class FrigateSwitch(FrigateMQTTEntity, SwitchEntity):
"""Frigate Switch class."""
_attr_entity_category = EntityCategory.CONFIG
@@ -117,7 +118,7 @@ def __init__(
},
)
- @callback # type: ignore[misc]
+ @callback
def _state_message_received(self, msg: ReceiveMessage) -> None:
"""Handle a new received MQTT state message."""
self._is_on = decode_if_necessary(msg.payload) == "ON"
diff --git a/custom_components/frigate/translations/pt-pt.json b/custom_components/frigate/translations/pt-pt.json
new file mode 100644
index 00000000..7aa1ca57
--- /dev/null
+++ b/custom_components/frigate/translations/pt-pt.json
@@ -0,0 +1,32 @@
+{
+ "config": {
+ "step": {
+ "user": {
+ "description": "URL que usa para aceder ao Frigate (ou seja, `http://frigate:5000/`)\n\nSe estiver usar HassOS com o complemento, o URL deve ser `http://ccab4aaf-frigate:5000/`\n\nO Home Assistant precisa de acesso à porta 5000 (api) e 1935 (rtmp) para ter todos os recursos.\n\nA integração configurará sensores, câmeras e funcionalidades do navegador de mídia.\n\nSensores:\n- Estatísticas para monitorar o desempenho do frigate \n- Contagem de objetos para todas as zonas e câmeras\n\nCâmeras:\n- Câmeras para imagem do último objeto detectado para cada câmera\n- Entidades da câmera com suporte a stream (requer RTMP)\n\nNavegador de mídia:\n- UI avançada com miniaturas para navegar em clipes de eventos\n- UI avançada para navegar 24 horas por dia, 7 dias por semana e por mês, dia, câmera, hora\n\nAPI:\n- API de notificação com endpoints voltados para o público para imagens em notificações",
+ "data": {
+ "url": "URL"
+ }
+ }
+ },
+ "error": {
+ "cannot_connect": "Falhou a ligar",
+ "invalid_url": "Link inválido"
+ },
+ "abort": {
+ "already_configured": "O dispositivo já está configurado"
+ }
+ },
+ "options": {
+ "step": {
+ "init": {
+ "data": {
+ "rtmp_url_template": "Modelo de URL RTMP (consulte a documentação)",
+ "notification_proxy_enable": "Activar o proxy de evento de notificação não autenticado"
+ }
+ }
+ },
+ "abort": {
+ "only_advanced_options": "O modo avançado está desativado e existem apenas opções avançadas"
+ }
+ }
+}
diff --git a/custom_components/frigate/update.py b/custom_components/frigate/update.py
index 6a2fe5d9..8f4dd514 100644
--- a/custom_components/frigate/update.py
+++ b/custom_components/frigate/update.py
@@ -1,4 +1,5 @@
"""Update platform for frigate."""
+
from __future__ import annotations
import logging
@@ -33,7 +34,9 @@ async def async_setup_entry(
async_add_entities(entities)
-class FrigateContainerUpdate(FrigateEntity, UpdateEntity, CoordinatorEntity): # type: ignore[misc]
+class FrigateContainerUpdate(
+ FrigateEntity, UpdateEntity, CoordinatorEntity[FrigateDataUpdateCoordinator]
+):
"""Frigate container update."""
_attr_name = "Server"
diff --git a/custom_components/frigate/views.py b/custom_components/frigate/views.py
index 0ad7e1dd..ba0628ec 100644
--- a/custom_components/frigate/views.py
+++ b/custom_components/frigate/views.py
@@ -1,19 +1,22 @@
"""Frigate HTTP views."""
+
from __future__ import annotations
-import asyncio
from collections.abc import Mapping
import datetime
-from http import HTTPStatus
-from ipaddress import ip_address
import logging
from typing import Any, Optional, cast
-import aiohttp
-from aiohttp import hdrs, web
-from aiohttp.web_exceptions import HTTPBadGateway, HTTPUnauthorized
+from aiohttp import web
+from hass_web_proxy_lib import (
+ HASSWebProxyLibForbiddenRequestError,
+ HASSWebProxyLibNotFoundRequestError,
+ HASSWebProxyLibUnauthorizedRequestError,
+ ProxiedURL,
+ ProxyView,
+ WebsocketProxyView,
+)
import jwt
-from multidict import CIMultiDict
from yarl import URL
from custom_components.frigate.api import FrigateApiClient
@@ -26,7 +29,7 @@
CONF_NOTIFICATION_PROXY_EXPIRE_AFTER_SECONDS,
DOMAIN,
)
-from homeassistant.components.http import KEY_AUTHENTICATED, HomeAssistantView
+from homeassistant.components.http import KEY_AUTHENTICATED
from homeassistant.components.http.auth import DATA_SIGN_SECRET, SIGN_QUERY_PARAM
from homeassistant.components.http.const import KEY_HASS
from homeassistant.config_entries import ConfigEntry
@@ -90,7 +93,7 @@ def get_client_for_frigate_instance_id(
def get_frigate_instance_id_for_config_entry(
hass: HomeAssistant,
config_entry: ConfigEntry,
-) -> ConfigEntry | None:
+) -> str | None:
"""Get a frigate_instance_id for a ConfigEntry."""
config = hass.data[DOMAIN].get(config_entry.entry_id, {}).get(ATTR_CONFIG, {})
@@ -111,21 +114,15 @@ def async_setup(hass: HomeAssistant) -> None:
hass.http.register_view(VodSegmentProxyView(session))
-# These proxies are inspired by:
-# - https://github.com/home-assistant/supervisor/blob/main/supervisor/api/ingress.py
-
-
-class ProxyView(HomeAssistantView): # type: ignore[misc]
- """HomeAssistant view."""
+class FrigateProxyViewMixin:
+ """A mixin for proxying Frigate."""
- requires_auth = True
-
- def __init__(self, websession: aiohttp.ClientSession):
- """Initialize the frigate clips proxy view."""
- self._websession = websession
+ def _get_query_params(self, request: web.Request) -> Mapping[str, str]:
+ """Get the query params to send upstream."""
+ return {k: v for k, v in request.query.items() if k != "authSig"}
def _get_config_entry_for_request(
- self, request: web.Request, frigate_instance_id: str | None
+ self, request: web.Request, frigate_instance_id: str | None = None
) -> ConfigEntry | None:
"""Get a ConfigEntry for a given request."""
hass = request.app[KEY_HASS]
@@ -134,86 +131,27 @@ def _get_config_entry_for_request(
return get_config_entry_for_frigate_instance_id(hass, frigate_instance_id)
return get_default_config_entry(hass)
- def _create_path(self, **kwargs: Any) -> str | None:
- """Create path."""
- raise NotImplementedError # pragma: no cover
-
- def _permit_request(
- self, request: web.Request, config_entry: ConfigEntry, **kwargs: Any
- ) -> bool:
- """Determine whether to permit a request."""
- return True
-
- async def get(
- self,
- request: web.Request,
- **kwargs: Any,
- ) -> web.Response | web.StreamResponse | web.WebSocketResponse:
- """Route data to service."""
- try:
- return await self._handle_request(request, **kwargs)
-
- except aiohttp.ClientError as err:
- _LOGGER.debug("Reverse proxy error for %s: %s", request.rel_url, err)
-
- raise HTTPBadGateway() from None
-
- @staticmethod
- def _get_query_params(request: web.Request) -> Mapping[str, str]:
- """Get the query params to send upstream."""
- return {k: v for k, v in request.query.items() if k != "authSig"}
-
- async def _handle_request(
- self,
- request: web.Request,
- frigate_instance_id: str | None = None,
- **kwargs: Any,
- ) -> web.Response | web.StreamResponse:
- """Handle route for request."""
- config_entry = self._get_config_entry_for_request(request, frigate_instance_id)
+ def _get_fqdn_path(
+ self, request: web.Request, path: str, frigate_instance_id: str | None = None
+ ) -> str:
+ """Get the fully qualified domain name path."""
+ config_entry = self._get_config_entry_for_request(
+ request, frigate_instance_id=frigate_instance_id
+ )
if not config_entry:
- return web.Response(status=HTTPStatus.BAD_REQUEST)
-
- if not self._permit_request(request, config_entry, **kwargs):
- return web.Response(status=HTTPStatus.FORBIDDEN)
-
- full_path = self._create_path(**kwargs)
- if not full_path:
- return web.Response(status=HTTPStatus.NOT_FOUND)
-
- url = str(URL(config_entry.data[CONF_URL]) / full_path)
- data = await request.read()
- source_header = _init_header(request)
-
- async with self._websession.request(
- request.method,
- url,
- headers=source_header,
- params=self._get_query_params(request),
- allow_redirects=False,
- data=data,
- ) as result:
- headers = _response_header(result)
+ raise HASSWebProxyLibNotFoundRequestError()
+ return str(URL(config_entry.data[CONF_URL]) / path)
- # Stream response
- response = web.StreamResponse(status=result.status, headers=headers)
- response.content_type = result.content_type
- try:
- await response.prepare(request)
- async for data in result.content.iter_any():
- await response.write(data)
+class FrigateProxyView(FrigateProxyViewMixin, ProxyView):
+ """A proxy for Frigate."""
- except (aiohttp.ClientError, aiohttp.ClientPayloadError) as err:
- _LOGGER.debug("Stream error for %s: %s", request.rel_url, err)
- except ConnectionResetError:
- # Connection is reset/closed by peer.
- pass
- return response
+class FrigateWebsocketProxyView(FrigateProxyViewMixin, WebsocketProxyView):
+ """A websocket proxy for Frigate."""
-class SnapshotsProxyView(ProxyView):
+class SnapshotsProxyView(FrigateProxyView):
"""A proxy for snapshots."""
url = "/api/frigate/{frigate_instance_id:.+}/snapshot/{eventid:.*}"
@@ -221,12 +159,19 @@ class SnapshotsProxyView(ProxyView):
name = "api:frigate:snapshots"
- def _create_path(self, **kwargs: Any) -> str | None:
- """Create path."""
- return f"api/events/{kwargs['eventid']}/snapshot.jpg"
+ def _get_proxied_url(self, request: web.Request, **kwargs: Any) -> ProxiedURL:
+ """Create proxied URL."""
+ return ProxiedURL(
+ url=self._get_fqdn_path(
+ request,
+ f"api/events/{kwargs['eventid']}/snapshot.jpg",
+ frigate_instance_id=kwargs.get("frigate_instance_id"),
+ ),
+ query_params=self._get_query_params(request),
+ )
-class RecordingProxyView(ProxyView):
+class RecordingProxyView(FrigateProxyView):
"""A proxy for recordings."""
url = "/api/frigate/{frigate_instance_id:.+}/recording/{camera:.+}/start/{start:[.0-9]+}/end/{end:[.0-9]*}"
@@ -236,57 +181,90 @@ class RecordingProxyView(ProxyView):
name = "api:frigate:recording"
- def _create_path(self, **kwargs: Any) -> str | None:
- """Create path."""
- return (
- f"api/{kwargs['camera']}/start/{kwargs['start']}"
- + f"/end/{kwargs['end']}/clip.mp4"
+ def _get_proxied_url(self, request: web.Request, **kwargs: Any) -> ProxiedURL:
+ """Create proxied URL."""
+ return ProxiedURL(
+ url=self._get_fqdn_path(
+ request,
+ f"api/{kwargs['camera']}/start/{kwargs['start']}"
+ + f"/end/{kwargs['end']}/clip.mp4",
+ frigate_instance_id=kwargs.get("frigate_instance_id"),
+ ),
+ query_params=self._get_query_params(request),
)
-class ThumbnailsProxyView(ProxyView):
+class ThumbnailsProxyView(FrigateProxyView):
"""A proxy for snapshots."""
url = "/api/frigate/{frigate_instance_id:.+}/thumbnail/{eventid:.*}"
name = "api:frigate:thumbnails"
- def _create_path(self, **kwargs: Any) -> str | None:
- """Create path."""
- return f"api/events/{kwargs['eventid']}/thumbnail.jpg"
+ def _get_proxied_url(self, request: web.Request, **kwargs: Any) -> ProxiedURL:
+ """Create proxied URL."""
+ return ProxiedURL(
+ url=self._get_fqdn_path(
+ request,
+ f"api/events/{kwargs['eventid']}/thumbnail.jpg",
+ frigate_instance_id=kwargs.get("frigate_instance_id"),
+ ),
+ query_params=self._get_query_params(request),
+ )
-class NotificationsProxyView(ProxyView):
+class NotificationsProxyView(FrigateProxyView):
"""A proxy for notifications."""
url = "/api/frigate/{frigate_instance_id:.+}/notifications/{event_id}/{path:.*}"
extra_urls = ["/api/frigate/notifications/{event_id}/{path:.*}"]
name = "api:frigate:notification"
- requires_auth = False
-
- def _create_path(self, **kwargs: Any) -> str | None:
- """Create path."""
- path, event_id = kwargs["path"], kwargs["event_id"]
- if path == "thumbnail.jpg":
- return f"api/events/{event_id}/thumbnail.jpg"
- if path == "snapshot.jpg":
- return f"api/events/{event_id}/snapshot.jpg"
-
- if path.endswith("clip.mp4"):
- return f"api/events/{event_id}/clip.mp4"
-
- if path.endswith("event_preview.gif"):
- return f"api/events/{event_id}/preview.gif"
+ def _get_proxied_url(
+ self,
+ request: web.Request,
+ **kwargs: Any,
+ ) -> ProxiedURL:
+ """Create proxied URL."""
+ path: str = kwargs["path"]
+ event_id: str = kwargs["event_id"]
- if path.endswith("review_preview.gif"):
- return f"api/review/{event_id}/preview"
+ config_entry = self._get_config_entry_for_request(
+ request, kwargs.get("frigate_instance_id")
+ )
+ if not config_entry:
+ raise HASSWebProxyLibNotFoundRequestError("No Frigate instance found.")
+ if not self._permit_request(request, config_entry, event_id=event_id):
+ raise HASSWebProxyLibForbiddenRequestError("Request not permitted.")
- return None
+ url_path: str | None = None
+ if path == "thumbnail.jpg":
+ url_path = f"api/events/{event_id}/thumbnail.jpg"
+ elif path == "snapshot.jpg":
+ url_path = f"api/events/{event_id}/snapshot.jpg"
+ elif path.endswith("clip.mp4"):
+ url_path = f"api/events/{event_id}/clip.mp4"
+ elif path.endswith("event_preview.gif"):
+ url_path = f"api/events/{event_id}/preview.gif"
+ elif path.endswith("review_preview.gif"):
+ url_path = f"api/review/{event_id}/preview"
+
+ if not url_path:
+ raise HASSWebProxyLibNotFoundRequestError
+
+ return ProxiedURL(
+ url=self._get_fqdn_path(
+ request,
+ url_path,
+ frigate_instance_id=kwargs.get("frigate_instance_id"),
+ ),
+ allow_unauthenticated=True,
+ query_params=self._get_query_params(request),
+ )
def _permit_request(
- self, request: web.Request, config_entry: ConfigEntry, **kwargs: Any
+ self, request: web.Request, config_entry: ConfigEntry, event_id: str
) -> bool:
"""Determine whether to permit a request."""
@@ -312,7 +290,7 @@ def _permit_request(
return True
try:
- event_id_timestamp = int(kwargs["event_id"].partition(".")[0])
+ event_id_timestamp = int(event_id.partition(".")[0])
event_datetime = datetime.datetime.fromtimestamp(
event_id_timestamp, tz=datetime.timezone.utc
)
@@ -324,13 +302,11 @@ def _permit_request(
# Otherwise, permit only if notification event is not expired
return now_datetime.timestamp() <= expiration_datetime.timestamp()
except ValueError:
- _LOGGER.warning(
- "The event id %s does not have a valid format.", kwargs["event_id"]
- )
+ _LOGGER.warning("The event id %s does not have a valid format.", event_id)
return False
-class VodProxyView(ProxyView):
+class VodProxyView(FrigateProxyView):
"""A proxy for vod playlists."""
url = "/api/frigate/{frigate_instance_id:.+}/vod/{path:.+}/{manifest:.+}.m3u8"
@@ -338,33 +314,49 @@ class VodProxyView(ProxyView):
name = "api:frigate:vod:manifest"
- @staticmethod
- def _get_query_params(request: web.Request) -> Mapping[str, str]:
+ def _get_query_params(self, request: web.Request) -> Mapping[str, str]:
"""Get the query params to send upstream."""
return request.query
- def _create_path(self, **kwargs: Any) -> str | None:
- """Create path."""
- return f"vod/{kwargs['path']}/{kwargs['manifest']}.m3u8"
+ def _get_proxied_url(self, request: web.Request, **kwargs: Any) -> ProxiedURL:
+ """Create proxied URL."""
+ return ProxiedURL(
+ url=self._get_fqdn_path(
+ request,
+ f"vod/{kwargs['path']}/{kwargs['manifest']}.m3u8",
+ frigate_instance_id=kwargs.get("frigate_instance_id"),
+ ),
+ query_params=self._get_query_params(request),
+ )
-class VodSegmentProxyView(ProxyView):
+class VodSegmentProxyView(FrigateProxyView):
"""A proxy for vod segments."""
url = "/api/frigate/{frigate_instance_id:.+}/vod/{path:.+}/{segment:.+}.{extension:(ts|m4s|mp4)}"
extra_urls = ["/api/frigate/vod/{path:.+}/{segment:.+}.{extension:(ts|m4s|mp4)}"]
name = "api:frigate:vod:segment"
- requires_auth = False
- def _create_path(self, **kwargs: Any) -> str | None:
- """Create path."""
- return f"vod/{kwargs['path']}/{kwargs['segment']}.{kwargs['extension']}"
+ def _get_proxied_url(self, request: web.Request, **kwargs: Any) -> ProxiedURL:
+ """Create proxied URL."""
+ if not self._async_validate_signed_manifest(request):
+ raise HASSWebProxyLibUnauthorizedRequestError()
+
+ return ProxiedURL(
+ url=self._get_fqdn_path(
+ request,
+ f"vod/{kwargs['path']}/{kwargs['segment']}.{kwargs['extension']}",
+ frigate_instance_id=kwargs.get("frigate_instance_id"),
+ ),
+ allow_unauthenticated=True,
+ query_params=self._get_query_params(request),
+ )
- async def _async_validate_signed_manifest(self, request: web.Request) -> bool:
+ def _async_validate_signed_manifest(self, request: web.Request) -> bool:
"""Validate the signature for the manifest of this segment."""
hass = request.app[KEY_HASS]
- secret = hass.data.get(DATA_SIGN_SECRET)
+ secret = str(hass.data.get(DATA_SIGN_SECRET))
signature = request.query.get(SIGN_QUERY_PARAM)
if signature is None:
@@ -387,98 +379,8 @@ async def _async_validate_signed_manifest(self, request: web.Request) -> bool:
return True
- async def get(
- self,
- request: web.Request,
- **kwargs: Any,
- ) -> web.Response | web.StreamResponse | web.WebSocketResponse:
- """Route data to service."""
-
- if not await self._async_validate_signed_manifest(request):
- raise HTTPUnauthorized()
-
- return await super().get(request, **kwargs)
-
-class WebsocketProxyView(ProxyView):
- """A simple proxy for websockets."""
-
- async def _proxy_msgs(
- self,
- ws_in: aiohttp.ClientWebSocketResponse | web.WebSocketResponse,
- ws_out: aiohttp.ClientWebSocketResponse | web.WebSocketResponse,
- ) -> None:
-
- async for msg in ws_in:
- try:
- if msg.type == aiohttp.WSMsgType.TEXT:
- await ws_out.send_str(msg.data)
- elif msg.type == aiohttp.WSMsgType.BINARY:
- await ws_out.send_bytes(msg.data)
- elif msg.type == aiohttp.WSMsgType.PING:
- await ws_out.ping()
- elif msg.type == aiohttp.WSMsgType.PONG:
- await ws_out.pong()
- except ConnectionResetError:
- return
-
- async def _handle_request(
- self,
- request: web.Request,
- frigate_instance_id: str | None = None,
- **kwargs: Any,
- ) -> web.Response | web.StreamResponse:
- """Handle route for request."""
-
- config_entry = self._get_config_entry_for_request(request, frigate_instance_id)
- if not config_entry:
- return web.Response(status=HTTPStatus.BAD_REQUEST)
-
- if not self._permit_request(request, config_entry, **kwargs):
- return web.Response(status=HTTPStatus.FORBIDDEN)
-
- full_path = self._create_path(**kwargs)
- if not full_path:
- return web.Response(status=HTTPStatus.NOT_FOUND)
-
- req_protocols = []
- if hdrs.SEC_WEBSOCKET_PROTOCOL in request.headers:
- req_protocols = [
- str(proto.strip())
- for proto in request.headers[hdrs.SEC_WEBSOCKET_PROTOCOL].split(",")
- ]
-
- ws_to_user = web.WebSocketResponse(
- protocols=req_protocols, autoclose=False, autoping=False
- )
- await ws_to_user.prepare(request)
-
- # Preparing
- url = str(URL(config_entry.data[CONF_URL]) / full_path)
- source_header = _init_header(request)
-
- # Support GET query
- if request.query_string:
- url = f"{url}?{request.query_string}"
-
- async with self._websession.ws_connect(
- url,
- headers=source_header,
- protocols=req_protocols,
- autoclose=False,
- autoping=False,
- ) as ws_to_frigate:
- await asyncio.wait(
- [
- asyncio.create_task(self._proxy_msgs(ws_to_frigate, ws_to_user)),
- asyncio.create_task(self._proxy_msgs(ws_to_user, ws_to_frigate)),
- ],
- return_when=asyncio.tasks.FIRST_COMPLETED,
- )
- return ws_to_user
-
-
-class JSMPEGProxyView(WebsocketProxyView):
+class JSMPEGProxyView(FrigateWebsocketProxyView):
"""A proxy for JSMPEG websocket."""
url = "/api/frigate/{frigate_instance_id:.+}/jsmpeg/{path:.+}"
@@ -486,12 +388,19 @@ class JSMPEGProxyView(WebsocketProxyView):
name = "api:frigate:jsmpeg"
- def _create_path(self, **kwargs: Any) -> str | None:
- """Create path."""
- return f"live/jsmpeg/{kwargs['path']}"
+ def _get_proxied_url(self, request: web.Request, **kwargs: Any) -> ProxiedURL:
+ """Create proxied URL."""
+ return ProxiedURL(
+ url=self._get_fqdn_path(
+ request,
+ f"live/jsmpeg/{kwargs['path']}",
+ frigate_instance_id=kwargs.get("frigate_instance_id"),
+ ),
+ query_params=self._get_query_params(request),
+ )
-class MSEProxyView(WebsocketProxyView):
+class MSEProxyView(FrigateWebsocketProxyView):
"""A proxy for MSE websocket."""
url = "/api/frigate/{frigate_instance_id:.+}/mse/{path:.+}"
@@ -499,12 +408,19 @@ class MSEProxyView(WebsocketProxyView):
name = "api:frigate:mse"
- def _create_path(self, **kwargs: Any) -> str | None:
- """Create path."""
- return f"live/mse/{kwargs['path']}"
+ def _get_proxied_url(self, request: web.Request, **kwargs: Any) -> ProxiedURL:
+ """Create proxied URL."""
+ return ProxiedURL(
+ url=self._get_fqdn_path(
+ request,
+ f"live/mse/{kwargs['path']}",
+ frigate_instance_id=kwargs.get("frigate_instance_id"),
+ ),
+ query_params=self._get_query_params(request),
+ )
-class WebRTCProxyView(WebsocketProxyView):
+class WebRTCProxyView(FrigateWebsocketProxyView):
"""A proxy for WebRTC websocket."""
url = "/api/frigate/{frigate_instance_id:.+}/webrtc/{path:.+}"
@@ -512,75 +428,13 @@ class WebRTCProxyView(WebsocketProxyView):
name = "api:frigate:webrtc"
- def _create_path(self, **kwargs: Any) -> str | None:
- """Create path."""
- return f"live/webrtc/{kwargs['path']}"
-
-
-def _init_header(request: web.Request) -> CIMultiDict | dict[str, str]:
- """Create initial header."""
- headers = {}
-
- # filter flags
- for name, value in request.headers.items():
- if name in (
- hdrs.CONTENT_LENGTH,
- hdrs.CONTENT_ENCODING,
- hdrs.SEC_WEBSOCKET_EXTENSIONS,
- hdrs.SEC_WEBSOCKET_PROTOCOL,
- hdrs.SEC_WEBSOCKET_VERSION,
- hdrs.SEC_WEBSOCKET_KEY,
- hdrs.HOST,
- hdrs.AUTHORIZATION,
- ):
- continue
- headers[name] = value
-
- # Set X-Forwarded-For
- forward_for = request.headers.get(hdrs.X_FORWARDED_FOR)
- assert request.transport
- connected_ip = ip_address(request.transport.get_extra_info("peername")[0])
- if forward_for:
- forward_for = f"{forward_for}, {connected_ip!s}"
- else:
- forward_for = f"{connected_ip!s}"
- headers[hdrs.X_FORWARDED_FOR] = forward_for
-
- # Set X-Forwarded-Host
- forward_host = request.headers.get(hdrs.X_FORWARDED_HOST)
- if not forward_host:
- forward_host = request.host
- headers[hdrs.X_FORWARDED_HOST] = forward_host
-
- # Set X-Forwarded-Proto
- forward_proto = request.headers.get(hdrs.X_FORWARDED_PROTO)
- if not forward_proto:
- forward_proto = request.url.scheme
- headers[hdrs.X_FORWARDED_PROTO] = forward_proto
-
- return headers
-
-
-def _response_header(response: aiohttp.ClientResponse) -> dict[str, str]:
- """Create response header."""
- headers = {}
-
- for name, value in response.headers.items():
- if name in (
- hdrs.TRANSFER_ENCODING,
- # Removing Content-Length header for streaming responses
- # prevents seeking from working for mp4 files
- # hdrs.CONTENT_LENGTH,
- hdrs.CONTENT_TYPE,
- hdrs.CONTENT_ENCODING,
- # Strips inbound CORS response headers since the aiohttp_cors
- # library will assert that they are not already present for CORS
- # requests.
- hdrs.ACCESS_CONTROL_ALLOW_ORIGIN,
- hdrs.ACCESS_CONTROL_ALLOW_CREDENTIALS,
- hdrs.ACCESS_CONTROL_EXPOSE_HEADERS,
- ):
- continue
- headers[name] = value
-
- return headers
+ def _get_proxied_url(self, request: web.Request, **kwargs: Any) -> ProxiedURL:
+ """Create proxied URL."""
+ return ProxiedURL(
+ url=self._get_fqdn_path(
+ request,
+ f"live/webrtc/{kwargs['path']}",
+ frigate_instance_id=kwargs.get("frigate_instance_id"),
+ ),
+ query_params=self._get_query_params(request),
+ )
diff --git a/custom_components/frigate/ws_api.py b/custom_components/frigate/ws_api.py
index ed648199..7a43ab30 100644
--- a/custom_components/frigate/ws_api.py
+++ b/custom_components/frigate/ws_api.py
@@ -1,4 +1,5 @@
"""Frigate HTTP views."""
+
from __future__ import annotations
import logging
@@ -55,8 +56,8 @@ def _get_client_or_send_error(
vol.Required("event_id"): str,
vol.Required("retain"): bool,
}
-) # type: ignore[misc]
-@websocket_api.async_response # type: ignore[misc]
+)
+@websocket_api.async_response
async def ws_retain_event(
hass: HomeAssistant,
connection: websocket_api.ActiveConnection,
@@ -90,8 +91,8 @@ async def ws_retain_event(
vol.Optional("after"): int,
vol.Optional("before"): int,
}
-) # type: ignore[misc]
-@websocket_api.async_response # type: ignore[misc]
+)
+@websocket_api.async_response
async def ws_get_recordings(
hass: HomeAssistant,
connection: websocket_api.ActiveConnection,
@@ -124,8 +125,8 @@ async def ws_get_recordings(
vol.Required("camera"): str,
vol.Optional("timezone"): str,
}
-) # type: ignore[misc]
-@websocket_api.async_response # type: ignore[misc]
+)
+@websocket_api.async_response
async def ws_get_recordings_summary(
hass: HomeAssistant,
connection: websocket_api.ActiveConnection,
@@ -166,8 +167,8 @@ async def ws_get_recordings_summary(
vol.Optional("has_snapshot"): bool,
vol.Optional("favorites"): bool,
}
-) # type: ignore[misc]
-@websocket_api.async_response # type: ignore[misc]
+)
+@websocket_api.async_response
async def ws_get_events(
hass: HomeAssistant,
connection: websocket_api.ActiveConnection,
@@ -212,8 +213,8 @@ async def ws_get_events(
vol.Optional("has_snapshot"): bool,
vol.Optional("timezone"): str,
}
-) # type: ignore[misc]
-@websocket_api.async_response # type: ignore[misc]
+)
+@websocket_api.async_response
async def ws_get_events_summary(
hass: HomeAssistant,
connection: websocket_api.ActiveConnection,
@@ -248,8 +249,8 @@ async def ws_get_events_summary(
vol.Required("type"): "frigate/events/subscribe",
vol.Required("instance_id"): str,
}
-) # type: ignore[misc]
-@websocket_api.async_response # type: ignore[misc]
+)
+@websocket_api.async_response
async def ws_subscribe_events(
hass: HomeAssistant,
connection: websocket_api.ActiveConnection,
@@ -279,8 +280,8 @@ async def ws_subscribe_events(
vol.Required("instance_id"): str,
vol.Required("subscription_id"): int,
}
-) # type: ignore[misc]
-@websocket_api.async_response # type: ignore[misc]
+)
+@websocket_api.async_response
async def ws_unsubscribe_events(
hass: HomeAssistant,
connection: websocket_api.ActiveConnection,
@@ -313,8 +314,8 @@ async def ws_unsubscribe_events(
vol.Required("instance_id"): str,
vol.Required("camera"): str,
}
-) # type: ignore[misc]
-@websocket_api.async_response # type: ignore[misc]
+)
+@websocket_api.async_response
async def ws_get_ptz_info(
hass: HomeAssistant,
connection: websocket_api.ActiveConnection,
diff --git a/custom_components/frigate/ws_event_proxy.py b/custom_components/frigate/ws_event_proxy.py
index b680906f..6f768390 100644
--- a/custom_components/frigate/ws_event_proxy.py
+++ b/custom_components/frigate/ws_event_proxy.py
@@ -1,4 +1,5 @@
"""Frigate event proxy."""
+
from __future__ import annotations
import logging
@@ -6,6 +7,7 @@
from homeassistant.components import websocket_api
from homeassistant.components.mqtt.models import ReceiveMessage
from homeassistant.components.mqtt.subscription import (
+ EntitySubscription,
async_prepare_subscribe_topics,
async_subscribe_topics,
async_unsubscribe_topics,
@@ -25,16 +27,16 @@ class WSEventProxy:
within HA.
"""
- def __init__(self, topic_prefix: str) -> None:
+ def __init__(self, hass: HomeAssistant, topic_prefix: str) -> None:
self._subscriptions: dict[int, websocket_api.ActiveConnection] = {}
self._topics = {
"events": {
"topic": f"{topic_prefix}/events",
- "msg_callback": lambda msg: self._receive_message(msg),
+ "msg_callback": lambda msg: self._receive_message(hass, msg),
"qos": 0,
}
}
- self._sub_state = None
+ self._sub_state: dict[str, EntitySubscription] | None = None
async def subscribe(
self,
@@ -89,7 +91,13 @@ def unsubscribe_all(self, hass: HomeAssistant) -> None:
for subscription_id in list(self._subscriptions.keys()):
self.unsubscribe(hass, subscription_id)
- def _receive_message(self, msg: ReceiveMessage) -> None:
+ def _receive_message(self, hass: HomeAssistant, msg: ReceiveMessage) -> None:
"""Handle a new received MQTT message."""
- for id, connection in self._subscriptions.items():
- connection.send_message(messages.event_message(id, msg.payload))
+
+ async def proxy() -> None:
+ for id, connection in self._subscriptions.items():
+ connection.send_message(messages.event_message(id, msg.payload))
+
+ # Must proxy in the executor pool to ensure threadsafety. Otherwise:
+ # `RuntimeError: Non-thread-safe operation invoked on an event loop other than the current one``
+ hass.create_task(proxy())
diff --git a/custom_components/mail_and_packages/binary_sensor.py b/custom_components/mail_and_packages/binary_sensor.py
index efdb63b2..2919c098 100644
--- a/custom_components/mail_and_packages/binary_sensor.py
+++ b/custom_components/mail_and_packages/binary_sensor.py
@@ -85,7 +85,8 @@ def available(self) -> bool:
def is_on(self) -> bool:
"""Return True if the image is updated."""
if self._type == "usps_update":
- if ATTR_IMAGE_NAME in self.coordinator.data.keys():
+ attributes = (ATTR_IMAGE_NAME, ATTR_IMAGE_PATH)
+ if set(attributes).issubset(self.coordinator.data.keys()):
image = self.coordinator.data[ATTR_IMAGE_NAME]
path = self.coordinator.data[ATTR_IMAGE_PATH]
usps_image = f"{self.hass.config.path()}/{path}{image}"
@@ -104,7 +105,8 @@ def is_on(self) -> bool:
return False
if self._type == "amazon_update":
- if ATTR_AMAZON_IMAGE in self.coordinator.data.keys():
+ attributes = (ATTR_AMAZON_IMAGE, ATTR_IMAGE_PATH)
+ if set(attributes).issubset(self.coordinator.data.keys()):
image = self.coordinator.data[ATTR_AMAZON_IMAGE]
path = f"{self.coordinator.data[ATTR_IMAGE_PATH]}amazon/"
amazon_image = f"{self.hass.config.path()}/{path}{image}"
diff --git a/custom_components/mail_and_packages/config_flow.py b/custom_components/mail_and_packages/config_flow.py
index 5f9ede48..15c1b065 100644
--- a/custom_components/mail_and_packages/config_flow.py
+++ b/custom_components/mail_and_packages/config_flow.py
@@ -22,6 +22,7 @@
CONF_AMAZON_FWDS,
CONF_CUSTOM_IMG,
CONF_CUSTOM_IMG_FILE,
+ CONF_STORAGE,
CONF_DURATION,
CONF_FOLDER,
CONF_GENERATE_MP4,
@@ -45,6 +46,7 @@
DEFAULT_PATH,
DEFAULT_PORT,
DEFAULT_SCAN_INTERVAL,
+ DEFAULT_STORAGE,
DOMAIN,
)
from .helpers import _check_ffmpeg, _test_login, get_resources, login
@@ -129,6 +131,14 @@ async def _validate_user_input(user_input: dict) -> tuple:
if not valid:
errors[CONF_CUSTOM_IMG_FILE] = "file_not_found"
+ # validate path exists
+ if CONF_STORAGE in user_input:
+ valid = path.exists(user_input[CONF_STORAGE])
+ else:
+ valid = True
+ if not valid:
+ errors[CONF_STORAGE] = "path_not_found"
+
return errors, user_input
@@ -274,6 +284,22 @@ def _get_default(key: str, fallback_default: Any = None) -> None:
)
+def _get_schema_step_storage(user_input: list, default_dict: list) -> Any:
+ """Get a schema using the default_dict as a backup."""
+ if user_input is None:
+ user_input = {}
+
+ def _get_default(key: str, fallback_default: Any = None) -> None:
+ """Get default value for key."""
+ return user_input.get(key, default_dict.get(key, fallback_default))
+
+ return vol.Schema(
+ {
+ vol.Required(CONF_STORAGE, default=_get_default(CONF_STORAGE)): cv.string,
+ }
+ )
+
+
@config_entries.HANDLERS.register(DOMAIN)
class MailAndPackagesFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
"""Config flow for Mail and Packages."""
@@ -374,9 +400,7 @@ async def async_step_config_3(self, user_input=None):
self._data.update(user_input)
self._errors, user_input = await _validate_user_input(self._data)
if len(self._errors) == 0:
- return self.async_create_entry(
- title=self._data[CONF_HOST], data=self._data
- )
+ return await self.async_step_config_storage()
return await self._show_config_3(user_input)
return await self._show_config_3(user_input)
@@ -403,9 +427,8 @@ async def async_step_config_amazon(self, user_input=None):
if len(self._errors) == 0:
if self._data[CONF_CUSTOM_IMG]:
return await self.async_step_config_3()
- return self.async_create_entry(
- title=self._data[CONF_HOST], data=self._data
- )
+ return await self.async_step_config_storage()
+
return await self._show_config_amazon(user_input)
return await self._show_config_amazon(user_input)
@@ -425,6 +448,33 @@ async def _show_config_amazon(self, user_input):
errors=self._errors,
)
+ async def async_step_config_storage(self, user_input=None):
+ """Configure form step storage."""
+ self._errors = {}
+ if user_input is not None:
+ self._data.update(user_input)
+ self._errors, user_input = await _validate_user_input(self._data)
+ if len(self._errors) == 0:
+ return self.async_create_entry(
+ title=self._data[CONF_HOST], data=self._data
+ )
+ return await self._show_config_storage(user_input)
+
+ return await self._show_config_storage(user_input)
+
+ async def _show_config_storage(self, user_input):
+ """Step 3 setup."""
+ # Defaults
+ defaults = {
+ CONF_STORAGE: DEFAULT_STORAGE,
+ }
+
+ return self.async_show_form(
+ step_id="config_storage",
+ data_schema=_get_schema_step_storage(user_input, defaults),
+ errors=self._errors,
+ )
+
async def async_step_reconfigure(self, user_input: dict[str, Any] | None = None):
"""Add reconfigure step to allow to reconfigure a config entry."""
self._entry = self.hass.config_entries.async_get_entry(self.context["entry_id"])
@@ -473,12 +523,7 @@ async def async_step_reconfig_2(self, user_input=None):
if self._data[CONF_CUSTOM_IMG]:
return await self.async_step_reconfig_3()
- self.hass.config_entries.async_update_entry(
- self._entry, data=self._data
- )
- await self.hass.config_entries.async_reload(self._entry.entry_id)
- _LOGGER.debug("%s reconfigured.", DOMAIN)
- return self.async_abort(reason="reconfigure_successful")
+ return await self.async_step_reconfig_storage()
return await self._show_reconfig_2(user_input)
@@ -502,12 +547,7 @@ async def async_step_reconfig_3(self, user_input=None):
self._data.update(user_input)
self._errors, user_input = await _validate_user_input(self._data)
if len(self._errors) == 0:
- self.hass.config_entries.async_update_entry(
- self._entry, data=self._data
- )
- await self.hass.config_entries.async_reload(self._entry.entry_id)
- _LOGGER.debug("%s reconfigured.", DOMAIN)
- return self.async_abort(reason="reconfigure_successful")
+ return await self.async_step_reconfig_storage()
return await self._show_reconfig_3(user_input)
@@ -536,6 +576,27 @@ async def async_step_reconfig_amazon(self, user_input=None):
if self._data[CONF_CUSTOM_IMG]:
return await self.async_step_reconfig_3()
+ return await self.async_step_reconfig_storage()
+
+ return await self._show_reconfig_amazon(user_input)
+
+ return await self._show_reconfig_amazon(user_input)
+
+ async def _show_reconfig_amazon(self, user_input):
+ """Step 3 setup."""
+ return self.async_show_form(
+ step_id="reconfig_amazon",
+ data_schema=_get_schema_step_amazon(user_input, self._data),
+ errors=self._errors,
+ )
+
+ async def async_step_reconfig_storage(self, user_input=None):
+ """Configure form step storage."""
+ self._errors = {}
+ if user_input is not None:
+ self._data.update(user_input)
+ self._errors, user_input = await _validate_user_input(self._data)
+ if len(self._errors) == 0:
self.hass.config_entries.async_update_entry(
self._entry, data=self._data
)
@@ -543,14 +604,14 @@ async def async_step_reconfig_amazon(self, user_input=None):
_LOGGER.debug("%s reconfigured.", DOMAIN)
return self.async_abort(reason="reconfigure_successful")
- return await self._show_reconfig_amazon(user_input)
+ return await self._show_reconfig_storage(user_input)
- return await self._show_reconfig_amazon(user_input)
+ return await self._show_reconfig_storage(user_input)
- async def _show_reconfig_amazon(self, user_input):
+ async def _show_reconfig_storage(self, user_input):
"""Step 3 setup."""
return self.async_show_form(
- step_id="reconfig_amazon",
- data_schema=_get_schema_step_amazon(user_input, self._data),
+ step_id="reconfig_storage",
+ data_schema=_get_schema_step_storage(user_input, self._data),
errors=self._errors,
)
diff --git a/custom_components/mail_and_packages/const.py b/custom_components/mail_and_packages/const.py
index caf81f90..09b2ceb3 100644
--- a/custom_components/mail_and_packages/const.py
+++ b/custom_components/mail_and_packages/const.py
@@ -13,7 +13,7 @@
DOMAIN = "mail_and_packages"
DOMAIN_DATA = f"{DOMAIN}_data"
-VERSION = "0.4.0"
+VERSION = "0.4.1"
ISSUE_URL = "http://github.com/moralmunky/Home-Assistant-Mail-And-Packages"
PLATFORM = "sensor"
PLATFORMS = ["binary_sensor", "camera", "sensor"]
@@ -46,6 +46,7 @@
CONF_CAMERA_NAME = "camera_name"
CONF_CUSTOM_IMG = "custom_img"
CONF_CUSTOM_IMG_FILE = "custom_img_file"
+CONF_STORAGE = "storage"
CONF_FOLDER = "folder"
CONF_PATH = "image_path"
CONF_DURATION = "gif_duration"
@@ -76,6 +77,7 @@
DEFAULT_CUSTOM_IMG_FILE = "custom_components/mail_and_packages/images/mail_none.gif"
DEFAULT_AMAZON_DAYS = 3
DEFAULT_AMAZON_DOMAIN = "amazon.com"
+DEFAULT_STORAGE = "custom_components/mail_and_packages/images/"
# Amazon
AMAZON_DOMAINS = [
@@ -252,6 +254,7 @@
"subject": [
"Your package has been delivered",
"Your packages have been delivered",
+ "Your shipment was delivered",
],
},
"fedex_delivering": {
@@ -260,6 +263,7 @@
"Delivery scheduled for today",
"Your package is scheduled for delivery today",
"Your package is now out for delivery",
+ "Your shipment is out for delivery today",
"out for delivery today",
],
},
@@ -312,6 +316,7 @@
"subject": [
"DHL On Demand Delivery",
"Paket kommt heute",
+ "kommt heute",
"Paket wird gleich zugestellt",
"Powiadomienie o przesyłce",
"DHL Shipment Notification",
@@ -320,6 +325,7 @@
"scheduled for delivery TODAY",
"zostanie dziś do Państwa doręczona",
"wird Ihnen heute",
+ "heute zwischen",
" - Shipment is out with courier for delivery - ",
"Shipment is scheduled for delivery",
"voraussichtlich innerhalb",
diff --git a/custom_components/mail_and_packages/helpers.py b/custom_components/mail_and_packages/helpers.py
index 5517cbeb..8aae808c 100644
--- a/custom_components/mail_and_packages/helpers.py
+++ b/custom_components/mail_and_packages/helpers.py
@@ -78,6 +78,7 @@
CONF_GENERATE_MP4,
CONF_IMAP_SECURITY,
CONF_VERIFY_SSL,
+ CONF_STORAGE,
DEFAULT_AMAZON_DAYS,
OVERLAY,
SENSOR_DATA,
@@ -158,9 +159,11 @@ def default_image_path(
) -> str:
"""Return value of the default image path.
- Returns the default path based on logic (placeholder for future code)
+ Returns the default path based on logic
"""
- # Return the default
+ storage = config_entry.get(CONF_STORAGE)
+ if storage:
+ return storage
return "custom_components/mail_and_packages/images/"
@@ -1113,6 +1116,9 @@ def amazon_search(
count = 0
domains = amazon_domain.split()
+ _LOGGER.debug("Cleaning up amazon images...")
+ cleanup_images(f"{image_path}amazon/")
+
for domain in domains:
for subject in subjects:
email_address = []
@@ -1135,6 +1141,14 @@ def amazon_search(
amazon_image_name,
)
+ if count == 0:
+ _LOGGER.debug("No Amazon deliveries found.")
+ nomail = f"{os.path.dirname(__file__)}/no_deliveries.jpg"
+ try:
+ copyfile(nomail, f"{image_path}amazon/" + amazon_image_name)
+ except Exception as err:
+ _LOGGER.error("Error attempting to copy image: %s", str(err))
+
return count
@@ -1202,17 +1216,20 @@ async def download_img(
_LOGGER.debug("Amazon image downloaded")
-def _process_amazon_forwards(email_list: Union[List[str], None]) -> list:
+def _process_amazon_forwards(email_list: str | list | None) -> list:
"""Process amazon forward emails.
Returns list of email addresses
"""
result = []
- if email_list:
+ if email_list is not None:
+ if not isinstance(email_list, list):
+ email_list = email_list.split()
for fwd in email_list:
if fwd and fwd != '""' and fwd not in result:
result.append(fwd)
+ _LOGGER.debug("Processed forwards: %s", result)
return result
@@ -1221,7 +1238,8 @@ def amazon_hub(account: Type[imaplib.IMAP4_SSL], fwds: Optional[str] = None) ->
Returns dict of sensor data
"""
- email_addresses = _process_amazon_forwards(fwds)
+ email_addresses = []
+ email_addresses.extend(_process_amazon_forwards(fwds))
body_regex = AMAZON_HUB_BODY
subject_regex = AMAZON_HUB_SUBJECT_SEARCH
info = {}
@@ -1374,9 +1392,10 @@ def get_items(
tfmt = past_date.strftime("%d-%b-%Y")
deliveries_today = []
order_number = []
- domains = _process_amazon_forwards(fwds)
+ domains = []
+ domains.extend(_process_amazon_forwards(fwds))
the_domain = the_domain.split()
- domains.append(the_domain)
+ domains.extend(the_domain)
_LOGGER.debug("Amazon email list: %s", str(domains))
diff --git a/custom_components/mail_and_packages/manifest.json b/custom_components/mail_and_packages/manifest.json
index 5a957eca..9e36c9c8 100644
--- a/custom_components/mail_and_packages/manifest.json
+++ b/custom_components/mail_and_packages/manifest.json
@@ -16,5 +16,5 @@
"Pillow>=9.0",
"dateparser"
],
- "version": "0.4.0"
+ "version": "0.4.1"
}
\ No newline at end of file
diff --git a/custom_components/mail_and_packages/strings.json b/custom_components/mail_and_packages/strings.json
index 354255fc..fcf3015b 100644
--- a/custom_components/mail_and_packages/strings.json
+++ b/custom_components/mail_and_packages/strings.json
@@ -1,106 +1,121 @@
{
- "config": {
- "abort": {
- "single_instance_allowed": "Only a single configuration of Mail and Packages is allowed.",
- "reconfigure_successful": "Reconfigure Successful"
- },
- "error": {
- "communication": "Unable to connect or login to the mail server. Please check the log for details.",
- "invalid_path": "Please store the images in another directory.",
- "ffmpeg_not_found": "Generate MP4 requires ffmpeg",
- "amazon_domain": "Invalid forwarding email address.",
- "file_not_found": "Image file not found",
- "invalid_email_format": "Invalid email address format."
- },
- "step": {
- "user": {
- "description": "Please enter the connection information of your mail server.",
- "data": {
- "host": "Host",
- "password": "Password",
- "port": "Port",
- "username": "Username",
- "verify_ssl": "Verify SSL Cert",
- "imap_security": "IMAP Security"
- },
- "title": "Mail and Packages (Step 1 of 2)"
- },
- "config_2": {
- "data": {
- "folder": "Mail Folder",
- "resources": "Sensors List",
- "scan_interval": "Scanning Interval (minutes, minimum 5)",
- "image_path": "Image Path",
- "gif_duration": "Image Duration (seconds)",
- "image_security": "Random Image Filename",
- "imap_timeout": "Time in seconds before connection timeout (seconds, minimum 10)",
- "generate_mp4": "Create mp4 from images",
- "allow_external": "Create image for notification apps",
- "custom_img": "Use custom 'no image' image?"
- },
- "description": "Finish the configuration by customizing the following based on your email structure and Home Assistant installation.\n\nFor details on the [Mail and Packages integration](https:\/\/github.com\/moralmunky\/Home-Assistant-Mail-And-Packages\/wiki\/Configuration-and-Email-Settings#configuration) options review the [configuration, templates, and automations section](https:\/\/github.com\/moralmunky\/Home-Assistant-Mail-And-Packages\/wiki\/Configuration-and-Email-Settings#configuration) on GitHub.\n\nIf using Amazon forwarded emails please separate each address with a comma.",
- "title": "Mail and Packages (Step 2 of 2)"
- },
- "config_3": {
- "data": {
- "custom_img_file": "Path to custom image: (ie: images\/my_custom_no_mail.jpg)"
- },
- "description": "Enter the path and file name to your custom no mail image below.\n\nExample: images\/custom_nomail.gif",
- "title": "Mail and Packages (Step 3 of 3)"
- },
- "config_amazon": {
- "data": {
- "amazon_domain": "Amazon domain",
- "amazon_fwds": "Amazon fowarded email addresses",
- "amazon_days": "Days back to check for Amazon emails"
- },
- "description": "Please enter the domain Amazon sends email's from (ie: amazon.com or amazon.de)\n\nIf using Amazon forwarded emails please seperate each address with a comma or enter (none) to clear this setting.",
- "title": "Amazon Settings"
- },
- "reconfigure": {
- "data": {
- "host": "Host",
- "password": "Password",
- "port": "Port",
- "username": "Username",
- "imap_security": "IMAP Security",
- "verify_ssl": "Verify SSL Cert"
- },
- "description": "Please enter the connection information of your mail server.",
- "title": "Mail and Packages (Step 1 of 2)"
- },
- "reconfig_2": {
- "data": {
- "folder": "Mail Folder",
- "scan_interval": "Scanning Interval (minutes, minimum 5)",
- "image_path": "Image Path",
- "gif_duration": "Image Duration (seconds)",
- "image_security": "Random Image Filename",
- "generate_mp4": "Create mp4 from images",
- "resources": "Sensors List",
- "imap_timeout": "Time in seconds before connection timeout (seconds, minimum 10)",
- "allow_external": "Create image for notification apps",
- "custom_img": "Use custom 'no image' image?"
- },
- "description": "Finish the configuration by customizing the following based on your email structure and Home Assistant installation.\n\nFor details on the [Mail and Packages integration](https:\/\/github.com\/moralmunky\/Home-Assistant-Mail-And-Packages\/wiki\/Configuration-and-Email-Settings#configuration) options review the [configuration, templates, and automations section](https:\/\/github.com\/moralmunky\/Home-Assistant-Mail-And-Packages\/wiki\/Configuration-and-Email-Settings#configuration) on GitHub.\n\nIf using Amazon forwarded emails please separate each address with a comma or enter (none) to clear this setting.",
- "title": "Mail and Packages (Step 2 of 2)"
- },
- "reconfig_3": {
- "data": {
- "custom_img_file": "Path to custom image: (i.e.: images\/my_custom_no_mail.jpg)"
- },
- "description": "Enter the path and file name to your custom no mail image below.\n\nExample: images\/custom_nomail.gif",
- "title": "Mail and Packages (Step 3 of 3)"
- },
- "reconfig_amazon": {
- "data": {
- "amazon_domain": "Amazon domain",
- "amazon_fwds": "Amazon fowarded email addresses",
- "amazon_days": "Days back to check for Amazon emails"
- },
- "description": "Please enter the domain Amazon sends email's from (ie: amazon.com or amazon.de)\n\nIf using Amazon forwarded emails please seperate each address with a comma or enter (none) to clear this setting.",
- "title": "Amazon Settings"
- }
- }
- }
+ "config": {
+ "abort": {
+ "single_instance_allowed": "Only a single configuration of Mail and Packages is allowed.",
+ "reconfigure_successful": "Reconfigure Successful"
+ },
+ "error": {
+ "communication": "Unable to connect or login to the mail server. Please check the log for details.",
+ "invalid_path": "Please store the images in another directory.",
+ "ffmpeg_not_found": "Generate MP4 requires ffmpeg",
+ "amazon_domain": "Invalid forwarding email address.",
+ "file_not_found": "Image file not found",
+ "invalid_email_format": "Invalid email address format.",
+ "path_not_found": "Directory not found"
+ },
+ "step": {
+ "user": {
+ "description": "Please enter the connection information of your mail server.",
+ "data": {
+ "host": "Host",
+ "password": "Password",
+ "port": "Port",
+ "username": "Username",
+ "verify_ssl": "Verify SSL Cert",
+ "imap_security": "IMAP Security"
+ },
+ "title": "Mail and Packages (Step 1 of 2)"
+ },
+ "config_2": {
+ "data": {
+ "folder": "Mail Folder",
+ "resources": "Sensors List",
+ "scan_interval": "Scanning Interval (minutes, minimum 5)",
+ "image_path": "Image Path",
+ "gif_duration": "Image Duration (seconds)",
+ "image_security": "Random Image Filename",
+ "imap_timeout": "Time in seconds before connection timeout (seconds, minimum 10)",
+ "generate_mp4": "Create mp4 from images",
+ "allow_external": "Create image for notification apps",
+ "custom_img": "Use custom 'no image' image?"
+ },
+ "description": "Finish the configuration by customizing the following based on your email structure and Home Assistant installation.\n\nFor details on the [Mail and Packages integration](https:\/\/github.com\/moralmunky\/Home-Assistant-Mail-And-Packages\/wiki\/Configuration-and-Email-Settings#configuration) options review the [configuration, templates, and automations section](https:\/\/github.com\/moralmunky\/Home-Assistant-Mail-And-Packages\/wiki\/Configuration-and-Email-Settings#configuration) on GitHub.\n\nIf using Amazon forwarded emails please separate each address with a comma.",
+ "title": "Mail and Packages (Step 2 of 2)"
+ },
+ "config_3": {
+ "data": {
+ "custom_img_file": "Path to custom image: (ie: images\/my_custom_no_mail.jpg)"
+ },
+ "description": "Enter the path and file name to your custom no mail image below.\n\nExample: images\/custom_nomail.gif",
+ "title": "Mail and Packages (Step 3 of 3)"
+ },
+ "config_amazon": {
+ "data": {
+ "amazon_domain": "Amazon domain",
+ "amazon_fwds": "Amazon fowarded email addresses",
+ "amazon_days": "Days back to check for Amazon emails"
+ },
+ "description": "Please enter the domain Amazon sends email's from (ie: amazon.com or amazon.de)\n\nIf using Amazon forwarded emails please seperate each address with a comma or enter (none) to clear this setting.",
+ "title": "Amazon Settings"
+ },
+ "reconfigure": {
+ "data": {
+ "host": "Host",
+ "password": "Password",
+ "port": "Port",
+ "username": "Username",
+ "imap_security": "IMAP Security",
+ "verify_ssl": "Verify SSL Cert"
+ },
+ "description": "Please enter the connection information of your mail server.",
+ "title": "Mail and Packages (Step 1 of 2)"
+ },
+ "reconfig_2": {
+ "data": {
+ "folder": "Mail Folder",
+ "scan_interval": "Scanning Interval (minutes, minimum 5)",
+ "image_path": "Image Path",
+ "gif_duration": "Image Duration (seconds)",
+ "image_security": "Random Image Filename",
+ "generate_mp4": "Create mp4 from images",
+ "resources": "Sensors List",
+ "imap_timeout": "Time in seconds before connection timeout (seconds, minimum 10)",
+ "allow_external": "Create image for notification apps",
+ "custom_img": "Use custom 'no image' image?"
+ },
+ "description": "Finish the configuration by customizing the following based on your email structure and Home Assistant installation.\n\nFor details on the [Mail and Packages integration](https:\/\/github.com\/moralmunky\/Home-Assistant-Mail-And-Packages\/wiki\/Configuration-and-Email-Settings#configuration) options review the [configuration, templates, and automations section](https:\/\/github.com\/moralmunky\/Home-Assistant-Mail-And-Packages\/wiki\/Configuration-and-Email-Settings#configuration) on GitHub.\n\nIf using Amazon forwarded emails please separate each address with a comma or enter (none) to clear this setting.",
+ "title": "Mail and Packages (Step 2 of 2)"
+ },
+ "reconfig_3": {
+ "data": {
+ "custom_img_file": "Path to custom image: (i.e.: images\/my_custom_no_mail.jpg)"
+ },
+ "description": "Enter the path and file name to your custom no mail image below.\n\nExample: images\/custom_nomail.gif",
+ "title": "Mail and Packages (Step 3 of 3)"
+ },
+ "reconfig_amazon": {
+ "data": {
+ "amazon_domain": "Amazon domain",
+ "amazon_fwds": "Amazon fowarded email addresses",
+ "amazon_days": "Days back to check for Amazon emails"
+ },
+ "description": "Please enter the domain Amazon sends email's from (ie: amazon.com or amazon.de)\n\nIf using Amazon forwarded emails please seperate each address with a comma or enter (none) to clear this setting.",
+ "title": "Amazon Settings"
+ },
+ "config_storage": {
+ "data": {
+ "storage": "Directory to store images"
+ },
+ "description": "Please enter the directory you'd like your images to be stored in.\nThe default is auto populated.",
+ "title": "Image storage location"
+ },
+ "reconfig_storage": {
+ "data": {
+ "storage": "Directory to store images"
+ },
+ "description": "Please enter the directory you'd like your images to be stored in.\nThe default is auto populated.",
+ "title": "Image storage location"
+ }
+ }
+ }
}
\ No newline at end of file
diff --git a/custom_components/mail_and_packages/translations/ca.json b/custom_components/mail_and_packages/translations/ca.json
index 94a37ae9..b845d5a9 100644
--- a/custom_components/mail_and_packages/translations/ca.json
+++ b/custom_components/mail_and_packages/translations/ca.json
@@ -10,7 +10,8 @@
"ffmpeg_not_found": "Generar MP4 requereix ffmpeg",
"amazon_domain": "Adreça de correu electrònic de reenviament no vàlida.",
"file_not_found": "No s'ha trobat el fitxer d'imatge",
- "invalid_email_format": "Format d'adreça de correu electrònic no vàlid."
+ "invalid_email_format": "Format d'adreça de correu electrònic no vàlid.",
+ "path_not_found": "Directori no trobat"
},
"step": {
"user": {
@@ -100,6 +101,20 @@
},
"description": "Introduïu el domini des d'on Amazon envia correus electrònics (és a dir: amazon.com o amazon.de)\n\nSi utilitzeu correus electrònics reenviats d'Amazon, separeu cada adreça amb una coma o introduïu (cap) per esborrar aquesta configuració.",
"title": "Configuració d'Amazon"
+ },
+ "config_storage": {
+ "data": {
+ "storage": "Directori per emmagatzemar imatges"
+ },
+ "description": "Introduïu el directori on voleu que es desin les vostres imatges.\nPer defecte, es completa automàticament.",
+ "title": "Ubicació de l'emmagatzematge d'imatges"
+ },
+ "reconfig_storage": {
+ "data": {
+ "storage": "Directori per emmagatzemar imatges"
+ },
+ "description": "Introduïu el directori on voleu que es desin les vostres imatges.\nPer defecte, es completa automàticament.",
+ "title": "Ubicació de l'emmagatzematge d'imatges"
}
}
}
diff --git a/custom_components/mail_and_packages/translations/de.json b/custom_components/mail_and_packages/translations/de.json
index 798e05be..a7dfb689 100644
--- a/custom_components/mail_and_packages/translations/de.json
+++ b/custom_components/mail_and_packages/translations/de.json
@@ -10,7 +10,8 @@
"ffmpeg_not_found": "MP4 erstellen erfordert ffmpeg",
"amazon_domain": "Ungültige Weiterleitungs-E-Mail-Adresse.",
"file_not_found": "Bilddatei nicht gefunden",
- "invalid_email_format": "Ungültiges E-Mail-Adressformat."
+ "invalid_email_format": "Ungültiges E-Mail-Adressformat.",
+ "path_not_found": "Verzeichnis nicht gefunden"
},
"step": {
"user": {
@@ -100,6 +101,20 @@
},
"description": "Bitte geben Sie die Domain ein, von der Amazon E-Mails sendet (z.B.: amazon.com oder amazon.de)\n\nWenn Sie weitergeleitete E-Mails von Amazon verwenden, trennen Sie bitte jede Adresse mit einem Komma oder geben Sie (keine) ein, um diese Einstellung zu löschen.",
"title": "Amazon Einstellungen"
+ },
+ "config_storage": {
+ "data": {
+ "storage": "Verzeichnis zum Speichern von Bildern"
+ },
+ "description": "Bitte geben Sie das Verzeichnis ein, in dem Ihre Bilder gespeichert werden sollen.\nStandardmäßig ist es automatisch ausgefüllt.",
+ "title": "Speicherort für Bilder"
+ },
+ "reconfig_storage": {
+ "data": {
+ "storage": "Verzeichnis zum Speichern von Bildern"
+ },
+ "description": "Bitte geben Sie das Verzeichnis ein, in dem Ihre Bilder gespeichert werden sollen.\nStandardmäßig ist es automatisch ausgefüllt.",
+ "title": "Speicherort für Bilder"
}
}
}
diff --git a/custom_components/mail_and_packages/translations/en.json b/custom_components/mail_and_packages/translations/en.json
index c9ac6841..fcf3015b 100644
--- a/custom_components/mail_and_packages/translations/en.json
+++ b/custom_components/mail_and_packages/translations/en.json
@@ -10,7 +10,8 @@
"ffmpeg_not_found": "Generate MP4 requires ffmpeg",
"amazon_domain": "Invalid forwarding email address.",
"file_not_found": "Image file not found",
- "invalid_email_format": "Invalid email address format."
+ "invalid_email_format": "Invalid email address format.",
+ "path_not_found": "Directory not found"
},
"step": {
"user": {
@@ -100,6 +101,20 @@
},
"description": "Please enter the domain Amazon sends email's from (ie: amazon.com or amazon.de)\n\nIf using Amazon forwarded emails please seperate each address with a comma or enter (none) to clear this setting.",
"title": "Amazon Settings"
+ },
+ "config_storage": {
+ "data": {
+ "storage": "Directory to store images"
+ },
+ "description": "Please enter the directory you'd like your images to be stored in.\nThe default is auto populated.",
+ "title": "Image storage location"
+ },
+ "reconfig_storage": {
+ "data": {
+ "storage": "Directory to store images"
+ },
+ "description": "Please enter the directory you'd like your images to be stored in.\nThe default is auto populated.",
+ "title": "Image storage location"
}
}
}
diff --git a/custom_components/mail_and_packages/translations/es.json b/custom_components/mail_and_packages/translations/es.json
index 80f60852..1bb6a75a 100644
--- a/custom_components/mail_and_packages/translations/es.json
+++ b/custom_components/mail_and_packages/translations/es.json
@@ -10,7 +10,8 @@
"ffmpeg_not_found": "Generar MP4 requiere ffmpeg",
"amazon_domain": "Dirección de correo electrónico de reenvío no válida.",
"file_not_found": "Archivo de imagen no encontrado",
- "invalid_email_format": "Formato de dirección de correo electrónico no válido."
+ "invalid_email_format": "Formato de dirección de correo electrónico no válido.",
+ "path_not_found": "Directorio no encontrado"
},
"step": {
"user": {
@@ -100,6 +101,20 @@
},
"description": "Por favor, introduzca el dominio desde el cual Amazon envía correos electrónicos (es decir: amazon.com o amazon.de)\n\nSi utiliza correos electrónicos reenviados por Amazon, separe cada dirección con una coma o introduzca (ninguno) para borrar esta configuración.",
"title": "Configuración de Amazon"
+ },
+ "config_storage": {
+ "data": {
+ "storage": "Directorio para almacenar imágenes"
+ },
+ "description": "Por favor, introduzca el directorio en el que le gustaría almacenar sus imágenes. \nEl valor predeterminado se rellena automáticamente.",
+ "title": "Ubicación de almacenamiento de imágenes"
+ },
+ "reconfig_storage": {
+ "data": {
+ "storage": "Directorio para almacenar imágenes"
+ },
+ "description": "Por favor, introduzca el directorio en el que le gustaría almacenar sus imágenes. \nEl valor predeterminado se rellena automáticamente.",
+ "title": "Ubicación de almacenamiento de imágenes"
}
}
}
diff --git a/custom_components/mail_and_packages/translations/es_419.json b/custom_components/mail_and_packages/translations/es_419.json
index 4df5451b..4a85988d 100644
--- a/custom_components/mail_and_packages/translations/es_419.json
+++ b/custom_components/mail_and_packages/translations/es_419.json
@@ -10,7 +10,8 @@
"ffmpeg_not_found": "Generar MP4 requiere ffmpeg",
"amazon_domain": "Dirección de correo electrónico de reenvío no válida.",
"file_not_found": "Archivo de imagen no encontrado",
- "invalid_email_format": "Formato de dirección de correo electrónico inválido."
+ "invalid_email_format": "Formato de dirección de correo electrónico inválido.",
+ "path_not_found": "Directorio no encontrado"
},
"step": {
"user": {
@@ -100,6 +101,20 @@
},
"description": "Por favor, ingrese el dominio desde el cual Amazon envía correos electrónicos (es decir: amazon.com o amazon.de)\n\nSi utiliza correos electrónicos reenviados por Amazon, separe cada dirección con una coma o ingrese (ninguno) para borrar esta configuración.",
"title": "Configuración de Amazon"
+ },
+ "config_storage": {
+ "data": {
+ "storage": "Directorio para almacenar imágenes"
+ },
+ "description": "Por favor, ingrese el directorio en el que le gustaría almacenar sus imágenes.\nEl predeterminado se llena automáticamente.",
+ "title": "Ubicación de almacenamiento de imágenes"
+ },
+ "reconfig_storage": {
+ "data": {
+ "storage": "Directorio para almacenar imágenes"
+ },
+ "description": "Por favor, ingrese el directorio en el que le gustaría almacenar sus imágenes.\nEl predeterminado se llena automáticamente.",
+ "title": "Ubicación de almacenamiento de imágenes"
}
}
}
diff --git a/custom_components/mail_and_packages/translations/fi.json b/custom_components/mail_and_packages/translations/fi.json
index a0e7fb60..42117186 100644
--- a/custom_components/mail_and_packages/translations/fi.json
+++ b/custom_components/mail_and_packages/translations/fi.json
@@ -10,7 +10,8 @@
"ffmpeg_not_found": "MP4:n luominen vaatii ffmpeg:n",
"amazon_domain": "Virheellinen edelleenlähetettävä sähköpostiosoite.",
"file_not_found": "Kuvatiedostoa ei löydy",
- "invalid_email_format": "Virheellinen sähköpostiosoitteen muoto."
+ "invalid_email_format": "Virheellinen sähköpostiosoitteen muoto.",
+ "path_not_found": "Hakemistoa ei löydy"
},
"step": {
"user": {
@@ -100,6 +101,20 @@
},
"description": "Anna domaini, josta Amazon lähettää sähköposteja (esim: amazon.com tai amazon.de)\n\nJos käytät Amazonin välittämiä sähköposteja, erottele jokainen osoite pilkulla tai kirjoita (none) tyhjentääksesi tämän asetuksen.",
"title": "Amazonin asetukset"
+ },
+ "config_storage": {
+ "data": {
+ "storage": "Hakemisto kuvien tallentamiseen"
+ },
+ "description": "Anna hakemisto, johon haluat kuviesi tallentuvan.\nOletusarvo täytetään automaattisesti.",
+ "title": "Kuvien tallennuspaikka"
+ },
+ "reconfig_storage": {
+ "data": {
+ "storage": "Hakemisto kuvien tallentamiseen"
+ },
+ "description": "Anna hakemisto, johon haluat kuviesi tallentuvan.\nOletusarvo täytetään automaattisesti.",
+ "title": "Kuvien tallennuspaikka"
}
}
}
diff --git a/custom_components/mail_and_packages/translations/fr.json b/custom_components/mail_and_packages/translations/fr.json
index 6e8cc572..4244a473 100644
--- a/custom_components/mail_and_packages/translations/fr.json
+++ b/custom_components/mail_and_packages/translations/fr.json
@@ -10,7 +10,8 @@
"ffmpeg_not_found": "Générer MP4 nécessite ffmpeg",
"amazon_domain": "Adresse e-mail de transfert invalide.",
"file_not_found": "Fichier image non trouvé",
- "invalid_email_format": "Format d'adresse e-mail invalide."
+ "invalid_email_format": "Format d'adresse e-mail invalide.",
+ "path_not_found": "Répertoire non trouvé"
},
"step": {
"user": {
@@ -100,6 +101,20 @@
},
"description": "Veuillez entrer le domaine à partir duquel Amazon envoie des emails (par exemple : amazon.com ou amazon.de)\n\nSi vous utilisez des emails transférés par Amazon, veuillez séparer chaque adresse par une virgule ou entrer (aucun) pour effacer ce paramètre.",
"title": "Paramètres Amazon"
+ },
+ "config_storage": {
+ "data": {
+ "storage": "Répertoire pour stocker les images"
+ },
+ "description": "Veuillez entrer le répertoire dans lequel vous souhaitez que vos images soient stockées.\nLa valeur par défaut est automatiquement remplie.",
+ "title": "Emplacement de stockage des images"
+ },
+ "reconfig_storage": {
+ "data": {
+ "storage": "Répertoire pour stocker les images"
+ },
+ "description": "Veuillez entrer le répertoire dans lequel vous souhaitez que vos images soient stockées.\nLa valeur par défaut est automatiquement remplie.",
+ "title": "Emplacement de stockage des images"
}
}
}
diff --git a/custom_components/mail_and_packages/translations/hu.json b/custom_components/mail_and_packages/translations/hu.json
index 032a64c2..035c0fb1 100644
--- a/custom_components/mail_and_packages/translations/hu.json
+++ b/custom_components/mail_and_packages/translations/hu.json
@@ -10,7 +10,8 @@
"ffmpeg_not_found": "Az MP4 generálása ffmpeg-et igényel",
"amazon_domain": "Érvénytelen továbbítási e-mail cím.",
"file_not_found": "Képfájl nem található",
- "invalid_email_format": "Érvénytelen e-mail cím formátum."
+ "invalid_email_format": "Érvénytelen e-mail cím formátum.",
+ "path_not_found": "Könyvtár nem található"
},
"step": {
"user": {
@@ -100,6 +101,20 @@
},
"description": "Kérjük, adja meg azt a domain-t, ahonnan az Amazon e-maileket küld (pl.: amazon.com vagy amazon.de)\n\nHa az Amazon továbbított e-maileket használ, kérjük, válassza el minden címet vesszővel, vagy írja be, hogy (nincs), hogy törölje ezt a beállítást.",
"title": "Amazon beállítások"
+ },
+ "config_storage": {
+ "data": {
+ "storage": "Képek tárolására szolgáló könyvtár"
+ },
+ "description": "Kérjük, adja meg azt a könyvtárat, ahová a képeit szeretné tárolni.\nAz alapértelmezett automatikusan kitöltődik.",
+ "title": "Képtárolási hely"
+ },
+ "reconfig_storage": {
+ "data": {
+ "storage": "Képek tárolására szolgáló könyvtár"
+ },
+ "description": "Kérjük, adja meg azt a könyvtárat, ahová a képeit szeretné tárolni.\nAz alapértelmezett automatikusan kitöltődik.",
+ "title": "Képtárolási hely"
}
}
}
diff --git a/custom_components/mail_and_packages/translations/it.json b/custom_components/mail_and_packages/translations/it.json
index 5b103d38..ea087d44 100644
--- a/custom_components/mail_and_packages/translations/it.json
+++ b/custom_components/mail_and_packages/translations/it.json
@@ -10,7 +10,8 @@
"ffmpeg_not_found": "Generare MP4 richiede ffmpeg",
"amazon_domain": "Indirizzo email di inoltro non valido.",
"file_not_found": "File immagine non trovato",
- "invalid_email_format": "Formato dell'indirizzo email non valido."
+ "invalid_email_format": "Formato dell'indirizzo email non valido.",
+ "path_not_found": "Directory non trovato"
},
"step": {
"user": {
@@ -100,6 +101,20 @@
},
"description": "Inserisci il dominio da cui Amazon invia le email (ad esempio: amazon.com o amazon.de)\n\nSe stai utilizzando email inoltrate da Amazon, separa ogni indirizzo con una virgola o inserisci (nessuno) per cancellare questa impostazione.",
"title": "Impostazioni Amazon"
+ },
+ "config_storage": {
+ "data": {
+ "storage": "Cartella per memorizzare le immagini"
+ },
+ "description": "Inserisci la directory in cui desideri che le tue immagini vengano memorizzate.\nIl valore predefinito viene popolato automaticamente.",
+ "title": "Posizione di archiviazione delle immagini"
+ },
+ "reconfig_storage": {
+ "data": {
+ "storage": "Cartella per memorizzare le immagini"
+ },
+ "description": "Inserisci la directory in cui desideri che le tue immagini vengano memorizzate.\nIl valore predefinito viene popolato automaticamente.",
+ "title": "Posizione di archiviazione delle immagini"
}
}
}
diff --git a/custom_components/mail_and_packages/translations/ko.json b/custom_components/mail_and_packages/translations/ko.json
index 670054a0..525c07fb 100644
--- a/custom_components/mail_and_packages/translations/ko.json
+++ b/custom_components/mail_and_packages/translations/ko.json
@@ -10,7 +10,8 @@
"ffmpeg_not_found": "MP4 생성은 ffmpeg가 필요합니다",
"amazon_domain": "잘못된 전달 이메일 주소입니다.",
"file_not_found": "이미지 파일을 찾을 수 없습니다",
- "invalid_email_format": "잘못된 이메일 주소 형식입니다."
+ "invalid_email_format": "잘못된 이메일 주소 형식입니다.",
+ "path_not_found": "디렉토리를 찾을 수 없습니다"
},
"step": {
"user": {
@@ -100,6 +101,20 @@
},
"description": "Amazon이 이메일을 보내는 도메인을 입력해 주세요 (예: amazon.com 또는 amazon.de)\n\nAmazon에서 전달된 이메일을 사용하는 경우 각 주소를 쉼표로 구분하거나 이 설정을 지우려면 (none)을 입력하세요.",
"title": "아마존 설정"
+ },
+ "config_storage": {
+ "data": {
+ "storage": "이미지를 저장할 디렉토리"
+ },
+ "description": "이미지를 저장할 디렉토리를 입력해 주세요.\n기본값은 자동으로 채워집니다.",
+ "title": "이미지 저장 위치"
+ },
+ "reconfig_storage": {
+ "data": {
+ "storage": "이미지를 저장할 디렉토리"
+ },
+ "description": "이미지를 저장할 디렉토리를 입력해 주세요.\n기본값은 자동으로 채워집니다.",
+ "title": "이미지 저장 위치"
}
}
}
diff --git a/custom_components/mail_and_packages/translations/nl.json b/custom_components/mail_and_packages/translations/nl.json
index ae81d214..50c4f0ff 100644
--- a/custom_components/mail_and_packages/translations/nl.json
+++ b/custom_components/mail_and_packages/translations/nl.json
@@ -10,7 +10,8 @@
"ffmpeg_not_found": "MP4 genereren vereist ffmpeg",
"amazon_domain": "Ongeldig doorstuur e-mailadres.",
"file_not_found": "Afbeeldingsbestand niet gevonden",
- "invalid_email_format": "Ongeldig e-mailadres formaat."
+ "invalid_email_format": "Ongeldig e-mailadres formaat.",
+ "path_not_found": "Map niet gevonden"
},
"step": {
"user": {
@@ -100,6 +101,20 @@
},
"description": "Voer het domein in waarvan Amazon e-mails verstuurt (bijv: amazon.com of amazon.de)\n\nAls u doorgestuurde e-mails van Amazon gebruikt, scheid dan elk adres met een komma of voer (geen) in om deze instelling te wissen.",
"title": "Amazon Instellingen"
+ },
+ "config_storage": {
+ "data": {
+ "storage": "Map om afbeeldingen op te slaan"
+ },
+ "description": "Voer de map in waar u uw afbeeldingen wilt opslaan.\nDe standaard is automatisch ingevuld.",
+ "title": "Locatie voor afbeeldingsopslag"
+ },
+ "reconfig_storage": {
+ "data": {
+ "storage": "Map om afbeeldingen op te slaan"
+ },
+ "description": "Voer de map in waar u uw afbeeldingen wilt opslaan.\nDe standaard is automatisch ingevuld.",
+ "title": "Locatie voor afbeeldingsopslag"
}
}
}
diff --git a/custom_components/mail_and_packages/translations/no.json b/custom_components/mail_and_packages/translations/no.json
index 29eecb78..8f1958a1 100644
--- a/custom_components/mail_and_packages/translations/no.json
+++ b/custom_components/mail_and_packages/translations/no.json
@@ -10,7 +10,8 @@
"ffmpeg_not_found": "Generer MP4 krever ffmpeg",
"amazon_domain": "Ugyldig videresendings e-postadresse.",
"file_not_found": "Bildefil ikke funnet",
- "invalid_email_format": "Ugyldig e-postadresseformat."
+ "invalid_email_format": "Ugyldig e-postadresseformat.",
+ "path_not_found": "Mappen ble ikke funnet"
},
"step": {
"user": {
@@ -100,6 +101,20 @@
},
"description": "Vennligst skriv inn domenet amazon sender e-poster fra (f.eks: amazon.com eller amazon.de)\n\nHvis du bruker Amazon videresendte e-poster, vennligst skill hver adresse med et komma, eller skriv inn (ingen) for å tømme denne innstillingen.",
"title": "Amazon-innstillinger"
+ },
+ "config_storage": {
+ "data": {
+ "storage": "Katalog for å lagre bilder"
+ },
+ "description": "Vennligst oppgi mappen du vil at bildene dine skal lagres i.\nStandard er automatisk fylt ut.",
+ "title": "Bildelagringssted"
+ },
+ "reconfig_storage": {
+ "data": {
+ "storage": "Katalog for å lagre bilder"
+ },
+ "description": "Vennligst oppgi mappen du vil at bildene dine skal lagres i.\nStandard er automatisk fylt ut.",
+ "title": "Bildelagringssted"
}
}
}
diff --git a/custom_components/mail_and_packages/translations/pl.json b/custom_components/mail_and_packages/translations/pl.json
index 4ea63d21..69b0c345 100644
--- a/custom_components/mail_and_packages/translations/pl.json
+++ b/custom_components/mail_and_packages/translations/pl.json
@@ -10,7 +10,8 @@
"ffmpeg_not_found": "Generowanie MP4 wymaga ffmpeg",
"amazon_domain": "Nieprawidłowy adres e-mail do przekierowania.",
"file_not_found": "Nie znaleziono pliku obrazu",
- "invalid_email_format": "Nieprawidłowy format adresu e-mail."
+ "invalid_email_format": "Nieprawidłowy format adresu e-mail.",
+ "path_not_found": "Katalog nie został znaleziony"
},
"step": {
"user": {
@@ -100,6 +101,20 @@
},
"description": "Wprowadź domenę, z której Amazon wysyła e-maile (np. amazon.com lub amazon.de)\n\nJeśli korzystasz z przekierowanych e-maili od Amazon, oddziel każdy adres przecinkiem lub wpisz (brak), aby wyczyścić to ustawienie.",
"title": "Ustawienia Amazon"
+ },
+ "config_storage": {
+ "data": {
+ "storage": "Katalog do przechowywania obrazów"
+ },
+ "description": "Wprowadź katalog, w którym chciałbyś przechowywać swoje obrazy.\nDomyślnie jest on automatycznie wypełniany.",
+ "title": "Lokalizacja przechowywania obrazów"
+ },
+ "reconfig_storage": {
+ "data": {
+ "storage": "Katalog do przechowywania obrazów"
+ },
+ "description": "Wprowadź katalog, w którym chciałbyś przechowywać swoje obrazy.\nDomyślnie jest on automatycznie wypełniany.",
+ "title": "Lokalizacja przechowywania obrazów"
}
}
}
diff --git a/custom_components/mail_and_packages/translations/pt.json b/custom_components/mail_and_packages/translations/pt.json
index fb1236e5..8b9ddc70 100644
--- a/custom_components/mail_and_packages/translations/pt.json
+++ b/custom_components/mail_and_packages/translations/pt.json
@@ -10,7 +10,8 @@
"ffmpeg_not_found": "Gerar MP4 requer ffmpeg",
"amazon_domain": "Endereço de encaminhamento de email inválido.",
"file_not_found": "Arquivo de imagem não encontrado",
- "invalid_email_format": "Formato de endereço de email inválido."
+ "invalid_email_format": "Formato de endereço de email inválido.",
+ "path_not_found": "Diretório não encontrado"
},
"step": {
"user": {
@@ -100,6 +101,20 @@
},
"description": "Por favor, insira o domínio de onde a Amazon envia e-mails (por exemplo: amazon.com ou amazon.de)\n\nSe estiver usando e-mails encaminhados pela Amazon, separe cada endereço com uma vírgula ou insira (nenhum) para limpar essa configuração.",
"title": "Configurações da Amazon"
+ },
+ "config_storage": {
+ "data": {
+ "storage": "Diretório para armazenar imagens"
+ },
+ "description": "Por favor, insira o diretório em que você gostaria que suas imagens fossem armazenadas.\nO padrão é preenchido automaticamente.",
+ "title": "Local de armazenamento de imagens"
+ },
+ "reconfig_storage": {
+ "data": {
+ "storage": "Diretório para armazenar imagens"
+ },
+ "description": "Por favor, insira o diretório em que você gostaria que suas imagens fossem armazenadas.\nO padrão é preenchido automaticamente.",
+ "title": "Local de armazenamento de imagens"
}
}
}
diff --git a/custom_components/mail_and_packages/translations/pt_BR.json b/custom_components/mail_and_packages/translations/pt_BR.json
index d2dd25b9..3255aab2 100644
--- a/custom_components/mail_and_packages/translations/pt_BR.json
+++ b/custom_components/mail_and_packages/translations/pt_BR.json
@@ -10,7 +10,8 @@
"ffmpeg_not_found": "Gerar MP4 requer ffmpeg",
"amazon_domain": "Endereço de encaminhamento de email inválido.",
"file_not_found": "Arquivo de imagem não encontrado",
- "invalid_email_format": "Formato de endereço de email inválido."
+ "invalid_email_format": "Formato de endereço de email inválido.",
+ "path_not_found": "Diretório não encontrado"
},
"step": {
"user": {
@@ -100,6 +101,20 @@
},
"description": "Por favor, insira o domínio do qual a Amazon envia e-mails (por exemplo: amazon.com ou amazon.de)\n\nSe estiver usando e-mails encaminhados pela Amazon, separe cada endereço com uma vírgula ou insira (nenhum) para limpar essa configuração.",
"title": "Configurações da Amazon"
+ },
+ "config_storage": {
+ "data": {
+ "storage": "Diretório para armazenar imagens"
+ },
+ "description": "Por favor, insira o diretório em que você gostaria que suas imagens fossem armazenadas.\nO padrão é preenchido automaticamente.",
+ "title": "Local de armazenamento de imagens"
+ },
+ "reconfig_storage": {
+ "data": {
+ "storage": "Diretório para armazenar imagens"
+ },
+ "description": "Por favor, insira o diretório em que você gostaria que suas imagens fossem armazenadas.\nO padrão é preenchido automaticamente.",
+ "title": "Local de armazenamento de imagens"
}
}
}
diff --git a/custom_components/mail_and_packages/translations/ru.json b/custom_components/mail_and_packages/translations/ru.json
index 92f33c90..53a8ddd3 100644
--- a/custom_components/mail_and_packages/translations/ru.json
+++ b/custom_components/mail_and_packages/translations/ru.json
@@ -10,7 +10,8 @@
"ffmpeg_not_found": "Для создания MP4 требуется ffmpeg",
"amazon_domain": "Недействительный адрес электронной почты для переадресации.",
"file_not_found": "Файл изображения не найден",
- "invalid_email_format": "Неверный формат адреса электронной почты."
+ "invalid_email_format": "Неверный формат адреса электронной почты.",
+ "path_not_found": "Директория не найдена"
},
"step": {
"user": {
@@ -100,6 +101,20 @@
},
"description": "Пожалуйста, введите домен, с которого Amazon отправляет электронные письма (например: amazon.com или amazon.de)\n\nЕсли вы используете переадресованные электронные письма от Amazon, разделите каждый адрес запятой или введите (none), чтобы очистить эту настройку.",
"title": "Настройки Amazon"
+ },
+ "config_storage": {
+ "data": {
+ "storage": "Каталог для хранения изображений"
+ },
+ "description": "Пожалуйста, введите директорию, в которой вы хотите хранить свои изображения. \nПо умолчанию она заполняется автоматически.",
+ "title": "Место хранения изображения"
+ },
+ "reconfig_storage": {
+ "data": {
+ "storage": "Каталог для хранения изображений"
+ },
+ "description": "Пожалуйста, введите директорию, в которой вы хотите хранить свои изображения. \nПо умолчанию она заполняется автоматически.",
+ "title": "Место хранения изображения"
}
}
}
diff --git a/custom_components/mail_and_packages/translations/sk.json b/custom_components/mail_and_packages/translations/sk.json
index 48e492f9..6f768ca9 100644
--- a/custom_components/mail_and_packages/translations/sk.json
+++ b/custom_components/mail_and_packages/translations/sk.json
@@ -10,7 +10,8 @@
"ffmpeg_not_found": "Vytvorenie MP4 vyžaduje ffmpeg",
"amazon_domain": "Neplatná adresa pre presmerovanie e-mailov.",
"file_not_found": "Obrázokový súbor nebol nájdený",
- "invalid_email_format": "Neplatný formát e-mailovej adresy."
+ "invalid_email_format": "Neplatný formát e-mailovej adresy.",
+ "path_not_found": "Adresár nebol nájdený"
},
"step": {
"user": {
@@ -100,6 +101,20 @@
},
"description": "Prosím, zadajte doménu, z ktorej Amazon posiela e-maily (napríklad: amazon.com alebo amazon.de)\n\nAk používate preposlané e-maily od Amazonu, oddelte každú adresu čiarkou alebo zadajte (žiadne) na vymazanie tohto nastavenia.",
"title": "Nastavenia Amazon"
+ },
+ "config_storage": {
+ "data": {
+ "storage": "Adresár na ukladanie obrázkov"
+ },
+ "description": "Prosím, zadajte adresár, v ktorom chcete ukladať svoje obrázky.\nPredvolená hodnota je automaticky vyplnená.",
+ "title": "Miesto ukladania obrázkov"
+ },
+ "reconfig_storage": {
+ "data": {
+ "storage": "Adresár na ukladanie obrázkov"
+ },
+ "description": "Prosím, zadajte adresár, v ktorom chcete ukladať svoje obrázky.\nPredvolená hodnota je automaticky vyplnená.",
+ "title": "Miesto ukladania obrázkov"
}
}
}
diff --git a/custom_components/mail_and_packages/translations/sl.json b/custom_components/mail_and_packages/translations/sl.json
index bd4ad790..37dfc9ef 100644
--- a/custom_components/mail_and_packages/translations/sl.json
+++ b/custom_components/mail_and_packages/translations/sl.json
@@ -10,7 +10,8 @@
"ffmpeg_not_found": "Ustvarjanje MP4 zahteva ffmpeg",
"amazon_domain": "Neveljaven naslov za preusmerjanje e-pošte.",
"file_not_found": "Slikovna datoteka ni najdena",
- "invalid_email_format": "Neveljaven format e-poštnega naslova."
+ "invalid_email_format": "Neveljaven format e-poštnega naslova.",
+ "path_not_found": "Mapa ni najdena"
},
"step": {
"user": {
@@ -100,6 +101,20 @@
},
"description": "Prosimo, vnesite domeno, s katere Amazon pošilja e-pošto (npr.: amazon.com ali amazon.de)\n\nČe uporabljate preusmerjena e-poštna sporočila Amazon, ločite vsak naslov z vejico ali vnesite (noben) za izbris te nastavitve.",
"title": "Nastavitve Amazon"
+ },
+ "config_storage": {
+ "data": {
+ "storage": "Mapa za shranjevanje slik"
+ },
+ "description": "Prosimo, vnesite imenik, v katerem želite shraniti svoje slike.\nPrivzeto je samodejno izpolnjeno.",
+ "title": "Lokacija shranjevanja slik"
+ },
+ "reconfig_storage": {
+ "data": {
+ "storage": "Mapa za shranjevanje slik"
+ },
+ "description": "Prosimo, vnesite imenik, v katerem želite shraniti svoje slike.\nPrivzeto je samodejno izpolnjeno.",
+ "title": "Lokacija shranjevanja slik"
}
}
}
diff --git a/custom_components/mail_and_packages/translations/sv.json b/custom_components/mail_and_packages/translations/sv.json
index 853a3258..7ae0537a 100644
--- a/custom_components/mail_and_packages/translations/sv.json
+++ b/custom_components/mail_and_packages/translations/sv.json
@@ -10,7 +10,8 @@
"ffmpeg_not_found": "Generera MP4 kräver ffmpeg",
"amazon_domain": "Ogiltig vidarebefordrings e-postadress.",
"file_not_found": "Bildfilen hittades inte",
- "invalid_email_format": "Ogiltigt format för e-postadress."
+ "invalid_email_format": "Ogiltigt format för e-postadress.",
+ "path_not_found": "Katalogen hittades inte"
},
"step": {
"user": {
@@ -100,6 +101,20 @@
},
"description": "Vänligen ange domänen som Amazon skickar e-postmeddelanden från (t.ex: amazon.com eller amazon.de)\n\nOm du använder Amazon vidarebefordrade e-postmeddelanden, vänligen separera varje adress med ett kommatecken eller ange (ingen) för att rensa denna inställning.",
"title": "Amazon-inställningar"
+ },
+ "config_storage": {
+ "data": {
+ "storage": "Katalog för att lagra bilder"
+ },
+ "description": "Vänligen ange den katalog du vill att dina bilder ska lagras i.\nStandardinställningen är automatiskt ifylld.",
+ "title": "Bildlagringsplats"
+ },
+ "reconfig_storage": {
+ "data": {
+ "storage": "Katalog för att lagra bilder"
+ },
+ "description": "Vänligen ange den katalog du vill att dina bilder ska lagras i.\nStandardinställningen är automatiskt ifylld.",
+ "title": "Bildlagringsplats"
}
}
}
diff --git a/custom_components/mail_and_packages/translations/zh_Hant_HK.json b/custom_components/mail_and_packages/translations/zh_Hant_HK.json
index 257142c7..c7edce08 100644
--- a/custom_components/mail_and_packages/translations/zh_Hant_HK.json
+++ b/custom_components/mail_and_packages/translations/zh_Hant_HK.json
@@ -10,7 +10,8 @@
"ffmpeg_not_found": "生成MP4需要ffmpeg",
"amazon_domain": "無效的轉發電郵地址。",
"file_not_found": "找不到圖像檔案",
- "invalid_email_format": "無效的電郵地址格式。"
+ "invalid_email_format": "無效的電郵地址格式。",
+ "path_not_found": "找不到目錄"
},
"step": {
"user": {
@@ -100,6 +101,20 @@
},
"description": "請輸入亞馬遜發送電子郵件的域名(例如:amazon.com或amazon.de)\n\n如果使用亞馬遜轉發的電子郵件,請用逗號分隔每個地址,或輸入(無)以清除此設定。",
"title": "Amazon 設定"
+ },
+ "config_storage": {
+ "data": {
+ "storage": "儲存圖片的目錄"
+ },
+ "description": "請輸入您希望存儲圖像的目錄。\n預設值會自動填充。",
+ "title": "圖像儲存位置"
+ },
+ "reconfig_storage": {
+ "data": {
+ "storage": "儲存圖片的目錄"
+ },
+ "description": "請輸入您希望存儲圖像的目錄。\n預設值會自動填充。",
+ "title": "圖像儲存位置"
}
}
}
diff --git a/custom_components/tesla_custom/base.py b/custom_components/tesla_custom/base.py
index cd03b921..db087a34 100644
--- a/custom_components/tesla_custom/base.py
+++ b/custom_components/tesla_custom/base.py
@@ -46,7 +46,9 @@ def __init__(
display_name = car.display_name
vehicle_name = (
display_name
- if display_name is not None and display_name != vin[-6:]
+ if display_name is not None
+ and display_name != vin[-6:]
+ and display_name != ""
else f"Tesla Model {str(vin[3]).upper()}"
)
self._attr_device_info = DeviceInfo(
diff --git a/custom_components/tesla_custom/const.py b/custom_components/tesla_custom/const.py
index 88b377fd..0f050317 100644
--- a/custom_components/tesla_custom/const.py
+++ b/custom_components/tesla_custom/const.py
@@ -1,6 +1,6 @@
"""Const file for Tesla cars."""
-VERSION = "3.24.1"
+VERSION = "3.24.2"
CONF_EXPIRATION = "expiration"
CONF_INCLUDE_VEHICLES = "include_vehicles"
CONF_INCLUDE_ENERGYSITES = "include_energysites"
diff --git a/custom_components/tesla_custom/manifest.json b/custom_components/tesla_custom/manifest.json
index 24e79e22..17687190 100644
--- a/custom_components/tesla_custom/manifest.json
+++ b/custom_components/tesla_custom/manifest.json
@@ -25,5 +25,5 @@
"issue_tracker": "https://github.com/alandtse/tesla/issues",
"loggers": ["teslajsonpy"],
"requirements": ["teslajsonpy==3.12.0"],
- "version": "3.24.1"
+ "version": "3.24.2"
}
diff --git a/custom_components/webrtc/__init__.py b/custom_components/webrtc/__init__.py
index 6d5f365d..5550ca9e 100644
--- a/custom_components/webrtc/__init__.py
+++ b/custom_components/webrtc/__init__.py
@@ -3,26 +3,22 @@
import time
import uuid
from pathlib import Path
-from typing import Union
from urllib.parse import urlencode, urljoin
-import homeassistant.helpers.config_validation as cv
import voluptuous as vol
from aiohttp import web
from aiohttp.web_exceptions import HTTPUnauthorized, HTTPGone, HTTPNotFound
-from homeassistant.components.camera import async_get_image
+from homeassistant.components.binary_sensor import HomeAssistant # fix tests
+from homeassistant.components.camera import async_get_stream_source, async_get_image
from homeassistant.components.hassio.ingress import _websocket_forward
from homeassistant.components.http import HomeAssistantView
from homeassistant.config_entries import ConfigEntry
-from homeassistant.const import (
- EVENT_HOMEASSISTANT_STOP,
- ATTR_ENTITY_ID,
- CONF_URL,
-)
+from homeassistant.const import ATTR_ENTITY_ID, CONF_URL, EVENT_HOMEASSISTANT_STOP
+from homeassistant.core import ServiceCall
+from homeassistant.helpers import config_validation as cv
from homeassistant.helpers.aiohttp_client import async_get_clientsession
from homeassistant.helpers.network import get_url
from homeassistant.helpers.template import Template
-from homeassistant.helpers.typing import HomeAssistantType, ConfigType, ServiceCallType
from . import utils
from .utils import DOMAIN, Server
@@ -60,18 +56,18 @@
HLS_SESSION = str(uuid.uuid4())
-async def async_setup(hass: HomeAssistantType, config: ConfigType):
+async def async_setup(hass: HomeAssistant, config: dict):
# 1. Serve lovelace card
path = Path(__file__).parent / "www"
for name in ("video-rtc.js", "webrtc-camera.js", "digital-ptz.js"):
- hass.http.register_static_path("/webrtc/" + name, str(path / name))
+ await utils.register_static_path(hass, "/webrtc/" + name, str(path / name))
# 2. Add card to resources
version = getattr(hass.data["integrations"][DOMAIN], "version", 0)
await utils.init_resource(hass, "/webrtc/webrtc-camera.js", str(version))
# 3. Serve html page
- hass.http.register_static_path("/webrtc/embed", str(path / "embed.html"))
+ await utils.register_static_path(hass, "/webrtc/embed", str(path / "embed.html"))
# 4. Serve WebSocket API
hass.http.register_view(WebSocketView)
@@ -81,7 +77,7 @@ async def async_setup(hass: HomeAssistantType, config: ConfigType):
# 6. Register webrtc.create_link and webrtc.dash_cast services:
- async def create_link(call: ServiceCallType):
+ async def create_link(call: ServiceCall):
link_id = call.data["link_id"]
ttl = call.data["time_to_live"]
LINKS[link_id] = {
@@ -91,7 +87,7 @@ async def create_link(call: ServiceCallType):
"ts": time.time() + ttl if ttl else 0,
}
- async def dash_cast(call: ServiceCallType):
+ async def dash_cast(call: ServiceCall):
link_id = uuid.uuid4().hex
LINKS[link_id] = {
"url": call.data.get("url"), # camera URL (rtsp...)
@@ -121,7 +117,7 @@ async def dash_cast(call: ServiceCallType):
return True
-async def async_setup_entry(hass: HomeAssistantType, entry: ConfigEntry):
+async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):
# 1. If user set custom url
go_url = entry.data.get(CONF_URL)
@@ -135,7 +131,7 @@ async def async_setup_entry(hass: HomeAssistantType, entry: ConfigEntry):
return True
# 3. Serve go2rtc binary manually
- binary = await utils.validate_binary(hass)
+ binary = await hass.async_add_executor_job(utils.validate_binary, hass)
if not binary:
return False
@@ -147,28 +143,33 @@ async def async_setup_entry(hass: HomeAssistantType, entry: ConfigEntry):
return True
-async def async_unload_entry(hass: HomeAssistantType, entry: ConfigEntry):
+async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry):
server = hass.data[DOMAIN]
if isinstance(server, Server):
server.stop()
return True
-async def ws_connect(hass: HomeAssistantType, params: dict) -> str:
+async def ws_connect(hass: HomeAssistant, params: dict) -> str:
# 1. Server URL from card param
server: str = params.get("server")
# 2. Server URL from integration settings
if not server:
- server: Union[str, Server] = hass.data[DOMAIN]
+ server: str | Server = hass.data[DOMAIN]
# 3. Server is manual binary
if isinstance(server, Server):
assert server.available, "WebRTC server not available"
server = "http://localhost:1984/"
- if name := params.get("entity"):
- src = await utils.get_stream_source(hass, name)
- assert src, f"Can't get URL for {name}"
- query = {"src": src, "name": name}
+ if entity_id := params.get("entity"):
+ src = await async_get_stream_source(hass, entity_id)
+ if src is None:
+ # build link to MJPEG stream
+ if state := hass.states.get(entity_id):
+ if token := state.attributes.get("access_token"):
+ src = f"{get_url(hass)}/api/camera_proxy_stream/{entity_id}?token={token}"
+ assert src, f"Can't get URL for {entity_id}"
+ query = {"src": src, "name": entity_id}
elif src := params.get("url"):
if "{{" in src or "{%" in src:
src = Template(src, hass).async_render()
@@ -179,7 +180,7 @@ async def ws_connect(hass: HomeAssistantType, params: dict) -> str:
return urljoin("ws" + server[4:], "api/ws") + "?" + urlencode(query)
-def _get_image_from_entity_id(hass: HomeAssistantType, entity_id: str):
+def _get_image_from_entity_id(hass: HomeAssistant, entity_id: str):
"""Get camera component from entity_id."""
if (component := hass.data.get("image")) is None:
raise Exception("Image integration not set up")
@@ -190,7 +191,7 @@ def _get_image_from_entity_id(hass: HomeAssistantType, entity_id: str):
return image
-async def ws_poster(hass: HomeAssistantType, params: dict) -> web.Response:
+async def ws_poster(hass: HomeAssistant, params: dict) -> web.Response:
poster: str = params["poster"]
if "{{" in poster or "{%" in poster:
@@ -304,7 +305,7 @@ async def get(self, request: web.Request, filename: str):
if filename not in ("playlist.m3u8", "init.mp4", "segment.m4s", "segment.ts"):
raise HTTPNotFound()
- hass: HomeAssistantType = request.app["hass"]
+ hass: HomeAssistant = request.app["hass"]
entry = hass.data[DOMAIN]
url = "http://localhost:1984/" if isinstance(entry, Server) else entry
url = urljoin(url, "api/hls/" + filename) + "?" + request.query_string
diff --git a/custom_components/webrtc/manifest.json b/custom_components/webrtc/manifest.json
index 13f696cd..f5482417 100644
--- a/custom_components/webrtc/manifest.json
+++ b/custom_components/webrtc/manifest.json
@@ -13,5 +13,5 @@
"iot_class": "calculated",
"issue_tracker": "https://github.com/AlexxIT/WebRTC/issues",
"requirements": [],
- "version": "v3.5.2"
+ "version": "v3.6.0"
}
\ No newline at end of file
diff --git a/custom_components/webrtc/translations/es.json b/custom_components/webrtc/translations/es.json
new file mode 100644
index 00000000..13055648
--- /dev/null
+++ b/custom_components/webrtc/translations/es.json
@@ -0,0 +1,88 @@
+{
+ "config": {
+ "abort": {
+ "arch": "Arquitectura del sistema operativo no compatible: {uname}",
+ "single_instance_allowed": "Ya está configurado. Solo es posible una única configuración."
+ },
+ "error": {
+ "connect": "No se puede conectar al servidor go2rtc"
+ },
+ "step": {
+ "user": {
+ "title": "URL de go2rtc",
+ "description": "Selecciona la versión del servidor de streaming [go2rtc](https://github.com/AlexxIT/go2rtc):\n1. Deja vacío si quieres la versión go2rtc integrada (*usuarios básicos*)\n2. Establece `http://localhost:1984` si instalas el complemento [go2rtc](https://github.com/AlexxIT/go2rtc#go2rtc-home-assistant-add-on) o [Frigate 12+](https://docs.frigate.video/) (*usuarios avanzados*)\n3. Establece una dirección personalizada si instalas go2rtc en otro servidor (*hackers*)",
+ "data": {
+ "url": "URL"
+ }
+ },
+ "config": {
+ "title": "Configuración de go2rtc",
+ "description": "Ruta: `{path}`",
+ "data": {
+ "api": "WebUI pública en el puerto 1984",
+ "rtsp": "RTSP público en el puerto 8554",
+ "username": "Nombre de usuario público (Web y RTSP)",
+ "password": "Contraseña pública (Web y RTSP)"
+ }
+ }
+ }
+ },
+ "services": {
+ "create_link": {
+ "name": "Crear enlace",
+ "description": "Crea un enlace temporal o permanente a un stream (ingresa `url` o `entidad`)",
+ "fields": {
+ "link_id": {
+ "name": "ID del enlace",
+ "description": "Crea una ID aleatoria o permanente para tu enlace"
+ },
+ "url": {
+ "name": "URL",
+ "description": "Enlace al stream RTSP"
+ },
+ "entity": {
+ "name": "Entidad",
+ "description": "entity_id de la cámara"
+ },
+ "open_limit": {
+ "name": "Límite de aperturas",
+ "description": "Cuántas veces se puede abrir un enlace (0 - ilimitado)"
+ },
+ "time_to_live": {
+ "name": "Tiempo de vida",
+ "description": "Cuántos segundos vivirá el enlace (0 - ilimitado)"
+ }
+ }
+ },
+ "dash_cast": {
+ "name": "DashCast",
+ "description": "Transmite stream al dispositivo Chromecast a través de la aplicación DashCast",
+ "fields": {
+ "entity_id": {
+ "name": "Entidad multimedia",
+ "description": "entity_id del reproductor multimedia"
+ },
+ "url": {
+ "name": "URL",
+ "description": "Enlace al stream RTSP"
+ },
+ "entity": {
+ "name": "Entidad",
+ "description": "entity_id de la cámara"
+ },
+ "extra": {
+ "name": "Extra",
+ "descripción": "Parámetros adicionales de la tarjeta"
+ },
+ "force": {
+ "name": "Forzar",
+ "description": "Forzar el reinicio de la aplicación DashCast"
+ },
+ "hass_url": {
+ "name": "URL de Hass",
+ "description": "URL base manual al servidor Hass"
+ }
+ }
+ }
+ }
+ }
\ No newline at end of file
diff --git a/custom_components/webrtc/translations/ur.json b/custom_components/webrtc/translations/ur.json
new file mode 100644
index 00000000..1c006ae3
--- /dev/null
+++ b/custom_components/webrtc/translations/ur.json
@@ -0,0 +1,88 @@
+{
+ "config": {
+ "abort": {
+ "arch": "غیر تعاون یافتہ OS آرکیٹیکچر: {uname}",
+ "single_instance_allowed": "پہلے سے ترتیب شدہ۔ صرف ایک ہی ترتیب ممکن ہے۔."
+ },
+ "error": {
+ "connect": "go2rtc سرور سے منسلک نہیں ہو سکتا"
+ },
+ "step": {
+ "user": {
+ "title": "go2rtc یو آر ایل",
+ "description": "[go2rtc](https://github.com/AlexxIT/go2rtc) اسٹریمنگ سرور ورژن منتخب کریں:\n1۔ اگر آپ بلٹ ان go2rtc ورژن (*بنیادی صارفین*) چاہتے ہیں تو خالی چھوڑ دیں\n2۔ اگر آپ [go2rtc](https://github.com/AlexxIT/go2rtc#go2rtc-home-assistant-add-on) یا [Frigate 12+](https://) کو انسٹال کرتے ہیں تو `http://localhost:1984` سیٹ کریں docs.frigate.video/) ایڈ آن (*جدید صارفین*)\n3۔ اگر آپ کسی دوسرے سرور (*ہیکرز*) پر go2rtc انسٹال کرتے ہیں تو اپنی مرضی کے مطابق پتہ سیٹ کریں۔",
+ "data": {
+ "url": "URL"
+ }
+ },
+ "config": {
+ "title": "go2rtc تشکیل",
+ "description": "راستہ: `{path}`",
+ "data": {
+ "api": "Public WebUI on port 1984",
+ "rtsp": "Public RTSP on port 8554",
+ "username": "عوامی صارف کا نام (ویب اور آر ٹی ایس پی)",
+ "password": "پبلک پاس ورڈ (ویب اور آر ٹی ایس پی)"
+ }
+ }
+ }
+ },
+ "services": {
+ "create_link": {
+ "name": "لنک بنائیں",
+ "description": "سٹریم کا عارضی یا مستقل لنک بنائیں ('url' یا 'entity' درج کریں)",
+ "fields": {
+ "link_id": {
+ "name": "لنک آئی ڈی",
+ "description": "اپنے لنک کے لیے ایک بے ترتیب یا مستقل ID بنائیں"
+ },
+ "url": {
+ "name": "URL",
+ "description": "RTSP اسٹریم سے لنک کریں۔"
+ },
+ "entity": {
+ "name": "ہستی",
+ "description": "کیمرہ entity_id"
+ },
+ "open_limit": {
+ "name": "کھلی حد",
+ "description": "ایک لنک کتنی بار کھولا جا سکتا ہے (0 - لا محدود)"
+ },
+ "time_to_live": {
+ "name": "زندہ رہنے کا وقت",
+ "description": "لنک کتنے سیکنڈ تک زندہ رہے گا (0 - لامحدود)"
+ }
+ }
+ },
+ "dash_cast": {
+ "name": "ڈیش کاسٹ",
+ "description": "DashCast ایپلیکیشن کے ذریعے کروم کاسٹ ڈیوائس پر اسٹریم کاسٹ کریں۔",
+ "fields": {
+ "entity_id": {
+ "name": "میڈیا ہستی",
+ "description": "میڈیا پلیئر کی entity_id"
+ },
+ "url": {
+ "name": "URL",
+ "description": "RTSP اسٹریم سے لنک کریں۔"
+ },
+ "entity": {
+ "name": "ہستی",
+ "description": "کیمرہ entity_id"
+ },
+ "extra": {
+ "name": "اضافی",
+ "description": "کارڈ کے اضافی پیرامز"
+ },
+ "force": {
+ "name": "زبردستی",
+ "description": "ڈیش کاسٹ ایپلیکیشن کو زبردستی دوبارہ شروع کریں۔"
+ },
+ "hass_url": {
+ "name": " بیس یو آر ایل",
+ "description": "ہاس سرور کے لیے دستی بیس یو آر ایل"
+ }
+ }
+ }
+ }
+}
diff --git a/custom_components/webrtc/utils.py b/custom_components/webrtc/utils.py
index 22b27acb..f4d4f91a 100644
--- a/custom_components/webrtc/utils.py
+++ b/custom_components/webrtc/utils.py
@@ -11,20 +11,21 @@
from urllib.parse import urljoin
import jwt
+import requests
from aiohttp import web
-from homeassistant.components.camera import Camera
from homeassistant.components.frontend import add_extra_js_url
from homeassistant.components.http.auth import DATA_SIGN_SECRET, SIGN_QUERY_PARAM
from homeassistant.components.lovelace.resources import ResourceStorageCollection
+from homeassistant.const import MAJOR_VERSION, MINOR_VERSION
from homeassistant.core import HomeAssistant
from homeassistant.helpers.aiohttp_client import async_get_clientsession
-from homeassistant.helpers.entity_component import EntityComponent, DATA_INSTANCES
+from homeassistant.helpers.entity_component import DATA_INSTANCES
_LOGGER = logging.getLogger(__name__)
DOMAIN = "webrtc"
-BINARY_VERSION = "1.8.4"
+BINARY_VERSION = "1.9.4"
SYSTEM = {
"Windows": {"AMD64": "go2rtc_win64.zip", "ARM64": "go2rtc_win_arm64.zip"},
@@ -62,14 +63,19 @@ def unzip(content: bytes) -> bytes:
return f.read()
-async def validate_binary(hass: HomeAssistant) -> Optional[str]:
+def validate_binary(hass: HomeAssistant) -> Optional[str]:
filename = f"go2rtc-{BINARY_VERSION}"
if platform.system() == "Windows":
filename += ".exe"
filename = hass.config.path(filename)
- if os.path.isfile(filename) and os.access(filename, os.X_OK):
- return filename
+ try:
+ if os.path.isfile(filename) and subprocess.check_output(
+ [filename, "-v"]
+ ).startswith(b"go2rtc"):
+ return filename
+ except:
+ pass
# remove all old binaries
for file in os.listdir(hass.config.config_dir):
@@ -83,11 +89,11 @@ async def validate_binary(hass: HomeAssistant) -> Optional[str]:
f"v{BINARY_VERSION}/{get_arch()}"
)
_LOGGER.debug(f"Download new binary: {url}")
- r = await async_get_clientsession(hass).get(url)
+ r = requests.get(url)
if not r.ok:
return None
- raw = await r.read()
+ raw = r.content
# unzip binary for windows
if url.endswith(".zip"):
@@ -103,14 +109,15 @@ async def validate_binary(hass: HomeAssistant) -> Optional[str]:
return filename
-# noinspection PyTypeChecker
-async def get_stream_source(hass: HomeAssistant, entity: str) -> str:
- try:
- component: EntityComponent = hass.data["camera"]
- camera: Camera = next(e for e in component.entities if e.entity_id == entity)
- return await camera.stream_source()
- except Exception:
- return None
+async def register_static_path(hass: HomeAssistant, url_path: str, path: str):
+ if (MAJOR_VERSION, MINOR_VERSION) >= (2024, 7):
+ from homeassistant.components.http import StaticPathConfig
+
+ await hass.http.async_register_static_paths(
+ [StaticPathConfig(url_path, path, True)]
+ )
+ else:
+ hass.http.register_static_path(url_path, path)
async def init_resource(hass: HomeAssistant, url: str, ver: str) -> bool:
diff --git a/custom_components/webrtc/www/video-rtc.js b/custom_components/webrtc/www/video-rtc.js
index 273bc099..f04a1bf7 100644
--- a/custom_components/webrtc/www/video-rtc.js
+++ b/custom_components/webrtc/www/video-rtc.js
@@ -19,7 +19,7 @@ export class VideoRTC extends HTMLElement {
super();
this.DISCONNECT_TIMEOUT = 5000;
- this.RECONNECT_TIMEOUT = 30000;
+ this.RECONNECT_TIMEOUT = 15000;
this.CODECS = [
'avc1.640029', // H.264 high 4.1 (Chromecast 1st and 2nd Gen)
@@ -70,6 +70,7 @@ export class VideoRTC extends HTMLElement {
* @type {RTCConfiguration}
*/
this.pcConfig = {
+ bundlePolicy: 'max-bundle',
iceServers: [{urls: 'stun:stun.l.google.com:19302'}],
sdpSemantics: 'unified-plan', // important for Chromecast 1
};
@@ -163,8 +164,9 @@ export class VideoRTC extends HTMLElement {
* https://developer.chrome.com/blog/autoplay/
*/
play() {
- this.video.play().catch(() => {
- if (!this.video.muted) {
+ this.video.play().catch(er => {
+ const isAutoplayError = er.name === 'NotAllowedError';
+ if (!this.video.muted && isAutoplayError) {
this.video.muted = true;
this.video.play().catch(er => {
console.warn(er);
@@ -247,6 +249,11 @@ export class VideoRTC extends HTMLElement {
this.appendChild(this.video);
+ this.video.addEventListener('error', ev => {
+ console.warn(ev);
+ if (this.ws) this.ws.close(); // run reconnect for broken MSE stream
+ });
+
// all Safari lies about supported audio codecs
const m = window.navigator.userAgent.match(/Version\/(\d+).+Safari/);
if (m) {
@@ -486,7 +493,9 @@ export class VideoRTC extends HTMLElement {
pc.addEventListener('connectionstatechange', () => {
if (pc.connectionState === 'connected') {
- const tracks = pc.getReceivers().map(receiver => receiver.track);
+ const tracks = pc.getTransceivers()
+ .filter(tr => tr.currentDirection === 'recvonly') // skip inactive
+ .map(tr => tr.receiver.track);
/** @type {HTMLVideoElement} */
const video2 = document.createElement('video');
video2.addEventListener('loadeddata', () => this.onpcvideo(video2), {once: true});
diff --git a/custom_components/webrtc/www/webrtc-camera.js b/custom_components/webrtc/www/webrtc-camera.js
index c751ec92..d1fc550f 100644
--- a/custom_components/webrtc/www/webrtc-camera.js
+++ b/custom_components/webrtc/www/webrtc-camera.js
@@ -1,5 +1,5 @@
/** Chrome 63+, Safari 11.1+ */
-import {VideoRTC} from './video-rtc.js?v=1.8.0';
+import {VideoRTC} from './video-rtc.js?v=1.9.4';
import {DigitalPTZ} from './digital-ptz.js?v=3.3.0';
class WebRTCCamera extends VideoRTC {
@@ -70,12 +70,19 @@ class WebRTCCamera extends VideoRTC {
this.streamID = -1;
this.nextStream(false);
+
+ this.onhass = [];
}
set hass(hass) {
+ this._hass = hass;
+ this.onhass.forEach(fn => fn());
// if card in vertical stack - `hass` property assign after `onconnect`
- super.hass = hass;
- this.onconnect();
+ // this.onconnect();
+ }
+
+ get hass() {
+ return this._hass;
}
/**
@@ -396,10 +403,12 @@ class WebRTCCamera extends VideoRTC {
`);
+ const template = JSON.stringify(this.config.ptz);
const handle = path => {
- const data = this.config.ptz['data_' + path];
- if (!data) return;
- const [domain, service] = this.config.ptz.service.split('.', 2);
+ if (!this.config.ptz['data_' + path]) return;
+ const config = template.indexOf('${') < 0 ? this.config.ptz : JSON.parse(eval('`' + template + '`'));
+ const [domain, service] = config.service.split('.', 2);
+ const data = config['data_' + path];
this.hass.callService(domain, service, data);
};
const ptz = this.querySelector('.ptz');
@@ -422,14 +431,21 @@ class WebRTCCamera extends VideoRTC {
}
saveScreenshot() {
- const canvas = document.createElement('canvas');
- canvas.width = this.video.videoWidth;
- canvas.height = this.video.videoHeight;
- canvas.getContext('2d').drawImage(this.video, 0, 0, canvas.width, canvas.height);
+ const a = document.createElement('a');
+
+ if (this.video.videoWidth && this.video.videoHeight) {
+ const canvas = document.createElement('canvas');
+ canvas.width = this.video.videoWidth;
+ canvas.height = this.video.videoHeight;
+ canvas.getContext('2d').drawImage(this.video, 0, 0, canvas.width, canvas.height);
+ a.href = canvas.toDataURL('image/jpeg');
+ } else if (this.video.poster && this.video.poster.startsWith('data:image/jpeg')) {
+ a.href = this.video.poster;
+ } else {
+ return;
+ }
const ts = new Date().toISOString().substring(0, 19).replaceAll('-', '').replaceAll(':', '');
- const a = document.createElement('a');
- a.href = canvas.toDataURL('image/jpeg');
a.download = `snapshot_${ts}.jpeg`;
a.click();
}
@@ -581,53 +597,75 @@ class WebRTCCamera extends VideoRTC {
renderShortcuts() {
if (!this.config.shortcuts) return;
- // backward compatibility with `services` property
- const services = this.config.shortcuts.services || this.config.shortcuts;
-
- const icons = services.map((value, index) => `
-
- `).join('');
-
const card = this.querySelector('.card');
card.insertAdjacentHTML('beforebegin', `
-
- `);
- card.insertAdjacentHTML('beforeend', `
-
${icons}
+
`);
+ card.insertAdjacentHTML('beforeend', '');
const shortcuts = this.querySelector('.shortcuts');
shortcuts.addEventListener('click', ev => {
- const value = services[ev.target.dataset.index];
- if(value.more_info !== undefined) {
+ const value = this.config.shortcuts[ev.target.dataset.index];
+ if (value.more_info !== undefined) {
const event = new Event('hass-more-info', {
bubbles: true,
cancelable: true,
composed: true,
});
- event.detail = { entityId: value.more_info };
+ event.detail = {entityId: value.more_info};
ev.target.dispatchEvent(event);
}
- if(value.service !== undefined) {
+ if (value.service !== undefined) {
const [domain, name] = value.service.split('.');
this.hass.callService(domain, name, value.service_data || {});
}
});
+
+ this.renderTemplate('shortcuts', () => {
+ shortcuts.innerHTML = this.config.shortcuts.map((value, index) => `
+
+ `).join('');
+ });
}
renderStyle() {
if (!this.config.style) return;
const style = document.createElement('style');
- style.innerText = this.config.style;
const card = this.querySelector('.card');
card.insertAdjacentElement('beforebegin', style);
+
+ this.renderTemplate('style', () => {
+ style.innerText = this.config.style;
+ });
+ }
+
+ renderTemplate(name, renderHTML) {
+ const config = this.config[name];
+ // support config param as string or as object
+ const template = typeof config === 'string' ? config : JSON.stringify(config);
+ // check if config param has template
+ if (template.indexOf('${') >= 0) {
+ const render = () => {
+ try {
+ const states = this.hass ? this.hass.states : undefined;
+ this.config[name] = JSON.parse(eval('`' + template + '`'));
+ renderHTML();
+ } catch (e) {
+ console.debug(e);
+ }
+ };
+ this.onhass.push(render);
+ render();
+ } else {
+ renderHTML();
+ }
}
get hasAudio() {
diff --git a/extras/Node-RED/flows.json b/extras/Node-RED/flows.json
index dca90706..13c35b9a 100644
--- a/extras/Node-RED/flows.json
+++ b/extras/Node-RED/flows.json
@@ -1 +1 @@
-[{"id":"9584418c.dafc2","type":"tab","label":"Automations","disabled":false,"info":""},{"id":"f602e6ba.609d28","type":"tab","label":"Irrigation","disabled":false,"info":""},{"id":"7133949ae957b8bc","type":"subflow","name":"Subflow 1","info":"","in":[],"out":[]},{"id":"9cfe6331fbc680d5","type":"group","z":"9584418c.dafc2","name":"USPS Vehicle Logo Object Detection","style":{"label":true},"nodes":["ed80a3f.522526","f3a3e80f.3e8e38","6f08d11c854dfb00","9b7c5535c74a94a3","d8a16fd91366d112","bcaf3569e7816922","d58f6ef71c326040","42be35f83b764861","b2a5543693ac851e","c13f0f20a56d6af5","7151828122e3b80c","bace446bfa7b343d","5acbb2cbdbdea368","c061be05c01527e0","e263410e9a3af7d8","d9e9a93275328762","a12e93d199527cae","b4b8f84a.7e57a8","63fd5090444c9cad","2dfdead1d2e3b78b","c1fe21bcb3184137","28609db070a98f82","04300ba2a76891a6","0a096bcbb68139e5","3e6040dad6b140f5","cd2f2ad667788097"],"x":54,"y":2099,"w":1392,"h":322},{"id":"3c4349a7eea9bd3b","type":"group","z":"9584418c.dafc2","name":"Set Cameras Online","style":{"label":true},"nodes":["bd19a17005513c2f","24d1a94e275e5e44","58d0c98797e19829","7a8e43b6f7c84bac","ab66afa5b576de3f","ccf5998fdf8ee50d"],"x":54,"y":1839,"w":492,"h":242},{"id":"35da177d9e2fd258","type":"group","z":"9584418c.dafc2","name":"Virtual Radar Server","style":{"label":true},"nodes":["a9a323de66b6f772","ee139512bcad0966","7da69a7e8ecadc7c","26e32b1d7824356a","3a82b835.c57d48","91afebbf8b9edf05","5684b08aacd6d225","4ca1a5ad47ce7a18","ba68e03143ba4af8","5f1d1b471a1c7cbb","2cd08c8da06afaf6","ea911291f04c7d18","43e5fa289c7550ff","97761f13f8e5c31b","ea239028eda07991"],"x":54,"y":1499,"w":1272,"h":322},{"id":"bd2acc7efb5be5fd","type":"group","z":"9584418c.dafc2","name":"Front Porch Light Occupancy Brightness","style":{"label":true},"nodes":["3f2a2e4d99057b69","3e399d83e4e7f4c3","59f5bc2571b0f12f","c68c969a6b8c2833","b1a99d9698d831b2","17b35d69307a8455","d11c183fff8d848d","fae7fa701710e258","1ef176bec8ed5da0","254a48eabb9cf476"],"x":54,"y":1279,"w":1092,"h":202},{"id":"11e25fc28c23144c","type":"group","z":"9584418c.dafc2","name":"Front House Lights","style":{"label":true},"nodes":["86bc310cbc0562af","2fb6a7afb6502a32","8c55985bffebd56a"],"x":54,"y":1119,"w":472,"h":142},{"id":"b808f2d7ae539c87","type":"group","z":"9584418c.dafc2","name":"Indoor Lights Dim Evening","style":{"label":true},"nodes":["e93027cb.6a6308","fc81cfda.29ff5","8ee35d65.a7569","41b918d5.7ce018","5420f9c0.5356c8","77184c93.8790d4","39a5ce57.78e3d2","ea19fe14.80749","ea2604f9.4cdf98","8a82f465.846018","d8ad0651.bf7a18","d9cc182cc3eb2a93","cde7b3c9ca39891b","1457bf6605a50448","fa90c550.d6c948"],"x":54,"y":659,"w":1073,"h":444},{"id":"9df353d4c0fc9a54","type":"group","z":"9584418c.dafc2","name":"Server Rack Temperature","style":{"label":true},"nodes":["73550501.be7fbc","7dff3ae1.e36a04","88822bfe.2cc598","96b5207d.407dd","b259f0eb.3e83","c7ff978f.ff0728","29b17ed7.fab972"],"x":54,"y":459,"w":932,"h":182},{"id":"18fe74aea06a1180","type":"group","z":"9584418c.dafc2","name":"AC Stale Air","style":{"label":true},"nodes":["ebe84a6f70b4bc2f","cf1c689e51b98aec","6af7abba85612dd9","8b6280c5c448720c","9ce46ce21d8cc964","2b6721107586ceae","830c3ddd08ef396c"],"x":54,"y":299,"w":1132,"h":142},{"id":"cf3a0410bcf837ae","type":"group","z":"9584418c.dafc2","name":"Door Alerts","style":{"label":true},"nodes":["2022689a.938918","8ec438b6.4eb2e8","9c1d9c7c.ed9c7","896f5b34.7b4328","c5124616.c9bd48","f9d93af6.184028","3314ec9f.ca8994","5c24f744.30fcb8","6aa388d0.707768","cf758271.d4fd6","5a740c2d.009864","c5c85c0aa2d8c8ca","28fa66cd.af058a","aee87977a0670889"],"x":54,"y":19,"w":1012,"h":262},{"id":"3cf0491ac33aecfa","type":"group","z":"f602e6ba.609d28","name":"Max Time and Master Valve Control","style":{"label":true},"nodes":["54bad548.7e9fcc","5a10cd93.8e94b4","a77808ff.3f1288","54ae6ec3.1bc63","bcbf413e.7b188","3b848bce.76aea4","43dedcca.ac7734","c42e6d62.7a24c","cdd3b7ef.04a618","63f07877e73b952a","5e9007a27732bba9","061b74f643477dd9","749afd72791a5127","656ad2cd6fb99f57","5093cf5ba33eb30a","1b05625730953169","21aa3b57a72b3336"],"x":54,"y":19,"w":1572,"h":222},{"id":"43a30fe5a5052c22","type":"group","z":"f602e6ba.609d28","name":"Custom Water","style":{"label":true},"nodes":["d269f175.c9dc6","3367e45f.cc981c","116d5bb3.ee92a4","80df47d5.602888","fb46876c.845298","98eeafa7.bd2b9","565ee5c1.561bfc","22a20603.86a06a","a8d96e.1f00969","808e6a81.92e2e8","883f2c00.1d94e8","e42ff3d9.593dc","76160bc4.8cd644","e2c37b65c5582c2b","860a4c61d7557dc9"],"x":54,"y":259,"w":1452,"h":262},{"id":"a9182c2cc04d2d9a","type":"group","z":"f602e6ba.609d28","name":"Irrigation Delays","style":{"label":true},"nodes":["dd9855ca4017c8c0","c3a696a117416327","27f2580e35031830","9cb8187c669c6485","47f1a8018e58e032","427f7fa58d86cc59","1d9a4d0bb4645f32","d9ebbaa37f5911a9","eeecfc1e8864e39f","89487a4efedec1db","1e4b3bc7c25b294f","2c45af5b3ee5cf0a","d7e50e7a2810667d","28936ec687ee4eb0","974833b6a2eca853","478a5a84d38ba181","c01fd0612615e927","93965a61d2c4f5de","c3cb1c7d15767014"],"x":54,"y":539,"w":752,"h":502},{"id":"0f07749a4e1672ad","type":"group","z":"f602e6ba.609d28","name":"Supply Voltage Control","style":{"label":true},"nodes":["1ae21386.a831bc","117145a7.67e99a","882aff35f788008b"],"x":54,"y":1059,"w":472,"h":142},{"id":"a08dae6118c91c19","type":"group","z":"f602e6ba.609d28","name":"Run Lawn","style":{"label":true},"nodes":["f2c9c3a5b8b11a64","9896327569c234da","e95ac52f03478921","174186fb5d054240","287dd3b1af5dc2d0","74cd40702021e86d","bf015af2161c5ec2","151eb6ba5b2d39cd","45ee74d06e9cac2c","95a54981805b22f2","a4b3eba196a504dc","02d1e639f7ac6596","8d3c8370996be2da","863b8fa63f210ebe","7d8374976c01e3dc","b0debe46542c4c67","de509d99b9d965b3","b1c9631973c2f4b1","6ea0448df1383ec2","224d30a98f52c287","5a27d31bfb4a6990","197853479ad9eeda","7b985932412db47d","acdcc72fea065aac","38affe5cc680d076","8f83c8d1d4492be0"],"x":54,"y":2019,"w":1272,"h":522},{"id":"79694877249c9902","type":"group","z":"f602e6ba.609d28","name":"Attempt Lawn","style":{"label":true},"nodes":["3b656b89.1ac154","493b435f.c9851c","7b12e66f.57d068","8c060f00.cf577","4422f61c.847d88","dcdeabc7.780578","722d03d6.2ff77c","af4788fe.215ba8","c90fd5e6.c5c678","862ad27a.d347d","83edf648.3f9ed8","8d4bfe8e.ee805","815fddc0.6604c","06d6255efdc31c47","5420d0eed32223fb","3ff9ce03ef7b554b","576b66fa1bd202a3","a3d75225807b70eb","219b37105a8304f1","e7430e17f0b24ed8","b6e7d5b8891bba6d","339ee0ada21856e0","d01fbafafbb34692","f5684be88477322f","336585d4eee0ca73","b3c4a3638c17629e","2fc67b25514de5a5","08e3098cf183e086"],"x":54,"y":1219,"w":672,"h":782},{"id":"68ec980b932fdba7","type":"group","z":"f602e6ba.609d28","name":"Attempt Front Beds","style":{"label":true},"nodes":["583f46a3.fc4c38","d9147878.b61cf8","c7e5552e.7f8a08","6bcf06fb.9ca748","f587589f.d739e8","d9d17e8f.590e6","d9f893eb.834f3","9d851699.6a8458","4fae5b92.a9cd44","418058c4.af3158","7350c911a0b1a86d","fdcfa1521191fa40","4f2902edc77f2d3b","f6881b4bf93c27c5","ed6e3d4225582e20","593bee0e8c958df8","67916c3a5554a794","f7ac7a90f3da2298","45c5dbbbd8ce50a1","abb8777dd08aa743","d8637d8d96b68fca","b403eec7866aea22"],"x":54,"y":2559,"w":672,"h":582},{"id":"55a2162532da4e14","type":"group","z":"f602e6ba.609d28","name":"Run Front Beds","style":{"label":true},"nodes":["a2ab7368.923fb","a31e3daf.17207","21ced698.708b5a","c661d489.9c9bc8","accc6697.196268","487ff788.8c5c98","2238b09b.1b5b5","84258ddd.41da4","9129b06e.d8925","5ce1803b.06628","aa53225140781dd7","8113d83074ff7701","d83b5ff7a2212931","f78cdb84200eb171","62b5545bc6d6e627","0fe0d325194604dd"],"x":54,"y":3159,"w":1332,"h":262},{"id":"59ea88a27ef998e7","type":"group","z":"9584418c.dafc2","name":"Drone Delivery Logo Object Detection","style":{"label":true},"nodes":["4e2d750742dc8890","cdc9c2c982e3fe5f","300267d7c89b0955","1ae58f8afe36e04c","5c59c5c412e759ce","aa523c5cbfe26949","b4392caec775b305","81d6e9a99eb61c67","8bec0433aa6e51fa","1aa9e39b6be88864","ec51454057c055e2","765c7c5a61100728","1bda1e8b7f76e5f3","14855ff357d5fbad","a95b4fa60f1238d7","081d788e92e34986","9799e777bb06f63f","6d56b297fcfe0016","2f18405339079200","b4d7bb6e129bacea","b442c20392c7ce60","ec6b4698123ebc34"],"x":54,"y":2439,"w":1412,"h":282},{"id":"cb7e3560a0078392","type":"group","z":"9584418c.dafc2","name":"Global Entry Schedule","style":{"label":true},"nodes":["5123f652827fa902","970920516fa379e8","51f2291060d07336","91d3d26774f9468e","7415468104c18108","b8a4a1ee4e15f778","79c00f8c61888f52","a61d605915dc23ff","c44a5c4d6d17ee9f","fa9f2ef8fecf1de2","7d01abce7bc68291","b7c50947c4507d03","1480d9470754a6a3","ca8d58af48d7b7c5","414a38bf0735b27c","c0546e86d17e99e9","d5ab0aa6d198ba81","88d3b091fc333998","1b266e9b338a4dfe","85644b2ab18e7141","041a81d375ec985d","bfbece91f0b61e8b","f3b23466b80725e0"],"x":54,"y":2739,"w":1102,"h":342},{"id":"26b2ac79d4c32bda","type":"group","z":"9584418c.dafc2","name":"Timelapse","style":{"label":true},"nodes":["83e2179938d08d58","59e4459459f077c9","089b07fa48286f29","7ff9bf1a917cbf50","a826a8c498d6d1e3"],"x":54,"y":3099,"w":612,"h":262},{"id":"6f393a92ae952332","type":"group","z":"9584418c.dafc2","name":"Faucet Auto Drip","style":{"label":true},"nodes":["08b26d8311cd9187","716e8fabff85ffb9","7b988b93a658f526","7fe1e564efbd46af","16e1a3e2f53e6bdf","d85faf19968afde1"],"x":54,"y":3379,"w":1032,"h":202},{"id":"e28fc796ce042622","type":"group","z":"9584418c.dafc2","name":"Generic Listener to Push Notifications from SMTP Inbox","style":{"label":true},"nodes":["7eb1a3d60fccbc76","cb1f141562c8fd2b","1cd709e001bf5e89","7f48460e08988c9e","24fc1882c8436738"],"x":54,"y":3599,"w":892,"h":142},{"id":"445e81780ba935ac","type":"group","z":"9584418c.dafc2","name":"License Plate Garage Door","style":{"label":true},"nodes":["5caa1a9942bc27ee","9b25e9a8817a7d8e","7c060a1e3c0ff12e","4fc565f7b86648dc","220bca8570d66770","184d6d5272648136","500ee424e3f6b6a1","6f27f3028b1805e2","004c0ae121925ea2","5218eca8a79a79a5","1fce953ec4b1ee3d","8c5272ae89e85e74","8067ec66aa846765","6648e0bdaa2d8170","18d9178fd318e333","b70d2ca780b98259","75bc8ac5d1afe28f"],"x":54,"y":3899,"w":1292,"h":242},{"id":"516939e66b0b3d5d","type":"group","z":"9584418c.dafc2","name":"QR Door Opener","style":{"label":true},"nodes":["4e761223bbb97b8d","4882c608e1fa69c7","72737cfc3371b80f","6cecf24fbf959b73","cde6c9446e054107","54c1081f98fd1945","519990f56ae7a4e9","8db5019cab97ba65","dd24955fcf11d0b8","6084ebe4fee0af4d","a8e5d53fc40fcf3c","28e26da9f431b399","a4574f947fc3c876","58c162476af5c2df","02dca310d30d41ec","e422bd64e999decb","fc7cc6d0b1911358"],"x":54,"y":4179,"w":1132,"h":302},{"id":"7a1cb951d36ebc37","type":"group","z":"9584418c.dafc2","name":"QR Send","style":{"label":true},"nodes":["e1a4ef361b9fc7ff","b6dbca53c840164c","38010b7e5f85b9f6","4c8457c87150cbf8","e073799764f16bc0","aa0e87207265845d","06871bb32f66c1ab","d0cd45ceef8e8641","e3b312790143d451","523a5be045f29150","10bf2ad7f818bba5","a6187e2d761f18bd","6d38c8b88ab6e9b1"],"x":54,"y":4519,"w":1032,"h":162},{"id":"e1dc0b88.463bb8","type":"server","name":"Home Assistant","version":5,"addon":false,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":false,"cacheJson":true,"heartbeat":true,"heartbeatInterval":"30","areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true},{"id":"546e31ed.0db1c","type":"mqtt-broker","name":"Mosquitto","broker":"10.0.1.22","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"9f81fd881d01a666","type":"position-config","name":"","isValide":"true","longitude":"0","latitude":"0","angleType":"deg","timeZoneOffset":"99","timeZoneDST":"0","stateTimeFormat":"3","stateDateFormat":"12","contextStore":""},{"id":"4f8f8feffed26998","type":"sqlitedb","db":"/data/amazon.db","mode":"RWC"},{"id":"96b8babe5c0a6107","type":"deepstack-server","proto":"http","host":"codeproject","port":"32168","version":"v1","rejectUnauthorized":true},{"id":"27555ce732fc54b0","type":"global-config","name":"global-config","env":[{"name":"bb_pass","value":"PASSWORD","type":"str"},{"name":"bb_number","value":"15128798125","type":"str"},{"name":"plate_andrew","value":"BNW7211","type":"str"},{"name":"qr_code","value":"zZxJ2GWG9W4MusFQ","type":"str"}]},{"id":"169e2bac20a4c980","type":"deepstack-server","proto":"http","host":"codeproject","port":"32168","version":"v1/vision/alpr","rejectUnauthorized":true},{"id":"a3221ddd636fd541","type":"mqtt-broker","name":"local","broker":"192.168.1.176","port":"1883","clientid":"","autoConnect":true,"usetls":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"autoUnsubscribe":true,"birthTopic":"","birthQos":"0","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willPayload":"","willMsg":{},"userProps":"","sessionExpiry":""},{"id":"962a7922.a6ddf8","type":"server","name":"Home Assistant","addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"","connectionDelay":false,"cacheJson":false,"heartbeat":false,"heartbeatInterval":"","entitySelector":"friendlyName","statusSeparator":"","enableGlobalContextStore":false},{"id":"2022689a.938918","type":"api-call-service","z":"9584418c.dafc2","g":"cf3a0410bcf837ae","name":"Notify Via Wrapper: Opened 1 Minute","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"script","service":"notify_wrapper","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": \"The \" & $lowercase(msg.data.new_state.attributes.friendly_name) & \" has been opened for 1 minute\"\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":890,"y":120,"wires":[[]]},{"id":"8ec438b6.4eb2e8","type":"api-current-state","z":"9584418c.dafc2","g":"cf3a0410bcf837ae","name":"Door Notify On","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"true","halt_if_type":"bool","halt_if_compare":"is","entity_id":"input_boolean.door_notify","state_type":"habool","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":360,"y":60,"wires":[["c5124616.c9bd48"],[]]},{"id":"9c1d9c7c.ed9c7","type":"change","z":"9584418c.dafc2","g":"cf3a0410bcf837ae","name":"Reset If Closed","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":220,"wires":[["5c24f744.30fcb8","cf758271.d4fd6","5a740c2d.009864","28fa66cd.af058a"]]},{"id":"896f5b34.7b4328","type":"api-call-service","z":"9584418c.dafc2","g":"cf3a0410bcf837ae","name":"Notify Via Wrapper","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"script","service":"notify_wrapper","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": payload, \"data\": {\"priority\": 1} \t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":950,"y":60,"wires":[[]]},{"id":"c5124616.c9bd48","type":"template","z":"9584418c.dafc2","g":"cf3a0410bcf837ae","name":"Opened","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{{ data.new_state.attributes.friendly_name }} opened","output":"str","x":740,"y":60,"wires":[["896f5b34.7b4328"]]},{"id":"f9d93af6.184028","type":"server-state-changed","z":"9584418c.dafc2","g":"cf3a0410bcf837ae","name":"Door Opened","server":"e1dc0b88.463bb8","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"binary_sensor.*_door$","entityIdType":"regex","outputInitially":false,"stateType":"habool","ifState":"true","ifStateType":"bool","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":150,"y":100,"wires":[["8ec438b6.4eb2e8","5c24f744.30fcb8","cf758271.d4fd6","5a740c2d.009864","28fa66cd.af058a"],["9c1d9c7c.ed9c7"]]},{"id":"73550501.be7fbc","type":"trigger-state","z":"9584418c.dafc2","d":true,"g":"9df353d4c0fc9a54","name":"Rack Temperature","server":"e1dc0b88.463bb8","version":4,"inputs":1,"outputs":2,"exposeAsEntityConfig":"","entityId":"sensor.rack_exhaust_temperature","entityIdType":"exact","debugEnabled":false,"constraints":[],"customOutputs":[],"outputInitially":false,"stateType":"num","enableInput":true,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"x":170,"y":560,"wires":[["7dff3ae1.e36a04"],[]]},{"id":"7dff3ae1.e36a04","type":"switch","z":"9584418c.dafc2","g":"9df353d4c0fc9a54","name":"Above 90?","property":"payload","propertyType":"msg","rules":[{"t":"gt","v":"95","vt":"num"},{"t":"lte","v":"90","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":350,"y":560,"wires":[["29b17ed7.fab972"],["96b5207d.407dd"]]},{"id":"88822bfe.2cc598","type":"api-call-service","z":"9584418c.dafc2","g":"9df353d4c0fc9a54","name":"Turn on Fan","server":"e1dc0b88.463bb8","version":5,"domain":"homeassistant","service":"turn_on","areaId":[],"deviceId":[],"entityId":["fan.rack_fan"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":true,"outputProperties":[],"queue":"none","x":710,"y":500,"wires":[[]]},{"id":"96b5207d.407dd","type":"api-current-state","z":"9584418c.dafc2","g":"9df353d4c0fc9a54","name":"Rack Fan","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"true","halt_if_type":"bool","halt_if_compare":"is","entity_id":"fan.rack_fan","state_type":"habool","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":540,"y":580,"wires":[["c7ff978f.ff0728"],[]]},{"id":"b259f0eb.3e83","type":"api-call-service","z":"9584418c.dafc2","g":"9df353d4c0fc9a54","name":"Turn off fan","server":"e1dc0b88.463bb8","version":5,"domain":"homeassistant","service":"turn_off","areaId":[],"deviceId":[],"entityId":["fan.rack_fan"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":true,"outputProperties":[],"queue":"none","x":890,"y":540,"wires":[[]]},{"id":"e93027cb.6a6308","type":"api-current-state","z":"9584418c.dafc2","g":"b808f2d7ae539c87","name":"Master Bedroom Lamps On?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.master_bedroom_lamps","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":680,"y":702,"wires":[["fc81cfda.29ff5"],[]]},{"id":"fc81cfda.29ff5","type":"api-call-service","z":"9584418c.dafc2","g":"b808f2d7ae539c87","name":"Set brightness to 128","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":[],"data":"{\"brightness\":\"128\",\"transition\":5, \"entity_id\": msg.data.entity_id}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1001,"y":700,"wires":[[]]},{"id":"c7ff978f.ff0728","type":"api-current-state","z":"9584418c.dafc2","g":"9df353d4c0fc9a54","name":"Rack fan auto off?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.rack_fan_auto_off","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":730,"y":600,"wires":[["b259f0eb.3e83"],[]]},{"id":"29b17ed7.fab972","type":"api-current-state","z":"9584418c.dafc2","g":"9df353d4c0fc9a54","name":"Rack Fan","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"true","halt_if_type":"bool","halt_if_compare":"is","entity_id":"fan.rack_fan","state_type":"habool","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":540,"y":520,"wires":[[],["88822bfe.2cc598"]]},{"id":"3314ec9f.ca8994","type":"server-state-changed","z":"9584418c.dafc2","g":"cf3a0410bcf837ae","name":"Garage Opened","server":"e1dc0b88.463bb8","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"cover.garage_door","entityIdType":"regex","outputInitially":false,"stateType":"str","ifState":"open","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"0","forType":"num","forUnits":"minutes","outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":160,"y":160,"wires":[["8ec438b6.4eb2e8"],[]]},{"id":"8ee35d65.a7569","type":"api-current-state","z":"9584418c.dafc2","d":true,"g":"b808f2d7ae539c87","name":"Kitchen Cans On?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.kitchen_can_lights","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":650,"y":942,"wires":[["5420f9c0.5356c8"],[]]},{"id":"41b918d5.7ce018","type":"api-current-state","z":"9584418c.dafc2","d":true,"g":"b808f2d7ae539c87","name":"Kitchen Table On?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.kitchen_table_light","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":650,"y":1062,"wires":[["d8ad0651.bf7a18"],[]]},{"id":"5420f9c0.5356c8","type":"api-call-service","z":"9584418c.dafc2","g":"b808f2d7ae539c87","name":"Set brightness to 40","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":[],"data":"{\"brightness\":\"40\",\"transition\": \"5\", \"entity_id\": msg.data.entity_id}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1000,"y":842,"wires":[[]]},{"id":"77184c93.8790d4","type":"api-current-state","z":"9584418c.dafc2","d":true,"g":"b808f2d7ae539c87","name":"Kitchen Sink On?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.kitchen_sink_light","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":650,"y":882,"wires":[["5420f9c0.5356c8"],[]]},{"id":"39a5ce57.78e3d2","type":"api-current-state","z":"9584418c.dafc2","g":"b808f2d7ae539c87","name":"Living Room Cans On?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.living_room_can_lights","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":670,"y":822,"wires":[["5420f9c0.5356c8"],[]]},{"id":"5c24f744.30fcb8","type":"trigger","z":"9584418c.dafc2","g":"cf3a0410bcf837ae","name":"Wait 5m","op1":"","op2":"5","op1type":"nul","op2type":"str","duration":"5","extend":false,"overrideDelay":false,"units":"min","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":620,"y":160,"wires":[["6aa388d0.707768","aee87977a0670889"]]},{"id":"6aa388d0.707768","type":"api-call-service","z":"9584418c.dafc2","g":"cf3a0410bcf837ae","name":"Alexa Announce Opened","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"notify","service":"alexa_media","areaId":[],"deviceId":[],"entityId":[],"data":"{\"message\":\"The\" & $lowercase(msg.data.new_state.attributes.friendly_name) & \"has been opened for\" & msg.payload & \" minutes.\",\"data\":{\"method\":\"all\",\"type\":\"announce\"},\"target\":[\"Office\",\"Kitchen\",\"Master\",\"Living Room\"]}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":850,"y":220,"wires":[[]]},{"id":"cf758271.d4fd6","type":"trigger","z":"9584418c.dafc2","g":"cf3a0410bcf837ae","name":"Wait 10m","op1":"","op2":"10","op1type":"nul","op2type":"str","duration":"10","extend":false,"overrideDelay":false,"units":"min","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":620,"y":200,"wires":[["6aa388d0.707768"]]},{"id":"5a740c2d.009864","type":"trigger","z":"9584418c.dafc2","g":"cf3a0410bcf837ae","name":"Wait 15m","op1":"","op2":"15","op1type":"nul","op2type":"str","duration":"15","extend":false,"overrideDelay":false,"units":"min","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":620,"y":240,"wires":[["6aa388d0.707768"]]},{"id":"ea19fe14.80749","type":"api-current-state","z":"9584418c.dafc2","d":true,"g":"b808f2d7ae539c87","name":"Entryway On?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.entryway_light","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":640,"y":1002,"wires":[["5420f9c0.5356c8"],[]]},{"id":"ea2604f9.4cdf98","type":"api-current-state","z":"9584418c.dafc2","g":"b808f2d7ae539c87","name":"Living Room Sconces On?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.living_room_sconces","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":680,"y":762,"wires":[["fc81cfda.29ff5"],[]]},{"id":"8a82f465.846018","type":"comment","z":"9584418c.dafc2","g":"b808f2d7ae539c87","name":"100% = 255","info":"","x":970,"y":773,"wires":[]},{"id":"d8ad0651.bf7a18","type":"api-call-service","z":"9584418c.dafc2","g":"b808f2d7ae539c87","name":"Set brightness to 80","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":[],"data":"{\"brightness\":\"80\",\"transition\": \"5\", \"entity_id\": msg.data.entity_id}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1000,"y":922,"wires":[[]]},{"id":"86bc310cbc0562af","type":"inject","z":"9584418c.dafc2","g":"11e25fc28c23144c","name":"At 10:30PM","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"30 22 * * *","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":170,"y":1200,"wires":[["2fb6a7afb6502a32","8c55985bffebd56a"]]},{"id":"2fb6a7afb6502a32","type":"api-call-service","z":"9584418c.dafc2","g":"11e25fc28c23144c","name":"Front Porch Lights Off","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"light","service":"turn_off","areaId":[],"deviceId":[],"entityId":["light.front_porch_lights"],"data":"{ \"transition\": 5 }","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":400,"y":1220,"wires":[[]]},{"id":"3f2a2e4d99057b69","type":"server-state-changed","z":"9584418c.dafc2","g":"bd2acc7efb5be5fd","name":"Front Door Motion","server":"e1dc0b88.463bb8","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"binary_sensor.front_door_all_occupancy","entityIdType":"exact","outputInitially":false,"stateType":"habool","ifState":"true","ifStateType":"bool","ifStateOperator":"is","outputOnlyOnStateChange":false,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":170,"y":1380,"wires":[["17b35d69307a8455","d11c183fff8d848d"],[]]},{"id":"3e399d83e4e7f4c3","type":"api-call-service","z":"9584418c.dafc2","g":"bd2acc7efb5be5fd","name":"Front Porch Lights to 254","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":["light.front_porch_lights"],"data":"{\"brightness\":\"254\",\"transition\":2}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":710,"y":1360,"wires":[["1ef176bec8ed5da0","59f5bc2571b0f12f"]]},{"id":"59f5bc2571b0f12f","type":"delay","z":"9584418c.dafc2","g":"bd2acc7efb5be5fd","name":"","pauseType":"delay","timeout":"60","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":560,"y":1440,"wires":[["c68c969a6b8c2833"]]},{"id":"c68c969a6b8c2833","type":"api-call-service","z":"9584418c.dafc2","g":"bd2acc7efb5be5fd","name":"Front Porch Lights Off","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"light","service":"turn_off","areaId":[],"deviceId":[],"entityId":["light.front_porch_lights"],"data":"{ \"transition\": 5 }","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":780,"y":1440,"wires":[["254a48eabb9cf476"]]},{"id":"d9cc182cc3eb2a93","type":"inject","z":"9584418c.dafc2","d":true,"g":"b808f2d7ae539c87","name":"At 10 PM","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"00 22 * * 3","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":160,"y":742,"wires":[["1457bf6605a50448"]]},{"id":"b1a99d9698d831b2","type":"server-state-changed","z":"9584418c.dafc2","g":"bd2acc7efb5be5fd","name":"Front Door Open","server":"e1dc0b88.463bb8","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"binary_sensor.front_door","entityIdType":"exact","outputInitially":false,"stateType":"habool","ifState":"true","ifStateType":"bool","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":160,"y":1440,"wires":[["17b35d69307a8455","d11c183fff8d848d"],[]]},{"id":"17b35d69307a8455","type":"within-time-switch","z":"9584418c.dafc2","g":"bd2acc7efb5be5fd","name":"","nameInt":"","positionConfig":"9f81fd881d01a666","startTime":"22:30","startTimeType":"entered","startOffset":0,"startOffsetType":"none","startOffsetMultiplier":60000,"endTime":"sunriseStart","endTimeType":"pdsTime","endOffset":"-30","endOffsetType":"num","endOffsetMultiplier":60000,"timeRestrictions":0,"timeRestrictionsType":"none","timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeOnlyOddWeeks":false,"timeOnlyEvenWeeks":false,"timeMonths":"*","timedatestart":"","timedateend":"","propertyStart":"","propertyStartType":"none","propertyStartCompare":"true","propertyStartThreshold":"","propertyStartThresholdType":"num","startTimeAlt":"","startTimeAltType":"entered","startOffsetAlt":0,"startOffsetAltType":"none","startOffsetAltMultiplier":60000,"propertyEnd":"","propertyEndType":"none","propertyEndCompare":"true","propertyEndThreshold":"","propertyEndThresholdType":"num","endTimeAlt":"","endTimeAltType":"entered","endOffsetAlt":0,"endOffsetAltType":"none","endOffsetAltMultiplier":60000,"withinTimeValue":"","withinTimeValueType":"msgInput","outOfTimeValue":"","outOfTimeValueType":"msgInput","tsCompare":"0","x":400,"y":1380,"wires":[["3e399d83e4e7f4c3"],[]]},{"id":"d11c183fff8d848d","type":"change","z":"9584418c.dafc2","g":"bd2acc7efb5be5fd","name":"Reset","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":350,"y":1440,"wires":[["59f5bc2571b0f12f"]]},{"id":"a9a323de66b6f772","type":"http request","z":"9584418c.dafc2","g":"35da177d9e2fd258","name":"Get Aircraft","method":"GET","ret":"obj","paytoqs":"ignore","url":"http://vrs:8080/VirtualRadar/AircraftList.json","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"other","keyValue":"Content-Type","valueType":"other","valueValue":"application/json"}],"x":610,"y":1660,"wires":[["7da69a7e8ecadc7c","91afebbf8b9edf05","4ca1a5ad47ce7a18","2cd08c8da06afaf6","43e5fa289c7550ff"]]},{"id":"ee139512bcad0966","type":"inject","z":"9584418c.dafc2","g":"35da177d9e2fd258","name":"Every 20 Seconds","props":[],"repeat":"20","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":190,"y":1660,"wires":[["ea239028eda07991"]]},{"id":"7da69a7e8ecadc7c","type":"function","z":"9584418c.dafc2","g":"35da177d9e2fd258","name":"Amazon","func":"var alert = {}\nvar message = \"Airborne:\\n\"\n\nfor (var i = 0; i < msg.payload.acList.length; i++) {\n if (typeof msg.payload.acList[i].Reg !== \"undefined\" && typeof msg.payload.acList[i].Man !== \"undefined\") {\n if (msg.payload.acList[i].Man.toLowerCase().includes(\"amazon\")) {\n //if (msg.payload.acList[i].Reg.endsWith(\"PA\") && msg.payload.acList[i].Man.toLowerCase().includes(\"amazon\")) {\n alert[msg.payload.acList[i].Reg] = msg.payload.acList[i].Icao\n }\n }\n}\n\nif (Object.keys(alert).length > 0) {\n for (const [key, value] of Object.entries(alert)) {\n message += key + \": https://globe.adsbexchange.com/?icao=\" + value + \"\\n\"\n }\n return { payload: message + \"https://vrs.aneis.ch\" }\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":780,"y":1660,"wires":[["5684b08aacd6d225"]]},{"id":"26e32b1d7824356a","type":"api-call-service","z":"9584418c.dafc2","g":"35da177d9e2fd258","name":"Notify Via Signal","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"notify","service":"signal_adsb","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": payload \t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1200,"y":1660,"wires":[[]]},{"id":"3a82b835.c57d48","type":"function","z":"9584418c.dafc2","g":"35da177d9e2fd258","name":"Rate Limiter","func":"var interval = (1000*60*10); // minimum interval between messages (ms)\ncontext.lastTime = context.lastTime || 0;\n\nvar now = Date.now();\n\nif (now-context.lastTime > interval) {\n context.lastTime = now;\n return msg;\n} else {\n return null;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1010,"y":1600,"wires":[["26e32b1d7824356a"]]},{"id":"91afebbf8b9edf05","type":"function","z":"9584418c.dafc2","g":"35da177d9e2fd258","name":"Interesting Tail #","func":"var alert = {}\nvar message = \"Interesting:\\n\"\n// N518GS George Strait\n// N628TS Elon\n// N898TS Taylor Swift\n// N621MM Taylor Swift\n// 82-8000 AF1\n// 92-9000 AF1\n// N5DA Don Adams Prop\n// N4DA Don Adams Lear\n// N68885 Zuckerberg\n// N681JK JB\n// N635PA\n// N628PA\n// N636PA\nvar interesting = [\"N68885\", \"N518GS\", \"N628TS\", \"82-8000\", \"92-9000\", \"N621MM\", \"N898TS\", \"N681JK\", \"N635PA\", \"N628PA\", \"N636PA\"]\n\nfor (var i = 0; i < msg.payload.acList.length; i++) {\n if (typeof msg.payload.acList[i].Reg !== \"undefined\") {\n if (interesting.includes(msg.payload.acList[i].Reg)) {\n alert[msg.payload.acList[i].Reg] = msg.payload.acList[i].Icao\n }\n }\n}\n\nif (Object.keys(alert).length > 0) {\n for (const [key, value] of Object.entries(alert)) {\n message += key + \": https://globe.adsbexchange.com/?icao=\" + value + \"\\n\"\n }\n return { payload: message + \"https://vrs.aneis.ch\" }\n}","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":800,"y":1600,"wires":[["3a82b835.c57d48"]]},{"id":"5684b08aacd6d225","type":"function","z":"9584418c.dafc2","g":"35da177d9e2fd258","name":"Rate Limiter","func":"var interval = (1000*60); // minimum interval between messages (ms)\ncontext.lastTime = context.lastTime || 0;\n\nvar now = Date.now();\n\nif (now-context.lastTime > interval) {\n context.lastTime = now;\n return msg;\n} else {\n return null;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1010,"y":1660,"wires":[["26e32b1d7824356a"]]},{"id":"4ca1a5ad47ce7a18","type":"function","z":"9584418c.dafc2","g":"35da177d9e2fd258","name":"Amazon Landing","func":"var alert = {}\nvar message = \"Landing:\\n\"\n\nfor (var i = 0; i < msg.payload.acList.length; i++) {\n if (typeof msg.payload.acList[i].Reg !== \"undefined\" && typeof msg.payload.acList[i].Man !== \"undefined\") {\n //if (msg.payload.acList[i].Reg.endsWith(\"PA\") && msg.payload.acList[i].Man.toLowerCase().includes(\"amazon\")) {\n if (msg.payload.acList[i].Man.toLowerCase().includes(\"amazon\")) {\n if (msg.payload.acList[i].Alt < 50){\n alert[msg.payload.acList[i].Reg] = msg.payload.acList[i].Icao\n }\n }\n }\n}\n\nif (Object.keys(alert).length > 0) {\n for (const [key, value] of Object.entries(alert)) {\n message += key + \": https://globe.adsbexchange.com/?icao=\" + value + \"\\n\"\n }\n return { payload: message + \"https://vrs.aneis.ch\" }\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":810,"y":1720,"wires":[["ba68e03143ba4af8"]]},{"id":"ba68e03143ba4af8","type":"function","z":"9584418c.dafc2","g":"35da177d9e2fd258","name":"Rate Limiter","func":"var interval = (1000*60); // minimum interval between messages (ms)\ncontext.lastTime = context.lastTime || 0;\n\nvar now = Date.now();\n\nif (now-context.lastTime > interval) {\n context.lastTime = now;\n return msg;\n} else {\n return null;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1010,"y":1720,"wires":[["26e32b1d7824356a"]]},{"id":"5f1d1b471a1c7cbb","type":"sqlite","z":"9584418c.dafc2","g":"35da177d9e2fd258","mydb":"4f8f8feffed26998","sqlquery":"msg.topic","sql":"","name":"Amazon","x":1000,"y":1780,"wires":[["ea911291f04c7d18"]]},{"id":"2cd08c8da06afaf6","type":"function","z":"9584418c.dafc2","g":"35da177d9e2fd258","name":"Write Amazon Landing","func":"var sql = \"\"\n\nfor (var i = 0; i < msg.payload.acList.length; i++) {\n var latlong = \"0,0\"\n if (typeof msg.payload.acList[i].Reg !== \"undefined\" && typeof msg.payload.acList[i].Lat !== \"undefined\" && typeof msg.payload.acList[i].Long !== \"undefined\") {\n //if (msg.payload.acList[i].Reg.endsWith(\"PA\") && msg.payload.acList[i].Man.toLowerCase().includes(\"amazon\")) {\n if (msg.payload.acList[i].Man.toLowerCase().includes(\"amazon\")) {\n if (msg.payload.acList[i].Alt < 50){\n latlong = msg.payload.acList[i].Lat + \",\" + msg.payload.acList[i].Long.toString()\n sql += `INSERT INTO deliveries (timestamp, registration, latlong, altitude) VALUES (\"${Date.now()}\", \"${msg.payload.acList[i].Reg}\", \"${latlong}\", \"${msg.payload.acList[i].Alt}\"); `\n }\n }\n }\n}\n\nif (sql.length > 0){\n msg.topic = sql\n return msg;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":820,"y":1780,"wires":[["5f1d1b471a1c7cbb"]]},{"id":"ea911291f04c7d18","type":"api-call-service","z":"9584418c.dafc2","g":"35da177d9e2fd258","name":"Generate Heatmap","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"shell_command","service":"generate_heatmap","areaId":[],"deviceId":[],"entityId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1210,"y":1780,"wires":[[]]},{"id":"cde7b3c9ca39891b","type":"link in","z":"9584418c.dafc2","g":"b808f2d7ae539c87","name":"","links":["1457bf6605a50448"],"x":325,"y":722,"wires":[["e93027cb.6a6308","ea2604f9.4cdf98","39a5ce57.78e3d2","77184c93.8790d4","8ee35d65.a7569","ea19fe14.80749","41b918d5.7ce018"]]},{"id":"1457bf6605a50448","type":"link out","z":"9584418c.dafc2","g":"b808f2d7ae539c87","name":"","links":["cde7b3c9ca39891b"],"x":295,"y":722,"wires":[]},{"id":"8c55985bffebd56a","type":"api-call-service","z":"9584418c.dafc2","g":"11e25fc28c23144c","name":"Front Sconces Off","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"light","service":"turn_off","areaId":[],"deviceId":[],"entityId":["light.front_sconces"],"data":"{ \"transition\": 5 }","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":390,"y":1160,"wires":[[]]},{"id":"fae7fa701710e258","type":"server-state-changed","z":"9584418c.dafc2","g":"bd2acc7efb5be5fd","name":"Front Door Unlock","server":"e1dc0b88.463bb8","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"lock.front_door","entityIdType":"exact","outputInitially":false,"stateType":"str","ifState":"unlocked","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":false,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":170,"y":1320,"wires":[["17b35d69307a8455","d11c183fff8d848d"],[]]},{"id":"ebe84a6f70b4bc2f","type":"inject","z":"9584418c.dafc2","g":"18fe74aea06a1180","name":"Every 30 Minutes","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"1800","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":190,"y":340,"wires":[["830c3ddd08ef396c"]]},{"id":"cf1c689e51b98aec","type":"api-current-state","z":"9584418c.dafc2","g":"18fe74aea06a1180","name":"Thermostat Idle","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"Idle","halt_if_type":"str","halt_if_compare":"is","entity_id":"sensor.thermostat_state","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":440,"y":340,"wires":[["6af7abba85612dd9"],[]]},{"id":"6af7abba85612dd9","type":"function","z":"9584418c.dafc2","g":"18fe74aea06a1180","name":"Idle > 2 hours","func":"// If last changed > 3 hours\nif (parseInt(msg.payload.timeSinceChangedMs) > 3600000*2) {\n return msg;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":560,"y":400,"wires":[["8b6280c5c448720c"]]},{"id":"8b6280c5c448720c","type":"api-call-service","z":"9584418c.dafc2","g":"18fe74aea06a1180","name":"Turn AC Fan on Low","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"climate","service":"set_fan_mode","areaId":[],"deviceId":[],"entityId":["climate.thermostat"],"data":"{\"fan_mode\":\"low\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":760,"y":340,"wires":[["9ce46ce21d8cc964"]]},{"id":"9ce46ce21d8cc964","type":"delay","z":"9584418c.dafc2","g":"18fe74aea06a1180","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":900,"y":400,"wires":[["2b6721107586ceae"]]},{"id":"2b6721107586ceae","type":"api-call-service","z":"9584418c.dafc2","g":"18fe74aea06a1180","name":"Turn AC Fan on Auto","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"climate","service":"set_fan_mode","areaId":[],"deviceId":[],"entityId":["climate.thermostat"],"data":"{\"fan_mode\":\"auto\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1060,"y":340,"wires":[[]]},{"id":"830c3ddd08ef396c","type":"api-current-state","z":"9584418c.dafc2","g":"18fe74aea06a1180","name":"Attic > 100","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"100","halt_if_type":"num","halt_if_compare":"gt","entity_id":"sensor.netatmo_home_attic_temperature","state_type":"str","blockInputOverrides":true,"outputProperties":[{"property":"attic","propertyType":"msg","value":"","valueType":"entityState"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":290,"y":400,"wires":[["cf1c689e51b98aec"],[]]},{"id":"43e5fa289c7550ff","type":"function","z":"9584418c.dafc2","d":true,"g":"35da177d9e2fd258","name":"Speedy","func":"var alert = {}\nvar message = \"Speedy:\\n\"\n\nfor (var i = 0; i < msg.payload.acList.length; i++) {\n if (typeof msg.payload.acList[i].Reg !== \"undefined\") {\n if (typeof msg.payload.acList[i].Spd == \"number\") {\n if (msg.payload.acList[i].Spd > 600) {\n alert[msg.payload.acList[i].Reg] = msg.payload.acList[i].Icao\n }\n }\n }\n}\n\nif (Object.keys(alert).length > 0) {\n for (const [key, value] of Object.entries(alert)) {\n message += key + \": https://globe.adsbexchange.com/?icao=\" + value + \"\\n\"\n }\n return { payload: message + \"https://vrs.aneis.ch\" }\n}","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":780,"y":1540,"wires":[["97761f13f8e5c31b"]]},{"id":"97761f13f8e5c31b","type":"function","z":"9584418c.dafc2","g":"35da177d9e2fd258","name":"Rate Limiter","func":"var interval = (1000*60*10); // minimum interval between messages (ms)\ncontext.lastTime = context.lastTime || 0;\n\nvar now = Date.now();\n\nif (now-context.lastTime > interval) {\n context.lastTime = now;\n return msg;\n} else {\n return null;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1010,"y":1540,"wires":[["26e32b1d7824356a"]]},{"id":"ed80a3f.522526","type":"server-state-changed","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Vehicle Detected","server":"e1dc0b88.463bb8","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"sensor.street_car_count","entityIdType":"exact","outputInitially":false,"stateType":"str","ifState":"0","ifStateType":"num","ifStateOperator":"gte","outputOnlyOnStateChange":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":160,"y":2200,"wires":[["3e6040dad6b140f5"],[]]},{"id":"f3a3e80f.3e8e38","type":"function","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Image to Payload","func":"msg = {\n payload: msg.payload,\n event_id: msg.event_id,\n loops: msg.loops\n};\n\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":930,"y":2200,"wires":[["e263410e9a3af7d8"]]},{"id":"6f08d11c854dfb00","type":"file","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Write File","filename":"/data/logo.jpg","filenameType":"str","appendNewline":true,"createDir":false,"overwriteFile":"true","encoding":"none","x":1020,"y":2260,"wires":[["b2a5543693ac851e"]]},{"id":"9b7c5535c74a94a3","type":"function","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Output msg","func":"msg = {\n payload: msg.outlinedImage,\n detection_result: msg.payload[0].label,\n event_id: msg.event_id\n};\n\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":850,"y":2260,"wires":[["6f08d11c854dfb00"]]},{"id":"d8a16fd91366d112","type":"switch","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Match Found","property":"payload","propertyType":"msg","rules":[{"t":"nempty"}],"checkall":"true","repair":false,"outputs":1,"x":430,"y":2260,"wires":[["63fd5090444c9cad"]]},{"id":"bcaf3569e7816922","type":"http request","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Get Events","method":"GET","ret":"txt","paytoqs":"ignore","url":"http://frigate:5000/api/events?cameras=driveway&labels=car&has_snapshot=1&zones=street&in_progress=1&limit=1","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":550,"y":2140,"wires":[["d58f6ef71c326040"]]},{"id":"d58f6ef71c326040","type":"function","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Extract Event ID","func":"if (JSON.parse(msg.payload).length > 0) {\n msg = {\n event_id: JSON.parse(msg.payload)[0].id,\n };\n return msg;\n}\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":540,"y":2200,"wires":[["c13f0f20a56d6af5"]]},{"id":"bd19a17005513c2f","type":"inject","z":"9584418c.dafc2","g":"3c4349a7eea9bd3b","name":"Every 15 Minutes","props":[],"repeat":"900","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":190,"y":1940,"wires":[["24d1a94e275e5e44","ab66afa5b576de3f","7a8e43b6f7c84bac","58d0c98797e19829","ccf5998fdf8ee50d"]]},{"id":"24d1a94e275e5e44","type":"http request","z":"9584418c.dafc2","g":"3c4349a7eea9bd3b","name":"Set Doorbell Online","method":"GET","ret":"bin","paytoqs":"ignore","url":"http://10.0.0.34/cgi-bin/configManager.cgi?action=setConfig&VSP_PaaS.Online=true","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"digest","senderr":false,"headers":[],"x":410,"y":2000,"wires":[[]]},{"id":"42be35f83b764861","type":"http request","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Add SubLabel","method":"POST","ret":"txt","paytoqs":"ignore","url":"http://frigate:5000/api/events/{{{event_id}}}/sub_label","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"other","keyValue":"Content-type","valueType":"other","valueValue":"application/json"}],"x":1340,"y":2200,"wires":[[]]},{"id":"b2a5543693ac851e","type":"function","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Detection to payload","func":"var new_msg = {\n payload: { \"subLabel\": msg.detection_result },\n detection_result: msg.detection_result,\n event_id: msg.event_id\n};\nvar msg = new_msg\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1280,"y":2260,"wires":[["42be35f83b764861","04300ba2a76891a6","0a096bcbb68139e5","c1fe21bcb3184137"]]},{"id":"c13f0f20a56d6af5","type":"http request","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Get Current Image","method":"GET","ret":"bin","paytoqs":"ignore","url":"http://frigate:1984/api/frame.jpeg?src=driveway&h=1000","tls":"","persist":true,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":730,"y":2200,"wires":[["f3a3e80f.3e8e38"]]},{"id":"7151828122e3b80c","type":"deepstack-custom-model","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Post to Deepstack","server":"96b8babe5c0a6107","confidence":"60","customModel":"delivery","drawPredictions":true,"outlineColor":"red","custom":"","outputs":1,"x":190,"y":2260,"wires":[["5acbb2cbdbdea368","bace446bfa7b343d"]]},{"id":"ea239028eda07991","type":"within-time-switch","z":"9584418c.dafc2","g":"35da177d9e2fd258","name":"","nameInt":"","positionConfig":"9f81fd881d01a666","startTime":"08:00:00","startTimeType":"entered","startOffset":0,"startOffsetType":"none","startOffsetMultiplier":60000,"endTime":"21:00:00","endTimeType":"entered","endOffset":0,"endOffsetType":"none","endOffsetMultiplier":60000,"timeRestrictions":0,"timeRestrictionsType":"none","timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeOnlyOddWeeks":false,"timeOnlyEvenWeeks":false,"timeMonths":"*","timedatestart":"","timedateend":"","propertyStart":"","propertyStartType":"none","propertyStartCompare":"true","propertyStartThreshold":"","propertyStartThresholdType":"num","startTimeAlt":"","startTimeAltType":"entered","startOffsetAlt":0,"startOffsetAltType":"none","startOffsetAltMultiplier":60000,"propertyEnd":"","propertyEndType":"none","propertyEndCompare":"true","propertyEndThreshold":"","propertyEndThresholdType":"num","endTimeAlt":"","endTimeAltType":"entered","endOffsetAlt":0,"endOffsetAltType":"none","endOffsetAltMultiplier":60000,"withinTimeValue":"true","withinTimeValueType":"msgInput","outOfTimeValue":"false","outOfTimeValueType":"msgInput","tsCompare":"0","x":410,"y":1660,"wires":[["a9a323de66b6f772"],[]]},{"id":"58d0c98797e19829","type":"http request","z":"9584418c.dafc2","d":true,"g":"3c4349a7eea9bd3b","name":"Set Camera 1 Online","method":"GET","ret":"bin","paytoqs":"ignore","url":"http://10.0.0.32/cgi-bin/configManager.cgi?action=setConfig&VSP_PaaS.Online=true","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"digest","senderr":false,"headers":[],"x":420,"y":1880,"wires":[[]]},{"id":"7a8e43b6f7c84bac","type":"http request","z":"9584418c.dafc2","d":true,"g":"3c4349a7eea9bd3b","name":"Set Camera 2 Online","method":"GET","ret":"bin","paytoqs":"ignore","url":"http://10.0.0.33/cgi-bin/configManager.cgi?action=setConfig&VSP_PaaS.Online=true","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"digest","senderr":false,"headers":[],"x":420,"y":1920,"wires":[[]]},{"id":"ab66afa5b576de3f","type":"http request","z":"9584418c.dafc2","d":true,"g":"3c4349a7eea9bd3b","name":"Set Camera 3 Online","method":"GET","ret":"bin","paytoqs":"ignore","url":"http://10.0.0.35/cgi-bin/configManager.cgi?action=setConfig&VSP_PaaS.Online=true","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"digest","senderr":false,"headers":[],"x":420,"y":1960,"wires":[[]]},{"id":"ccf5998fdf8ee50d","type":"http request","z":"9584418c.dafc2","d":true,"g":"3c4349a7eea9bd3b","name":"Set PTZ Online","method":"GET","ret":"bin","paytoqs":"ignore","url":"http://10.0.0.36/cgi-bin/configManager.cgi?action=setConfig&VSP_PaaS.Online=true","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"digest","senderr":false,"headers":[],"x":400,"y":2040,"wires":[[]]},{"id":"1ef176bec8ed5da0","type":"api-call-service","z":"9584418c.dafc2","g":"bd2acc7efb5be5fd","name":"Doorbell Ring Light On","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":["light.front_door_ring_light"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1020,"y":1340,"wires":[[]]},{"id":"254a48eabb9cf476","type":"api-call-service","z":"9584418c.dafc2","g":"bd2acc7efb5be5fd","name":"Doorbell Ring Light Off","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"light","service":"turn_off","areaId":[],"deviceId":[],"entityId":["light.front_door_ring_light"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1020,"y":1440,"wires":[[]]},{"id":"4e2d750742dc8890","type":"server-state-changed","z":"9584418c.dafc2","d":true,"g":"59ea88a27ef998e7","name":"Drone Motion Detected","server":"e1dc0b88.463bb8","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"binary_sensor.drone_detect_motion","entityIdType":"exact","outputInitially":false,"stateType":"str","ifState":"on","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":false,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":180,"y":2480,"wires":[["9799e777bb06f63f"],[]]},{"id":"cdc9c2c982e3fe5f","type":"function","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Image to Payload","func":"msg = {\n payload: msg.payload,\n loops: msg.loops\n};\n\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":890,"y":2480,"wires":[["b4392caec775b305"]]},{"id":"300267d7c89b0955","type":"debug","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Deepstack Output","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":420,"y":2620,"wires":[]},{"id":"1ae58f8afe36e04c","type":"http request","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Get Current Image","method":"GET","ret":"bin","paytoqs":"ignore","url":"http://frigate:5000/api/bullet/latest.jpg?quality=100","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":670,"y":2480,"wires":[["cdc9c2c982e3fe5f"]]},{"id":"5c59c5c412e759ce","type":"deepstack-custom-model","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Post to Deepstack","server":"96b8babe5c0a6107","confidence":"40","customModel":"delivery","drawPredictions":true,"outlineColor":"red","custom":"","outputs":1,"x":190,"y":2540,"wires":[["300267d7c89b0955","aa523c5cbfe26949","2f18405339079200"]]},{"id":"aa523c5cbfe26949","type":"image","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"","width":"800","data":"outlinedImage","dataType":"msg","thumbnail":false,"active":true,"pass":true,"outputs":1,"x":200,"y":2680,"wires":[[]]},{"id":"b4392caec775b305","type":"jimp-image","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"","data":"payload","dataType":"msg","ret":"buf","parameter1":"380","parameter1Type":"num","parameter2":"0","parameter2Type":"num","parameter3":"170","parameter3Type":"num","parameter4":"170","parameter4Type":"num","parameter5":"","parameter5Type":"msg","parameter6":"","parameter6Type":"msg","parameter7":"","parameter7Type":"msg","parameter8":"","parameter8Type":"msg","sendProperty":"payload","sendPropertyType":"msg","parameterCount":4,"jimpFunction":"crop","selectedJimpFunction":{"name":"crop","fn":"crop","description":"crop to the given region","parameters":[{"name":"x","type":"num","required":true,"hint":"the x coordinate to crop form"},{"name":"y","type":"num","required":true,"hint":"the y coordinate to crop form"},{"name":"w","type":"num","required":true,"hint":"the width of the crop region"},{"name":"h","type":"num","required":true,"hint":"the height of the crop region"}]},"x":1050,"y":2480,"wires":[["5c59c5c412e759ce","081d788e92e34986"]]},{"id":"81d6e9a99eb61c67","type":"switch","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Match Found","property":"payload","propertyType":"msg","rules":[{"t":"nempty"}],"checkall":"true","repair":false,"outputs":1,"x":690,"y":2540,"wires":[["8bec0433aa6e51fa"]]},{"id":"8bec0433aa6e51fa","type":"function","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Output msg","func":"var oldmsg = msg;\n\nmsg = {\n payload: msg.outlinedImage,\n detection_result: msg.payload[0].label,\n};\n\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":890,"y":2540,"wires":[["1aa9e39b6be88864","b4d7bb6e129bacea"]]},{"id":"1aa9e39b6be88864","type":"file","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Write File","filename":"/data/logo.jpg","filenameType":"str","appendNewline":true,"createDir":false,"overwriteFile":"true","encoding":"none","x":1060,"y":2540,"wires":[["ec51454057c055e2"]]},{"id":"ec51454057c055e2","type":"function","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Detection to payload","func":"var new_msg = {\n payload: { \"subLabel\": msg.detection_result },\n detection_result: msg.detection_result,\n event_id: msg.event_id\n};\nvar msg = new_msg\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":1260,"y":2540,"wires":[["6d56b297fcfe0016"]]},{"id":"765c7c5a61100728","type":"http request","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Create Event","method":"POST","ret":"txt","paytoqs":"ignore","url":"http://frigate:5000/api/events/drone_detect/PrimeAir/create","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"other","keyValue":"Content-type","valueType":"other","valueValue":"application/json"}],"x":1270,"y":2600,"wires":[[]]},{"id":"1bda1e8b7f76e5f3","type":"http request","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Create Event","method":"POST","ret":"txt","paytoqs":"ignore","url":"http://frigate:5000/api/events/back_porch/PrimeAir/create","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"other","keyValue":"Content-type","valueType":"other","valueValue":"application/json"}],"x":1270,"y":2640,"wires":[[]]},{"id":"14855ff357d5fbad","type":"mqtt out","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"","topic":"frigate/events","qos":"","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"546e31ed.0db1c","x":1360,"y":2680,"wires":[]},{"id":"a95b4fa60f1238d7","type":"function","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Build MQTT","func":"msg.payload = {'type':'update', 'after':{'label':'PrimeAir'}}\n\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1190,"y":2680,"wires":[["14855ff357d5fbad"]]},{"id":"081d788e92e34986","type":"image","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"","width":"800","data":"payload","dataType":"msg","thumbnail":false,"active":true,"pass":true,"outputs":1,"x":1000,"y":2680,"wires":[[]]},{"id":"9799e777bb06f63f","type":"within-time-switch","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"","nameInt":"","positionConfig":"9f81fd881d01a666","startTime":"08:30:00","startTimeType":"entered","startOffset":0,"startOffsetType":"none","startOffsetMultiplier":60000,"endTime":"15:30:00","endTimeType":"entered","endOffset":0,"endOffsetType":"none","endOffsetMultiplier":60000,"timeRestrictions":0,"timeRestrictionsType":"none","timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeOnlyOddWeeks":false,"timeOnlyEvenWeeks":false,"timeMonths":"*","timedatestart":"","timedateend":"","propertyStart":"","propertyStartType":"none","propertyStartCompare":"true","propertyStartThreshold":"","propertyStartThresholdType":"num","startTimeAlt":"","startTimeAltType":"entered","startOffsetAlt":0,"startOffsetAltType":"none","startOffsetAltMultiplier":60000,"propertyEnd":"","propertyEndType":"none","propertyEndCompare":"true","propertyEndThreshold":"","propertyEndThresholdType":"num","endTimeAlt":"","endTimeAltType":"entered","endOffsetAlt":0,"endOffsetAltType":"none","endOffsetAltMultiplier":60000,"withinTimeValue":"true","withinTimeValueType":"msgInput","outOfTimeValue":"false","outOfTimeValueType":"msgInput","tsCompare":"0","x":430,"y":2480,"wires":[["1ae58f8afe36e04c"],[]]},{"id":"6d56b297fcfe0016","type":"function","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Rate Limiter","func":"var interval = (1000*30); // minimum interval between messages (ms)\ncontext.lastTime = context.lastTime || 0;\n\nvar now = Date.now();\n\nif (now-context.lastTime > interval) {\n context.lastTime = now;\n return msg;\n} else {\n return null;\n}","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":1070,"y":2600,"wires":[["a95b4fa60f1238d7","1bda1e8b7f76e5f3","765c7c5a61100728","b442c20392c7ce60"]]},{"id":"2f18405339079200","type":"while-loop","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Loop \"payload.length == 0\"","condi":"msg.payload.length == 0","limit":true,"limitTime":"10","time":"loops","timeType":"msg","x":460,"y":2540,"wires":[["81d6e9a99eb61c67"],["1ae58f8afe36e04c"]]},{"id":"bace446bfa7b343d","type":"while-loop","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Loop \"msg.payload.length == 0\"","condi":"msg.payload.length == 0","limit":true,"limitTime":"4","time":"loops","timeType":"msg","x":240,"y":2340,"wires":[["d8a16fd91366d112"],["c13f0f20a56d6af5"]]},{"id":"b4d7bb6e129bacea","type":"debug","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Write Match Image","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":740,"y":2600,"wires":[]},{"id":"b442c20392c7ce60","type":"debug","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Call Frigate API","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":750,"y":2680,"wires":[]},{"id":"5acbb2cbdbdea368","type":"image","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"","width":"800","data":"outlinedImage","dataType":"msg","thumbnail":false,"active":true,"pass":true,"outputs":1,"x":200,"y":2380,"wires":[[]]},{"id":"c061be05c01527e0","type":"image","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"","width":"800","data":"payload","dataType":"msg","thumbnail":false,"active":true,"pass":true,"outputs":1,"x":1060,"y":2380,"wires":[[]]},{"id":"ec6b4698123ebc34","type":"inject","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Manually Create Event","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":1280,"y":2480,"wires":[["6d56b297fcfe0016"]]},{"id":"e263410e9a3af7d8","type":"jimp-image","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"","data":"payload","dataType":"msg","ret":"buf","parameter1":"650","parameter1Type":"num","parameter2":"0","parameter2Type":"num","parameter3":"625","parameter3Type":"num","parameter4":"130","parameter4Type":"num","parameter5":"","parameter5Type":"msg","parameter6":"","parameter6Type":"msg","parameter7":"","parameter7Type":"msg","parameter8":"","parameter8Type":"msg","sendProperty":"payload","sendPropertyType":"msg","parameterCount":4,"jimpFunction":"crop","selectedJimpFunction":{"name":"crop","fn":"crop","description":"crop to the given region","parameters":[{"name":"x","type":"num","required":true,"hint":"the x coordinate to crop form"},{"name":"y","type":"num","required":true,"hint":"the y coordinate to crop form"},{"name":"w","type":"num","required":true,"hint":"the width of the crop region"},{"name":"h","type":"num","required":true,"hint":"the height of the crop region"}]},"x":1110,"y":2200,"wires":[["7151828122e3b80c","a12e93d199527cae","c061be05c01527e0"]]},{"id":"5123f652827fa902","type":"inject","z":"9584418c.dafc2","d":true,"g":"cb7e3560a0078392","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"30","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":170,"y":2860,"wires":[["970920516fa379e8","88d3b091fc333998"]]},{"id":"970920516fa379e8","type":"http request","z":"9584418c.dafc2","d":true,"g":"cb7e3560a0078392","name":"PHX","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://ttp.cbp.dhs.gov/schedulerapi/slot-availability?locationId=7160","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":330,"y":2860,"wires":[["51f2291060d07336"]]},{"id":"51f2291060d07336","type":"function","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"11/07","func":"var oldmsg = msg;\nvar match = false\nvar slots = ''\n\nfor (var i = 0; i < msg.payload.availableSlots.length; i++) {\n if (msg.payload.availableSlots[i].startTimestamp.includes('2023-11-07')){\n console.log(msg.payload.availableSlots[i].startTimestamp)\n slots += msg.payload.availableSlots[i].startTimestamp + ' '\n match = true\n }\n}\n\nmsg = {\n payload: \"PHX: \" + slots + \"https://ttp.cbp.dhs.gov/schedulerui/schedule-interview/location?lang=en&vo=true&returnUrl=ttp-external&service=UP\",\n 'match': match\n};\n\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":470,"y":2860,"wires":[["7415468104c18108","a61d605915dc23ff"]]},{"id":"91d3d26774f9468e","type":"debug","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"HOU","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":630,"y":2820,"wires":[]},{"id":"7415468104c18108","type":"debug","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"PHX","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":630,"y":2900,"wires":[]},{"id":"b8a4a1ee4e15f778","type":"api-call-service","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"Notify Via Signal","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"notify","service":"signal_self","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": msg.payload\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":960,"y":2860,"wires":[[]]},{"id":"79c00f8c61888f52","type":"switch","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"","property":"match","propertyType":"msg","rules":[{"t":"true"}],"checkall":"true","repair":false,"outputs":1,"x":610,"y":2780,"wires":[["c44a5c4d6d17ee9f"]]},{"id":"a61d605915dc23ff","type":"switch","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"","property":"match","propertyType":"msg","rules":[{"t":"true"}],"checkall":"true","repair":false,"outputs":1,"x":610,"y":2860,"wires":[["fa9f2ef8fecf1de2"]]},{"id":"c44a5c4d6d17ee9f","type":"function","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"Rate Limiter","func":"var interval = (1000*600); // minimum interval between messages (ms)\ncontext.lastTime = context.lastTime || 0;\n\nvar now = Date.now();\n\nif (now-context.lastTime > interval) {\n context.lastTime = now;\n return msg;\n} else {\n return null;\n}","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":770,"y":2780,"wires":[["d5ab0aa6d198ba81"]]},{"id":"fa9f2ef8fecf1de2","type":"function","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"Rate Limiter","func":"var interval = (1000*600); // minimum interval between messages (ms)\ncontext.lastTime = context.lastTime || 0;\n\nvar now = Date.now();\n\nif (now-context.lastTime > interval) {\n context.lastTime = now;\n return msg;\n} else {\n return null;\n}","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":770,"y":2860,"wires":[["b8a4a1ee4e15f778"]]},{"id":"7d01abce7bc68291","type":"function","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"All","func":"var oldmsg = msg;\nvar slots = msg.payload.availableSlots\n\n// Pass message if slots not empty\nif(slots.length > 0){\n msg.message = slots[0].startTimestamp\n return msg;\n}","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":470,"y":2940,"wires":[["1480d9470754a6a3","b7c50947c4507d03"]]},{"id":"b7c50947c4507d03","type":"switch","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"","property":"payload","propertyType":"msg","rules":[{"t":"nempty"}],"checkall":"true","repair":false,"outputs":1,"x":610,"y":2940,"wires":[["ca8d58af48d7b7c5","414a38bf0735b27c"]]},{"id":"1480d9470754a6a3","type":"debug","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"DAL","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":630,"y":2980,"wires":[]},{"id":"ca8d58af48d7b7c5","type":"function","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"Rate Limiter","func":"var interval = (1000*120); // minimum interval between messages (ms)\ncontext.lastTime = context.lastTime || 0;\n\nvar now = Date.now();\n\nif (now-context.lastTime > interval) {\n context.lastTime = now;\n return msg;\n} else {\n return null;\n}","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":770,"y":2940,"wires":[["414a38bf0735b27c","bfbece91f0b61e8b"]]},{"id":"414a38bf0735b27c","type":"api-call-service","z":"9584418c.dafc2","d":true,"g":"cb7e3560a0078392","name":"Notify Via Signal","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"notify","service":"signal_self","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": \"Dallas https://ttp.cbp.dhs.gov/schedulerui/schedule-interview/location?lang=en&vo=true&returnUrl=ttp-external&service=UP\"\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":960,"y":2940,"wires":[[]]},{"id":"c0546e86d17e99e9","type":"function","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"11/03","func":"var oldmsg = msg;\nvar match = false\nvar slots = ''\n\nfor (var i = 0; i < msg.payload.availableSlots.length; i++) {\n if (msg.payload.availableSlots[i].startTimestamp.includes('2023-11-03')){\n console.log(msg.payload.availableSlots[i].startTimestamp)\n slots += msg.payload.availableSlots[i].startTimestamp + ' '\n match = true\n }\n}\n\nmsg = {\n payload: \"HOU: \" + slots + \"https://ttp.cbp.dhs.gov/schedulerui/schedule-interview/location?lang=en&vo=true&returnUrl=ttp-external&service=UP\",\n 'match': match\n};\n\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":470,"y":2780,"wires":[["91d3d26774f9468e","79c00f8c61888f52"]]},{"id":"d5ab0aa6d198ba81","type":"api-call-service","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"Notify Via Signal","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"notify","service":"signal_self","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": msg.payload\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":960,"y":2780,"wires":[[]]},{"id":"83e2179938d08d58","type":"api-call-service","z":"9584418c.dafc2","g":"26b2ac79d4c32bda","name":"Timelapse Snapshots","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"camera","service":"snapshot","areaId":[],"deviceId":[],"entityId":["camera.back_porch","camera.bullet","camera.driveway","camera.front_door"],"data":"{\"filename\":\"/config/media/images/{{ entity_id.entity_id }}/{{ now().strftime('%Y%m%d-%H%M%S') }}.webp\"}","dataType":"json","mergeContext":"","mustacheAltTags":true,"outputProperties":[],"queue":"none","x":540,"y":3220,"wires":[[]]},{"id":"59e4459459f077c9","type":"time-inject","z":"9584418c.dafc2","g":"26b2ac79d4c32bda","name":"Golden Hour Dawn End","nameInt":"⏲ golden hour dawn end = $!{lblInject}!","positionConfig":"9f81fd881d01a666","props":[],"injectTypeSelect":"time","intervalCount":1,"intervalCountType":"num","intervalCountMultiplier":60000,"time":"goldenHourDawnEnd","timeType":"pdsTime","offset":0,"offsetType":"none","offsetMultiplier":60000,"timeEnd":"","timeEndType":"entered","timeEndOffset":0,"timeEndOffsetType":"none","timeEndOffsetMultiplier":60000,"timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeOnlyOddWeeks":false,"timeOnlyEvenWeeks":false,"timeMonths":"*","timedatestart":"","timedateend":"","property":"","propertyType":"none","propertyCompare":"true","propertyThreshold":"","propertyThresholdType":"num","timeAlt":"","timeAltType":"entered","timeAltDays":"*","timeAltOnlyOddDays":false,"timeAltOnlyEvenDays":false,"timeAltOnlyOddWeeks":false,"timeAltOnlyEvenWeeks":false,"timeAltMonths":"*","timeAltOffset":0,"timeAltOffsetType":"none","timeAltOffsetMultiplier":60000,"once":false,"onceDelay":0.1,"recalcTime":2,"x":200,"y":3140,"wires":[["83e2179938d08d58"]]},{"id":"089b07fa48286f29","type":"time-inject","z":"9584418c.dafc2","g":"26b2ac79d4c32bda","name":"Golden Hour Dusk Start","nameInt":"⏲ golden hour dusk start = $!{lblInject}!","positionConfig":"9f81fd881d01a666","props":[],"injectTypeSelect":"time","intervalCount":1,"intervalCountType":"num","intervalCountMultiplier":60000,"time":"goldenHourDuskStart","timeType":"pdsTime","offset":0,"offsetType":"none","offsetMultiplier":60000,"timeEnd":"","timeEndType":"entered","timeEndOffset":0,"timeEndOffsetType":"none","timeEndOffsetMultiplier":60000,"timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeOnlyOddWeeks":false,"timeOnlyEvenWeeks":false,"timeMonths":"*","timedatestart":"","timedateend":"","property":"","propertyType":"none","propertyCompare":"true","propertyThreshold":"","propertyThresholdType":"num","timeAlt":"","timeAltType":"entered","timeAltDays":"*","timeAltOnlyOddDays":false,"timeAltOnlyEvenDays":false,"timeAltOnlyOddWeeks":false,"timeAltOnlyEvenWeeks":false,"timeAltMonths":"*","timeAltOffset":0,"timeAltOffsetType":"none","timeAltOffsetMultiplier":60000,"once":false,"onceDelay":0.1,"recalcTime":2,"x":200,"y":3320,"wires":[["83e2179938d08d58"]]},{"id":"7ff9bf1a917cbf50","type":"time-inject","z":"9584418c.dafc2","g":"26b2ac79d4c32bda","name":"Golden Hour Dusk Start - 3h","nameInt":"⏲ golden hour dusk start↶ = $!{lblInject}!","positionConfig":"9f81fd881d01a666","props":[],"injectTypeSelect":"time","intervalCount":1,"intervalCountType":"num","intervalCountMultiplier":60000,"time":"goldenHourDuskStart","timeType":"pdsTime","offset":"-3","offsetType":"num","offsetMultiplier":3600000,"timeEnd":"","timeEndType":"entered","timeEndOffset":0,"timeEndOffsetType":"none","timeEndOffsetMultiplier":60000,"timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeOnlyOddWeeks":false,"timeOnlyEvenWeeks":false,"timeMonths":"*","timedatestart":"","timedateend":"","property":"","propertyType":"none","propertyCompare":"true","propertyThreshold":"","propertyThresholdType":"num","timeAlt":"","timeAltType":"entered","timeAltDays":"*","timeAltOnlyOddDays":false,"timeAltOnlyEvenDays":false,"timeAltOnlyOddWeeks":false,"timeAltOnlyEvenWeeks":false,"timeAltMonths":"*","timeAltOffset":0,"timeAltOffsetType":"none","timeAltOffsetMultiplier":60000,"once":false,"onceDelay":0.1,"recalcTime":2,"x":220,"y":3260,"wires":[["83e2179938d08d58"]]},{"id":"a826a8c498d6d1e3","type":"time-inject","z":"9584418c.dafc2","g":"26b2ac79d4c32bda","name":"Golden Hour Dawn End + 3h","nameInt":"⏲ golden hour dawn end↷ = $!{lblInject}!","positionConfig":"9f81fd881d01a666","props":[],"injectTypeSelect":"time","intervalCount":1,"intervalCountType":"num","intervalCountMultiplier":60000,"time":"goldenHourDawnEnd","timeType":"pdsTime","offset":"3","offsetType":"num","offsetMultiplier":3600000,"timeEnd":"","timeEndType":"entered","timeEndOffset":0,"timeEndOffsetType":"none","timeEndOffsetMultiplier":60000,"timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeOnlyOddWeeks":false,"timeOnlyEvenWeeks":false,"timeMonths":"*","timedatestart":"","timedateend":"","property":"","propertyType":"none","propertyCompare":"true","propertyThreshold":"","propertyThresholdType":"num","timeAlt":"","timeAltType":"entered","timeAltDays":"*","timeAltOnlyOddDays":false,"timeAltOnlyEvenDays":false,"timeAltOnlyOddWeeks":false,"timeAltOnlyEvenWeeks":false,"timeAltMonths":"*","timeAltOffset":0,"timeAltOffsetType":"none","timeAltOffsetMultiplier":60000,"once":false,"onceDelay":0.1,"recalcTime":2,"x":220,"y":3200,"wires":[["83e2179938d08d58"]]},{"id":"c5c85c0aa2d8c8ca","type":"server-state-changed","z":"9584418c.dafc2","g":"cf3a0410bcf837ae","name":"Safe Opened","server":"e1dc0b88.463bb8","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"binary_sensor.large_safe","entityIdType":"exact","outputInitially":false,"stateType":"habool","ifState":"true","ifStateType":"bool","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":530,"y":80,"wires":[["c5124616.c9bd48"],[]]},{"id":"fa90c550.d6c948","type":"inject","z":"9584418c.dafc2","d":true,"g":"b808f2d7ae539c87","name":"At 8 PM","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"00 20 * * 1,2,4,5,6,0","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":160,"y":700,"wires":[["1457bf6605a50448"]]},{"id":"08b26d8311cd9187","type":"inject","z":"9584418c.dafc2","d":true,"g":"6f393a92ae952332","name":"Every 5 minutes","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"300","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":190,"y":3480,"wires":[["716e8fabff85ffb9","7b988b93a658f526","d85faf19968afde1"]]},{"id":"716e8fabff85ffb9","type":"api-current-state","z":"9584418c.dafc2","g":"6f393a92ae952332","name":"Attic Temperature < 34","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"34","halt_if_type":"num","halt_if_compare":"lt","entity_id":"sensor.netatmo_home_attic_temperature","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":420,"y":3420,"wires":[["16e1a3e2f53e6bdf"],[]]},{"id":"7b988b93a658f526","type":"api-current-state","z":"9584418c.dafc2","g":"6f393a92ae952332","name":"Thermostat Outdoor Temperature <= 35","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"35","halt_if_type":"num","halt_if_compare":"lte","entity_id":"sensor.thermostat_outdoor_ambient_temperature","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":480,"y":3480,"wires":[["16e1a3e2f53e6bdf"],[]]},{"id":"7fe1e564efbd46af","type":"api-call-service","z":"9584418c.dafc2","g":"6f393a92ae952332","name":"Turn on Faucet Drip","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"homeassistant","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.bhyve_1"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":970,"y":3480,"wires":[[]]},{"id":"16e1a3e2f53e6bdf","type":"api-current-state","z":"9584418c.dafc2","g":"6f393a92ae952332","name":"Faucet Drip Off?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","entity_id":"switch.bhyve_1","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":780,"y":3480,"wires":[["7fe1e564efbd46af"],[]]},{"id":"d85faf19968afde1","type":"api-current-state","z":"9584418c.dafc2","g":"6f393a92ae952332","name":"Compost External Temperature < 34","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"34","halt_if_type":"num","halt_if_compare":"lt","entity_id":"sensor.compost_external_temperature","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":470,"y":3540,"wires":[["16e1a3e2f53e6bdf"],[]]},{"id":"504a90c2bb116cda","type":"inject","z":"9584418c.dafc2","name":"On Demand","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":690,"y":1920,"wires":[["f7c82af0e299c914"]]},{"id":"f7c82af0e299c914","type":"http request","z":"9584418c.dafc2","name":"Enable Overlay","method":"GET","ret":"bin","paytoqs":"ignore","url":"http://10.0.0.32/cgi-bin/configManager.cgi?action=setConfig&VideoWidget[0].CustomTitle[1].EncodeBlend=true","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"digest","senderr":false,"headers":[],"x":900,"y":1920,"wires":[[]]},{"id":"aa9d132ce4c33794","type":"http request","z":"9584418c.dafc2","name":"Set Overlay Text","method":"GET","ret":"bin","paytoqs":"ignore","url":"http://10.0.0.32/cgi-bin/configManager.cgi?action=setConfig&VideoWidget[0].CustomTitle[1].Text={{{payload}}}°F","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"digest","senderr":false,"headers":[],"x":1140,"y":1980,"wires":[[]]},{"id":"8f9a073f4ebb3133","type":"inject","z":"9584418c.dafc2","name":"On Demand */5","props":[],"repeat":"300","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":700,"y":1980,"wires":[["446f812e8b1f4307"]]},{"id":"acd933c5c0eddc8b","type":"http request","z":"9584418c.dafc2","name":"Disable Overlay","method":"GET","ret":"bin","paytoqs":"ignore","url":"http://10.0.0.32/cgi-bin/configManager.cgi?action=setConfig&VideoWidget[0].CustomTitle[1].EncodeBlend=false","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"digest","senderr":false,"headers":[],"x":900,"y":2040,"wires":[[]]},{"id":"6d26bb1db9ea5e67","type":"inject","z":"9584418c.dafc2","name":"On Demand","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":690,"y":2040,"wires":[["acd933c5c0eddc8b"]]},{"id":"446f812e8b1f4307","type":"api-current-state","z":"9584418c.dafc2","name":"Outdoor Temperature","server":"e1dc0b88.463bb8","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"sensor.433_weather_temperature","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":920,"y":1980,"wires":[["aa9d132ce4c33794"]]},{"id":"7eb1a3d60fccbc76","type":"Mailin SMTP","z":"9584418c.dafc2","g":"e28fc796ce042622","name":"Recieve Mail","port":25,"x":150,"y":3660,"wires":[["1cd709e001bf5e89"]]},{"id":"cb1f141562c8fd2b","type":"api-call-service","z":"9584418c.dafc2","g":"e28fc796ce042622","name":"Notify Cellular Priority 1","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"notify","service":"cellular_message","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": payload.html, \"data\": {\"priority\": 1} \t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":810,"y":3640,"wires":[[]]},{"id":"88d3b091fc333998","type":"http request","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"DAL","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://ttp.cbp.dhs.gov/schedulerapi/slot-availability?locationId=5300","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":330,"y":2940,"wires":[["7d01abce7bc68291"]]},{"id":"1cd709e001bf5e89","type":"within-time-switch","z":"9584418c.dafc2","g":"e28fc796ce042622","name":"","nameInt":"","positionConfig":"9f81fd881d01a666","startTime":"09:00:00","startTimeType":"entered","startOffset":0,"startOffsetType":"none","startOffsetMultiplier":60000,"endTime":"22:00:00","endTimeType":"entered","endOffset":0,"endOffsetType":"none","endOffsetMultiplier":60000,"timeRestrictions":0,"timeRestrictionsType":"none","timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeOnlyOddWeeks":false,"timeOnlyEvenWeeks":false,"timeMonths":"*","timedatestart":"","timedateend":"","propertyStart":"","propertyStartType":"none","propertyStartCompare":"true","propertyStartThreshold":"","propertyStartThresholdType":"num","startTimeAlt":"","startTimeAltType":"entered","startOffsetAlt":0,"startOffsetAltType":"none","startOffsetAltMultiplier":60000,"propertyEnd":"","propertyEndType":"none","propertyEndCompare":"true","propertyEndThreshold":"","propertyEndThresholdType":"num","endTimeAlt":"","endTimeAltType":"entered","endOffsetAlt":0,"endOffsetAltType":"none","endOffsetAltMultiplier":60000,"withinTimeValue":"true","withinTimeValueType":"msgInput","outOfTimeValue":"false","outOfTimeValueType":"msgInput","tsCompare":"0","x":370,"y":3660,"wires":[["24fc1882c8436738"],["7f48460e08988c9e"]]},{"id":"7f48460e08988c9e","type":"api-call-service","z":"9584418c.dafc2","g":"e28fc796ce042622","name":"Notify Cellular Priority 0","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"notify","service":"cellular_message","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": payload.html, \"data\": {\"priority\": 0} \t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":810,"y":3700,"wires":[[]]},{"id":"24fc1882c8436738","type":"api-current-state","z":"9584418c.dafc2","g":"e28fc796ce042622","name":"Andrew Home?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"home","halt_if_type":"str","halt_if_compare":"is","entity_id":"person.andrew","state_type":"habool","blockInputOverrides":false,"outputProperties":[],"for":0,"forType":"num","forUnits":"minutes","x":580,"y":3640,"wires":[["cb1f141562c8fd2b"],["7f48460e08988c9e"]]},{"id":"d9e9a93275328762","type":"inject","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":780,"y":2140,"wires":[["c13f0f20a56d6af5"]]},{"id":"a12e93d199527cae","type":"file","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Write File","filename":"/data/input.jpg","filenameType":"str","appendNewline":true,"createDir":false,"overwriteFile":"true","encoding":"none","x":1200,"y":2140,"wires":[[]]},{"id":"f8a0990e2842810d","type":"server-state-changed","z":"9584418c.dafc2","name":"Dead Zwave Node","server":"e1dc0b88.463bb8","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"_node_status","entityIdType":"substring","outputInitially":false,"stateType":"str","ifState":"dead","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":170,"y":3780,"wires":[["1ba5d7539019ce84"],[]]},{"id":"1ba5d7539019ce84","type":"api-call-service","z":"9584418c.dafc2","name":"Notify Via Signal","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"notify","service":"signal_homeassistant","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": topic & \" has died\" }","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":420,"y":3780,"wires":[[]]},{"id":"1b266e9b338a4dfe","type":"debug","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"BB Debug","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1040,"y":3040,"wires":[]},{"id":"85644b2ab18e7141","type":"http request","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"BlueBubbles","method":"POST","ret":"txt","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"other","keyValue":"bb-aneisch","valueType":"other","valueValue":"true"}],"x":870,"y":3040,"wires":[["1b266e9b338a4dfe"]]},{"id":"041a81d375ec985d","type":"function","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"Build BB Message","func":"msg.url = msg.payload + \"/api/v1/message/text?password=\" + env.get(\"bb_pass\")\nmsg.payload = {\n \"chatGuid\": \"iMessage;-;+\" + env.get(\"bb_number\"),\n \"message\": \" https://ttp.cbp.dhs.gov/schedulerui/schedule-interview/location?lang=en&vo=true&returnUrl=ttp-external&service=UP\",\n \"method\": \"private-api\"\n}\n\nreturn msg;\n\n","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":670,"y":3040,"wires":[["85644b2ab18e7141"]]},{"id":"bfbece91f0b61e8b","type":"api-current-state","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"Get BlueBubbles URL","server":"e1dc0b88.463bb8","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_text.bluebubbles_url","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":250,"y":3040,"wires":[["f3b23466b80725e0"]]},{"id":"f3b23466b80725e0","type":"json","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"Object to JSON","property":"message","action":"str","pretty":false,"x":460,"y":3040,"wires":[["041a81d375ec985d"]]},{"id":"b4b8f84a.7e57a8","type":"jimp-image","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Annotate","data":"outlinedImage","dataType":"msg","ret":"buf","parameter1":"FONT_SANS_16_WHITE","parameter1Type":"jimpFont","parameter2":"10","parameter2Type":"num","parameter3":"0","parameter3Type":"num","parameter4":"timestamp","parameter4Type":"msg","parameter5":"HORIZONTAL_ALIGN_LEFT","parameter5Type":"AlignX","parameter6":"VERTICAL_ALIGN_TOP","parameter6Type":"AlignY","parameter7":"","parameter7Type":"auto","parameter8":"","parameter8Type":"auto","sendProperty":"outlinedImage","parameterCount":8,"jimpFunction":"print2","selectedJimpFunction":{"name":"print aligned","fn":"print","description":"Print text to the image","parameters":[{"name":"font|str","type":"jimpFont","required":true,"hint":"font to print. NOTE: This can be one of the presets or the path to a fnt file"},{"name":"x","type":"num","required":true,"hint":"x coordinate to print text"},{"name":"y","type":"num","required":true,"hint":"y coordinate to print text"},{"name":"text","group":"options","type":"str","required":true,"hint":"text to print"},{"name":"alignmentX","group":"options","type":"AlignX","required":false,"hint":"X Alignment"},{"name":"alignmentY","group":"options","type":"AlignY","required":false,"hint":"Y Alignment"},{"name":"maxWidth","type":"auto|num","required":false,"hint":"wrap text at maxWidth"},{"name":"maxHeight","type":"auto|num","required":false,"hint":"max height"}]},"x":700,"y":2260,"wires":[["9b7c5535c74a94a3","2dfdead1d2e3b78b"]],"icon":"font-awesome/fa-image"},{"id":"63fd5090444c9cad","type":"api-render-template","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Time","server":"e1dc0b88.463bb8","version":0,"template":"{{ now().strftime(\"%m-%d-%YT%H:%M:%S\") }}","resultsLocation":"timestamp","resultsLocationType":"msg","templateLocation":"","templateLocationType":"none","x":570,"y":2260,"wires":[["b4b8f84a.7e57a8"]]},{"id":"2dfdead1d2e3b78b","type":"debug","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Post Annotate","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":560,"y":2360,"wires":[]},{"id":"c1fe21bcb3184137","type":"debug","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Post Output msg","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":810,"y":2360,"wires":[]},{"id":"28fa66cd.af058a","type":"trigger","z":"9584418c.dafc2","g":"cf3a0410bcf837ae","name":"Wait 1m","op1":"","op2":"1","op1type":"nul","op2type":"str","duration":"1","extend":false,"overrideDelay":false,"units":"min","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":620,"y":120,"wires":[["2022689a.938918"]]},{"id":"aee87977a0670889","type":"api-call-service","z":"9584418c.dafc2","g":"cf3a0410bcf837ae","name":"Notify Via Wrapper: Opened 5 Minutes","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"script","service":"notify_wrapper","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": \"The \" & $lowercase(msg.data.new_state.attributes.friendly_name) & \" has been opened for 5 minutes\"\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":890,"y":160,"wires":[[]]},{"id":"5caa1a9942bc27ee","type":"function","z":"9584418c.dafc2","g":"445e81780ba935ac","name":"Image to Payload","func":"msg = {\n payload: msg.payload,\n event_id: msg.event_id,\n loops: msg.loops,\n looking_for: msg.looking_for\n};\n\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":950,"y":3960,"wires":[["4fc565f7b86648dc","75bc8ac5d1afe28f"]]},{"id":"9b25e9a8817a7d8e","type":"http request","z":"9584418c.dafc2","g":"445e81780ba935ac","name":"Get Current Image","method":"GET","ret":"bin","paytoqs":"ignore","url":"http://frigate:1984/api/frame.jpeg?src=driveway","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":710,"y":3960,"wires":[["5caa1a9942bc27ee"]]},{"id":"7c060a1e3c0ff12e","type":"inject","z":"9584418c.dafc2","g":"445e81780ba935ac","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":160,"y":3940,"wires":[["1fce953ec4b1ee3d"]]},{"id":"4fc565f7b86648dc","type":"deepstack-object-detection","z":"9584418c.dafc2","g":"445e81780ba935ac","name":"","server":"169e2bac20a4c980","confidence":"70","drawPredictions":false,"printLabel":false,"outlineColor":"pink","custom":"","filters":[],"outputs":1,"x":1190,"y":3960,"wires":[["6f27f3028b1805e2"]]},{"id":"220bca8570d66770","type":"debug","z":"9584418c.dafc2","g":"445e81780ba935ac","name":"Log Plate","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":350,"y":4100,"wires":[]},{"id":"184d6d5272648136","type":"server-state-changed","z":"9584418c.dafc2","g":"445e81780ba935ac","name":"Vehicle Detected","server":"e1dc0b88.463bb8","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"sensor.driveway_far_car_count","entityIdType":"exact","outputInitially":false,"stateType":"str","ifState":"0","ifStateType":"num","ifStateOperator":"gt","outputOnlyOnStateChange":false,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":160,"y":3980,"wires":[["1fce953ec4b1ee3d"],[]]},{"id":"500ee424e3f6b6a1","type":"while-loop","z":"9584418c.dafc2","g":"445e81780ba935ac","name":"No Match","condi":"msg.payload != msg.looking_for","limit":true,"limitTime":"10","time":"loops","timeType":"msg","x":340,"y":4040,"wires":[["5218eca8a79a79a5"],["9b25e9a8817a7d8e"]]},{"id":"6f27f3028b1805e2","type":"change","z":"9584418c.dafc2","g":"445e81780ba935ac","name":"Plate to Payload","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[0].plate","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":180,"y":4040,"wires":[["500ee424e3f6b6a1","220bca8570d66770"]]},{"id":"004c0ae121925ea2","type":"debug","z":"9584418c.dafc2","g":"445e81780ba935ac","name":"Found","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":690,"y":4100,"wires":[]},{"id":"5218eca8a79a79a5","type":"switch","z":"9584418c.dafc2","g":"445e81780ba935ac","name":"If Match","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"plate_andrew","vt":"env"}],"checkall":"true","repair":false,"outputs":1,"x":540,"y":4040,"wires":[["004c0ae121925ea2","b70d2ca780b98259"]]},{"id":"1fce953ec4b1ee3d","type":"change","z":"9584418c.dafc2","g":"445e81780ba935ac","name":"","rules":[{"t":"set","p":"looking_for","pt":"msg","to":"plate_andrew","tot":"env"}],"action":"","property":"","from":"","to":"","reg":false,"x":410,"y":3960,"wires":[["9b25e9a8817a7d8e"]]},{"id":"8c5272ae89e85e74","type":"api-current-state","z":"9584418c.dafc2","g":"445e81780ba935ac","name":"Garage Closed","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"closed","halt_if_type":"str","halt_if_compare":"is","entity_id":"cover.garage_door","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":900,"y":4040,"wires":[["18d9178fd318e333"],[]]},{"id":"8067ec66aa846765","type":"api-call-service","z":"9584418c.dafc2","g":"445e81780ba935ac","name":"Open Garage","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"cover","service":"open_cover","areaId":[],"deviceId":[],"entityId":["cover.garage_door"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1240,"y":4040,"wires":[["6648e0bdaa2d8170"]]},{"id":"6648e0bdaa2d8170","type":"api-call-service","z":"9584418c.dafc2","g":"445e81780ba935ac","name":"Notify Via Signal","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"notify","service":"signal_self","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": \"Garage opened by ALPR\" \t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1240,"y":4100,"wires":[[]]},{"id":"18d9178fd318e333","type":"function","z":"9584418c.dafc2","g":"445e81780ba935ac","name":"Rate Limiter","func":"var interval = (1000*10); // minimum interval between messages (ms)\ncontext.lastTime = context.lastTime || 0;\n\nvar now = Date.now();\n\nif (now-context.lastTime > interval) {\n context.lastTime = now;\n return msg;\n} else {\n return null;\n}","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":1070,"y":4040,"wires":[["8067ec66aa846765"]]},{"id":"b70d2ca780b98259","type":"api-current-state","z":"9584418c.dafc2","g":"445e81780ba935ac","name":"Andrew in Car","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"binary_sensor.andrew_phone_car_connected","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":720,"y":4040,"wires":[["8c5272ae89e85e74"],[]]},{"id":"75bc8ac5d1afe28f","type":"image","z":"9584418c.dafc2","g":"445e81780ba935ac","name":"","width":"800","data":"payload","dataType":"msg","thumbnail":false,"active":true,"pass":true,"outputs":1,"x":1040,"y":4100,"wires":[[]]},{"id":"4e761223bbb97b8d","type":"function","z":"9584418c.dafc2","g":"516939e66b0b3d5d","name":"Image to Payload","func":"msg = {\n payload: msg.payload,\n loops: msg.loops,\n looking_for: msg.looking_for\n};\n\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":810,"y":4240,"wires":[["6cecf24fbf959b73","cde6c9446e054107"]]},{"id":"4882c608e1fa69c7","type":"server-state-changed","z":"9584418c.dafc2","d":true,"g":"516939e66b0b3d5d","name":"Doorbell Button","server":"e1dc0b88.463bb8","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"binary_sensor.front_door_button_pressed","entityIdType":"exact","outputInitially":false,"stateType":"str","ifState":"on","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":false,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[],"x":160,"y":4280,"wires":[["dd24955fcf11d0b8"],[]]},{"id":"72737cfc3371b80f","type":"switch","z":"9584418c.dafc2","g":"516939e66b0b3d5d","name":"If Match","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"looking_for","vt":"msg"}],"checkall":"true","repair":false,"outputs":1,"x":740,"y":4380,"wires":[["519990f56ae7a4e9","a4574f947fc3c876","fc7cc6d0b1911358"]]},{"id":"6cecf24fbf959b73","type":"image","z":"9584418c.dafc2","g":"516939e66b0b3d5d","name":"","width":"800","data":"payload","dataType":"msg","thumbnail":false,"active":true,"pass":true,"outputs":1,"x":240,"y":4440,"wires":[[]]},{"id":"cde6c9446e054107","type":"qrdecode","z":"9584418c.dafc2","g":"516939e66b0b3d5d","name":"","x":1020,"y":4240,"wires":[["a8e5d53fc40fcf3c"]]},{"id":"54c1081f98fd1945","type":"http request","z":"9584418c.dafc2","g":"516939e66b0b3d5d","name":"Get Current Image","method":"GET","ret":"bin","paytoqs":"ignore","url":"http://frigate:1984/api/frame.jpeg?src=front_door","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":590,"y":4240,"wires":[["4e761223bbb97b8d"]]},{"id":"519990f56ae7a4e9","type":"api-call-service","z":"9584418c.dafc2","g":"516939e66b0b3d5d","name":"Notify Via Signal","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"notify","service":"signal_self","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": \"Front door QR match\" \t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":920,"y":4320,"wires":[[]]},{"id":"8db5019cab97ba65","type":"api-call-service","z":"9584418c.dafc2","g":"516939e66b0b3d5d","name":"Speak \"QR Accepted\"","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"media_player","service":"play_media","areaId":[],"deviceId":[],"entityId":["media_player.doorbell"],"data":"{\"media_content_id\":\"media-source://tts/microsoft?message=QR+code+validated,+unlocking+door\",\"media_content_type\":\"provider\",\"announce\":true}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1060,"y":4380,"wires":[[]]},{"id":"dd24955fcf11d0b8","type":"api-current-state","z":"9584418c.dafc2","g":"516939e66b0b3d5d","name":"Get Code","server":"e1dc0b88.463bb8","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_text.qr_code_content","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"looking_for","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":380,"y":4240,"wires":[["54c1081f98fd1945"]]},{"id":"6084ebe4fee0af4d","type":"inject","z":"9584418c.dafc2","g":"516939e66b0b3d5d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":160,"y":4220,"wires":[["dd24955fcf11d0b8"]]},{"id":"e1a4ef361b9fc7ff","type":"inject","z":"9584418c.dafc2","g":"7a1cb951d36ebc37","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":160,"y":4560,"wires":[["38010b7e5f85b9f6"]]},{"id":"b6dbca53c840164c","type":"qrcode-generator","z":"9584418c.dafc2","g":"7a1cb951d36ebc37","name":"Generate QR","qrtype":"text2qr","text2qrText":"","ssid":"","hiddenssid":false,"wifitype":"","phonenum":"","smsphonenum":"","smstext":"","mailto":"","mailsubject":"","mailbody":"","latitude":"","longitude":"","colorlight":"#ffffff","colordark":"#000000","printstatus":false,"x":710,"y":4560,"wires":[["e3b312790143d451"]]},{"id":"38010b7e5f85b9f6","type":"random-string","z":"9584418c.dafc2","g":"7a1cb951d36ebc37","size":"15","characters":"","property":"qrcodeinput","x":340,"y":4560,"wires":[["4c8457c87150cbf8"]]},{"id":"4c8457c87150cbf8","type":"api-call-service","z":"9584418c.dafc2","g":"7a1cb951d36ebc37","name":"Set QR Value","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.qr_code_content"],"data":"{\"value\": msg.qrcodeinput}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":530,"y":4560,"wires":[["b6dbca53c840164c"]]},{"id":"e073799764f16bc0","type":"api-call-service","z":"9584418c.dafc2","g":"7a1cb951d36ebc37","name":"Send Via Signal","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"notify","service":"signal_self","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": \"QR Code\",\t \"data\": {\t \"attachments\": [\t '/config/media/images/qr.png' \t ]\t }\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":960,"y":4640,"wires":[[]]},{"id":"aa0e87207265845d","type":"jimp-image","z":"9584418c.dafc2","g":"7a1cb951d36ebc37","name":"Annotate","data":"payload","dataType":"msg","ret":"buf","parameter1":"FONT_SANS_10_BLACK","parameter1Type":"jimpFont","parameter2":"5","parameter2Type":"num","parameter3":"335","parameter3Type":"num","parameter4":"timestamp","parameter4Type":"msg","parameter5":"","parameter5Type":"msg","parameter6":"","parameter6Type":"msg","parameter7":"","parameter7Type":"msg","parameter8":"","parameter8Type":"msg","sendProperty":"payload","sendPropertyType":"msg","parameterCount":8,"jimpFunction":"print2","selectedJimpFunction":{"name":"print aligned","fn":"print","description":"Print text to the image","parameters":[{"name":"font|str","type":"jimpFont","required":true,"hint":"font to print. NOTE: This can be one of the presets or the path to a fnt file"},{"name":"x","type":"num","required":true,"hint":"x coordinate to print text"},{"name":"y","type":"num","required":true,"hint":"y coordinate to print text"},{"name":"text","group":"options","type":"str","required":true,"hint":"text to print"},{"name":"alignmentX","group":"options","type":"AlignX","required":false,"hint":"X Alignment"},{"name":"alignmentY","group":"options","type":"AlignY","required":false,"hint":"Y Alignment"},{"name":"maxWidth","type":"auto|num","required":false,"hint":"wrap text at maxWidth"},{"name":"maxHeight","type":"auto|num","required":false,"hint":"max height"}]},"x":620,"y":4640,"wires":[["06871bb32f66c1ab"]]},{"id":"06871bb32f66c1ab","type":"file","z":"9584418c.dafc2","g":"7a1cb951d36ebc37","name":"Write File","filename":"/data/qr.png","filenameType":"str","appendNewline":true,"createDir":false,"overwriteFile":"true","encoding":"none","x":780,"y":4640,"wires":[["e073799764f16bc0"]]},{"id":"a8e5d53fc40fcf3c","type":"while-loop","z":"9584418c.dafc2","g":"516939e66b0b3d5d","name":"No Match","condi":"msg.payload.status != 0","limit":true,"limitTime":"60","time":"loops","timeType":"msg","x":420,"y":4380,"wires":[["e422bd64e999decb","02dca310d30d41ec"],["28e26da9f431b399","02dca310d30d41ec"]]},{"id":"d0cd45ceef8e8641","type":"api-render-template","z":"9584418c.dafc2","g":"7a1cb951d36ebc37","name":"Time","server":"e1dc0b88.463bb8","version":0,"template":"{{ now().strftime(\"%m-%d-%YT%H:%M:%S\") }}","resultsLocation":"timestamp","resultsLocationType":"msg","templateLocation":"","templateLocationType":"none","x":1010,"y":4560,"wires":[["523a5be045f29150"]]},{"id":"28e26da9f431b399","type":"delay","z":"9584418c.dafc2","g":"516939e66b0b3d5d","name":"","pauseType":"delay","timeout":"500","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":490,"y":4300,"wires":[["54c1081f98fd1945"]]},{"id":"e3b312790143d451","type":"jimp-image","z":"9584418c.dafc2","g":"7a1cb951d36ebc37","name":"Resize","data":"payload","dataType":"msg","ret":"buf","parameter1":"350","parameter1Type":"num","parameter2":"350","parameter2Type":"num","parameter3":"0","parameter3Type":"none","parameter4":"Press doorbell then show","parameter4Type":"str","parameter5":"","parameter5Type":"msg","parameter6":"","parameter6Type":"msg","parameter7":"","parameter7Type":"msg","parameter8":"","parameter8Type":"msg","sendProperty":"payload","sendPropertyType":"msg","parameterCount":3,"jimpFunction":"resize","selectedJimpFunction":{"name":"resize","fn":"resize","description":"resize the image. One of the w or h parameters can be set to automatic (\"Jimp.AUTO\" or -1).","parameters":[{"name":"w","type":"num|auto","required":true,"hint":"the width to resize the image to (or \"Jimp.AUTO\" or -1)"},{"name":"h","type":"num|auto","required":true,"hint":"the height to resize the image to (or \"Jimp.AUTO\" or -1)"},{"name":"mode","type":"resizeMode","required":false,"hint":"a scaling method (e.g. Jimp.RESIZE_BEZIER)"}]},"x":870,"y":4560,"wires":[["d0cd45ceef8e8641"]]},{"id":"523a5be045f29150","type":"jimp-image","z":"9584418c.dafc2","g":"7a1cb951d36ebc37","name":"Annotate","data":"payload","dataType":"msg","ret":"buf","parameter1":"FONT_SANS_16_BLACK","parameter1Type":"jimpFont","parameter2":"40","parameter2Type":"num","parameter3":"0","parameter3Type":"num","parameter4":"Press doorbell then hold ~8\" in front of\\n camera for up to 30 seconds","parameter4Type":"str","parameter5":"","parameter5Type":"msg","parameter6":"","parameter6Type":"msg","parameter7":"","parameter7Type":"msg","parameter8":"","parameter8Type":"msg","sendProperty":"payload","sendPropertyType":"msg","parameterCount":8,"jimpFunction":"print2","selectedJimpFunction":{"name":"print aligned","fn":"print","description":"Print text to the image","parameters":[{"name":"font|str","type":"jimpFont","required":true,"hint":"font to print. NOTE: This can be one of the presets or the path to a fnt file"},{"name":"x","type":"num","required":true,"hint":"x coordinate to print text"},{"name":"y","type":"num","required":true,"hint":"y coordinate to print text"},{"name":"text","group":"options","type":"str","required":true,"hint":"text to print"},{"name":"alignmentX","group":"options","type":"AlignX","required":false,"hint":"X Alignment"},{"name":"alignmentY","group":"options","type":"AlignY","required":false,"hint":"Y Alignment"},{"name":"maxWidth","type":"auto|num","required":false,"hint":"wrap text at maxWidth"},{"name":"maxHeight","type":"auto|num","required":false,"hint":"max height"}]},"x":200,"y":4640,"wires":[["a6187e2d761f18bd"]]},{"id":"a4574f947fc3c876","type":"api-call-service","z":"9584418c.dafc2","g":"516939e66b0b3d5d","name":"Unlock Door","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"lock","service":"unlock","areaId":[],"deviceId":[],"entityId":["lock.front_door"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":910,"y":4440,"wires":[["58c162476af5c2df"]]},{"id":"10bf2ad7f818bba5","type":"link in","z":"9584418c.dafc2","g":"7a1cb951d36ebc37","name":"link in 1","links":["58c162476af5c2df"],"x":205,"y":4600,"wires":[["38010b7e5f85b9f6"]]},{"id":"58c162476af5c2df","type":"link out","z":"9584418c.dafc2","g":"516939e66b0b3d5d","name":"link out 1","mode":"link","links":["10bf2ad7f818bba5"],"x":1035,"y":4440,"wires":[]},{"id":"a6187e2d761f18bd","type":"jimp-image","z":"9584418c.dafc2","g":"7a1cb951d36ebc37","name":"Annotate","data":"payload","dataType":"msg","ret":"buf","parameter1":"FONT_SANS_14_BLACK","parameter1Type":"jimpFont","parameter2":"20","parameter2Type":"num","parameter3":"310","parameter3Type":"num","parameter4":"Say \"Alexa, lock the front door\" before leaving","parameter4Type":"str","parameter5":"","parameter5Type":"msg","parameter6":"","parameter6Type":"msg","parameter7":"","parameter7Type":"msg","parameter8":"","parameter8Type":"msg","sendProperty":"payload","sendPropertyType":"msg","parameterCount":8,"jimpFunction":"print2","selectedJimpFunction":{"name":"print aligned","fn":"print","description":"Print text to the image","parameters":[{"name":"font|str","type":"jimpFont","required":true,"hint":"font to print. NOTE: This can be one of the presets or the path to a fnt file"},{"name":"x","type":"num","required":true,"hint":"x coordinate to print text"},{"name":"y","type":"num","required":true,"hint":"y coordinate to print text"},{"name":"text","group":"options","type":"str","required":true,"hint":"text to print"},{"name":"alignmentX","group":"options","type":"AlignX","required":false,"hint":"X Alignment"},{"name":"alignmentY","group":"options","type":"AlignY","required":false,"hint":"Y Alignment"},{"name":"maxWidth","type":"auto|num","required":false,"hint":"wrap text at maxWidth"},{"name":"maxHeight","type":"auto|num","required":false,"hint":"max height"}]},"x":340,"y":4640,"wires":[["6d38c8b88ab6e9b1"]]},{"id":"6d38c8b88ab6e9b1","type":"jimp-image","z":"9584418c.dafc2","g":"7a1cb951d36ebc37","name":"Annotate","data":"payload","dataType":"msg","ret":"buf","parameter1":"FONT_SANS_14_BLACK","parameter1Type":"jimpFont","parameter2":"85","parameter2Type":"num","parameter3":"322","parameter3Type":"num","parameter4":"and quickly closing the door","parameter4Type":"str","parameter5":"","parameter5Type":"msg","parameter6":"","parameter6Type":"msg","parameter7":"","parameter7Type":"msg","parameter8":"","parameter8Type":"msg","sendProperty":"payload","sendPropertyType":"msg","parameterCount":8,"jimpFunction":"print2","selectedJimpFunction":{"name":"print aligned","fn":"print","description":"Print text to the image","parameters":[{"name":"font|str","type":"jimpFont","required":true,"hint":"font to print. NOTE: This can be one of the presets or the path to a fnt file"},{"name":"x","type":"num","required":true,"hint":"x coordinate to print text"},{"name":"y","type":"num","required":true,"hint":"y coordinate to print text"},{"name":"text","group":"options","type":"str","required":true,"hint":"text to print"},{"name":"alignmentX","group":"options","type":"AlignX","required":false,"hint":"X Alignment"},{"name":"alignmentY","group":"options","type":"AlignY","required":false,"hint":"Y Alignment"},{"name":"maxWidth","type":"auto|num","required":false,"hint":"wrap text at maxWidth"},{"name":"maxHeight","type":"auto|num","required":false,"hint":"max height"}]},"x":480,"y":4640,"wires":[["aa0e87207265845d"]]},{"id":"02dca310d30d41ec","type":"debug","z":"9584418c.dafc2","g":"516939e66b0b3d5d","name":"Found","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":710,"y":4280,"wires":[]},{"id":"e422bd64e999decb","type":"switch","z":"9584418c.dafc2","g":"516939e66b0b3d5d","name":"If Value","property":"payload.value","propertyType":"msg","rules":[{"t":"istype","v":"string","vt":"string"}],"checkall":"true","repair":false,"outputs":1,"x":600,"y":4380,"wires":[["72737cfc3371b80f"]]},{"id":"fc7cc6d0b1911358","type":"delay","z":"9584418c.dafc2","g":"516939e66b0b3d5d","name":"1s","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":890,"y":4380,"wires":[["8db5019cab97ba65"]]},{"id":"e45fa3455968d380","type":"server-state-changed","z":"9584418c.dafc2","name":"Device Battery Levels","server":"e1dc0b88.463bb8","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"_battery_level","entityIdType":"substring","outputInitially":false,"stateType":"str","ifState":"20","ifStateType":"num","ifStateOperator":"lt","outputOnlyOnStateChange":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":180,"y":3840,"wires":[["84c749850e5b4db9"],[]]},{"id":"84c749850e5b4db9","type":"api-call-service","z":"9584418c.dafc2","name":"Notify Via Signal","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"notify","service":"signal_homeassistant","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": topic & \" has low battery (\" & payload & \"%)\" }","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":420,"y":3840,"wires":[[]]},{"id":"9d6f4f2f2b1e1400","type":"api-call-service","z":"9584418c.dafc2","name":"Notify Via Signal","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"notify","service":"signal_homeassistant","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": topic & \" has low battery (\" & payload & \")\" }","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":900,"y":3840,"wires":[[]]},{"id":"bc96c3f77cb59c1a","type":"server-state-changed","z":"9584418c.dafc2","name":"Smoke Alarm Battery Levels","server":"e1dc0b88.463bb8","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"alarm_battery_level","entityIdType":"substring","outputInitially":false,"stateType":"str","ifState":"80","ifStateType":"num","ifStateOperator":"lt","outputOnlyOnStateChange":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":660,"y":3840,"wires":[["9d6f4f2f2b1e1400"],[]]},{"id":"19ede27409237241","type":"inject","z":"9584418c.dafc2","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":1140,"y":1900,"wires":[["e792dec2261edf2e"]]},{"id":"28609db070a98f82","type":"http request","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Trigger USPS Automation","method":"POST","ret":"txt","paytoqs":"ignore","url":"http://10.0.1.22:8123/api/webhook/usps_mail_detected","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"other","keyValue":"Content-type","valueType":"other","valueValue":"application/json"}],"x":1290,"y":2380,"wires":[[]]},{"id":"04300ba2a76891a6","type":"switch","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Match USPS","property":"detection_result","propertyType":"msg","rules":[{"t":"eq","v":"usps","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":1250,"y":2300,"wires":[["28609db070a98f82"]]},{"id":"0a096bcbb68139e5","type":"switch","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Match USPS","property":"detection_result","propertyType":"msg","rules":[{"t":"eq","v":"Usps","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":1230,"y":2340,"wires":[["28609db070a98f82"]]},{"id":"3e6040dad6b140f5","type":"api-render-template","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"USPS > 12 hours","server":"e1dc0b88.463bb8","version":0,"template":"{{ as_timestamp(now()) - as_timestamp(states('input_datetime.usps_last')) > 43200 }}","resultsLocation":"eval","resultsLocationType":"msg","templateLocation":"","templateLocationType":"none","x":250,"y":2140,"wires":[["cd2f2ad667788097"]]},{"id":"cd2f2ad667788097","type":"switch","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"","property":"eval","propertyType":"msg","rules":[{"t":"eq","v":"True","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":410,"y":2140,"wires":[["bcaf3569e7816922"]]},{"id":"e792dec2261edf2e","type":"http request","z":"9584418c.dafc2","name":"Reboot Doorbell","method":"GET","ret":"bin","paytoqs":"ignore","url":"http://10.0.0.34/cgi-bin/magicBox.cgi?action=reboot","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"digest","senderr":false,"headers":[],"x":1360,"y":1900,"wires":[[]]},{"id":"bb1a0274b2aa88ed","type":"server-state-changed","z":"9584418c.dafc2","name":"Alive Zwave Node","server":"e1dc0b88.463bb8","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"_node_status","entityIdType":"substring","outputInitially":false,"stateType":"str","ifState":"alive","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":630,"y":3780,"wires":[["fafc94cc016e6430"],[]]},{"id":"fafc94cc016e6430","type":"api-call-service","z":"9584418c.dafc2","name":"Notify Via Signal","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"notify","service":"signal_homeassistant","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": topic & \" has revived\" }","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":880,"y":3780,"wires":[[]]},{"id":"d269f175.c9dc6","type":"server-events","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","name":"Custom Water Event Fired","server":"e1dc0b88.463bb8","version":3,"exposeAsEntityConfig":"","eventType":"irrigation_custom_water","eventData":"","waitForRunning":true,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"$outputData(\"eventData\").event_type","valueType":"jsonata"},{"property":"event_type","propertyType":"msg","value":"$outputData(\"eventData\").event_type","valueType":"jsonata"}],"x":190,"y":340,"wires":[["883f2c00.1d94e8"]]},{"id":"3367e45f.cc981c","type":"function","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","name":"++","func":"if ( (msg.i += 1) < msg.zones.length ) return msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":670,"y":400,"wires":[["116d5bb3.ee92a4"]]},{"id":"116d5bb3.ee92a4","type":"function","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","name":"For Each","func":"if( msg.i == undefined ) msg.i = 0;\n\nmsg.payload = msg.zones[ msg.i ];\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":840,"y":340,"wires":[["565ee5c1.561bfc","80df47d5.602888","e2c37b65c5582c2b"]]},{"id":"80df47d5.602888","type":"api-call-service","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","name":"Turn On Zone","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":[],"data":"{ \"entity_id\": payload.zone}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1060,"y":340,"wires":[[]]},{"id":"fb46876c.845298","type":"api-call-service","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","name":"Turn Off Zone","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":[],"data":"{ \"entity_id\": payload.zone}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1320,"y":400,"wires":[["98eeafa7.bd2b9","860a4c61d7557dc9"]]},{"id":"98eeafa7.bd2b9","type":"delay","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","name":"Delay 5","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"outputs":1,"x":980,"y":480,"wires":[["3367e45f.cc981c"]]},{"id":"565ee5c1.561bfc","type":"change","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","name":"Set Delay Variable","rules":[{"t":"set","p":"delay","pt":"msg","to":"payload.time* 60000","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":890,"y":400,"wires":[["22a20603.86a06a"]]},{"id":"22a20603.86a06a","type":"stoptimer-varidelay","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","duration":"5","durationType":"num","units":"Millisecond","payloadtype":"num","payloadval":"0","name":"Delay","reporting":"every_second","persist":false,"x":1090,"y":400,"wires":[["fb46876c.845298"],[],["a8d96e.1f00969"]]},{"id":"a8d96e.1f00969","type":"mqtt out","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","name":"Publish Time Remaining","topic":"sensor/irrigation_time_remaining","qos":"","retain":"","broker":"546e31ed.0db1c","x":1350,"y":340,"wires":[]},{"id":"3b656b89.1ac154","type":"inject","z":"f602e6ba.609d28","g":"79694877249c9902","name":"3:00 Attempt","props":[{"p":"payload"}],"repeat":"","crontab":"00 03 * * *","once":false,"onceDelay":0.1,"topic":"","payload":"[{\"zone\":\"switch.irrigation_front_beds\",\"time\":10,\"name\":\"Front beds\"},{\"zone\":\"switch.irrigation_front_lawn\",\"time\":20,\"name\":\"Front lawn\"},{\"zone\":\"switch.irrigation_left_and_main_rear_lawn\",\"time\":20,\"name\":\"Left and main rear lawn\"},{\"zone\":\"switch.irrigation_front_and_right_rear_lawn\",\"time\":20,\"name\":\"Front and right rear lawn\"},{\"zone\":\"switch.irrigation_side_lawn\",\"time\":20,\"name\":\"Side lawn\"}]","payloadType":"json","x":180,"y":1280,"wires":[["493b435f.c9851c"]]},{"id":"493b435f.c9851c","type":"api-current-state","z":"f602e6ba.609d28","g":"79694877249c9902","name":"Schedule Enabled","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.lawn_irrigation_scheduling","state_type":"str","blockInputOverrides":false,"outputProperties":[],"for":0,"forType":"num","forUnits":"minutes","x":410,"y":1280,"wires":[["8c060f00.cf577"],["7b12e66f.57d068"]]},{"id":"7b12e66f.57d068","type":"api-call-service","z":"f602e6ba.609d28","g":"79694877249c9902","name":"Set Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.lawn_irrigation_reason"],"data":"{\"value\":\"Automation Off\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":630,"y":1300,"wires":[[]]},{"id":"8c060f00.cf577","type":"link out","z":"f602e6ba.609d28","g":"79694877249c9902","name":"","links":["f1cbfe0.7dfb4","576b66fa1bd202a3"],"x":595,"y":1260,"wires":[]},{"id":"4422f61c.847d88","type":"link in","z":"f602e6ba.609d28","g":"79694877249c9902","name":"","links":["3ff9ce03ef7b554b"],"x":135,"y":1480,"wires":[["219b37105a8304f1"]]},{"id":"dcdeabc7.780578","type":"link out","z":"f602e6ba.609d28","g":"79694877249c9902","name":"","links":["1eaa857e.b6b8db","c90fd5e6.c5c678","b8fe96458628f202"],"x":595,"y":1460,"wires":[]},{"id":"722d03d6.2ff77c","type":"link in","z":"f602e6ba.609d28","g":"79694877249c9902","name":"","links":["8d4bfe8e.ee805","d67106b42368e630"],"x":135,"y":1900,"wires":[["b3c4a3638c17629e"]]},{"id":"af4788fe.215ba8","type":"link out","z":"f602e6ba.609d28","g":"79694877249c9902","name":"","links":["405789f7.0727a8","eb1a5268c1aec843","9896327569c234da"],"x":595,"y":1900,"wires":[]},{"id":"c90fd5e6.c5c678","type":"link in","z":"f602e6ba.609d28","g":"79694877249c9902","name":"","links":["dcdeabc7.780578","89d715ddf12d2195"],"x":135,"y":1600,"wires":[["e7430e17f0b24ed8"]]},{"id":"862ad27a.d347d","type":"link out","z":"f602e6ba.609d28","g":"79694877249c9902","name":"","links":["83edf648.3f9ed8"],"x":595,"y":1580,"wires":[]},{"id":"808e6a81.92e2e8","type":"api-call-service","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","name":"Turn On Master Valve","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.irrigation_master_valve"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":460,"y":400,"wires":[["e42ff3d9.593dc"]]},{"id":"883f2c00.1d94e8","type":"api-current-state","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","name":"24v Power","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"switch.irrigation_24v_power","state_type":"str","blockInputOverrides":false,"outputProperties":[],"for":0,"forType":"num","forUnits":"minutes","x":250,"y":400,"wires":[["808e6a81.92e2e8"],["808e6a81.92e2e8"]]},{"id":"e42ff3d9.593dc","type":"delay","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","name":"Delay 5","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"outputs":1,"x":480,"y":340,"wires":[["76160bc4.8cd644"]]},{"id":"76160bc4.8cd644","type":"change","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","name":"","rules":[{"t":"set","p":"zones","pt":"msg","to":"payload.event.zones","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":660,"y":340,"wires":[["116d5bb3.ee92a4"]]},{"id":"83edf648.3f9ed8","type":"link in","z":"f602e6ba.609d28","g":"79694877249c9902","name":"","links":["862ad27a.d347d","1bb3825011174363"],"x":135,"y":1700,"wires":[["b6e7d5b8891bba6d"]]},{"id":"8d4bfe8e.ee805","type":"link out","z":"f602e6ba.609d28","g":"79694877249c9902","name":"","links":["722d03d6.2ff77c"],"x":595,"y":1720,"wires":[]},{"id":"583f46a3.fc4c38","type":"inject","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"5:00 Attempt","props":[{"p":"payload"}],"repeat":"","crontab":"00 05 * * *","once":false,"onceDelay":0.1,"topic":"","payload":"[{\"zone\":\"switch.irrigation_front_beds\",\"time\":10,\"name\":\"Front beds\"},{\"zone\":\"switch.irrigation_front_lawn\",\"time\":20,\"name\":\"Front lawn\"},{\"zone\":\"switch.irrigation_left_and_main_rear_lawn\",\"time\":20,\"name\":\"Left and main rear lawn\"},{\"zone\":\"switch.irrigation_front_and_right_rear_lawn\",\"time\":20,\"name\":\"Front and right rear lawn\"},{\"zone\":\"switch.irrigation_side_lawn\",\"time\":20,\"name\":\"Side lawn\"}]","payloadType":"json","x":180,"y":2620,"wires":[["d9147878.b61cf8"]]},{"id":"d9147878.b61cf8","type":"api-current-state","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"Schedule Enabled","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.front_bed_irrigation_scheduling","state_type":"str","blockInputOverrides":false,"outputProperties":[],"for":0,"forType":"num","forUnits":"minutes","x":410,"y":2620,"wires":[["c7e5552e.7f8a08"],["45c5dbbbd8ce50a1"]]},{"id":"c7e5552e.7f8a08","type":"link out","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"","links":["f1cbfe0.7dfb4","f6881b4bf93c27c5"],"x":595,"y":2600,"wires":[]},{"id":"6bcf06fb.9ca748","type":"link in","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"","links":["4f2902edc77f2d3b"],"x":135,"y":2820,"wires":[["ed6e3d4225582e20"]]},{"id":"f587589f.d739e8","type":"link out","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"","links":["1eaa857e.b6b8db","9d851699.6a8458"],"x":595,"y":2800,"wires":[]},{"id":"d9d17e8f.590e6","type":"link in","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"","links":["4fae5b92.a9cd44"],"x":135,"y":3040,"wires":[["d8637d8d96b68fca"]]},{"id":"d9f893eb.834f3","type":"link out","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"","links":["5ce1803b.06628"],"x":595,"y":3040,"wires":[]},{"id":"9d851699.6a8458","type":"link in","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"","links":["f587589f.d739e8"],"x":135,"y":2940,"wires":[["593bee0e8c958df8"]]},{"id":"4fae5b92.a9cd44","type":"link out","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"","links":["d9d17e8f.590e6"],"x":595,"y":2920,"wires":[]},{"id":"a2ab7368.923fb","type":"template","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"Zone Settings Front Beds","field":"zones","fieldType":"msg","format":"json","syntax":"mustache","template":"{\n \"zone\": \"switch.irrigation_front_beds\",\n \"time\": 20,\n \"name\": \"Front beds\"\n}","output":"json","x":250,"y":3200,"wires":[["62b5545bc6d6e627"]]},{"id":"a31e3daf.17207","type":"api-call-service","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"Turn On Master Valve","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.irrigation_master_valve"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":560,"y":3200,"wires":[["21ced698.708b5a","0fe0d325194604dd"]]},{"id":"21ced698.708b5a","type":"delay","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"2s","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"outputs":1,"x":730,"y":3200,"wires":[["c661d489.9c9bc8"]]},{"id":"c661d489.9c9bc8","type":"api-call-service","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"Turn On Zone","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":[],"data":"{ \"entity_id\": msg.zones.zone}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":880,"y":3200,"wires":[["accc6697.196268"]]},{"id":"accc6697.196268","type":"change","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"Set Delay Variable","rules":[{"t":"set","p":"delay","pt":"msg","to":"msg.zones.time* 60000","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":1090,"y":3200,"wires":[["487ff788.8c5c98"]]},{"id":"487ff788.8c5c98","type":"stoptimer-varidelay","z":"f602e6ba.609d28","g":"55a2162532da4e14","duration":"5","durationType":"num","units":"Millisecond","payloadtype":"num","payloadval":"0","name":"Delay","reporting":"every_second","persist":false,"ignoretimerpass":false,"x":850,"y":3260,"wires":[["2238b09b.1b5b5","9129b06e.d8925"],[],["84258ddd.41da4"]]},{"id":"2238b09b.1b5b5","type":"api-call-service","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"Turn Off Zone","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":[],"data":"{ \"entity_id\": msg.zones.zone}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":900,"y":3340,"wires":[[]]},{"id":"84258ddd.41da4","type":"mqtt out","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"Publish Time Remaining","topic":"sensor/irrigation_time_remaining","qos":"","retain":"","broker":"546e31ed.0db1c","x":1130,"y":3320,"wires":[]},{"id":"9129b06e.d8925","type":"function","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"Create msg object","func":"var message = \"Sprinkler auto-run: \" + msg.zones.name + \" ran for \" + msg.zones.time + \" minutes\"\n\nreturn { alert: message };","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1050,"y":3260,"wires":[["d83b5ff7a2212931"]]},{"id":"5ce1803b.06628","type":"link in","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"","links":["db46e0c1.f9ab5","d9f893eb.834f3"],"x":95,"y":3200,"wires":[["a2ab7368.923fb"]]},{"id":"815fddc0.6604c","type":"api-call-service","z":"f602e6ba.609d28","g":"79694877249c9902","name":"Turn On 24v","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.irrigation_24v_power"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":470,"y":1900,"wires":[["af4788fe.215ba8"]]},{"id":"418058c4.af3158","type":"api-call-service","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"Turn On 24v","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.irrigation_24v_power"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":470,"y":3040,"wires":[["d9f893eb.834f3"]]},{"id":"1ae21386.a831bc","type":"inject","z":"f602e6ba.609d28","g":"0f07749a4e1672ad","name":"06:00 24v Off","props":[],"repeat":"","crontab":"00 06 * * *","once":false,"onceDelay":0.1,"topic":"","x":180,"y":1140,"wires":[["117145a7.67e99a","882aff35f788008b"]]},{"id":"117145a7.67e99a","type":"api-call-service","z":"f602e6ba.609d28","g":"0f07749a4e1672ad","name":"Turn Off 24v","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.irrigation_24v_power"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":390,"y":1100,"wires":[[]]},{"id":"06d6255efdc31c47","type":"api-current-state","z":"f602e6ba.609d28","g":"79694877249c9902","name":"Force Run","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.irrigation_force_run","state_type":"str","blockInputOverrides":false,"outputProperties":[],"for":0,"forType":"num","forUnits":"minutes","x":250,"y":1380,"wires":[["2fc67b25514de5a5"],["3ff9ce03ef7b554b"]]},{"id":"5420d0eed32223fb","type":"link out","z":"f602e6ba.609d28","g":"79694877249c9902","name":"","links":["f1cbfe0.7dfb4","08e3098cf183e086"],"x":595,"y":1360,"wires":[]},{"id":"3ff9ce03ef7b554b","type":"link out","z":"f602e6ba.609d28","g":"79694877249c9902","name":"","links":["f1cbfe0.7dfb4","4422f61c.847d88","8524a273a6a8ffd0"],"x":595,"y":1400,"wires":[]},{"id":"576b66fa1bd202a3","type":"link in","z":"f602e6ba.609d28","g":"79694877249c9902","name":"","links":["8c060f00.cf577"],"x":135,"y":1380,"wires":[["06d6255efdc31c47"]]},{"id":"7350c911a0b1a86d","type":"api-current-state","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"Force Run","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.irrigation_force_run","state_type":"str","blockInputOverrides":false,"outputProperties":[],"for":0,"forType":"num","forUnits":"minutes","x":250,"y":2720,"wires":[["abb8777dd08aa743"],["4f2902edc77f2d3b"]]},{"id":"fdcfa1521191fa40","type":"link out","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"","links":["f1cbfe0.7dfb4","b403eec7866aea22"],"x":595,"y":2700,"wires":[]},{"id":"4f2902edc77f2d3b","type":"link out","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"","links":["f1cbfe0.7dfb4","6bcf06fb.9ca748"],"x":595,"y":2740,"wires":[]},{"id":"f6881b4bf93c27c5","type":"link in","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"","links":["c7e5552e.7f8a08"],"x":135,"y":2720,"wires":[["7350c911a0b1a86d"]]},{"id":"882aff35f788008b","type":"api-call-service","z":"f602e6ba.609d28","g":"0f07749a4e1672ad","name":"Turn Off Force Run","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"homeassistant","service":"turn_off","areaId":[],"deviceId":[],"entityId":["input_boolean.irrigation_force_run"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":410,"y":1160,"wires":[[]]},{"id":"a3d75225807b70eb","type":"delay","z":"f602e6ba.609d28","g":"79694877249c9902","name":"30 Minute Delay","pauseType":"delay","timeout":"30","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":280,"y":1760,"wires":[["339ee0ada21856e0"]]},{"id":"e2c37b65c5582c2b","type":"api-call-service","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","name":"Turn Off Start/Stop tracking","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["automation.store_sprinkler_start_stop_times"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1060,"y":300,"wires":[[]]},{"id":"860a4c61d7557dc9","type":"api-call-service","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","name":"Turn On Start/Stop tracking","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["automation.store_sprinkler_start_stop_times"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1360,"y":460,"wires":[[]]},{"id":"aa53225140781dd7","type":"api-render-template","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"Evaluate Template","server":"e1dc0b88.463bb8","version":0,"template":"","resultsLocation":"data.continue","resultsLocationType":"msg","templateLocation":"template","templateLocationType":"msg","x":250,"y":3320,"wires":[["8113d83074ff7701"]]},{"id":"8113d83074ff7701","type":"switch","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"Last Ran >= Template Hrs Ago","property":"data.continue","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"num"},{"t":"eq","v":"0","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":530,"y":3320,"wires":[["a31e3daf.17207"],["f78cdb84200eb171"]]},{"id":"d83b5ff7a2212931","type":"api-call-service","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"Notify via Wrapper","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"script","service":"notify_wrapper","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": alert \t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1270,"y":3260,"wires":[[]]},{"id":"dd9855ca4017c8c0","type":"api-call-service","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"Turn on Boolean","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"homeassistant","service":"turn_on","areaId":[],"deviceId":[],"entityId":["input_boolean.irrigation_rainfall_delay"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":700,"y":580,"wires":[[]]},{"id":"c3a696a117416327","type":"function","z":"f602e6ba.609d28","d":true,"g":"a9182c2cc04d2d9a","name":"Check Rainfall","func":"var rain_override = false\n\nfor (var i = 0; i < msg.payload.length; i++) {\n if (parseFloat(msg.payload[i].state) > 0.25) {\n rain_override = true\n }\n}\n\n// top = proceed\n// bottom = overridden\nif (rain_override === true) {\n return [ null, {rain_override} ];\n} \nelse {\n return [ {rain_override}, null ];\n}","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":500,"y":680,"wires":[["47f1a8018e58e032"],["dd9855ca4017c8c0"]]},{"id":"27f2580e35031830","type":"api-get-history","z":"f602e6ba.609d28","d":true,"g":"a9182c2cc04d2d9a","name":"Rainfall 120h","server":"e1dc0b88.463bb8","version":1,"startDate":"","endDate":"","entityId":"sensor.netatmo_home_rain_sum_rain_today_inches","entityIdType":"equals","useRelativeTime":true,"relativeTime":"120h","flatten":true,"outputType":"array","outputLocationType":"msg","outputLocation":"payload","x":310,"y":680,"wires":[["c3a696a117416327"]]},{"id":"9cb8187c669c6485","type":"comment","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"Rainfall","info":"","x":150,"y":600,"wires":[]},{"id":"47f1a8018e58e032","type":"api-call-service","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"Turn off Boolean","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"homeassistant","service":"turn_off","areaId":[],"deviceId":[],"entityId":["input_boolean.irrigation_rainfall_delay"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":700,"y":660,"wires":[[]]},{"id":"427f7fa58d86cc59","type":"inject","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"*/30","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"1800","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":150,"y":640,"wires":[["27f2580e35031830","93965a61d2c4f5de"]]},{"id":"1d9a4d0bb4645f32","type":"api-call-service","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"Turn on Boolean","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"homeassistant","service":"turn_on","areaId":[],"deviceId":[],"entityId":["input_boolean.irrigation_rain_forecast_delay"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":700,"y":840,"wires":[[]]},{"id":"d9ebbaa37f5911a9","type":"comment","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"Rain Forecast","info":"","x":170,"y":760,"wires":[]},{"id":"eeecfc1e8864e39f","type":"api-call-service","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"Turn off Boolean","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"homeassistant","service":"turn_off","areaId":[],"deviceId":[],"entityId":["input_boolean.irrigation_rain_forecast_delay"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":700,"y":760,"wires":[[]]},{"id":"89487a4efedec1db","type":"inject","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"*/30","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"1800","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":150,"y":800,"wires":[["2c45af5b3ee5cf0a","c3cb1c7d15767014"]]},{"id":"1e4b3bc7c25b294f","type":"function","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"Rain Chance","func":"// Check next 4 precipitation_probability values\n// HA Template: \n// {% for j in state_attr(\"weather.kcll_daynight\",\"forecast\")[:4] %}\n// {{ j.precipitation_probability }}\n// {% endfor %}\n\nvar forecast_override = false\n\n// if (parseFloat(msg.payload) > 40) {\n// forecast_override = true\n// }\n \nfor (var i = 0; i < 4; i++) {\n if (parseFloat(msg.data.attributes.forecast[i].precipitation_probability) >= 60) {\n forecast_override = true\n }\n}\n\n// top = proceed\n// bottom = overridden\nif (forecast_override === true) {\n return [ null, {forecast_override} ];\n} \nelse {\n return [ {forecast_override}, null ];\n}","outputs":2,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":490,"y":800,"wires":[["eeecfc1e8864e39f"],["1d9a4d0bb4645f32"]]},{"id":"2c45af5b3ee5cf0a","type":"api-current-state","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"Weather","server":"e1dc0b88.463bb8","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"weather.kcll_daynight","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":300,"y":800,"wires":[["1e4b3bc7c25b294f"]]},{"id":"d7e50e7a2810667d","type":"api-call-service","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"Turn on Boolean","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"homeassistant","service":"turn_on","areaId":[],"deviceId":[],"entityId":["input_boolean.irrigation_wind_delay"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":700,"y":1000,"wires":[[]]},{"id":"28936ec687ee4eb0","type":"comment","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"Wind","info":"","x":150,"y":920,"wires":[]},{"id":"974833b6a2eca853","type":"api-call-service","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"Turn off Boolean","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"homeassistant","service":"turn_off","areaId":[],"deviceId":[],"entityId":["input_boolean.irrigation_wind_delay"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":700,"y":920,"wires":[[]]},{"id":"478a5a84d38ba181","type":"inject","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"*/5","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"300","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":150,"y":960,"wires":[["c01fd0612615e927"]]},{"id":"c01fd0612615e927","type":"api-current-state","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"Wind <= 10 MPH","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"10","halt_if_type":"num","halt_if_compare":"lte","entity_id":"sensor.nws_wind_speed","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":330,"y":960,"wires":[["974833b6a2eca853"],["d7e50e7a2810667d"]]},{"id":"219b37105a8304f1","type":"api-current-state","z":"f602e6ba.609d28","g":"79694877249c9902","name":"Rainfall Delay","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.irrigation_rainfall_delay","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":260,"y":1480,"wires":[["dcdeabc7.780578"],["d01fbafafbb34692"]]},{"id":"e7430e17f0b24ed8","type":"api-current-state","z":"f602e6ba.609d28","g":"79694877249c9902","name":"Rain Forecast Delay","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.irrigation_rain_forecast_delay","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":280,"y":1600,"wires":[["862ad27a.d347d"],["f5684be88477322f"]]},{"id":"b6e7d5b8891bba6d","type":"api-current-state","z":"f602e6ba.609d28","g":"79694877249c9902","name":"Wind Delay","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.irrigation_wind_delay","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":250,"y":1700,"wires":[["8d4bfe8e.ee805"],["a3d75225807b70eb"]]},{"id":"339ee0ada21856e0","type":"api-current-state","z":"f602e6ba.609d28","g":"79694877249c9902","name":"Wind Delay","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.irrigation_wind_delay","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":250,"y":1820,"wires":[["8d4bfe8e.ee805"],["336585d4eee0ca73"]]},{"id":"ed6e3d4225582e20","type":"api-current-state","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"Rainfall Delay","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.irrigation_rainfall_delay","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":260,"y":2820,"wires":[["f587589f.d739e8"],["f7ac7a90f3da2298"]]},{"id":"593bee0e8c958df8","type":"api-current-state","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"Rain Forecast Delay","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.irrigation_rain_forecast_delay","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":280,"y":2940,"wires":[["4fae5b92.a9cd44"],["67916c3a5554a794","4fae5b92.a9cd44"]]},{"id":"d01fbafafbb34692","type":"api-call-service","z":"f602e6ba.609d28","g":"79694877249c9902","name":"Set Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.lawn_irrigation_reason"],"data":"{\"value\":\"Rainfall\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":630,"y":1500,"wires":[[]]},{"id":"f5684be88477322f","type":"api-call-service","z":"f602e6ba.609d28","g":"79694877249c9902","name":"Set Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.lawn_irrigation_reason"],"data":"{\"value\":\"Rain Forecasted\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":630,"y":1620,"wires":[[]]},{"id":"336585d4eee0ca73","type":"api-call-service","z":"f602e6ba.609d28","g":"79694877249c9902","name":"Set Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.lawn_irrigation_reason"],"data":"{\"value\":\"Wind\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":630,"y":1820,"wires":[[]]},{"id":"b3c4a3638c17629e","type":"api-call-service","z":"f602e6ba.609d28","g":"79694877249c9902","name":"Clear Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.lawn_irrigation_reason"],"data":"{\"value\":\"None\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":260,"y":1900,"wires":[["815fddc0.6604c"]]},{"id":"67916c3a5554a794","type":"api-call-service","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"Set Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.front_bed_irrigation_reason"],"data":"{\"value\":\"Rain Forecasted\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":630,"y":2960,"wires":[[]]},{"id":"f7ac7a90f3da2298","type":"api-call-service","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"Set Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.front_bed_irrigation_reason"],"data":"{\"value\":\"Rainfall\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":630,"y":2840,"wires":[[]]},{"id":"45c5dbbbd8ce50a1","type":"api-call-service","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"Set Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.front_bed_irrigation_reason"],"data":"{\"value\":\"Automation Off\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":630,"y":2640,"wires":[[]]},{"id":"2fc67b25514de5a5","type":"api-call-service","z":"f602e6ba.609d28","g":"79694877249c9902","name":"Set Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.lawn_irrigation_reason"],"data":"{\"value\":\"Force Run\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":450,"y":1360,"wires":[["5420d0eed32223fb"]]},{"id":"08e3098cf183e086","type":"link in","z":"f602e6ba.609d28","g":"79694877249c9902","name":"","links":["5420d0eed32223fb"],"x":325,"y":1960,"wires":[["815fddc0.6604c"]]},{"id":"abb8777dd08aa743","type":"api-call-service","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"Set Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.front_bed_irrigation_reason"],"data":"{\"value\":\"Force Run\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":450,"y":2700,"wires":[["fdcfa1521191fa40"]]},{"id":"d8637d8d96b68fca","type":"api-call-service","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"Clear Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.front_bed_irrigation_reason"],"data":"{\"value\":\"None\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":260,"y":3040,"wires":[["418058c4.af3158"]]},{"id":"b403eec7866aea22","type":"link in","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"","links":["fdcfa1521191fa40"],"x":325,"y":3100,"wires":[["418058c4.af3158"]]},{"id":"f2c9c3a5b8b11a64","type":"switch","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Continue?","property":"data.continue","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"eq","v":"1","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":1230,"y":2060,"wires":[["287dd3b1af5dc2d0"],["bf015af2161c5ec2"]]},{"id":"9896327569c234da","type":"link in","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"","links":["af4788fe.215ba8"],"x":95,"y":2060,"wires":[["e95ac52f03478921"]]},{"id":"e95ac52f03478921","type":"template","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Lawn Zones","field":"all_zones","fieldType":"msg","format":"json","syntax":"mustache","template":"[\n {\n \"zone\": \"switch.irrigation_front_lawn\",\n \"name\": \"Front lawn\"\n },\n {\n \"zone\": \"switch.irrigation_left_and_main_rear_lawn\",\n \"name\": \"Left and main rear lawn\"\n },\n {\n \"zone\": \"switch.irrigation_front_and_right_rear_lawn\",\n \"name\": \"Front and right rear lawn\"\n },\n {\n \"zone\": \"switch.irrigation_side_lawn\",\n \"name\": \"Side lawn\"\n }\n]","output":"json","x":290,"y":2060,"wires":[["287dd3b1af5dc2d0"]]},{"id":"174186fb5d054240","type":"api-render-template","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Evaluate Template","server":"e1dc0b88.463bb8","version":0,"template":"","resultsLocation":"data.continue","resultsLocationType":"msg","templateLocation":"template","templateLocationType":"msg","x":1050,"y":2060,"wires":[["f2c9c3a5b8b11a64"]]},{"id":"287dd3b1af5dc2d0","type":"array-loop","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Loop Through Zones","key":"al287dd3b1af5dc2d0","keyType":"msg","reset":true,"resetValue":"value-null","array":"all_zones","arrayType":"msg","x":220,"y":2120,"wires":[["74cd40702021e86d","acdcc72fea065aac"],["224d30a98f52c287"]]},{"id":"74cd40702021e86d","type":"template","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Zone Settings Lawn","field":"zones","fieldType":"msg","format":"json","syntax":"mustache","template":"[\n {\n \"zone\": \"switch.irrigation_front_lawn\",\n \"time\": 10,\n \"name\": \"Front lawn\"\n },\n {\n \"zone\": \"switch.irrigation_left_and_main_rear_lawn\",\n \"time\": 10,\n \"name\": \"Left and main rear lawn\"\n },\n {\n \"zone\": \"switch.irrigation_front_and_right_rear_lawn\",\n \"time\": 10,\n \"name\": \"Front and right rear lawn\"\n },\n {\n \"zone\": \"switch.irrigation_side_lawn\",\n \"time\": 10,\n \"name\": \"Side lawn\"\n },\n {\n \"zone\": \"switch.irrigation_front_lawn\",\n \"time\": 10,\n \"name\": \"Front lawn\"\n },\n {\n \"zone\": \"switch.irrigation_left_and_main_rear_lawn\",\n \"time\": 10,\n \"name\": \"Left and main rear lawn\"\n },\n {\n \"zone\": \"switch.irrigation_front_and_right_rear_lawn\",\n \"time\": 10,\n \"name\": \"Front and right rear lawn\"\n },\n {\n \"zone\": \"switch.irrigation_side_lawn\",\n \"time\": 10,\n \"name\": \"Side lawn\"\n }\n]","output":"json","x":460,"y":2180,"wires":[["151eb6ba5b2d39cd"]]},{"id":"bf015af2161c5ec2","type":"function","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Append Run Zones","func":"if (typeof msg.run_zones === 'undefined'){\n msg.run_zones = []\n}\n\n// Add zone to run_zones\nmsg.run_zones.push(msg.payload.zone)\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":210,"y":2180,"wires":[["287dd3b1af5dc2d0"]]},{"id":"151eb6ba5b2d39cd","type":"array-loop","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Loop Through Zones","key":"al287dd3b1af5dc2d0","keyType":"msg","reset":true,"resetValue":"value-null","array":"zones","arrayType":"msg","x":720,"y":2180,"wires":[[],["45ee74d06e9cac2c"]]},{"id":"45ee74d06e9cac2c","type":"switch","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"If Zone in Run Zone","property":"run_zones","propertyType":"msg","rules":[{"t":"cont","v":"payload.zone","vt":"msg"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":710,"y":2240,"wires":[["8d3c8370996be2da"],["151eb6ba5b2d39cd"]]},{"id":"95a54981805b22f2","type":"api-call-service","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Turn On Zone","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":[],"data":"{ \"entity_id\": payload.zone}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":880,"y":2320,"wires":[["02d1e639f7ac6596","7b985932412db47d"]]},{"id":"a4b3eba196a504dc","type":"api-call-service","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Turn Off Zone","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":[],"data":"{ \"entity_id\": payload.zone}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":540,"y":2500,"wires":[["6ea0448df1383ec2"]]},{"id":"02d1e639f7ac6596","type":"change","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Set Delay Variable","rules":[{"t":"set","p":"delay","pt":"msg","to":"payload.time* 60000","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":550,"y":2380,"wires":[["863b8fa63f210ebe"]]},{"id":"8d3c8370996be2da","type":"api-call-service","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Turn On Master Valve","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.irrigation_master_valve"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":560,"y":2320,"wires":[["b1c9631973c2f4b1","8f83c8d1d4492be0"]]},{"id":"863b8fa63f210ebe","type":"stoptimer-varidelay","z":"f602e6ba.609d28","g":"a08dae6118c91c19","duration":"5","durationType":"num","units":"Millisecond","payloadtype":"num","payloadval":"0","name":"Delay","reporting":"every_second","persist":false,"ignoretimerpass":false,"x":510,"y":2440,"wires":[["a4b3eba196a504dc","de509d99b9d965b3"],[],["7d8374976c01e3dc"]]},{"id":"7d8374976c01e3dc","type":"mqtt out","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Publish Time Remaining","topic":"sensor/irrigation_time_remaining","qos":"","retain":"","broker":"546e31ed.0db1c","x":790,"y":2460,"wires":[]},{"id":"b0debe46542c4c67","type":"api-call-service","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Notify via Wrapper","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"script","service":"notify_wrapper","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": alert \t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":990,"y":2420,"wires":[[]]},{"id":"de509d99b9d965b3","type":"function","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Create msg object","func":"var message = \"Sprinkler auto-run: \" + msg.payload.name + \" ran for \" + msg.payload.time + \" minutes\"\n\nreturn { alert: message };","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":770,"y":2420,"wires":[["b0debe46542c4c67"]]},{"id":"b1c9631973c2f4b1","type":"delay","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"2s","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"outputs":1,"x":730,"y":2320,"wires":[["95a54981805b22f2"]]},{"id":"6ea0448df1383ec2","type":"delay","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Delay 10","pauseType":"delay","timeout":"10","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"outputs":1,"x":320,"y":2440,"wires":[["151eb6ba5b2d39cd"]]},{"id":"224d30a98f52c287","type":"api-current-state","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Force Run","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.irrigation_force_run","state_type":"str","blockInputOverrides":false,"outputProperties":[],"for":0,"forType":"num","forUnits":"minutes","x":510,"y":2060,"wires":[["bf015af2161c5ec2"],["38affe5cc680d076"]]},{"id":"5a27d31bfb4a6990","type":"comment","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Actually Handle Watering","info":"","x":1150,"y":2340,"wires":[]},{"id":"197853479ad9eeda","type":"comment","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Decide Which Zones to Run","info":"","x":1020,"y":2160,"wires":[]},{"id":"7b985932412db47d","type":"debug","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Log Zone On","active":false,"tosidebar":true,"console":true,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1100,"y":2280,"wires":[]},{"id":"acdcc72fea065aac","type":"debug","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Log Run Zones","active":false,"tosidebar":true,"console":true,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":350,"y":2260,"wires":[]},{"id":"f78cdb84200eb171","type":"api-call-service","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"Set Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.front_bed_irrigation_reason"],"data":"{\"value\":\"Recently Ran\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":750,"y":3380,"wires":[[]]},{"id":"93965a61d2c4f5de","type":"api-current-state","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"< 1\" in 5 Days","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"1","halt_if_type":"num","halt_if_compare":"gte","entity_id":"sensor.neighbor_5in1_rain_last_5_days","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":420,"y":620,"wires":[["dd9855ca4017c8c0"],["47f1a8018e58e032"]]},{"id":"54bad548.7e9fcc","type":"ha-get-entities","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"Get \"On\" Sprinklers","server":"e1dc0b88.463bb8","version":1,"rules":[{"property":"entity_id","logic":"starts_with","value":"switch.irrigation","valueType":"str"},{"property":"entity_id","logic":"does_not_include","value":"switch.irrigation_master_valve,switch.irrigation_24v_power,switch.irrigation_drip","valueType":"str"},{"property":"state","logic":"is","value":"on","valueType":"str"}],"outputType":"array","outputEmptyResults":true,"outputLocationType":"msg","outputLocation":"payload","outputResultsCount":1,"x":390,"y":100,"wires":[["bcbf413e.7b188"]]},{"id":"5a10cd93.8e94b4","type":"inject","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"60","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":170,"y":100,"wires":[["54bad548.7e9fcc"]]},{"id":"a77808ff.3f1288","type":"switch","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"On Longer than 26 minutes?","property":"payload[0].timeSinceChangedMs","propertyType":"msg","rules":[{"t":"gte","v":"1600000","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":720,"y":60,"wires":[["54ae6ec3.1bc63"]]},{"id":"54ae6ec3.1bc63","type":"api-call-service","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"Turn Off Zone","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":[],"data":"{ \"entity_id\": payload[0].entity_id }","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":980,"y":60,"wires":[[]]},{"id":"bcbf413e.7b188","type":"switch","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"More Than 0 Entities?","property":"payload","propertyType":"msg","rules":[{"t":"nempty"},{"t":"empty"}],"checkall":"true","repair":false,"outputs":2,"x":300,"y":160,"wires":[["a77808ff.3f1288","3b848bce.76aea4"],["656ad2cd6fb99f57"]]},{"id":"3b848bce.76aea4","type":"change","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"Reset Delay","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":670,"y":100,"wires":[["cdd3b7ef.04a618"]]},{"id":"43dedcca.ac7734","type":"api-call-service","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"Turn Off Master","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.irrigation_master_valve"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1340,"y":180,"wires":[["5093cf5ba33eb30a"]]},{"id":"c42e6d62.7a24c","type":"api-current-state","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"Master On?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"switch.irrigation_master_valve","state_type":"str","blockInputOverrides":true,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":510,"y":200,"wires":[["cdd3b7ef.04a618","21aa3b57a72b3336"],["3b848bce.76aea4","1b05625730953169"]]},{"id":"cdd3b7ef.04a618","type":"trigger","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"Wait 1m","op1":"","op2":"0","op1type":"nul","op2type":"str","duration":"1","extend":false,"overrideDelay":false,"units":"min","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":880,"y":120,"wires":[["5e9007a27732bba9"]]},{"id":"63f07877e73b952a","type":"switch","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"More Than 0 Entities?","property":"payload","propertyType":"msg","rules":[{"t":"nempty"},{"t":"empty"}],"checkall":"true","repair":false,"outputs":2,"x":1100,"y":180,"wires":[[],["749afd72791a5127"]]},{"id":"5e9007a27732bba9","type":"ha-get-entities","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"Get \"On\" Sprinklers","server":"e1dc0b88.463bb8","version":1,"rules":[{"property":"entity_id","logic":"starts_with","value":"switch.irrigation","valueType":"str"},{"property":"entity_id","logic":"does_not_include","value":"switch.irrigation_master_valve,switch.irrigation_24v_power","valueType":"str"},{"property":"state","logic":"is","value":"on","valueType":"str"}],"outputType":"array","outputEmptyResults":true,"outputLocationType":"msg","outputLocation":"payload","outputResultsCount":1,"x":1070,"y":120,"wires":[["63f07877e73b952a"]]},{"id":"061b74f643477dd9","type":"switch","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"More Than 0 Entities?","property":"payload","propertyType":"msg","rules":[{"t":"nempty"},{"t":"empty"}],"checkall":"true","repair":false,"outputs":2,"x":1360,"y":120,"wires":[["43dedcca.ac7734"],[]]},{"id":"749afd72791a5127","type":"trigger","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"Wait 1m","op1":"","op2":"0","op1type":"nul","op2type":"str","duration":"5","extend":false,"overrideDelay":false,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":1260,"y":60,"wires":[["061b74f643477dd9"]]},{"id":"656ad2cd6fb99f57","type":"function","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"clear msg","func":"msg = {}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":280,"y":200,"wires":[["c42e6d62.7a24c"]]},{"id":"c3cb1c7d15767014","type":"api-current-state","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"Weather","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"50","halt_if_type":"num","halt_if_compare":"gte","entity_id":"sensor.precip_probability","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":300,"y":860,"wires":[["1d9a4d0bb4645f32"],["eeecfc1e8864e39f"]]},{"id":"38affe5cc680d076","type":"template","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Template: Zone Last Ran >= 71 hours","field":"template","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{%- set entity_name = \"input_datetime{{ payload.zone }}\" | regex_replace(find='switch', replace='', ignorecase=False) -%}\n{%- set time = (as_timestamp(now()) - as_timestamp(states(entity_name+\"_last_start\"))) | int -%}\n{% if time >= 71*3600 %}1{% else %}0{% endif %}","output":"str","x":790,"y":2060,"wires":[["174186fb5d054240"]]},{"id":"62b5545bc6d6e627","type":"template","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"Template: Zone Last Ran >= 23 hours","field":"template","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{%- set entity_name = \"input_datetime{{ zones.zone }}\" | regex_replace(find='switch', replace='', ignorecase=False) -%}\n{%- set time = (as_timestamp(now()) - as_timestamp(states(entity_name+\"_last_start\"))) | int -%}\n{% if time >= 23*3600 %}1{% else %}0{% endif %}","output":"str","x":310,"y":3260,"wires":[["aa53225140781dd7"]]},{"id":"5093cf5ba33eb30a","type":"api-call-service","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"Disable Tracking","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"homeassistant","service":"disable_entity","areaId":[],"deviceId":[],"entityId":["sensor.irrigation_water_usage"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1520,"y":180,"wires":[[]]},{"id":"1b05625730953169","type":"api-call-service","z":"f602e6ba.609d28","d":true,"g":"3cf0491ac33aecfa","name":"Disable Tracking","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"homeassistant","service":"disable_entity","areaId":[],"deviceId":[],"entityId":["sensor.irrigation_water_usage"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":820,"y":200,"wires":[[]]},{"id":"21aa3b57a72b3336","type":"api-call-service","z":"f602e6ba.609d28","d":true,"g":"3cf0491ac33aecfa","name":"Enable Tracking","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"homeassistant","service":"enable_entity","areaId":[],"deviceId":[],"entityId":["sensor.irrigation_water_usage"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":820,"y":160,"wires":[[]]},{"id":"8f83c8d1d4492be0","type":"api-call-service","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Enable Tracking","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"homeassistant","service":"enable_entity","areaId":[],"deviceId":[],"entityId":["sensor.irrigation_water_usage"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":900,"y":2280,"wires":[[]]},{"id":"0fe0d325194604dd","type":"api-call-service","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"Enable Tracking","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"homeassistant","service":"enable_entity","areaId":[],"deviceId":[],"entityId":["sensor.irrigation_water_usage"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":660,"y":3280,"wires":[[]]}]
\ No newline at end of file
+[{"id":"9584418c.dafc2","type":"tab","label":"Automations","disabled":false,"info":""},{"id":"f602e6ba.609d28","type":"tab","label":"Irrigation","disabled":false,"info":""},{"id":"7133949ae957b8bc","type":"subflow","name":"Subflow 1","info":"","in":[],"out":[]},{"id":"9cfe6331fbc680d5","type":"group","z":"9584418c.dafc2","name":"USPS Vehicle Logo Object Detection","style":{"label":true},"nodes":["ed80a3f.522526","f3a3e80f.3e8e38","6f08d11c854dfb00","9b7c5535c74a94a3","d8a16fd91366d112","bcaf3569e7816922","d58f6ef71c326040","42be35f83b764861","b2a5543693ac851e","c13f0f20a56d6af5","7151828122e3b80c","bace446bfa7b343d","5acbb2cbdbdea368","c061be05c01527e0","e263410e9a3af7d8","d9e9a93275328762","a12e93d199527cae","b4b8f84a.7e57a8","63fd5090444c9cad","2dfdead1d2e3b78b","c1fe21bcb3184137","28609db070a98f82","04300ba2a76891a6","0a096bcbb68139e5","3e6040dad6b140f5","cd2f2ad667788097"],"x":54,"y":2099,"w":1392,"h":322},{"id":"3c4349a7eea9bd3b","type":"group","z":"9584418c.dafc2","name":"Set Cameras Online","style":{"label":true},"nodes":["bd19a17005513c2f","24d1a94e275e5e44","58d0c98797e19829","7a8e43b6f7c84bac","ab66afa5b576de3f","ccf5998fdf8ee50d"],"x":54,"y":1839,"w":492,"h":242},{"id":"35da177d9e2fd258","type":"group","z":"9584418c.dafc2","name":"Virtual Radar Server","style":{"label":true},"nodes":["a9a323de66b6f772","ee139512bcad0966","7da69a7e8ecadc7c","26e32b1d7824356a","3a82b835.c57d48","91afebbf8b9edf05","5684b08aacd6d225","4ca1a5ad47ce7a18","ba68e03143ba4af8","5f1d1b471a1c7cbb","2cd08c8da06afaf6","ea911291f04c7d18","43e5fa289c7550ff","97761f13f8e5c31b","ea239028eda07991"],"x":54,"y":1499,"w":1272,"h":322},{"id":"bd2acc7efb5be5fd","type":"group","z":"9584418c.dafc2","name":"Front Porch Light Occupancy Brightness","style":{"label":true},"nodes":["3f2a2e4d99057b69","3e399d83e4e7f4c3","59f5bc2571b0f12f","c68c969a6b8c2833","b1a99d9698d831b2","17b35d69307a8455","d11c183fff8d848d","fae7fa701710e258","1ef176bec8ed5da0","254a48eabb9cf476","4c459036b05c8866","57ad567ffcc2f626"],"x":54,"y":1279,"w":1092,"h":202},{"id":"11e25fc28c23144c","type":"group","z":"9584418c.dafc2","name":"Front House Lights","style":{"label":true},"nodes":["86bc310cbc0562af","2fb6a7afb6502a32","8c55985bffebd56a","3032aa47a7e5ca0f"],"x":54,"y":1119,"w":472,"h":142},{"id":"b808f2d7ae539c87","type":"group","z":"9584418c.dafc2","name":"Indoor Lights Dim Evening","style":{"label":true},"nodes":["e93027cb.6a6308","fc81cfda.29ff5","8ee35d65.a7569","41b918d5.7ce018","5420f9c0.5356c8","77184c93.8790d4","39a5ce57.78e3d2","ea19fe14.80749","ea2604f9.4cdf98","8a82f465.846018","d8ad0651.bf7a18","d9cc182cc3eb2a93","cde7b3c9ca39891b","1457bf6605a50448","fa90c550.d6c948"],"x":54,"y":659,"w":1073,"h":444},{"id":"9df353d4c0fc9a54","type":"group","z":"9584418c.dafc2","name":"Server Rack Temperature","style":{"label":true},"nodes":["73550501.be7fbc","7dff3ae1.e36a04","88822bfe.2cc598","96b5207d.407dd","b259f0eb.3e83","c7ff978f.ff0728","29b17ed7.fab972"],"x":54,"y":459,"w":932,"h":182},{"id":"18fe74aea06a1180","type":"group","z":"9584418c.dafc2","name":"AC Stale Air","style":{"label":true},"nodes":["ebe84a6f70b4bc2f","cf1c689e51b98aec","6af7abba85612dd9","8b6280c5c448720c","9ce46ce21d8cc964","2b6721107586ceae","830c3ddd08ef396c"],"x":54,"y":299,"w":1132,"h":142},{"id":"cf3a0410bcf837ae","type":"group","z":"9584418c.dafc2","name":"Door Alerts","style":{"label":true},"nodes":["2022689a.938918","8ec438b6.4eb2e8","9c1d9c7c.ed9c7","896f5b34.7b4328","c5124616.c9bd48","f9d93af6.184028","3314ec9f.ca8994","5c24f744.30fcb8","6aa388d0.707768","cf758271.d4fd6","5a740c2d.009864","c5c85c0aa2d8c8ca","28fa66cd.af058a","aee87977a0670889"],"x":54,"y":19,"w":1012,"h":262},{"id":"3cf0491ac33aecfa","type":"group","z":"f602e6ba.609d28","name":"Max Time and Master Valve Control","style":{"label":true},"nodes":["54bad548.7e9fcc","5a10cd93.8e94b4","a77808ff.3f1288","54ae6ec3.1bc63","bcbf413e.7b188","3b848bce.76aea4","43dedcca.ac7734","c42e6d62.7a24c","cdd3b7ef.04a618","63f07877e73b952a","5e9007a27732bba9","061b74f643477dd9","749afd72791a5127","656ad2cd6fb99f57","5093cf5ba33eb30a","1b05625730953169","21aa3b57a72b3336"],"x":54,"y":19,"w":1572,"h":222},{"id":"43a30fe5a5052c22","type":"group","z":"f602e6ba.609d28","name":"Custom Water","style":{"label":true},"nodes":["d269f175.c9dc6","3367e45f.cc981c","116d5bb3.ee92a4","80df47d5.602888","fb46876c.845298","98eeafa7.bd2b9","565ee5c1.561bfc","22a20603.86a06a","a8d96e.1f00969","808e6a81.92e2e8","883f2c00.1d94e8","e42ff3d9.593dc","76160bc4.8cd644","e2c37b65c5582c2b","860a4c61d7557dc9"],"x":54,"y":259,"w":1452,"h":262},{"id":"a9182c2cc04d2d9a","type":"group","z":"f602e6ba.609d28","name":"Irrigation Delays","style":{"label":true},"nodes":["dd9855ca4017c8c0","c3a696a117416327","27f2580e35031830","9cb8187c669c6485","47f1a8018e58e032","427f7fa58d86cc59","1d9a4d0bb4645f32","d9ebbaa37f5911a9","eeecfc1e8864e39f","89487a4efedec1db","1e4b3bc7c25b294f","2c45af5b3ee5cf0a","d7e50e7a2810667d","28936ec687ee4eb0","974833b6a2eca853","478a5a84d38ba181","c01fd0612615e927","93965a61d2c4f5de","c3cb1c7d15767014"],"x":54,"y":539,"w":752,"h":502},{"id":"0f07749a4e1672ad","type":"group","z":"f602e6ba.609d28","name":"Supply Voltage Control","style":{"label":true},"nodes":["1ae21386.a831bc","117145a7.67e99a","882aff35f788008b"],"x":54,"y":1059,"w":472,"h":142},{"id":"a08dae6118c91c19","type":"group","z":"f602e6ba.609d28","name":"Run Lawn","style":{"label":true},"nodes":["f2c9c3a5b8b11a64","9896327569c234da","e95ac52f03478921","174186fb5d054240","287dd3b1af5dc2d0","74cd40702021e86d","bf015af2161c5ec2","151eb6ba5b2d39cd","45ee74d06e9cac2c","95a54981805b22f2","a4b3eba196a504dc","02d1e639f7ac6596","8d3c8370996be2da","863b8fa63f210ebe","7d8374976c01e3dc","b0debe46542c4c67","de509d99b9d965b3","b1c9631973c2f4b1","6ea0448df1383ec2","224d30a98f52c287","5a27d31bfb4a6990","197853479ad9eeda","7b985932412db47d","acdcc72fea065aac","38affe5cc680d076","8f83c8d1d4492be0"],"x":54,"y":2019,"w":1272,"h":522},{"id":"79694877249c9902","type":"group","z":"f602e6ba.609d28","name":"Attempt Lawn","style":{"label":true},"nodes":["3b656b89.1ac154","493b435f.c9851c","7b12e66f.57d068","8c060f00.cf577","4422f61c.847d88","dcdeabc7.780578","722d03d6.2ff77c","af4788fe.215ba8","c90fd5e6.c5c678","862ad27a.d347d","83edf648.3f9ed8","8d4bfe8e.ee805","815fddc0.6604c","06d6255efdc31c47","5420d0eed32223fb","3ff9ce03ef7b554b","576b66fa1bd202a3","a3d75225807b70eb","219b37105a8304f1","e7430e17f0b24ed8","b6e7d5b8891bba6d","339ee0ada21856e0","d01fbafafbb34692","f5684be88477322f","336585d4eee0ca73","b3c4a3638c17629e","2fc67b25514de5a5","08e3098cf183e086"],"x":54,"y":1219,"w":672,"h":782},{"id":"68ec980b932fdba7","type":"group","z":"f602e6ba.609d28","name":"Attempt Front Beds","style":{"label":true},"nodes":["583f46a3.fc4c38","d9147878.b61cf8","c7e5552e.7f8a08","6bcf06fb.9ca748","f587589f.d739e8","d9d17e8f.590e6","d9f893eb.834f3","9d851699.6a8458","4fae5b92.a9cd44","418058c4.af3158","7350c911a0b1a86d","fdcfa1521191fa40","4f2902edc77f2d3b","f6881b4bf93c27c5","ed6e3d4225582e20","593bee0e8c958df8","67916c3a5554a794","f7ac7a90f3da2298","45c5dbbbd8ce50a1","abb8777dd08aa743","d8637d8d96b68fca","b403eec7866aea22"],"x":54,"y":2559,"w":672,"h":582},{"id":"55a2162532da4e14","type":"group","z":"f602e6ba.609d28","name":"Run Front Beds","style":{"label":true},"nodes":["a2ab7368.923fb","a31e3daf.17207","21ced698.708b5a","c661d489.9c9bc8","accc6697.196268","487ff788.8c5c98","2238b09b.1b5b5","84258ddd.41da4","9129b06e.d8925","5ce1803b.06628","aa53225140781dd7","8113d83074ff7701","d83b5ff7a2212931","f78cdb84200eb171","62b5545bc6d6e627","0fe0d325194604dd"],"x":54,"y":3159,"w":1332,"h":262},{"id":"59ea88a27ef998e7","type":"group","z":"9584418c.dafc2","name":"Drone Delivery Logo Object Detection","style":{"label":true},"nodes":["4e2d750742dc8890","cdc9c2c982e3fe5f","300267d7c89b0955","1ae58f8afe36e04c","5c59c5c412e759ce","aa523c5cbfe26949","b4392caec775b305","81d6e9a99eb61c67","8bec0433aa6e51fa","1aa9e39b6be88864","ec51454057c055e2","765c7c5a61100728","1bda1e8b7f76e5f3","14855ff357d5fbad","a95b4fa60f1238d7","081d788e92e34986","9799e777bb06f63f","6d56b297fcfe0016","2f18405339079200","b4d7bb6e129bacea","b442c20392c7ce60","ec6b4698123ebc34"],"x":54,"y":2439,"w":1412,"h":282},{"id":"cb7e3560a0078392","type":"group","z":"9584418c.dafc2","name":"Global Entry Schedule","style":{"label":true},"nodes":["5123f652827fa902","970920516fa379e8","51f2291060d07336","91d3d26774f9468e","7415468104c18108","b8a4a1ee4e15f778","79c00f8c61888f52","a61d605915dc23ff","c44a5c4d6d17ee9f","fa9f2ef8fecf1de2","7d01abce7bc68291","b7c50947c4507d03","1480d9470754a6a3","ca8d58af48d7b7c5","414a38bf0735b27c","c0546e86d17e99e9","d5ab0aa6d198ba81","88d3b091fc333998","1b266e9b338a4dfe","85644b2ab18e7141","041a81d375ec985d","bfbece91f0b61e8b","f3b23466b80725e0"],"x":54,"y":2739,"w":1102,"h":342},{"id":"26b2ac79d4c32bda","type":"group","z":"9584418c.dafc2","name":"Timelapse","style":{"label":true},"nodes":["83e2179938d08d58","59e4459459f077c9","089b07fa48286f29","7ff9bf1a917cbf50","a826a8c498d6d1e3"],"x":54,"y":3099,"w":612,"h":262},{"id":"6f393a92ae952332","type":"group","z":"9584418c.dafc2","name":"Faucet Auto Drip","style":{"label":true},"nodes":["08b26d8311cd9187","716e8fabff85ffb9","7b988b93a658f526","7fe1e564efbd46af","16e1a3e2f53e6bdf","d85faf19968afde1"],"x":54,"y":3379,"w":1032,"h":202},{"id":"e28fc796ce042622","type":"group","z":"9584418c.dafc2","name":"Generic Listener to Push Notifications from SMTP Inbox","style":{"label":true},"nodes":["7eb1a3d60fccbc76","cb1f141562c8fd2b","1cd709e001bf5e89","7f48460e08988c9e","24fc1882c8436738"],"x":54,"y":3599,"w":892,"h":142},{"id":"445e81780ba935ac","type":"group","z":"9584418c.dafc2","name":"License Plate Garage Door","style":{"label":true},"nodes":["5caa1a9942bc27ee","9b25e9a8817a7d8e","7c060a1e3c0ff12e","4fc565f7b86648dc","220bca8570d66770","184d6d5272648136","500ee424e3f6b6a1","6f27f3028b1805e2","004c0ae121925ea2","5218eca8a79a79a5","1fce953ec4b1ee3d","8c5272ae89e85e74","8067ec66aa846765","6648e0bdaa2d8170","18d9178fd318e333","b70d2ca780b98259","75bc8ac5d1afe28f"],"x":54,"y":3899,"w":1292,"h":242},{"id":"516939e66b0b3d5d","type":"group","z":"9584418c.dafc2","name":"QR Door Opener","style":{"label":true},"nodes":["4e761223bbb97b8d","4882c608e1fa69c7","72737cfc3371b80f","6cecf24fbf959b73","cde6c9446e054107","54c1081f98fd1945","519990f56ae7a4e9","8db5019cab97ba65","dd24955fcf11d0b8","6084ebe4fee0af4d","a8e5d53fc40fcf3c","28e26da9f431b399","a4574f947fc3c876","58c162476af5c2df","02dca310d30d41ec","e422bd64e999decb","fc7cc6d0b1911358"],"x":54,"y":4179,"w":1132,"h":302},{"id":"7a1cb951d36ebc37","type":"group","z":"9584418c.dafc2","name":"QR Send","style":{"label":true},"nodes":["e1a4ef361b9fc7ff","b6dbca53c840164c","38010b7e5f85b9f6","4c8457c87150cbf8","e073799764f16bc0","aa0e87207265845d","06871bb32f66c1ab","d0cd45ceef8e8641","e3b312790143d451","523a5be045f29150","10bf2ad7f818bba5","a6187e2d761f18bd","6d38c8b88ab6e9b1"],"x":54,"y":4519,"w":1032,"h":162},{"id":"e1dc0b88.463bb8","type":"server","name":"Home Assistant","version":5,"addon":false,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":false,"cacheJson":true,"heartbeat":true,"heartbeatInterval":"30","areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true},{"id":"546e31ed.0db1c","type":"mqtt-broker","name":"Mosquitto","broker":"10.0.1.22","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"9f81fd881d01a666","type":"position-config","name":"","isValide":"true","longitude":"0","latitude":"0","angleType":"deg","timeZoneOffset":"99","timeZoneDST":"0","stateTimeFormat":"3","stateDateFormat":"12","contextStore":""},{"id":"4f8f8feffed26998","type":"sqlitedb","db":"/data/amazon.db","mode":"RWC"},{"id":"96b8babe5c0a6107","type":"deepstack-server","proto":"http","host":"codeproject","port":"32168","version":"v1","rejectUnauthorized":true},{"id":"27555ce732fc54b0","type":"global-config","name":"global-config","env":[{"name":"bb_pass","value":"PASSWORD","type":"str"},{"name":"bb_number","value":"15128798125","type":"str"},{"name":"plate_andrew","value":"BNW7211","type":"str"},{"name":"qr_code","value":"zZxJ2GWG9W4MusFQ","type":"str"}]},{"id":"169e2bac20a4c980","type":"deepstack-server","proto":"http","host":"codeproject","port":"32168","version":"v1/vision/alpr","rejectUnauthorized":true},{"id":"2022689a.938918","type":"api-call-service","z":"9584418c.dafc2","g":"cf3a0410bcf837ae","name":"Notify Via Wrapper: Opened 1 Minute","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"script","service":"notify_wrapper","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": \"The \" & $lowercase(msg.data.new_state.attributes.friendly_name) & \" has been opened for 1 minute\"\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":890,"y":120,"wires":[[]]},{"id":"8ec438b6.4eb2e8","type":"api-current-state","z":"9584418c.dafc2","g":"cf3a0410bcf837ae","name":"Door Notify On","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"true","halt_if_type":"bool","halt_if_compare":"is","entity_id":"input_boolean.door_notify","state_type":"habool","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":360,"y":60,"wires":[["c5124616.c9bd48"],[]]},{"id":"9c1d9c7c.ed9c7","type":"change","z":"9584418c.dafc2","g":"cf3a0410bcf837ae","name":"Reset If Closed","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":220,"wires":[["5c24f744.30fcb8","cf758271.d4fd6","5a740c2d.009864","28fa66cd.af058a"]]},{"id":"896f5b34.7b4328","type":"api-call-service","z":"9584418c.dafc2","g":"cf3a0410bcf837ae","name":"Notify Via Wrapper","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"script","service":"notify_wrapper","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": payload, \"data\": {\"priority\": 1} \t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":950,"y":60,"wires":[[]]},{"id":"c5124616.c9bd48","type":"template","z":"9584418c.dafc2","g":"cf3a0410bcf837ae","name":"Opened","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{{ data.new_state.attributes.friendly_name }} opened","output":"str","x":740,"y":60,"wires":[["896f5b34.7b4328"]]},{"id":"f9d93af6.184028","type":"server-state-changed","z":"9584418c.dafc2","g":"cf3a0410bcf837ae","name":"Door Opened","server":"e1dc0b88.463bb8","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"binary_sensor.*_door$","entityIdType":"regex","outputInitially":false,"stateType":"habool","ifState":"true","ifStateType":"bool","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":150,"y":100,"wires":[["8ec438b6.4eb2e8","5c24f744.30fcb8","cf758271.d4fd6","5a740c2d.009864","28fa66cd.af058a"],["9c1d9c7c.ed9c7"]]},{"id":"73550501.be7fbc","type":"trigger-state","z":"9584418c.dafc2","d":true,"g":"9df353d4c0fc9a54","name":"Rack Temperature","server":"e1dc0b88.463bb8","version":4,"inputs":1,"outputs":2,"exposeAsEntityConfig":"","entityId":"sensor.rack_exhaust_temperature","entityIdType":"exact","debugEnabled":false,"constraints":[],"customOutputs":[],"outputInitially":false,"stateType":"num","enableInput":true,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"x":170,"y":560,"wires":[["7dff3ae1.e36a04"],[]]},{"id":"7dff3ae1.e36a04","type":"switch","z":"9584418c.dafc2","g":"9df353d4c0fc9a54","name":"Above 90?","property":"payload","propertyType":"msg","rules":[{"t":"gt","v":"95","vt":"num"},{"t":"lte","v":"90","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":350,"y":560,"wires":[["29b17ed7.fab972"],["96b5207d.407dd"]]},{"id":"88822bfe.2cc598","type":"api-call-service","z":"9584418c.dafc2","g":"9df353d4c0fc9a54","name":"Turn on Fan","server":"e1dc0b88.463bb8","version":5,"domain":"homeassistant","service":"turn_on","areaId":[],"deviceId":[],"entityId":["fan.rack_fan"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":true,"outputProperties":[],"queue":"none","x":710,"y":500,"wires":[[]]},{"id":"96b5207d.407dd","type":"api-current-state","z":"9584418c.dafc2","g":"9df353d4c0fc9a54","name":"Rack Fan","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"true","halt_if_type":"bool","halt_if_compare":"is","entity_id":"fan.rack_fan","state_type":"habool","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":540,"y":580,"wires":[["c7ff978f.ff0728"],[]]},{"id":"b259f0eb.3e83","type":"api-call-service","z":"9584418c.dafc2","g":"9df353d4c0fc9a54","name":"Turn off fan","server":"e1dc0b88.463bb8","version":5,"domain":"homeassistant","service":"turn_off","areaId":[],"deviceId":[],"entityId":["fan.rack_fan"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":true,"outputProperties":[],"queue":"none","x":890,"y":540,"wires":[[]]},{"id":"e93027cb.6a6308","type":"api-current-state","z":"9584418c.dafc2","g":"b808f2d7ae539c87","name":"Master Bedroom Lamps On?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.master_bedroom_lamps","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":680,"y":702,"wires":[["fc81cfda.29ff5"],[]]},{"id":"fc81cfda.29ff5","type":"api-call-service","z":"9584418c.dafc2","g":"b808f2d7ae539c87","name":"Set brightness to 128","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":[],"data":"{\"brightness\":\"128\",\"transition\":5, \"entity_id\": msg.data.entity_id}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1001,"y":700,"wires":[[]]},{"id":"c7ff978f.ff0728","type":"api-current-state","z":"9584418c.dafc2","g":"9df353d4c0fc9a54","name":"Rack fan auto off?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.rack_fan_auto_off","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":730,"y":600,"wires":[["b259f0eb.3e83"],[]]},{"id":"29b17ed7.fab972","type":"api-current-state","z":"9584418c.dafc2","g":"9df353d4c0fc9a54","name":"Rack Fan","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"true","halt_if_type":"bool","halt_if_compare":"is","entity_id":"fan.rack_fan","state_type":"habool","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":540,"y":520,"wires":[[],["88822bfe.2cc598"]]},{"id":"3314ec9f.ca8994","type":"server-state-changed","z":"9584418c.dafc2","g":"cf3a0410bcf837ae","name":"Garage Opened","server":"e1dc0b88.463bb8","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"cover.garage_door","entityIdType":"regex","outputInitially":false,"stateType":"str","ifState":"open","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"0","forType":"num","forUnits":"minutes","outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":160,"y":160,"wires":[["8ec438b6.4eb2e8"],[]]},{"id":"8ee35d65.a7569","type":"api-current-state","z":"9584418c.dafc2","d":true,"g":"b808f2d7ae539c87","name":"Kitchen Cans On?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.kitchen_can_lights","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":650,"y":942,"wires":[["5420f9c0.5356c8"],[]]},{"id":"41b918d5.7ce018","type":"api-current-state","z":"9584418c.dafc2","d":true,"g":"b808f2d7ae539c87","name":"Kitchen Table On?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.kitchen_table_light","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":650,"y":1062,"wires":[["d8ad0651.bf7a18"],[]]},{"id":"5420f9c0.5356c8","type":"api-call-service","z":"9584418c.dafc2","g":"b808f2d7ae539c87","name":"Set brightness to 40","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":[],"data":"{\"brightness\":\"40\",\"transition\": \"5\", \"entity_id\": msg.data.entity_id}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1000,"y":842,"wires":[[]]},{"id":"77184c93.8790d4","type":"api-current-state","z":"9584418c.dafc2","d":true,"g":"b808f2d7ae539c87","name":"Kitchen Sink On?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.kitchen_sink_light","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":650,"y":882,"wires":[["5420f9c0.5356c8"],[]]},{"id":"39a5ce57.78e3d2","type":"api-current-state","z":"9584418c.dafc2","g":"b808f2d7ae539c87","name":"Living Room Cans On?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.living_room_can_lights","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":670,"y":822,"wires":[["5420f9c0.5356c8"],[]]},{"id":"5c24f744.30fcb8","type":"trigger","z":"9584418c.dafc2","g":"cf3a0410bcf837ae","name":"Wait 5m","op1":"","op2":"5","op1type":"nul","op2type":"str","duration":"5","extend":false,"overrideDelay":false,"units":"min","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":620,"y":160,"wires":[["6aa388d0.707768","aee87977a0670889"]]},{"id":"6aa388d0.707768","type":"api-call-service","z":"9584418c.dafc2","g":"cf3a0410bcf837ae","name":"Alexa Announce Opened","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"notify","service":"alexa_media","areaId":[],"deviceId":[],"entityId":[],"data":"{\"message\":\"The\" & $lowercase(msg.data.new_state.attributes.friendly_name) & \"has been opened for\" & msg.payload & \" minutes.\",\"data\":{\"method\":\"all\",\"type\":\"announce\"},\"target\":[\"Office\",\"Kitchen\",\"Master\",\"Living Room\"]}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":850,"y":220,"wires":[[]]},{"id":"cf758271.d4fd6","type":"trigger","z":"9584418c.dafc2","g":"cf3a0410bcf837ae","name":"Wait 10m","op1":"","op2":"10","op1type":"nul","op2type":"str","duration":"10","extend":false,"overrideDelay":false,"units":"min","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":620,"y":200,"wires":[["6aa388d0.707768"]]},{"id":"5a740c2d.009864","type":"trigger","z":"9584418c.dafc2","g":"cf3a0410bcf837ae","name":"Wait 15m","op1":"","op2":"15","op1type":"nul","op2type":"str","duration":"15","extend":false,"overrideDelay":false,"units":"min","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":620,"y":240,"wires":[["6aa388d0.707768"]]},{"id":"ea19fe14.80749","type":"api-current-state","z":"9584418c.dafc2","d":true,"g":"b808f2d7ae539c87","name":"Entryway On?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.entryway_light","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":640,"y":1002,"wires":[["5420f9c0.5356c8"],[]]},{"id":"ea2604f9.4cdf98","type":"api-current-state","z":"9584418c.dafc2","g":"b808f2d7ae539c87","name":"Living Room Sconces On?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.living_room_sconces","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":680,"y":762,"wires":[["fc81cfda.29ff5"],[]]},{"id":"8a82f465.846018","type":"comment","z":"9584418c.dafc2","g":"b808f2d7ae539c87","name":"100% = 255","info":"","x":970,"y":773,"wires":[]},{"id":"d8ad0651.bf7a18","type":"api-call-service","z":"9584418c.dafc2","g":"b808f2d7ae539c87","name":"Set brightness to 80","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":[],"data":"{\"brightness\":\"80\",\"transition\": \"5\", \"entity_id\": msg.data.entity_id}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1000,"y":922,"wires":[[]]},{"id":"86bc310cbc0562af","type":"inject","z":"9584418c.dafc2","g":"11e25fc28c23144c","name":"At 10:30PM","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"30 22 * * *","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":170,"y":1200,"wires":[["2fb6a7afb6502a32","8c55985bffebd56a"]]},{"id":"2fb6a7afb6502a32","type":"api-call-service","z":"9584418c.dafc2","g":"11e25fc28c23144c","name":"Front Porch Lights Off","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"light","service":"turn_off","areaId":[],"deviceId":[],"entityId":["light.front_porch_halloween","light.front_porch_lights"],"data":"{ \"transition\": 5 }","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":400,"y":1220,"wires":[[]]},{"id":"3f2a2e4d99057b69","type":"server-state-changed","z":"9584418c.dafc2","g":"bd2acc7efb5be5fd","name":"Front Door Motion","server":"e1dc0b88.463bb8","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"binary_sensor.front_door_all_occupancy","entityIdType":"exact","outputInitially":false,"stateType":"habool","ifState":"true","ifStateType":"bool","ifStateOperator":"is","outputOnlyOnStateChange":false,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":170,"y":1380,"wires":[["17b35d69307a8455","d11c183fff8d848d"],[]]},{"id":"3e399d83e4e7f4c3","type":"api-call-service","z":"9584418c.dafc2","g":"bd2acc7efb5be5fd","name":"Front Porch Lights to 254","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":["light.front_porch_lights"],"data":"{\"brightness\":\"254\",\"transition\":2}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":710,"y":1360,"wires":[["1ef176bec8ed5da0","59f5bc2571b0f12f"]]},{"id":"59f5bc2571b0f12f","type":"delay","z":"9584418c.dafc2","g":"bd2acc7efb5be5fd","name":"","pauseType":"delay","timeout":"60","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":560,"y":1440,"wires":[["c68c969a6b8c2833"]]},{"id":"c68c969a6b8c2833","type":"api-call-service","z":"9584418c.dafc2","g":"bd2acc7efb5be5fd","name":"Front Porch Lights Off","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"light","service":"turn_off","areaId":[],"deviceId":[],"entityId":["light.front_porch_lights"],"data":"{ \"transition\": 5 }","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":780,"y":1440,"wires":[["254a48eabb9cf476"]]},{"id":"d9cc182cc3eb2a93","type":"inject","z":"9584418c.dafc2","d":true,"g":"b808f2d7ae539c87","name":"At 10 PM","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"00 22 * * 3","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":160,"y":742,"wires":[["1457bf6605a50448"]]},{"id":"b1a99d9698d831b2","type":"server-state-changed","z":"9584418c.dafc2","g":"bd2acc7efb5be5fd","name":"Front Door Open","server":"e1dc0b88.463bb8","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"binary_sensor.front_door","entityIdType":"exact","outputInitially":false,"stateType":"habool","ifState":"true","ifStateType":"bool","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":160,"y":1440,"wires":[["17b35d69307a8455","d11c183fff8d848d"],[]]},{"id":"17b35d69307a8455","type":"within-time-switch","z":"9584418c.dafc2","g":"bd2acc7efb5be5fd","name":"","nameInt":"","positionConfig":"9f81fd881d01a666","startTime":"22:30","startTimeType":"entered","startOffset":0,"startOffsetType":"none","startOffsetMultiplier":60000,"endTime":"sunriseStart","endTimeType":"pdsTime","endOffset":"-30","endOffsetType":"num","endOffsetMultiplier":60000,"timeRestrictions":0,"timeRestrictionsType":"none","timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeOnlyOddWeeks":false,"timeOnlyEvenWeeks":false,"timeMonths":"*","timedatestart":"","timedateend":"","propertyStart":"","propertyStartType":"none","propertyStartCompare":"true","propertyStartThreshold":"","propertyStartThresholdType":"num","startTimeAlt":"","startTimeAltType":"entered","startOffsetAlt":0,"startOffsetAltType":"none","startOffsetAltMultiplier":60000,"propertyEnd":"","propertyEndType":"none","propertyEndCompare":"true","propertyEndThreshold":"","propertyEndThresholdType":"num","endTimeAlt":"","endTimeAltType":"entered","endOffsetAlt":0,"endOffsetAltType":"none","endOffsetAltMultiplier":60000,"withinTimeValue":"","withinTimeValueType":"msgInput","outOfTimeValue":"","outOfTimeValueType":"msgInput","tsCompare":"0","x":400,"y":1380,"wires":[["3e399d83e4e7f4c3"],[]]},{"id":"d11c183fff8d848d","type":"change","z":"9584418c.dafc2","g":"bd2acc7efb5be5fd","name":"Reset","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":350,"y":1440,"wires":[["59f5bc2571b0f12f"]]},{"id":"a9a323de66b6f772","type":"http request","z":"9584418c.dafc2","g":"35da177d9e2fd258","name":"Get Aircraft","method":"GET","ret":"obj","paytoqs":"ignore","url":"http://vrs:8080/VirtualRadar/AircraftList.json","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"other","keyValue":"Content-Type","valueType":"other","valueValue":"application/json"}],"x":610,"y":1660,"wires":[["7da69a7e8ecadc7c","91afebbf8b9edf05","4ca1a5ad47ce7a18","2cd08c8da06afaf6","43e5fa289c7550ff"]]},{"id":"ee139512bcad0966","type":"inject","z":"9584418c.dafc2","g":"35da177d9e2fd258","name":"Every 20 Seconds","props":[],"repeat":"20","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":190,"y":1660,"wires":[["ea239028eda07991"]]},{"id":"7da69a7e8ecadc7c","type":"function","z":"9584418c.dafc2","g":"35da177d9e2fd258","name":"Amazon","func":"var alert = {}\nvar message = \"Airborne:\\n\"\n\nfor (var i = 0; i < msg.payload.acList.length; i++) {\n if (typeof msg.payload.acList[i].Reg !== \"undefined\" && typeof msg.payload.acList[i].Man !== \"undefined\") {\n if (msg.payload.acList[i].Man.toLowerCase().includes(\"amazon\")) {\n //if (msg.payload.acList[i].Reg.endsWith(\"PA\") && msg.payload.acList[i].Man.toLowerCase().includes(\"amazon\")) {\n alert[msg.payload.acList[i].Reg] = msg.payload.acList[i].Icao\n }\n }\n}\n\nif (Object.keys(alert).length > 0) {\n for (const [key, value] of Object.entries(alert)) {\n message += key + \": https://globe.adsbexchange.com/?icao=\" + value + \"\\n\"\n }\n return { payload: message + \"https://vrs.aneis.ch\" }\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":780,"y":1660,"wires":[["5684b08aacd6d225"]]},{"id":"26e32b1d7824356a","type":"api-call-service","z":"9584418c.dafc2","g":"35da177d9e2fd258","name":"Notify Via Signal","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"notify","service":"signal_adsb","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": payload \t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1200,"y":1660,"wires":[[]]},{"id":"3a82b835.c57d48","type":"function","z":"9584418c.dafc2","g":"35da177d9e2fd258","name":"Rate Limiter","func":"var interval = (1000*60*10); // minimum interval between messages (ms)\ncontext.lastTime = context.lastTime || 0;\n\nvar now = Date.now();\n\nif (now-context.lastTime > interval) {\n context.lastTime = now;\n return msg;\n} else {\n return null;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1010,"y":1600,"wires":[["26e32b1d7824356a"]]},{"id":"91afebbf8b9edf05","type":"function","z":"9584418c.dafc2","g":"35da177d9e2fd258","name":"Interesting Tail #","func":"var alert = {}\nvar message = \"Interesting:\\n\"\n// N518GS George Strait\n// N628TS Elon\n// N898TS Taylor Swift\n// N621MM Taylor Swift\n// 82-8000 AF1\n// 92-9000 AF1\n// N5DA DA Prop\n// N4DA DA Lear\n// N68885 Zuck\n// N681JK JB\n// N635PA\n// N628PA\n// N636PA\n// N334AF cactus\nvar interesting = [\"N334AF\", \"N68885\", \"N518GS\", \"N628TS\", \"82-8000\", \"92-9000\", \"N621MM\", \"N898TS\", \"N681JK\", \"N635PA\", \"N628PA\", \"N636PA\"]\n\nfor (var i = 0; i < msg.payload.acList.length; i++) {\n if (typeof msg.payload.acList[i].Reg !== \"undefined\") {\n if (interesting.includes(msg.payload.acList[i].Reg)) {\n alert[msg.payload.acList[i].Reg] = msg.payload.acList[i].Icao\n }\n }\n}\n\nif (Object.keys(alert).length > 0) {\n for (const [key, value] of Object.entries(alert)) {\n message += key + \": https://globe.adsbexchange.com/?icao=\" + value + \"\\n\"\n }\n return { payload: message + \"https://vrs.aneis.ch\" }\n}","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":810,"y":1600,"wires":[["3a82b835.c57d48"]]},{"id":"5684b08aacd6d225","type":"function","z":"9584418c.dafc2","g":"35da177d9e2fd258","name":"Rate Limiter","func":"var interval = (1000*60); // minimum interval between messages (ms)\ncontext.lastTime = context.lastTime || 0;\n\nvar now = Date.now();\n\nif (now-context.lastTime > interval) {\n context.lastTime = now;\n return msg;\n} else {\n return null;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1010,"y":1660,"wires":[["26e32b1d7824356a"]]},{"id":"4ca1a5ad47ce7a18","type":"function","z":"9584418c.dafc2","g":"35da177d9e2fd258","name":"Amazon Landing","func":"var alert = {}\nvar message = \"Landing:\\n\"\n\nfor (var i = 0; i < msg.payload.acList.length; i++) {\n if (typeof msg.payload.acList[i].Reg !== \"undefined\" && typeof msg.payload.acList[i].Man !== \"undefined\") {\n //if (msg.payload.acList[i].Reg.endsWith(\"PA\") && msg.payload.acList[i].Man.toLowerCase().includes(\"amazon\")) {\n if (msg.payload.acList[i].Man.toLowerCase().includes(\"amazon\")) {\n if (msg.payload.acList[i].Alt < 50){\n alert[msg.payload.acList[i].Reg] = msg.payload.acList[i].Icao\n }\n }\n }\n}\n\nif (Object.keys(alert).length > 0) {\n for (const [key, value] of Object.entries(alert)) {\n message += key + \": https://globe.adsbexchange.com/?icao=\" + value + \"\\n\"\n }\n return { payload: message + \"https://vrs.aneis.ch\" }\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":810,"y":1720,"wires":[["ba68e03143ba4af8"]]},{"id":"ba68e03143ba4af8","type":"function","z":"9584418c.dafc2","g":"35da177d9e2fd258","name":"Rate Limiter","func":"var interval = (1000*60); // minimum interval between messages (ms)\ncontext.lastTime = context.lastTime || 0;\n\nvar now = Date.now();\n\nif (now-context.lastTime > interval) {\n context.lastTime = now;\n return msg;\n} else {\n return null;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1010,"y":1720,"wires":[["26e32b1d7824356a"]]},{"id":"5f1d1b471a1c7cbb","type":"sqlite","z":"9584418c.dafc2","g":"35da177d9e2fd258","mydb":"4f8f8feffed26998","sqlquery":"msg.topic","sql":"","name":"Amazon","x":1000,"y":1780,"wires":[["ea911291f04c7d18"]]},{"id":"2cd08c8da06afaf6","type":"function","z":"9584418c.dafc2","g":"35da177d9e2fd258","name":"Write Amazon Landing","func":"var sql = \"\"\n\nfor (var i = 0; i < msg.payload.acList.length; i++) {\n var latlong = \"0,0\"\n if (typeof msg.payload.acList[i].Reg !== \"undefined\" && typeof msg.payload.acList[i].Lat !== \"undefined\" && typeof msg.payload.acList[i].Long !== \"undefined\") {\n //if (msg.payload.acList[i].Reg.endsWith(\"PA\") && msg.payload.acList[i].Man.toLowerCase().includes(\"amazon\")) {\n if (msg.payload.acList[i].Man.toLowerCase().includes(\"amazon\")) {\n if (msg.payload.acList[i].Alt < 50){\n latlong = msg.payload.acList[i].Lat + \",\" + msg.payload.acList[i].Long.toString()\n sql += `INSERT INTO deliveries (timestamp, registration, latlong, altitude) VALUES (\"${Date.now()}\", \"${msg.payload.acList[i].Reg}\", \"${latlong}\", \"${msg.payload.acList[i].Alt}\"); `\n }\n }\n }\n}\n\nif (sql.length > 0){\n msg.topic = sql\n return msg;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":820,"y":1780,"wires":[["5f1d1b471a1c7cbb"]]},{"id":"ea911291f04c7d18","type":"api-call-service","z":"9584418c.dafc2","g":"35da177d9e2fd258","name":"Generate Heatmap","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"shell_command","service":"generate_heatmap","areaId":[],"deviceId":[],"entityId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1210,"y":1780,"wires":[[]]},{"id":"cde7b3c9ca39891b","type":"link in","z":"9584418c.dafc2","g":"b808f2d7ae539c87","name":"","links":["1457bf6605a50448"],"x":325,"y":722,"wires":[["e93027cb.6a6308","ea2604f9.4cdf98","39a5ce57.78e3d2","77184c93.8790d4","8ee35d65.a7569","ea19fe14.80749","41b918d5.7ce018"]]},{"id":"1457bf6605a50448","type":"link out","z":"9584418c.dafc2","g":"b808f2d7ae539c87","name":"","links":["cde7b3c9ca39891b"],"x":295,"y":722,"wires":[]},{"id":"8c55985bffebd56a","type":"api-call-service","z":"9584418c.dafc2","g":"11e25fc28c23144c","name":"Front Sconces Off","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"light","service":"turn_off","areaId":[],"deviceId":[],"entityId":["light.front_sconces"],"data":"{ \"transition\": 5 }","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":390,"y":1160,"wires":[[]]},{"id":"fae7fa701710e258","type":"server-state-changed","z":"9584418c.dafc2","g":"bd2acc7efb5be5fd","name":"Front Door Unlock","server":"e1dc0b88.463bb8","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"lock.front_door","entityIdType":"exact","outputInitially":false,"stateType":"str","ifState":"unlocked","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":false,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":170,"y":1320,"wires":[["17b35d69307a8455","d11c183fff8d848d"],[]]},{"id":"ebe84a6f70b4bc2f","type":"inject","z":"9584418c.dafc2","g":"18fe74aea06a1180","name":"Every 30 Minutes","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"1800","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":190,"y":340,"wires":[["830c3ddd08ef396c"]]},{"id":"cf1c689e51b98aec","type":"api-current-state","z":"9584418c.dafc2","g":"18fe74aea06a1180","name":"Thermostat Idle","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"Idle","halt_if_type":"str","halt_if_compare":"is","entity_id":"sensor.thermostat_state","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":440,"y":340,"wires":[["6af7abba85612dd9"],[]]},{"id":"6af7abba85612dd9","type":"function","z":"9584418c.dafc2","g":"18fe74aea06a1180","name":"Idle > 2 hours","func":"// If last changed > 3 hours\nif (parseInt(msg.payload.timeSinceChangedMs) > 3600000*2) {\n return msg;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":560,"y":400,"wires":[["8b6280c5c448720c"]]},{"id":"8b6280c5c448720c","type":"api-call-service","z":"9584418c.dafc2","g":"18fe74aea06a1180","name":"Turn AC Fan on Low","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"climate","service":"set_fan_mode","areaId":[],"deviceId":[],"entityId":["climate.thermostat"],"data":"{\"fan_mode\":\"low\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":760,"y":340,"wires":[["9ce46ce21d8cc964"]]},{"id":"9ce46ce21d8cc964","type":"delay","z":"9584418c.dafc2","g":"18fe74aea06a1180","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":900,"y":400,"wires":[["2b6721107586ceae"]]},{"id":"2b6721107586ceae","type":"api-call-service","z":"9584418c.dafc2","g":"18fe74aea06a1180","name":"Turn AC Fan on Auto","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"climate","service":"set_fan_mode","areaId":[],"deviceId":[],"entityId":["climate.thermostat"],"data":"{\"fan_mode\":\"auto\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1060,"y":340,"wires":[[]]},{"id":"830c3ddd08ef396c","type":"api-current-state","z":"9584418c.dafc2","g":"18fe74aea06a1180","name":"Attic > 100","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"100","halt_if_type":"num","halt_if_compare":"gt","entity_id":"sensor.netatmo_home_attic_temperature","state_type":"str","blockInputOverrides":true,"outputProperties":[{"property":"attic","propertyType":"msg","value":"","valueType":"entityState"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":290,"y":400,"wires":[["cf1c689e51b98aec"],[]]},{"id":"43e5fa289c7550ff","type":"function","z":"9584418c.dafc2","d":true,"g":"35da177d9e2fd258","name":"Speedy","func":"var alert = {}\nvar message = \"Speedy:\\n\"\n\nfor (var i = 0; i < msg.payload.acList.length; i++) {\n if (typeof msg.payload.acList[i].Reg !== \"undefined\") {\n if (typeof msg.payload.acList[i].Spd == \"number\") {\n if (msg.payload.acList[i].Spd > 600) {\n alert[msg.payload.acList[i].Reg] = msg.payload.acList[i].Icao\n }\n }\n }\n}\n\nif (Object.keys(alert).length > 0) {\n for (const [key, value] of Object.entries(alert)) {\n message += key + \": https://globe.adsbexchange.com/?icao=\" + value + \"\\n\"\n }\n return { payload: message + \"https://vrs.aneis.ch\" }\n}","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":780,"y":1540,"wires":[["97761f13f8e5c31b"]]},{"id":"97761f13f8e5c31b","type":"function","z":"9584418c.dafc2","g":"35da177d9e2fd258","name":"Rate Limiter","func":"var interval = (1000*60*10); // minimum interval between messages (ms)\ncontext.lastTime = context.lastTime || 0;\n\nvar now = Date.now();\n\nif (now-context.lastTime > interval) {\n context.lastTime = now;\n return msg;\n} else {\n return null;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1010,"y":1540,"wires":[["26e32b1d7824356a"]]},{"id":"ed80a3f.522526","type":"server-state-changed","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Vehicle Detected","server":"e1dc0b88.463bb8","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"sensor.street_car_count","entityIdType":"exact","outputInitially":false,"stateType":"str","ifState":"0","ifStateType":"num","ifStateOperator":"gte","outputOnlyOnStateChange":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":160,"y":2200,"wires":[["3e6040dad6b140f5"],[]]},{"id":"f3a3e80f.3e8e38","type":"function","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Image to Payload","func":"msg = {\n payload: msg.payload,\n event_id: msg.event_id,\n loops: msg.loops\n};\n\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":930,"y":2200,"wires":[["e263410e9a3af7d8"]]},{"id":"6f08d11c854dfb00","type":"file","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Write File","filename":"/data/logo.jpg","filenameType":"str","appendNewline":true,"createDir":false,"overwriteFile":"true","encoding":"none","x":1020,"y":2260,"wires":[["b2a5543693ac851e"]]},{"id":"9b7c5535c74a94a3","type":"function","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Output msg","func":"msg = {\n payload: msg.outlinedImage,\n detection_result: msg.payload[0].label,\n event_id: msg.event_id\n};\n\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":850,"y":2260,"wires":[["6f08d11c854dfb00"]]},{"id":"d8a16fd91366d112","type":"switch","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Match Found","property":"payload","propertyType":"msg","rules":[{"t":"nempty"}],"checkall":"true","repair":false,"outputs":1,"x":430,"y":2260,"wires":[["63fd5090444c9cad"]]},{"id":"bcaf3569e7816922","type":"http request","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Get Events","method":"GET","ret":"txt","paytoqs":"ignore","url":"http://frigate:5000/api/events?cameras=driveway&labels=car&has_snapshot=1&zones=street&in_progress=1&limit=1","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":550,"y":2140,"wires":[["d58f6ef71c326040"]]},{"id":"d58f6ef71c326040","type":"function","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Extract Event ID","func":"if (JSON.parse(msg.payload).length > 0) {\n msg = {\n event_id: JSON.parse(msg.payload)[0].id,\n };\n return msg;\n}\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":540,"y":2200,"wires":[["c13f0f20a56d6af5"]]},{"id":"bd19a17005513c2f","type":"inject","z":"9584418c.dafc2","g":"3c4349a7eea9bd3b","name":"Every 15 Minutes","props":[],"repeat":"900","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":190,"y":1940,"wires":[["24d1a94e275e5e44","ab66afa5b576de3f","7a8e43b6f7c84bac","58d0c98797e19829","ccf5998fdf8ee50d"]]},{"id":"24d1a94e275e5e44","type":"http request","z":"9584418c.dafc2","g":"3c4349a7eea9bd3b","name":"Set Doorbell Online","method":"GET","ret":"bin","paytoqs":"ignore","url":"http://10.0.0.34/cgi-bin/configManager.cgi?action=setConfig&VSP_PaaS.Online=true","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"digest","senderr":false,"headers":[],"x":410,"y":2000,"wires":[[]]},{"id":"42be35f83b764861","type":"http request","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Add SubLabel","method":"POST","ret":"txt","paytoqs":"ignore","url":"http://frigate:5000/api/events/{{{event_id}}}/sub_label","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"other","keyValue":"Content-type","valueType":"other","valueValue":"application/json"}],"x":1340,"y":2200,"wires":[[]]},{"id":"b2a5543693ac851e","type":"function","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Detection to payload","func":"var new_msg = {\n payload: { \"subLabel\": msg.detection_result },\n detection_result: msg.detection_result,\n event_id: msg.event_id\n};\nvar msg = new_msg\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1280,"y":2260,"wires":[["42be35f83b764861","04300ba2a76891a6","0a096bcbb68139e5","c1fe21bcb3184137"]]},{"id":"c13f0f20a56d6af5","type":"http request","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Get Current Image","method":"GET","ret":"bin","paytoqs":"ignore","url":"http://frigate:1984/api/frame.jpeg?src=driveway&h=1000","tls":"","persist":true,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":730,"y":2200,"wires":[["f3a3e80f.3e8e38"]]},{"id":"7151828122e3b80c","type":"deepstack-custom-model","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Post to Deepstack","server":"96b8babe5c0a6107","confidence":"60","customModel":"delivery","drawPredictions":true,"outlineColor":"red","custom":"","outputs":1,"x":190,"y":2260,"wires":[["5acbb2cbdbdea368","bace446bfa7b343d"]]},{"id":"ea239028eda07991","type":"within-time-switch","z":"9584418c.dafc2","g":"35da177d9e2fd258","name":"","nameInt":"","positionConfig":"9f81fd881d01a666","startTime":"08:00:00","startTimeType":"entered","startOffset":0,"startOffsetType":"none","startOffsetMultiplier":60000,"endTime":"21:00:00","endTimeType":"entered","endOffset":0,"endOffsetType":"none","endOffsetMultiplier":60000,"timeRestrictions":0,"timeRestrictionsType":"none","timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeOnlyOddWeeks":false,"timeOnlyEvenWeeks":false,"timeMonths":"*","timedatestart":"","timedateend":"","propertyStart":"","propertyStartType":"none","propertyStartCompare":"true","propertyStartThreshold":"","propertyStartThresholdType":"num","startTimeAlt":"","startTimeAltType":"entered","startOffsetAlt":0,"startOffsetAltType":"none","startOffsetAltMultiplier":60000,"propertyEnd":"","propertyEndType":"none","propertyEndCompare":"true","propertyEndThreshold":"","propertyEndThresholdType":"num","endTimeAlt":"","endTimeAltType":"entered","endOffsetAlt":0,"endOffsetAltType":"none","endOffsetAltMultiplier":60000,"withinTimeValue":"true","withinTimeValueType":"msgInput","outOfTimeValue":"false","outOfTimeValueType":"msgInput","tsCompare":"0","x":410,"y":1660,"wires":[["a9a323de66b6f772"],[]]},{"id":"58d0c98797e19829","type":"http request","z":"9584418c.dafc2","d":true,"g":"3c4349a7eea9bd3b","name":"Set Camera 1 Online","method":"GET","ret":"bin","paytoqs":"ignore","url":"http://10.0.0.32/cgi-bin/configManager.cgi?action=setConfig&VSP_PaaS.Online=true","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"digest","senderr":false,"headers":[],"x":420,"y":1880,"wires":[[]]},{"id":"7a8e43b6f7c84bac","type":"http request","z":"9584418c.dafc2","d":true,"g":"3c4349a7eea9bd3b","name":"Set Camera 2 Online","method":"GET","ret":"bin","paytoqs":"ignore","url":"http://10.0.0.33/cgi-bin/configManager.cgi?action=setConfig&VSP_PaaS.Online=true","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"digest","senderr":false,"headers":[],"x":420,"y":1920,"wires":[[]]},{"id":"ab66afa5b576de3f","type":"http request","z":"9584418c.dafc2","d":true,"g":"3c4349a7eea9bd3b","name":"Set Camera 3 Online","method":"GET","ret":"bin","paytoqs":"ignore","url":"http://10.0.0.35/cgi-bin/configManager.cgi?action=setConfig&VSP_PaaS.Online=true","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"digest","senderr":false,"headers":[],"x":420,"y":1960,"wires":[[]]},{"id":"ccf5998fdf8ee50d","type":"http request","z":"9584418c.dafc2","d":true,"g":"3c4349a7eea9bd3b","name":"Set PTZ Online","method":"GET","ret":"bin","paytoqs":"ignore","url":"http://10.0.0.36/cgi-bin/configManager.cgi?action=setConfig&VSP_PaaS.Online=true","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"digest","senderr":false,"headers":[],"x":400,"y":2040,"wires":[[]]},{"id":"1ef176bec8ed5da0","type":"api-call-service","z":"9584418c.dafc2","g":"bd2acc7efb5be5fd","name":"Doorbell Ring Light On","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":["light.front_door_ring_light"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1020,"y":1340,"wires":[[]]},{"id":"254a48eabb9cf476","type":"api-call-service","z":"9584418c.dafc2","g":"bd2acc7efb5be5fd","name":"Doorbell Ring Light Off","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"light","service":"turn_off","areaId":[],"deviceId":[],"entityId":["light.front_door_ring_light"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1020,"y":1440,"wires":[[]]},{"id":"4e2d750742dc8890","type":"server-state-changed","z":"9584418c.dafc2","d":true,"g":"59ea88a27ef998e7","name":"Drone Motion Detected","server":"e1dc0b88.463bb8","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"binary_sensor.drone_detect_motion","entityIdType":"exact","outputInitially":false,"stateType":"str","ifState":"on","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":false,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":180,"y":2480,"wires":[["9799e777bb06f63f"],[]]},{"id":"cdc9c2c982e3fe5f","type":"function","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Image to Payload","func":"msg = {\n payload: msg.payload,\n loops: msg.loops\n};\n\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":890,"y":2480,"wires":[["b4392caec775b305"]]},{"id":"300267d7c89b0955","type":"debug","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Deepstack Output","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":420,"y":2620,"wires":[]},{"id":"1ae58f8afe36e04c","type":"http request","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Get Current Image","method":"GET","ret":"bin","paytoqs":"ignore","url":"http://frigate:5000/api/bullet/latest.jpg?quality=100","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":670,"y":2480,"wires":[["cdc9c2c982e3fe5f"]]},{"id":"5c59c5c412e759ce","type":"deepstack-custom-model","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Post to Deepstack","server":"96b8babe5c0a6107","confidence":"40","customModel":"delivery","drawPredictions":true,"outlineColor":"red","custom":"","outputs":1,"x":190,"y":2540,"wires":[["300267d7c89b0955","aa523c5cbfe26949","2f18405339079200"]]},{"id":"aa523c5cbfe26949","type":"image","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"","width":"800","data":"outlinedImage","dataType":"msg","thumbnail":false,"active":true,"pass":true,"outputs":1,"x":200,"y":2680,"wires":[[]]},{"id":"b4392caec775b305","type":"jimp-image","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"","data":"payload","dataType":"msg","ret":"buf","parameter1":"380","parameter1Type":"num","parameter2":"0","parameter2Type":"num","parameter3":"170","parameter3Type":"num","parameter4":"170","parameter4Type":"num","parameter5":"","parameter5Type":"msg","parameter6":"","parameter6Type":"msg","parameter7":"","parameter7Type":"msg","parameter8":"","parameter8Type":"msg","sendProperty":"payload","sendPropertyType":"msg","parameterCount":4,"jimpFunction":"crop","selectedJimpFunction":{"name":"crop","fn":"crop","description":"crop to the given region","parameters":[{"name":"x","type":"num","required":true,"hint":"the x coordinate to crop form"},{"name":"y","type":"num","required":true,"hint":"the y coordinate to crop form"},{"name":"w","type":"num","required":true,"hint":"the width of the crop region"},{"name":"h","type":"num","required":true,"hint":"the height of the crop region"}]},"x":1050,"y":2480,"wires":[["5c59c5c412e759ce","081d788e92e34986"]]},{"id":"81d6e9a99eb61c67","type":"switch","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Match Found","property":"payload","propertyType":"msg","rules":[{"t":"nempty"}],"checkall":"true","repair":false,"outputs":1,"x":690,"y":2540,"wires":[["8bec0433aa6e51fa"]]},{"id":"8bec0433aa6e51fa","type":"function","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Output msg","func":"var oldmsg = msg;\n\nmsg = {\n payload: msg.outlinedImage,\n detection_result: msg.payload[0].label,\n};\n\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":890,"y":2540,"wires":[["1aa9e39b6be88864","b4d7bb6e129bacea"]]},{"id":"1aa9e39b6be88864","type":"file","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Write File","filename":"/data/logo.jpg","filenameType":"str","appendNewline":true,"createDir":false,"overwriteFile":"true","encoding":"none","x":1060,"y":2540,"wires":[["ec51454057c055e2"]]},{"id":"ec51454057c055e2","type":"function","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Detection to payload","func":"var new_msg = {\n payload: { \"subLabel\": msg.detection_result },\n detection_result: msg.detection_result,\n event_id: msg.event_id\n};\nvar msg = new_msg\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":1260,"y":2540,"wires":[["6d56b297fcfe0016"]]},{"id":"765c7c5a61100728","type":"http request","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Create Event","method":"POST","ret":"txt","paytoqs":"ignore","url":"http://frigate:5000/api/events/drone_detect/PrimeAir/create","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"other","keyValue":"Content-type","valueType":"other","valueValue":"application/json"}],"x":1270,"y":2600,"wires":[[]]},{"id":"1bda1e8b7f76e5f3","type":"http request","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Create Event","method":"POST","ret":"txt","paytoqs":"ignore","url":"http://frigate:5000/api/events/back_porch/PrimeAir/create","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"other","keyValue":"Content-type","valueType":"other","valueValue":"application/json"}],"x":1270,"y":2640,"wires":[[]]},{"id":"14855ff357d5fbad","type":"mqtt out","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"","topic":"frigate/events","qos":"","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"546e31ed.0db1c","x":1360,"y":2680,"wires":[]},{"id":"a95b4fa60f1238d7","type":"function","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Build MQTT","func":"msg.payload = {'type':'update', 'after':{'label':'PrimeAir'}}\n\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1190,"y":2680,"wires":[["14855ff357d5fbad"]]},{"id":"081d788e92e34986","type":"image","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"","width":"800","data":"payload","dataType":"msg","thumbnail":false,"active":true,"pass":true,"outputs":1,"x":1000,"y":2680,"wires":[[]]},{"id":"9799e777bb06f63f","type":"within-time-switch","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"","nameInt":"","positionConfig":"9f81fd881d01a666","startTime":"08:30:00","startTimeType":"entered","startOffset":0,"startOffsetType":"none","startOffsetMultiplier":60000,"endTime":"15:30:00","endTimeType":"entered","endOffset":0,"endOffsetType":"none","endOffsetMultiplier":60000,"timeRestrictions":0,"timeRestrictionsType":"none","timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeOnlyOddWeeks":false,"timeOnlyEvenWeeks":false,"timeMonths":"*","timedatestart":"","timedateend":"","propertyStart":"","propertyStartType":"none","propertyStartCompare":"true","propertyStartThreshold":"","propertyStartThresholdType":"num","startTimeAlt":"","startTimeAltType":"entered","startOffsetAlt":0,"startOffsetAltType":"none","startOffsetAltMultiplier":60000,"propertyEnd":"","propertyEndType":"none","propertyEndCompare":"true","propertyEndThreshold":"","propertyEndThresholdType":"num","endTimeAlt":"","endTimeAltType":"entered","endOffsetAlt":0,"endOffsetAltType":"none","endOffsetAltMultiplier":60000,"withinTimeValue":"true","withinTimeValueType":"msgInput","outOfTimeValue":"false","outOfTimeValueType":"msgInput","tsCompare":"0","x":430,"y":2480,"wires":[["1ae58f8afe36e04c"],[]]},{"id":"6d56b297fcfe0016","type":"function","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Rate Limiter","func":"var interval = (1000*30); // minimum interval between messages (ms)\ncontext.lastTime = context.lastTime || 0;\n\nvar now = Date.now();\n\nif (now-context.lastTime > interval) {\n context.lastTime = now;\n return msg;\n} else {\n return null;\n}","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":1070,"y":2600,"wires":[["a95b4fa60f1238d7","1bda1e8b7f76e5f3","765c7c5a61100728","b442c20392c7ce60"]]},{"id":"2f18405339079200","type":"while-loop","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Loop \"payload.length == 0\"","condi":"msg.payload.length == 0","limit":true,"limitTime":"10","time":"loops","timeType":"msg","x":460,"y":2540,"wires":[["81d6e9a99eb61c67"],["1ae58f8afe36e04c"]]},{"id":"bace446bfa7b343d","type":"while-loop","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Loop \"msg.payload.length == 0\"","condi":"msg.payload.length == 0","limit":true,"limitTime":"4","time":"loops","timeType":"msg","x":240,"y":2340,"wires":[["d8a16fd91366d112"],["c13f0f20a56d6af5"]]},{"id":"b4d7bb6e129bacea","type":"debug","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Write Match Image","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":740,"y":2600,"wires":[]},{"id":"b442c20392c7ce60","type":"debug","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Call Frigate API","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":750,"y":2680,"wires":[]},{"id":"5acbb2cbdbdea368","type":"image","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"","width":"800","data":"outlinedImage","dataType":"msg","thumbnail":false,"active":true,"pass":true,"outputs":1,"x":200,"y":2380,"wires":[[]]},{"id":"c061be05c01527e0","type":"image","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"","width":"800","data":"payload","dataType":"msg","thumbnail":false,"active":true,"pass":true,"outputs":1,"x":1060,"y":2380,"wires":[[]]},{"id":"ec6b4698123ebc34","type":"inject","z":"9584418c.dafc2","g":"59ea88a27ef998e7","name":"Manually Create Event","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":1280,"y":2480,"wires":[["6d56b297fcfe0016"]]},{"id":"e263410e9a3af7d8","type":"jimp-image","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"","data":"payload","dataType":"msg","ret":"buf","parameter1":"650","parameter1Type":"num","parameter2":"0","parameter2Type":"num","parameter3":"625","parameter3Type":"num","parameter4":"130","parameter4Type":"num","parameter5":"","parameter5Type":"msg","parameter6":"","parameter6Type":"msg","parameter7":"","parameter7Type":"msg","parameter8":"","parameter8Type":"msg","sendProperty":"payload","sendPropertyType":"msg","parameterCount":4,"jimpFunction":"crop","selectedJimpFunction":{"name":"crop","fn":"crop","description":"crop to the given region","parameters":[{"name":"x","type":"num","required":true,"hint":"the x coordinate to crop form"},{"name":"y","type":"num","required":true,"hint":"the y coordinate to crop form"},{"name":"w","type":"num","required":true,"hint":"the width of the crop region"},{"name":"h","type":"num","required":true,"hint":"the height of the crop region"}]},"x":1110,"y":2200,"wires":[["7151828122e3b80c","a12e93d199527cae","c061be05c01527e0"]]},{"id":"5123f652827fa902","type":"inject","z":"9584418c.dafc2","d":true,"g":"cb7e3560a0078392","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"30","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":170,"y":2860,"wires":[["970920516fa379e8","88d3b091fc333998"]]},{"id":"970920516fa379e8","type":"http request","z":"9584418c.dafc2","d":true,"g":"cb7e3560a0078392","name":"PHX","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://ttp.cbp.dhs.gov/schedulerapi/slot-availability?locationId=7160","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":330,"y":2860,"wires":[["51f2291060d07336"]]},{"id":"51f2291060d07336","type":"function","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"11/07","func":"var oldmsg = msg;\nvar match = false\nvar slots = ''\n\nfor (var i = 0; i < msg.payload.availableSlots.length; i++) {\n if (msg.payload.availableSlots[i].startTimestamp.includes('2023-11-07')){\n console.log(msg.payload.availableSlots[i].startTimestamp)\n slots += msg.payload.availableSlots[i].startTimestamp + ' '\n match = true\n }\n}\n\nmsg = {\n payload: \"PHX: \" + slots + \"https://ttp.cbp.dhs.gov/schedulerui/schedule-interview/location?lang=en&vo=true&returnUrl=ttp-external&service=UP\",\n 'match': match\n};\n\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":470,"y":2860,"wires":[["7415468104c18108","a61d605915dc23ff"]]},{"id":"91d3d26774f9468e","type":"debug","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"HOU","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":630,"y":2820,"wires":[]},{"id":"7415468104c18108","type":"debug","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"PHX","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":630,"y":2900,"wires":[]},{"id":"b8a4a1ee4e15f778","type":"api-call-service","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"Notify Via Signal","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"notify","service":"signal_self","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": msg.payload\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":960,"y":2860,"wires":[[]]},{"id":"79c00f8c61888f52","type":"switch","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"","property":"match","propertyType":"msg","rules":[{"t":"true"}],"checkall":"true","repair":false,"outputs":1,"x":610,"y":2780,"wires":[["c44a5c4d6d17ee9f"]]},{"id":"a61d605915dc23ff","type":"switch","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"","property":"match","propertyType":"msg","rules":[{"t":"true"}],"checkall":"true","repair":false,"outputs":1,"x":610,"y":2860,"wires":[["fa9f2ef8fecf1de2"]]},{"id":"c44a5c4d6d17ee9f","type":"function","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"Rate Limiter","func":"var interval = (1000*600); // minimum interval between messages (ms)\ncontext.lastTime = context.lastTime || 0;\n\nvar now = Date.now();\n\nif (now-context.lastTime > interval) {\n context.lastTime = now;\n return msg;\n} else {\n return null;\n}","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":770,"y":2780,"wires":[["d5ab0aa6d198ba81"]]},{"id":"fa9f2ef8fecf1de2","type":"function","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"Rate Limiter","func":"var interval = (1000*600); // minimum interval between messages (ms)\ncontext.lastTime = context.lastTime || 0;\n\nvar now = Date.now();\n\nif (now-context.lastTime > interval) {\n context.lastTime = now;\n return msg;\n} else {\n return null;\n}","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":770,"y":2860,"wires":[["b8a4a1ee4e15f778"]]},{"id":"7d01abce7bc68291","type":"function","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"All","func":"var oldmsg = msg;\nvar slots = msg.payload.availableSlots\n\n// Pass message if slots not empty\nif(slots.length > 0){\n msg.message = slots[0].startTimestamp\n return msg;\n}","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":470,"y":2940,"wires":[["1480d9470754a6a3","b7c50947c4507d03"]]},{"id":"b7c50947c4507d03","type":"switch","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"","property":"payload","propertyType":"msg","rules":[{"t":"nempty"}],"checkall":"true","repair":false,"outputs":1,"x":610,"y":2940,"wires":[["ca8d58af48d7b7c5","414a38bf0735b27c"]]},{"id":"1480d9470754a6a3","type":"debug","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"DAL","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":630,"y":2980,"wires":[]},{"id":"ca8d58af48d7b7c5","type":"function","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"Rate Limiter","func":"var interval = (1000*120); // minimum interval between messages (ms)\ncontext.lastTime = context.lastTime || 0;\n\nvar now = Date.now();\n\nif (now-context.lastTime > interval) {\n context.lastTime = now;\n return msg;\n} else {\n return null;\n}","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":770,"y":2940,"wires":[["414a38bf0735b27c","bfbece91f0b61e8b"]]},{"id":"414a38bf0735b27c","type":"api-call-service","z":"9584418c.dafc2","d":true,"g":"cb7e3560a0078392","name":"Notify Via Signal","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"notify","service":"signal_self","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": \"Dallas https://ttp.cbp.dhs.gov/schedulerui/schedule-interview/location?lang=en&vo=true&returnUrl=ttp-external&service=UP\"\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":960,"y":2940,"wires":[[]]},{"id":"c0546e86d17e99e9","type":"function","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"11/03","func":"var oldmsg = msg;\nvar match = false\nvar slots = ''\n\nfor (var i = 0; i < msg.payload.availableSlots.length; i++) {\n if (msg.payload.availableSlots[i].startTimestamp.includes('2023-11-03')){\n console.log(msg.payload.availableSlots[i].startTimestamp)\n slots += msg.payload.availableSlots[i].startTimestamp + ' '\n match = true\n }\n}\n\nmsg = {\n payload: \"HOU: \" + slots + \"https://ttp.cbp.dhs.gov/schedulerui/schedule-interview/location?lang=en&vo=true&returnUrl=ttp-external&service=UP\",\n 'match': match\n};\n\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":470,"y":2780,"wires":[["91d3d26774f9468e","79c00f8c61888f52"]]},{"id":"d5ab0aa6d198ba81","type":"api-call-service","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"Notify Via Signal","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"notify","service":"signal_self","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": msg.payload\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":960,"y":2780,"wires":[[]]},{"id":"83e2179938d08d58","type":"api-call-service","z":"9584418c.dafc2","g":"26b2ac79d4c32bda","name":"Timelapse Snapshots","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"camera","service":"snapshot","areaId":[],"deviceId":[],"entityId":["camera.back_porch","camera.bullet","camera.driveway","camera.front_door"],"data":"{\"filename\":\"/config/media/images/{{ entity_id.entity_id }}/{{ now().strftime('%Y%m%d-%H%M%S') }}.webp\"}","dataType":"json","mergeContext":"","mustacheAltTags":true,"outputProperties":[],"queue":"none","x":540,"y":3220,"wires":[[]]},{"id":"59e4459459f077c9","type":"time-inject","z":"9584418c.dafc2","g":"26b2ac79d4c32bda","name":"Golden Hour Dawn End","nameInt":"⏲ golden hour dawn end = $!{lblInject}!","positionConfig":"9f81fd881d01a666","props":[],"injectTypeSelect":"time","intervalCount":1,"intervalCountType":"num","intervalCountMultiplier":60000,"time":"goldenHourDawnEnd","timeType":"pdsTime","offset":0,"offsetType":"none","offsetMultiplier":60000,"timeEnd":"","timeEndType":"entered","timeEndOffset":0,"timeEndOffsetType":"none","timeEndOffsetMultiplier":60000,"timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeOnlyOddWeeks":false,"timeOnlyEvenWeeks":false,"timeMonths":"*","timedatestart":"","timedateend":"","property":"","propertyType":"none","propertyCompare":"true","propertyThreshold":"","propertyThresholdType":"num","timeAlt":"","timeAltType":"entered","timeAltDays":"*","timeAltOnlyOddDays":false,"timeAltOnlyEvenDays":false,"timeAltOnlyOddWeeks":false,"timeAltOnlyEvenWeeks":false,"timeAltMonths":"*","timeAltOffset":0,"timeAltOffsetType":"none","timeAltOffsetMultiplier":60000,"once":false,"onceDelay":0.1,"recalcTime":2,"x":200,"y":3140,"wires":[["83e2179938d08d58"]]},{"id":"089b07fa48286f29","type":"time-inject","z":"9584418c.dafc2","g":"26b2ac79d4c32bda","name":"Golden Hour Dusk Start","nameInt":"⏲ golden hour dusk start = $!{lblInject}!","positionConfig":"9f81fd881d01a666","props":[],"injectTypeSelect":"time","intervalCount":1,"intervalCountType":"num","intervalCountMultiplier":60000,"time":"goldenHourDuskStart","timeType":"pdsTime","offset":0,"offsetType":"none","offsetMultiplier":60000,"timeEnd":"","timeEndType":"entered","timeEndOffset":0,"timeEndOffsetType":"none","timeEndOffsetMultiplier":60000,"timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeOnlyOddWeeks":false,"timeOnlyEvenWeeks":false,"timeMonths":"*","timedatestart":"","timedateend":"","property":"","propertyType":"none","propertyCompare":"true","propertyThreshold":"","propertyThresholdType":"num","timeAlt":"","timeAltType":"entered","timeAltDays":"*","timeAltOnlyOddDays":false,"timeAltOnlyEvenDays":false,"timeAltOnlyOddWeeks":false,"timeAltOnlyEvenWeeks":false,"timeAltMonths":"*","timeAltOffset":0,"timeAltOffsetType":"none","timeAltOffsetMultiplier":60000,"once":false,"onceDelay":0.1,"recalcTime":2,"x":200,"y":3320,"wires":[["83e2179938d08d58"]]},{"id":"7ff9bf1a917cbf50","type":"time-inject","z":"9584418c.dafc2","g":"26b2ac79d4c32bda","name":"Golden Hour Dusk Start - 3h","nameInt":"⏲ golden hour dusk start↶ = $!{lblInject}!","positionConfig":"9f81fd881d01a666","props":[],"injectTypeSelect":"time","intervalCount":1,"intervalCountType":"num","intervalCountMultiplier":60000,"time":"goldenHourDuskStart","timeType":"pdsTime","offset":"-3","offsetType":"num","offsetMultiplier":3600000,"timeEnd":"","timeEndType":"entered","timeEndOffset":0,"timeEndOffsetType":"none","timeEndOffsetMultiplier":60000,"timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeOnlyOddWeeks":false,"timeOnlyEvenWeeks":false,"timeMonths":"*","timedatestart":"","timedateend":"","property":"","propertyType":"none","propertyCompare":"true","propertyThreshold":"","propertyThresholdType":"num","timeAlt":"","timeAltType":"entered","timeAltDays":"*","timeAltOnlyOddDays":false,"timeAltOnlyEvenDays":false,"timeAltOnlyOddWeeks":false,"timeAltOnlyEvenWeeks":false,"timeAltMonths":"*","timeAltOffset":0,"timeAltOffsetType":"none","timeAltOffsetMultiplier":60000,"once":false,"onceDelay":0.1,"recalcTime":2,"x":220,"y":3260,"wires":[["83e2179938d08d58"]]},{"id":"a826a8c498d6d1e3","type":"time-inject","z":"9584418c.dafc2","g":"26b2ac79d4c32bda","name":"Golden Hour Dawn End + 3h","nameInt":"⏲ golden hour dawn end↷ = $!{lblInject}!","positionConfig":"9f81fd881d01a666","props":[],"injectTypeSelect":"time","intervalCount":1,"intervalCountType":"num","intervalCountMultiplier":60000,"time":"goldenHourDawnEnd","timeType":"pdsTime","offset":"3","offsetType":"num","offsetMultiplier":3600000,"timeEnd":"","timeEndType":"entered","timeEndOffset":0,"timeEndOffsetType":"none","timeEndOffsetMultiplier":60000,"timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeOnlyOddWeeks":false,"timeOnlyEvenWeeks":false,"timeMonths":"*","timedatestart":"","timedateend":"","property":"","propertyType":"none","propertyCompare":"true","propertyThreshold":"","propertyThresholdType":"num","timeAlt":"","timeAltType":"entered","timeAltDays":"*","timeAltOnlyOddDays":false,"timeAltOnlyEvenDays":false,"timeAltOnlyOddWeeks":false,"timeAltOnlyEvenWeeks":false,"timeAltMonths":"*","timeAltOffset":0,"timeAltOffsetType":"none","timeAltOffsetMultiplier":60000,"once":false,"onceDelay":0.1,"recalcTime":2,"x":220,"y":3200,"wires":[["83e2179938d08d58"]]},{"id":"c5c85c0aa2d8c8ca","type":"server-state-changed","z":"9584418c.dafc2","g":"cf3a0410bcf837ae","name":"Safe Opened","server":"e1dc0b88.463bb8","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"binary_sensor.large_safe","entityIdType":"exact","outputInitially":false,"stateType":"habool","ifState":"true","ifStateType":"bool","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":530,"y":80,"wires":[["c5124616.c9bd48"],[]]},{"id":"fa90c550.d6c948","type":"inject","z":"9584418c.dafc2","d":true,"g":"b808f2d7ae539c87","name":"At 8 PM","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"00 20 * * 1,2,4,5,6,0","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":160,"y":700,"wires":[["1457bf6605a50448"]]},{"id":"08b26d8311cd9187","type":"inject","z":"9584418c.dafc2","d":true,"g":"6f393a92ae952332","name":"Every 5 minutes","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"300","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":190,"y":3480,"wires":[["716e8fabff85ffb9","7b988b93a658f526","d85faf19968afde1"]]},{"id":"716e8fabff85ffb9","type":"api-current-state","z":"9584418c.dafc2","g":"6f393a92ae952332","name":"Attic Temperature < 34","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"34","halt_if_type":"num","halt_if_compare":"lt","entity_id":"sensor.netatmo_home_attic_temperature","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":420,"y":3420,"wires":[["16e1a3e2f53e6bdf"],[]]},{"id":"7b988b93a658f526","type":"api-current-state","z":"9584418c.dafc2","g":"6f393a92ae952332","name":"Thermostat Outdoor Temperature <= 35","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"35","halt_if_type":"num","halt_if_compare":"lte","entity_id":"sensor.thermostat_outdoor_ambient_temperature","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":480,"y":3480,"wires":[["16e1a3e2f53e6bdf"],[]]},{"id":"7fe1e564efbd46af","type":"api-call-service","z":"9584418c.dafc2","g":"6f393a92ae952332","name":"Turn on Faucet Drip","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"homeassistant","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.bhyve_1"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":970,"y":3480,"wires":[[]]},{"id":"16e1a3e2f53e6bdf","type":"api-current-state","z":"9584418c.dafc2","g":"6f393a92ae952332","name":"Faucet Drip Off?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","entity_id":"switch.bhyve_1","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":780,"y":3480,"wires":[["7fe1e564efbd46af"],[]]},{"id":"d85faf19968afde1","type":"api-current-state","z":"9584418c.dafc2","g":"6f393a92ae952332","name":"Compost External Temperature < 34","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"34","halt_if_type":"num","halt_if_compare":"lt","entity_id":"sensor.compost_external_temperature","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":470,"y":3540,"wires":[["16e1a3e2f53e6bdf"],[]]},{"id":"504a90c2bb116cda","type":"inject","z":"9584418c.dafc2","name":"On Demand","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":690,"y":1920,"wires":[["f7c82af0e299c914"]]},{"id":"f7c82af0e299c914","type":"http request","z":"9584418c.dafc2","name":"Enable Overlay","method":"GET","ret":"bin","paytoqs":"ignore","url":"http://10.0.0.32/cgi-bin/configManager.cgi?action=setConfig&VideoWidget[0].CustomTitle[1].EncodeBlend=true","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"digest","senderr":false,"headers":[],"x":900,"y":1920,"wires":[[]]},{"id":"aa9d132ce4c33794","type":"http request","z":"9584418c.dafc2","name":"Set Overlay Text","method":"GET","ret":"bin","paytoqs":"ignore","url":"http://10.0.0.32/cgi-bin/configManager.cgi?action=setConfig&VideoWidget[0].CustomTitle[1].Text={{{payload}}}°F","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"digest","senderr":false,"headers":[],"x":1140,"y":1980,"wires":[[]]},{"id":"8f9a073f4ebb3133","type":"inject","z":"9584418c.dafc2","name":"On Demand */5","props":[],"repeat":"300","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":700,"y":1980,"wires":[["446f812e8b1f4307"]]},{"id":"acd933c5c0eddc8b","type":"http request","z":"9584418c.dafc2","name":"Disable Overlay","method":"GET","ret":"bin","paytoqs":"ignore","url":"http://10.0.0.32/cgi-bin/configManager.cgi?action=setConfig&VideoWidget[0].CustomTitle[1].EncodeBlend=false","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"digest","senderr":false,"headers":[],"x":900,"y":2040,"wires":[[]]},{"id":"6d26bb1db9ea5e67","type":"inject","z":"9584418c.dafc2","name":"On Demand","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":690,"y":2040,"wires":[["acd933c5c0eddc8b"]]},{"id":"446f812e8b1f4307","type":"api-current-state","z":"9584418c.dafc2","name":"Outdoor Temperature","server":"e1dc0b88.463bb8","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"sensor.433_weather_temperature","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":920,"y":1980,"wires":[["aa9d132ce4c33794"]]},{"id":"7eb1a3d60fccbc76","type":"Mailin SMTP","z":"9584418c.dafc2","g":"e28fc796ce042622","name":"Recieve Mail","port":25,"x":150,"y":3660,"wires":[["1cd709e001bf5e89"]]},{"id":"cb1f141562c8fd2b","type":"api-call-service","z":"9584418c.dafc2","g":"e28fc796ce042622","name":"Notify Cellular Priority 1","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"notify","service":"cellular_message","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": payload.html, \"data\": {\"priority\": 1} \t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":810,"y":3640,"wires":[[]]},{"id":"88d3b091fc333998","type":"http request","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"DAL","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://ttp.cbp.dhs.gov/schedulerapi/slot-availability?locationId=5300","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":330,"y":2940,"wires":[["7d01abce7bc68291"]]},{"id":"1cd709e001bf5e89","type":"within-time-switch","z":"9584418c.dafc2","g":"e28fc796ce042622","name":"","nameInt":"","positionConfig":"9f81fd881d01a666","startTime":"09:00:00","startTimeType":"entered","startOffset":0,"startOffsetType":"none","startOffsetMultiplier":60000,"endTime":"22:00:00","endTimeType":"entered","endOffset":0,"endOffsetType":"none","endOffsetMultiplier":60000,"timeRestrictions":0,"timeRestrictionsType":"none","timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeOnlyOddWeeks":false,"timeOnlyEvenWeeks":false,"timeMonths":"*","timedatestart":"","timedateend":"","propertyStart":"","propertyStartType":"none","propertyStartCompare":"true","propertyStartThreshold":"","propertyStartThresholdType":"num","startTimeAlt":"","startTimeAltType":"entered","startOffsetAlt":0,"startOffsetAltType":"none","startOffsetAltMultiplier":60000,"propertyEnd":"","propertyEndType":"none","propertyEndCompare":"true","propertyEndThreshold":"","propertyEndThresholdType":"num","endTimeAlt":"","endTimeAltType":"entered","endOffsetAlt":0,"endOffsetAltType":"none","endOffsetAltMultiplier":60000,"withinTimeValue":"true","withinTimeValueType":"msgInput","outOfTimeValue":"false","outOfTimeValueType":"msgInput","tsCompare":"0","x":370,"y":3660,"wires":[["24fc1882c8436738"],["7f48460e08988c9e"]]},{"id":"7f48460e08988c9e","type":"api-call-service","z":"9584418c.dafc2","g":"e28fc796ce042622","name":"Notify Cellular Priority 0","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"notify","service":"cellular_message","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": payload.html, \"data\": {\"priority\": 0} \t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":810,"y":3700,"wires":[[]]},{"id":"24fc1882c8436738","type":"api-current-state","z":"9584418c.dafc2","g":"e28fc796ce042622","name":"Andrew Home?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"home","halt_if_type":"str","halt_if_compare":"is","entity_id":"person.andrew","state_type":"habool","blockInputOverrides":false,"outputProperties":[],"for":0,"forType":"num","forUnits":"minutes","x":580,"y":3640,"wires":[["cb1f141562c8fd2b"],["7f48460e08988c9e"]]},{"id":"d9e9a93275328762","type":"inject","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":780,"y":2140,"wires":[["c13f0f20a56d6af5"]]},{"id":"a12e93d199527cae","type":"file","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Write File","filename":"/data/input.jpg","filenameType":"str","appendNewline":true,"createDir":false,"overwriteFile":"true","encoding":"none","x":1200,"y":2140,"wires":[[]]},{"id":"f8a0990e2842810d","type":"server-state-changed","z":"9584418c.dafc2","name":"Dead Zwave Node","server":"e1dc0b88.463bb8","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"_node_status","entityIdType":"substring","outputInitially":false,"stateType":"str","ifState":"dead","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":170,"y":3780,"wires":[["1ba5d7539019ce84"],[]]},{"id":"1ba5d7539019ce84","type":"api-call-service","z":"9584418c.dafc2","name":"Notify Via Signal","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"notify","service":"signal_homeassistant","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": topic & \" has died\" }","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":420,"y":3780,"wires":[[]]},{"id":"1b266e9b338a4dfe","type":"debug","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"BB Debug","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1040,"y":3040,"wires":[]},{"id":"85644b2ab18e7141","type":"http request","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"BlueBubbles","method":"POST","ret":"txt","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"other","keyValue":"bb-aneisch","valueType":"other","valueValue":"true"}],"x":870,"y":3040,"wires":[["1b266e9b338a4dfe"]]},{"id":"041a81d375ec985d","type":"function","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"Build BB Message","func":"msg.url = msg.payload + \"/api/v1/message/text?password=\" + env.get(\"bb_pass\")\nmsg.payload = {\n \"chatGuid\": \"iMessage;-;+\" + env.get(\"bb_number\"),\n \"message\": \" https://ttp.cbp.dhs.gov/schedulerui/schedule-interview/location?lang=en&vo=true&returnUrl=ttp-external&service=UP\",\n \"method\": \"private-api\"\n}\n\nreturn msg;\n\n","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":670,"y":3040,"wires":[["85644b2ab18e7141"]]},{"id":"bfbece91f0b61e8b","type":"api-current-state","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"Get BlueBubbles URL","server":"e1dc0b88.463bb8","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_text.bluebubbles_url","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":250,"y":3040,"wires":[["f3b23466b80725e0"]]},{"id":"f3b23466b80725e0","type":"json","z":"9584418c.dafc2","g":"cb7e3560a0078392","name":"Object to JSON","property":"message","action":"str","pretty":false,"x":460,"y":3040,"wires":[["041a81d375ec985d"]]},{"id":"b4b8f84a.7e57a8","type":"jimp-image","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Annotate","data":"outlinedImage","dataType":"msg","ret":"buf","parameter1":"FONT_SANS_16_WHITE","parameter1Type":"jimpFont","parameter2":"10","parameter2Type":"num","parameter3":"0","parameter3Type":"num","parameter4":"timestamp","parameter4Type":"msg","parameter5":"HORIZONTAL_ALIGN_LEFT","parameter5Type":"AlignX","parameter6":"VERTICAL_ALIGN_TOP","parameter6Type":"AlignY","parameter7":"","parameter7Type":"auto","parameter8":"","parameter8Type":"auto","sendProperty":"outlinedImage","parameterCount":8,"jimpFunction":"print2","selectedJimpFunction":{"name":"print aligned","fn":"print","description":"Print text to the image","parameters":[{"name":"font|str","type":"jimpFont","required":true,"hint":"font to print. NOTE: This can be one of the presets or the path to a fnt file"},{"name":"x","type":"num","required":true,"hint":"x coordinate to print text"},{"name":"y","type":"num","required":true,"hint":"y coordinate to print text"},{"name":"text","group":"options","type":"str","required":true,"hint":"text to print"},{"name":"alignmentX","group":"options","type":"AlignX","required":false,"hint":"X Alignment"},{"name":"alignmentY","group":"options","type":"AlignY","required":false,"hint":"Y Alignment"},{"name":"maxWidth","type":"auto|num","required":false,"hint":"wrap text at maxWidth"},{"name":"maxHeight","type":"auto|num","required":false,"hint":"max height"}]},"x":700,"y":2260,"wires":[["9b7c5535c74a94a3","2dfdead1d2e3b78b"]],"icon":"font-awesome/fa-image"},{"id":"63fd5090444c9cad","type":"api-render-template","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Time","server":"e1dc0b88.463bb8","version":0,"template":"{{ now().strftime(\"%m-%d-%YT%H:%M:%S\") }}","resultsLocation":"timestamp","resultsLocationType":"msg","templateLocation":"","templateLocationType":"none","x":570,"y":2260,"wires":[["b4b8f84a.7e57a8"]]},{"id":"2dfdead1d2e3b78b","type":"debug","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Post Annotate","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":560,"y":2360,"wires":[]},{"id":"c1fe21bcb3184137","type":"debug","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Post Output msg","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":810,"y":2360,"wires":[]},{"id":"28fa66cd.af058a","type":"trigger","z":"9584418c.dafc2","g":"cf3a0410bcf837ae","name":"Wait 1m","op1":"","op2":"1","op1type":"nul","op2type":"str","duration":"1","extend":false,"overrideDelay":false,"units":"min","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":620,"y":120,"wires":[["2022689a.938918"]]},{"id":"aee87977a0670889","type":"api-call-service","z":"9584418c.dafc2","g":"cf3a0410bcf837ae","name":"Notify Via Wrapper: Opened 5 Minutes","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"script","service":"notify_wrapper","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": \"The \" & $lowercase(msg.data.new_state.attributes.friendly_name) & \" has been opened for 5 minutes\"\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":890,"y":160,"wires":[[]]},{"id":"5caa1a9942bc27ee","type":"function","z":"9584418c.dafc2","g":"445e81780ba935ac","name":"Image to Payload","func":"msg = {\n payload: msg.payload,\n event_id: msg.event_id,\n loops: msg.loops,\n looking_for: msg.looking_for\n};\n\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":950,"y":3960,"wires":[["4fc565f7b86648dc","75bc8ac5d1afe28f"]]},{"id":"9b25e9a8817a7d8e","type":"http request","z":"9584418c.dafc2","g":"445e81780ba935ac","name":"Get Current Image","method":"GET","ret":"bin","paytoqs":"ignore","url":"http://frigate:1984/api/frame.jpeg?src=driveway","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":710,"y":3960,"wires":[["5caa1a9942bc27ee"]]},{"id":"7c060a1e3c0ff12e","type":"inject","z":"9584418c.dafc2","g":"445e81780ba935ac","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":160,"y":3940,"wires":[["1fce953ec4b1ee3d"]]},{"id":"4fc565f7b86648dc","type":"deepstack-object-detection","z":"9584418c.dafc2","g":"445e81780ba935ac","name":"","server":"169e2bac20a4c980","confidence":"70","drawPredictions":false,"printLabel":false,"outlineColor":"pink","custom":"","filters":[],"outputs":1,"x":1190,"y":3960,"wires":[["6f27f3028b1805e2"]]},{"id":"220bca8570d66770","type":"debug","z":"9584418c.dafc2","g":"445e81780ba935ac","name":"Log Plate","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":350,"y":4100,"wires":[]},{"id":"184d6d5272648136","type":"server-state-changed","z":"9584418c.dafc2","d":true,"g":"445e81780ba935ac","name":"Vehicle Detected","server":"e1dc0b88.463bb8","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"sensor.driveway_far_car_count","entityIdType":"exact","outputInitially":false,"stateType":"str","ifState":"0","ifStateType":"num","ifStateOperator":"gt","outputOnlyOnStateChange":false,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":160,"y":3980,"wires":[["1fce953ec4b1ee3d"],[]]},{"id":"500ee424e3f6b6a1","type":"while-loop","z":"9584418c.dafc2","g":"445e81780ba935ac","name":"No Match","condi":"msg.payload != msg.looking_for","limit":true,"limitTime":"10","time":"loops","timeType":"msg","x":340,"y":4040,"wires":[["5218eca8a79a79a5"],["9b25e9a8817a7d8e"]]},{"id":"6f27f3028b1805e2","type":"change","z":"9584418c.dafc2","g":"445e81780ba935ac","name":"Plate to Payload","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[0].plate","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":180,"y":4040,"wires":[["500ee424e3f6b6a1","220bca8570d66770"]]},{"id":"004c0ae121925ea2","type":"debug","z":"9584418c.dafc2","g":"445e81780ba935ac","name":"Found","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":690,"y":4100,"wires":[]},{"id":"5218eca8a79a79a5","type":"switch","z":"9584418c.dafc2","g":"445e81780ba935ac","name":"If Match","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"plate_andrew","vt":"env"}],"checkall":"true","repair":false,"outputs":1,"x":540,"y":4040,"wires":[["004c0ae121925ea2","b70d2ca780b98259"]]},{"id":"1fce953ec4b1ee3d","type":"change","z":"9584418c.dafc2","g":"445e81780ba935ac","name":"","rules":[{"t":"set","p":"looking_for","pt":"msg","to":"plate_andrew","tot":"env"}],"action":"","property":"","from":"","to":"","reg":false,"x":410,"y":3960,"wires":[["9b25e9a8817a7d8e"]]},{"id":"8c5272ae89e85e74","type":"api-current-state","z":"9584418c.dafc2","g":"445e81780ba935ac","name":"Garage Closed","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"closed","halt_if_type":"str","halt_if_compare":"is","entity_id":"cover.garage_door","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":900,"y":4040,"wires":[["18d9178fd318e333"],[]]},{"id":"8067ec66aa846765","type":"api-call-service","z":"9584418c.dafc2","g":"445e81780ba935ac","name":"Open Garage","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"cover","service":"open_cover","areaId":[],"deviceId":[],"entityId":["cover.garage_door"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1240,"y":4040,"wires":[["6648e0bdaa2d8170"]]},{"id":"6648e0bdaa2d8170","type":"api-call-service","z":"9584418c.dafc2","g":"445e81780ba935ac","name":"Notify Via Signal","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"notify","service":"signal_self","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": \"Garage opened by ALPR\" \t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1240,"y":4100,"wires":[[]]},{"id":"18d9178fd318e333","type":"function","z":"9584418c.dafc2","g":"445e81780ba935ac","name":"Rate Limiter","func":"var interval = (1000*10); // minimum interval between messages (ms)\ncontext.lastTime = context.lastTime || 0;\n\nvar now = Date.now();\n\nif (now-context.lastTime > interval) {\n context.lastTime = now;\n return msg;\n} else {\n return null;\n}","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":1070,"y":4040,"wires":[["8067ec66aa846765"]]},{"id":"b70d2ca780b98259","type":"api-current-state","z":"9584418c.dafc2","g":"445e81780ba935ac","name":"Andrew in Car","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"binary_sensor.andrew_phone_car_connected","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":720,"y":4040,"wires":[["8c5272ae89e85e74"],[]]},{"id":"75bc8ac5d1afe28f","type":"image","z":"9584418c.dafc2","g":"445e81780ba935ac","name":"","width":"800","data":"payload","dataType":"msg","thumbnail":false,"active":true,"pass":true,"outputs":1,"x":1040,"y":4100,"wires":[[]]},{"id":"4e761223bbb97b8d","type":"function","z":"9584418c.dafc2","g":"516939e66b0b3d5d","name":"Image to Payload","func":"msg = {\n payload: msg.payload,\n loops: msg.loops,\n looking_for: msg.looking_for\n};\n\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":810,"y":4240,"wires":[["6cecf24fbf959b73","cde6c9446e054107"]]},{"id":"4882c608e1fa69c7","type":"server-state-changed","z":"9584418c.dafc2","d":true,"g":"516939e66b0b3d5d","name":"Doorbell Button","server":"e1dc0b88.463bb8","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"binary_sensor.front_door_button_pressed","entityIdType":"exact","outputInitially":false,"stateType":"str","ifState":"on","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":false,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[],"x":160,"y":4280,"wires":[["dd24955fcf11d0b8"],[]]},{"id":"72737cfc3371b80f","type":"switch","z":"9584418c.dafc2","g":"516939e66b0b3d5d","name":"If Match","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"looking_for","vt":"msg"}],"checkall":"true","repair":false,"outputs":1,"x":740,"y":4380,"wires":[["519990f56ae7a4e9","a4574f947fc3c876","fc7cc6d0b1911358"]]},{"id":"6cecf24fbf959b73","type":"image","z":"9584418c.dafc2","g":"516939e66b0b3d5d","name":"","width":"800","data":"payload","dataType":"msg","thumbnail":false,"active":true,"pass":true,"outputs":1,"x":240,"y":4440,"wires":[[]]},{"id":"cde6c9446e054107","type":"qrdecode","z":"9584418c.dafc2","g":"516939e66b0b3d5d","name":"","x":1020,"y":4240,"wires":[["a8e5d53fc40fcf3c"]]},{"id":"54c1081f98fd1945","type":"http request","z":"9584418c.dafc2","g":"516939e66b0b3d5d","name":"Get Current Image","method":"GET","ret":"bin","paytoqs":"ignore","url":"http://frigate:1984/api/frame.jpeg?src=front_door","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":590,"y":4240,"wires":[["4e761223bbb97b8d"]]},{"id":"519990f56ae7a4e9","type":"api-call-service","z":"9584418c.dafc2","g":"516939e66b0b3d5d","name":"Notify Via Signal","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"notify","service":"signal_self","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": \"Front door QR match\" \t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":920,"y":4320,"wires":[[]]},{"id":"8db5019cab97ba65","type":"api-call-service","z":"9584418c.dafc2","g":"516939e66b0b3d5d","name":"Speak \"QR Accepted\"","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"media_player","service":"play_media","areaId":[],"deviceId":[],"entityId":["media_player.doorbell"],"data":"{\"media_content_id\":\"media-source://tts/microsoft?message=QR+code+validated,+unlocking+door\",\"media_content_type\":\"provider\",\"announce\":true}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1060,"y":4380,"wires":[[]]},{"id":"dd24955fcf11d0b8","type":"api-current-state","z":"9584418c.dafc2","g":"516939e66b0b3d5d","name":"Get Code","server":"e1dc0b88.463bb8","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_text.qr_code_content","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"looking_for","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":380,"y":4240,"wires":[["54c1081f98fd1945"]]},{"id":"6084ebe4fee0af4d","type":"inject","z":"9584418c.dafc2","g":"516939e66b0b3d5d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":160,"y":4220,"wires":[["dd24955fcf11d0b8"]]},{"id":"e1a4ef361b9fc7ff","type":"inject","z":"9584418c.dafc2","g":"7a1cb951d36ebc37","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":160,"y":4560,"wires":[["38010b7e5f85b9f6"]]},{"id":"b6dbca53c840164c","type":"qrcode-generator","z":"9584418c.dafc2","g":"7a1cb951d36ebc37","name":"Generate QR","qrtype":"text2qr","text2qrText":"","ssid":"","hiddenssid":false,"wifitype":"","phonenum":"","smsphonenum":"","smstext":"","mailto":"","mailsubject":"","mailbody":"","latitude":"","longitude":"","colorlight":"#ffffff","colordark":"#000000","printstatus":false,"x":710,"y":4560,"wires":[["e3b312790143d451"]]},{"id":"38010b7e5f85b9f6","type":"random-string","z":"9584418c.dafc2","g":"7a1cb951d36ebc37","size":"15","characters":"","property":"qrcodeinput","x":340,"y":4560,"wires":[["4c8457c87150cbf8"]]},{"id":"4c8457c87150cbf8","type":"api-call-service","z":"9584418c.dafc2","g":"7a1cb951d36ebc37","name":"Set QR Value","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.qr_code_content"],"data":"{\"value\": msg.qrcodeinput}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":530,"y":4560,"wires":[["b6dbca53c840164c"]]},{"id":"e073799764f16bc0","type":"api-call-service","z":"9584418c.dafc2","g":"7a1cb951d36ebc37","name":"Send Via Signal","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"notify","service":"signal_self","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": \"QR Code\",\t \"data\": {\t \"attachments\": [\t '/config/media/images/qr.png' \t ]\t }\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":960,"y":4640,"wires":[[]]},{"id":"aa0e87207265845d","type":"jimp-image","z":"9584418c.dafc2","g":"7a1cb951d36ebc37","name":"Annotate","data":"payload","dataType":"msg","ret":"buf","parameter1":"FONT_SANS_10_BLACK","parameter1Type":"jimpFont","parameter2":"5","parameter2Type":"num","parameter3":"335","parameter3Type":"num","parameter4":"timestamp","parameter4Type":"msg","parameter5":"","parameter5Type":"msg","parameter6":"","parameter6Type":"msg","parameter7":"","parameter7Type":"msg","parameter8":"","parameter8Type":"msg","sendProperty":"payload","sendPropertyType":"msg","parameterCount":8,"jimpFunction":"print2","selectedJimpFunction":{"name":"print aligned","fn":"print","description":"Print text to the image","parameters":[{"name":"font|str","type":"jimpFont","required":true,"hint":"font to print. NOTE: This can be one of the presets or the path to a fnt file"},{"name":"x","type":"num","required":true,"hint":"x coordinate to print text"},{"name":"y","type":"num","required":true,"hint":"y coordinate to print text"},{"name":"text","group":"options","type":"str","required":true,"hint":"text to print"},{"name":"alignmentX","group":"options","type":"AlignX","required":false,"hint":"X Alignment"},{"name":"alignmentY","group":"options","type":"AlignY","required":false,"hint":"Y Alignment"},{"name":"maxWidth","type":"auto|num","required":false,"hint":"wrap text at maxWidth"},{"name":"maxHeight","type":"auto|num","required":false,"hint":"max height"}]},"x":620,"y":4640,"wires":[["06871bb32f66c1ab"]]},{"id":"06871bb32f66c1ab","type":"file","z":"9584418c.dafc2","g":"7a1cb951d36ebc37","name":"Write File","filename":"/data/qr.png","filenameType":"str","appendNewline":true,"createDir":false,"overwriteFile":"true","encoding":"none","x":780,"y":4640,"wires":[["e073799764f16bc0"]]},{"id":"a8e5d53fc40fcf3c","type":"while-loop","z":"9584418c.dafc2","g":"516939e66b0b3d5d","name":"No Match","condi":"msg.payload.status != 0","limit":true,"limitTime":"60","time":"loops","timeType":"msg","x":420,"y":4380,"wires":[["e422bd64e999decb","02dca310d30d41ec"],["28e26da9f431b399","02dca310d30d41ec"]]},{"id":"d0cd45ceef8e8641","type":"api-render-template","z":"9584418c.dafc2","g":"7a1cb951d36ebc37","name":"Time","server":"e1dc0b88.463bb8","version":0,"template":"{{ now().strftime(\"%m-%d-%YT%H:%M:%S\") }}","resultsLocation":"timestamp","resultsLocationType":"msg","templateLocation":"","templateLocationType":"none","x":1010,"y":4560,"wires":[["523a5be045f29150"]]},{"id":"28e26da9f431b399","type":"delay","z":"9584418c.dafc2","g":"516939e66b0b3d5d","name":"","pauseType":"delay","timeout":"500","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":490,"y":4300,"wires":[["54c1081f98fd1945"]]},{"id":"e3b312790143d451","type":"jimp-image","z":"9584418c.dafc2","g":"7a1cb951d36ebc37","name":"Resize","data":"payload","dataType":"msg","ret":"buf","parameter1":"350","parameter1Type":"num","parameter2":"350","parameter2Type":"num","parameter3":"0","parameter3Type":"none","parameter4":"Press doorbell then show","parameter4Type":"str","parameter5":"","parameter5Type":"msg","parameter6":"","parameter6Type":"msg","parameter7":"","parameter7Type":"msg","parameter8":"","parameter8Type":"msg","sendProperty":"payload","sendPropertyType":"msg","parameterCount":3,"jimpFunction":"resize","selectedJimpFunction":{"name":"resize","fn":"resize","description":"resize the image. One of the w or h parameters can be set to automatic (\"Jimp.AUTO\" or -1).","parameters":[{"name":"w","type":"num|auto","required":true,"hint":"the width to resize the image to (or \"Jimp.AUTO\" or -1)"},{"name":"h","type":"num|auto","required":true,"hint":"the height to resize the image to (or \"Jimp.AUTO\" or -1)"},{"name":"mode","type":"resizeMode","required":false,"hint":"a scaling method (e.g. Jimp.RESIZE_BEZIER)"}]},"x":870,"y":4560,"wires":[["d0cd45ceef8e8641"]]},{"id":"523a5be045f29150","type":"jimp-image","z":"9584418c.dafc2","g":"7a1cb951d36ebc37","name":"Annotate","data":"payload","dataType":"msg","ret":"buf","parameter1":"FONT_SANS_16_BLACK","parameter1Type":"jimpFont","parameter2":"40","parameter2Type":"num","parameter3":"0","parameter3Type":"num","parameter4":"Press doorbell then hold ~8\" in front of\\n camera for up to 30 seconds","parameter4Type":"str","parameter5":"","parameter5Type":"msg","parameter6":"","parameter6Type":"msg","parameter7":"","parameter7Type":"msg","parameter8":"","parameter8Type":"msg","sendProperty":"payload","sendPropertyType":"msg","parameterCount":8,"jimpFunction":"print2","selectedJimpFunction":{"name":"print aligned","fn":"print","description":"Print text to the image","parameters":[{"name":"font|str","type":"jimpFont","required":true,"hint":"font to print. NOTE: This can be one of the presets or the path to a fnt file"},{"name":"x","type":"num","required":true,"hint":"x coordinate to print text"},{"name":"y","type":"num","required":true,"hint":"y coordinate to print text"},{"name":"text","group":"options","type":"str","required":true,"hint":"text to print"},{"name":"alignmentX","group":"options","type":"AlignX","required":false,"hint":"X Alignment"},{"name":"alignmentY","group":"options","type":"AlignY","required":false,"hint":"Y Alignment"},{"name":"maxWidth","type":"auto|num","required":false,"hint":"wrap text at maxWidth"},{"name":"maxHeight","type":"auto|num","required":false,"hint":"max height"}]},"x":200,"y":4640,"wires":[["a6187e2d761f18bd"]]},{"id":"a4574f947fc3c876","type":"api-call-service","z":"9584418c.dafc2","g":"516939e66b0b3d5d","name":"Unlock Door","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"lock","service":"unlock","areaId":[],"deviceId":[],"entityId":["lock.front_door"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":910,"y":4440,"wires":[["58c162476af5c2df"]]},{"id":"10bf2ad7f818bba5","type":"link in","z":"9584418c.dafc2","g":"7a1cb951d36ebc37","name":"link in 1","links":["58c162476af5c2df"],"x":205,"y":4600,"wires":[["38010b7e5f85b9f6"]]},{"id":"58c162476af5c2df","type":"link out","z":"9584418c.dafc2","g":"516939e66b0b3d5d","name":"link out 1","mode":"link","links":["10bf2ad7f818bba5"],"x":1035,"y":4440,"wires":[]},{"id":"a6187e2d761f18bd","type":"jimp-image","z":"9584418c.dafc2","g":"7a1cb951d36ebc37","name":"Annotate","data":"payload","dataType":"msg","ret":"buf","parameter1":"FONT_SANS_14_BLACK","parameter1Type":"jimpFont","parameter2":"20","parameter2Type":"num","parameter3":"310","parameter3Type":"num","parameter4":"Say \"Alexa, lock the front door\" before leaving","parameter4Type":"str","parameter5":"","parameter5Type":"msg","parameter6":"","parameter6Type":"msg","parameter7":"","parameter7Type":"msg","parameter8":"","parameter8Type":"msg","sendProperty":"payload","sendPropertyType":"msg","parameterCount":8,"jimpFunction":"print2","selectedJimpFunction":{"name":"print aligned","fn":"print","description":"Print text to the image","parameters":[{"name":"font|str","type":"jimpFont","required":true,"hint":"font to print. NOTE: This can be one of the presets or the path to a fnt file"},{"name":"x","type":"num","required":true,"hint":"x coordinate to print text"},{"name":"y","type":"num","required":true,"hint":"y coordinate to print text"},{"name":"text","group":"options","type":"str","required":true,"hint":"text to print"},{"name":"alignmentX","group":"options","type":"AlignX","required":false,"hint":"X Alignment"},{"name":"alignmentY","group":"options","type":"AlignY","required":false,"hint":"Y Alignment"},{"name":"maxWidth","type":"auto|num","required":false,"hint":"wrap text at maxWidth"},{"name":"maxHeight","type":"auto|num","required":false,"hint":"max height"}]},"x":340,"y":4640,"wires":[["6d38c8b88ab6e9b1"]]},{"id":"6d38c8b88ab6e9b1","type":"jimp-image","z":"9584418c.dafc2","g":"7a1cb951d36ebc37","name":"Annotate","data":"payload","dataType":"msg","ret":"buf","parameter1":"FONT_SANS_14_BLACK","parameter1Type":"jimpFont","parameter2":"85","parameter2Type":"num","parameter3":"322","parameter3Type":"num","parameter4":"and quickly closing the door","parameter4Type":"str","parameter5":"","parameter5Type":"msg","parameter6":"","parameter6Type":"msg","parameter7":"","parameter7Type":"msg","parameter8":"","parameter8Type":"msg","sendProperty":"payload","sendPropertyType":"msg","parameterCount":8,"jimpFunction":"print2","selectedJimpFunction":{"name":"print aligned","fn":"print","description":"Print text to the image","parameters":[{"name":"font|str","type":"jimpFont","required":true,"hint":"font to print. NOTE: This can be one of the presets or the path to a fnt file"},{"name":"x","type":"num","required":true,"hint":"x coordinate to print text"},{"name":"y","type":"num","required":true,"hint":"y coordinate to print text"},{"name":"text","group":"options","type":"str","required":true,"hint":"text to print"},{"name":"alignmentX","group":"options","type":"AlignX","required":false,"hint":"X Alignment"},{"name":"alignmentY","group":"options","type":"AlignY","required":false,"hint":"Y Alignment"},{"name":"maxWidth","type":"auto|num","required":false,"hint":"wrap text at maxWidth"},{"name":"maxHeight","type":"auto|num","required":false,"hint":"max height"}]},"x":480,"y":4640,"wires":[["aa0e87207265845d"]]},{"id":"02dca310d30d41ec","type":"debug","z":"9584418c.dafc2","g":"516939e66b0b3d5d","name":"Found","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":710,"y":4280,"wires":[]},{"id":"e422bd64e999decb","type":"switch","z":"9584418c.dafc2","g":"516939e66b0b3d5d","name":"If Value","property":"payload.value","propertyType":"msg","rules":[{"t":"istype","v":"string","vt":"string"}],"checkall":"true","repair":false,"outputs":1,"x":600,"y":4380,"wires":[["72737cfc3371b80f"]]},{"id":"fc7cc6d0b1911358","type":"delay","z":"9584418c.dafc2","g":"516939e66b0b3d5d","name":"1s","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":890,"y":4380,"wires":[["8db5019cab97ba65"]]},{"id":"e45fa3455968d380","type":"server-state-changed","z":"9584418c.dafc2","name":"Device Battery Levels","server":"e1dc0b88.463bb8","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"_battery_level","entityIdType":"substring","outputInitially":false,"stateType":"str","ifState":"10","ifStateType":"num","ifStateOperator":"lt","outputOnlyOnStateChange":true,"for":"5","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":180,"y":3840,"wires":[["84c749850e5b4db9"],[]]},{"id":"84c749850e5b4db9","type":"api-call-service","z":"9584418c.dafc2","name":"Notify Via Signal","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"notify","service":"signal_homeassistant","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": topic & \" has low battery (\" & payload & \"%)\" }","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":420,"y":3840,"wires":[[]]},{"id":"9d6f4f2f2b1e1400","type":"api-call-service","z":"9584418c.dafc2","name":"Notify Via Signal","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"notify","service":"signal_homeassistant","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": topic & \" has low battery (\" & payload & \")\" }","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":900,"y":3840,"wires":[[]]},{"id":"bc96c3f77cb59c1a","type":"server-state-changed","z":"9584418c.dafc2","name":"Smoke Alarm Battery Levels","server":"e1dc0b88.463bb8","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"alarm_battery_level","entityIdType":"substring","outputInitially":false,"stateType":"str","ifState":"80","ifStateType":"num","ifStateOperator":"lt","outputOnlyOnStateChange":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":660,"y":3840,"wires":[["9d6f4f2f2b1e1400"],[]]},{"id":"19ede27409237241","type":"inject","z":"9584418c.dafc2","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":1140,"y":1900,"wires":[["e792dec2261edf2e"]]},{"id":"28609db070a98f82","type":"http request","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Trigger USPS Automation","method":"POST","ret":"txt","paytoqs":"ignore","url":"http://10.0.1.22:8123/api/webhook/usps_mail_detected","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"other","keyValue":"Content-type","valueType":"other","valueValue":"application/json"}],"x":1290,"y":2380,"wires":[[]]},{"id":"04300ba2a76891a6","type":"switch","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Match USPS","property":"detection_result","propertyType":"msg","rules":[{"t":"eq","v":"usps","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":1250,"y":2300,"wires":[["28609db070a98f82"]]},{"id":"0a096bcbb68139e5","type":"switch","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"Match USPS","property":"detection_result","propertyType":"msg","rules":[{"t":"eq","v":"Usps","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":1230,"y":2340,"wires":[["28609db070a98f82"]]},{"id":"3e6040dad6b140f5","type":"api-render-template","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"USPS > 12 hours","server":"e1dc0b88.463bb8","version":0,"template":"{{ as_timestamp(now()) - as_timestamp(states('input_datetime.usps_last')) > 43200 }}","resultsLocation":"eval","resultsLocationType":"msg","templateLocation":"","templateLocationType":"none","x":250,"y":2140,"wires":[["cd2f2ad667788097"]]},{"id":"cd2f2ad667788097","type":"switch","z":"9584418c.dafc2","g":"9cfe6331fbc680d5","name":"","property":"eval","propertyType":"msg","rules":[{"t":"eq","v":"True","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":410,"y":2140,"wires":[["bcaf3569e7816922"]]},{"id":"e792dec2261edf2e","type":"http request","z":"9584418c.dafc2","name":"Reboot Doorbell","method":"GET","ret":"bin","paytoqs":"ignore","url":"http://10.0.0.34/cgi-bin/magicBox.cgi?action=reboot","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"digest","senderr":false,"headers":[],"x":1360,"y":1900,"wires":[[]]},{"id":"bb1a0274b2aa88ed","type":"server-state-changed","z":"9584418c.dafc2","name":"Alive Zwave Node","server":"e1dc0b88.463bb8","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"_node_status","entityIdType":"substring","outputInitially":false,"stateType":"str","ifState":"alive","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":630,"y":3780,"wires":[["fafc94cc016e6430"],[]]},{"id":"fafc94cc016e6430","type":"api-call-service","z":"9584418c.dafc2","name":"Notify Via Signal","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"notify","service":"signal_homeassistant","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": topic & \" has revived\" }","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":880,"y":3780,"wires":[[]]},{"id":"4c459036b05c8866","type":"comment","z":"9584418c.dafc2","g":"bd2acc7efb5be5fd","name":"Halloween","info":"","x":700,"y":1320,"wires":[]},{"id":"3032aa47a7e5ca0f","type":"comment","z":"9584418c.dafc2","g":"11e25fc28c23144c","name":"Halloween","info":"","x":220,"y":1160,"wires":[]},{"id":"57ad567ffcc2f626","type":"comment","z":"9584418c.dafc2","g":"bd2acc7efb5be5fd","name":"Halloween","info":"","x":820,"y":1400,"wires":[]},{"id":"d269f175.c9dc6","type":"server-events","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","name":"Custom Water Event Fired","server":"e1dc0b88.463bb8","version":3,"exposeAsEntityConfig":"","eventType":"irrigation_custom_water","eventData":"","waitForRunning":true,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"$outputData(\"eventData\").event_type","valueType":"jsonata"},{"property":"event_type","propertyType":"msg","value":"$outputData(\"eventData\").event_type","valueType":"jsonata"}],"x":190,"y":340,"wires":[["883f2c00.1d94e8"]]},{"id":"3367e45f.cc981c","type":"function","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","name":"++","func":"if ( (msg.i += 1) < msg.zones.length ) return msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":670,"y":400,"wires":[["116d5bb3.ee92a4"]]},{"id":"116d5bb3.ee92a4","type":"function","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","name":"For Each","func":"if( msg.i == undefined ) msg.i = 0;\n\nmsg.payload = msg.zones[ msg.i ];\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":840,"y":340,"wires":[["565ee5c1.561bfc","80df47d5.602888","e2c37b65c5582c2b"]]},{"id":"80df47d5.602888","type":"api-call-service","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","name":"Turn On Zone","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":[],"data":"{ \"entity_id\": payload.zone}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1060,"y":340,"wires":[[]]},{"id":"fb46876c.845298","type":"api-call-service","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","name":"Turn Off Zone","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":[],"data":"{ \"entity_id\": payload.zone}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1320,"y":400,"wires":[["98eeafa7.bd2b9","860a4c61d7557dc9"]]},{"id":"98eeafa7.bd2b9","type":"delay","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","name":"Delay 5","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"outputs":1,"x":980,"y":480,"wires":[["3367e45f.cc981c"]]},{"id":"565ee5c1.561bfc","type":"change","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","name":"Set Delay Variable","rules":[{"t":"set","p":"delay","pt":"msg","to":"payload.time* 60000","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":890,"y":400,"wires":[["22a20603.86a06a"]]},{"id":"22a20603.86a06a","type":"stoptimer-varidelay","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","duration":"5","durationType":"num","units":"Millisecond","payloadtype":"num","payloadval":"0","name":"Delay","reporting":"every_second","persist":false,"x":1090,"y":400,"wires":[["fb46876c.845298"],[],["a8d96e.1f00969"]]},{"id":"a8d96e.1f00969","type":"mqtt out","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","name":"Publish Time Remaining","topic":"sensor/irrigation_time_remaining","qos":"","retain":"","broker":"546e31ed.0db1c","x":1350,"y":340,"wires":[]},{"id":"3b656b89.1ac154","type":"inject","z":"f602e6ba.609d28","g":"79694877249c9902","name":"3:00 Attempt","props":[{"p":"payload"}],"repeat":"","crontab":"00 03 * * *","once":false,"onceDelay":0.1,"topic":"","payload":"[{\"zone\":\"switch.irrigation_front_beds\",\"time\":10,\"name\":\"Front beds\"},{\"zone\":\"switch.irrigation_front_lawn\",\"time\":20,\"name\":\"Front lawn\"},{\"zone\":\"switch.irrigation_left_and_main_rear_lawn\",\"time\":20,\"name\":\"Left and main rear lawn\"},{\"zone\":\"switch.irrigation_front_and_right_rear_lawn\",\"time\":20,\"name\":\"Front and right rear lawn\"},{\"zone\":\"switch.irrigation_side_lawn\",\"time\":20,\"name\":\"Side lawn\"}]","payloadType":"json","x":180,"y":1280,"wires":[["493b435f.c9851c"]]},{"id":"493b435f.c9851c","type":"api-current-state","z":"f602e6ba.609d28","g":"79694877249c9902","name":"Schedule Enabled","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.lawn_irrigation_scheduling","state_type":"str","blockInputOverrides":false,"outputProperties":[],"for":0,"forType":"num","forUnits":"minutes","x":410,"y":1280,"wires":[["8c060f00.cf577"],["7b12e66f.57d068"]]},{"id":"7b12e66f.57d068","type":"api-call-service","z":"f602e6ba.609d28","g":"79694877249c9902","name":"Set Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.lawn_irrigation_reason"],"data":"{\"value\":\"Automation Off\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":630,"y":1300,"wires":[[]]},{"id":"8c060f00.cf577","type":"link out","z":"f602e6ba.609d28","g":"79694877249c9902","name":"","links":["576b66fa1bd202a3"],"x":595,"y":1260,"wires":[]},{"id":"4422f61c.847d88","type":"link in","z":"f602e6ba.609d28","g":"79694877249c9902","name":"","links":["3ff9ce03ef7b554b"],"x":135,"y":1480,"wires":[["219b37105a8304f1"]]},{"id":"dcdeabc7.780578","type":"link out","z":"f602e6ba.609d28","g":"79694877249c9902","name":"","links":["c90fd5e6.c5c678"],"x":595,"y":1460,"wires":[]},{"id":"722d03d6.2ff77c","type":"link in","z":"f602e6ba.609d28","g":"79694877249c9902","name":"","links":["8d4bfe8e.ee805"],"x":135,"y":1900,"wires":[["b3c4a3638c17629e"]]},{"id":"af4788fe.215ba8","type":"link out","z":"f602e6ba.609d28","g":"79694877249c9902","name":"","links":["9896327569c234da"],"x":595,"y":1900,"wires":[]},{"id":"c90fd5e6.c5c678","type":"link in","z":"f602e6ba.609d28","g":"79694877249c9902","name":"","links":["dcdeabc7.780578"],"x":135,"y":1600,"wires":[["e7430e17f0b24ed8"]]},{"id":"862ad27a.d347d","type":"link out","z":"f602e6ba.609d28","g":"79694877249c9902","name":"","links":["83edf648.3f9ed8"],"x":595,"y":1580,"wires":[]},{"id":"808e6a81.92e2e8","type":"api-call-service","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","name":"Turn On Master Valve","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.irrigation_master_valve"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":460,"y":400,"wires":[["e42ff3d9.593dc"]]},{"id":"883f2c00.1d94e8","type":"api-current-state","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","name":"24v Power","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"switch.irrigation_24v_power","state_type":"str","blockInputOverrides":false,"outputProperties":[],"for":0,"forType":"num","forUnits":"minutes","x":250,"y":400,"wires":[["808e6a81.92e2e8"],["808e6a81.92e2e8"]]},{"id":"e42ff3d9.593dc","type":"delay","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","name":"Delay 5","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"outputs":1,"x":480,"y":340,"wires":[["76160bc4.8cd644"]]},{"id":"76160bc4.8cd644","type":"change","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","name":"","rules":[{"t":"set","p":"zones","pt":"msg","to":"payload.event.zones","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":660,"y":340,"wires":[["116d5bb3.ee92a4"]]},{"id":"83edf648.3f9ed8","type":"link in","z":"f602e6ba.609d28","g":"79694877249c9902","name":"","links":["862ad27a.d347d"],"x":135,"y":1700,"wires":[["b6e7d5b8891bba6d"]]},{"id":"8d4bfe8e.ee805","type":"link out","z":"f602e6ba.609d28","g":"79694877249c9902","name":"","links":["722d03d6.2ff77c"],"x":595,"y":1720,"wires":[]},{"id":"583f46a3.fc4c38","type":"inject","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"5:00 Attempt","props":[{"p":"payload"}],"repeat":"","crontab":"00 05 * * *","once":false,"onceDelay":0.1,"topic":"","payload":"[{\"zone\":\"switch.irrigation_front_beds\",\"time\":10,\"name\":\"Front beds\"},{\"zone\":\"switch.irrigation_front_lawn\",\"time\":20,\"name\":\"Front lawn\"},{\"zone\":\"switch.irrigation_left_and_main_rear_lawn\",\"time\":20,\"name\":\"Left and main rear lawn\"},{\"zone\":\"switch.irrigation_front_and_right_rear_lawn\",\"time\":20,\"name\":\"Front and right rear lawn\"},{\"zone\":\"switch.irrigation_side_lawn\",\"time\":20,\"name\":\"Side lawn\"}]","payloadType":"json","x":180,"y":2620,"wires":[["d9147878.b61cf8"]]},{"id":"d9147878.b61cf8","type":"api-current-state","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"Schedule Enabled","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.front_bed_irrigation_scheduling","state_type":"str","blockInputOverrides":false,"outputProperties":[],"for":0,"forType":"num","forUnits":"minutes","x":410,"y":2620,"wires":[["c7e5552e.7f8a08"],["45c5dbbbd8ce50a1"]]},{"id":"c7e5552e.7f8a08","type":"link out","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"","links":["f6881b4bf93c27c5"],"x":595,"y":2600,"wires":[]},{"id":"6bcf06fb.9ca748","type":"link in","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"","links":["4f2902edc77f2d3b"],"x":135,"y":2820,"wires":[["ed6e3d4225582e20"]]},{"id":"f587589f.d739e8","type":"link out","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"","links":["9d851699.6a8458"],"x":595,"y":2800,"wires":[]},{"id":"d9d17e8f.590e6","type":"link in","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"","links":["4fae5b92.a9cd44"],"x":135,"y":3040,"wires":[["d8637d8d96b68fca"]]},{"id":"d9f893eb.834f3","type":"link out","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"","links":["5ce1803b.06628"],"x":595,"y":3040,"wires":[]},{"id":"9d851699.6a8458","type":"link in","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"","links":["f587589f.d739e8"],"x":135,"y":2940,"wires":[["593bee0e8c958df8"]]},{"id":"4fae5b92.a9cd44","type":"link out","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"","links":["d9d17e8f.590e6"],"x":595,"y":2920,"wires":[]},{"id":"a2ab7368.923fb","type":"template","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"Zone Settings Front Beds","field":"zones","fieldType":"msg","format":"json","syntax":"mustache","template":"{\n \"zone\": \"switch.irrigation_front_beds\",\n \"time\": 20,\n \"name\": \"Front beds\"\n}","output":"json","x":250,"y":3200,"wires":[["62b5545bc6d6e627"]]},{"id":"a31e3daf.17207","type":"api-call-service","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"Turn On Master Valve","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.irrigation_master_valve"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":560,"y":3200,"wires":[["21ced698.708b5a","0fe0d325194604dd"]]},{"id":"21ced698.708b5a","type":"delay","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"2s","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"outputs":1,"x":730,"y":3200,"wires":[["c661d489.9c9bc8"]]},{"id":"c661d489.9c9bc8","type":"api-call-service","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"Turn On Zone","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":[],"data":"{ \"entity_id\": msg.zones.zone}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":880,"y":3200,"wires":[["accc6697.196268"]]},{"id":"accc6697.196268","type":"change","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"Set Delay Variable","rules":[{"t":"set","p":"delay","pt":"msg","to":"msg.zones.time* 60000","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":1090,"y":3200,"wires":[["487ff788.8c5c98"]]},{"id":"487ff788.8c5c98","type":"stoptimer-varidelay","z":"f602e6ba.609d28","g":"55a2162532da4e14","duration":"5","durationType":"num","units":"Millisecond","payloadtype":"num","payloadval":"0","name":"Delay","reporting":"every_second","persist":false,"ignoretimerpass":false,"x":850,"y":3260,"wires":[["2238b09b.1b5b5","9129b06e.d8925"],[],["84258ddd.41da4"]]},{"id":"2238b09b.1b5b5","type":"api-call-service","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"Turn Off Zone","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":[],"data":"{ \"entity_id\": msg.zones.zone}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":900,"y":3340,"wires":[[]]},{"id":"84258ddd.41da4","type":"mqtt out","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"Publish Time Remaining","topic":"sensor/irrigation_time_remaining","qos":"","retain":"","broker":"546e31ed.0db1c","x":1130,"y":3320,"wires":[]},{"id":"9129b06e.d8925","type":"function","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"Create msg object","func":"var message = \"Sprinkler auto-run: \" + msg.zones.name + \" ran for \" + msg.zones.time + \" minutes\"\n\nreturn { alert: message };","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1050,"y":3260,"wires":[["d83b5ff7a2212931"]]},{"id":"5ce1803b.06628","type":"link in","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"","links":["d9f893eb.834f3"],"x":95,"y":3200,"wires":[["a2ab7368.923fb"]]},{"id":"815fddc0.6604c","type":"api-call-service","z":"f602e6ba.609d28","g":"79694877249c9902","name":"Turn On 24v","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.irrigation_24v_power"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":470,"y":1900,"wires":[["af4788fe.215ba8"]]},{"id":"418058c4.af3158","type":"api-call-service","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"Turn On 24v","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.irrigation_24v_power"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":470,"y":3040,"wires":[["d9f893eb.834f3"]]},{"id":"1ae21386.a831bc","type":"inject","z":"f602e6ba.609d28","g":"0f07749a4e1672ad","name":"06:00 24v Off","props":[],"repeat":"","crontab":"00 06 * * *","once":false,"onceDelay":0.1,"topic":"","x":180,"y":1140,"wires":[["117145a7.67e99a","882aff35f788008b"]]},{"id":"117145a7.67e99a","type":"api-call-service","z":"f602e6ba.609d28","g":"0f07749a4e1672ad","name":"Turn Off 24v","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.irrigation_24v_power"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":390,"y":1100,"wires":[[]]},{"id":"06d6255efdc31c47","type":"api-current-state","z":"f602e6ba.609d28","g":"79694877249c9902","name":"Force Run","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.irrigation_force_run","state_type":"str","blockInputOverrides":false,"outputProperties":[],"for":0,"forType":"num","forUnits":"minutes","x":250,"y":1380,"wires":[["2fc67b25514de5a5"],["3ff9ce03ef7b554b"]]},{"id":"5420d0eed32223fb","type":"link out","z":"f602e6ba.609d28","g":"79694877249c9902","name":"","links":["08e3098cf183e086"],"x":595,"y":1360,"wires":[]},{"id":"3ff9ce03ef7b554b","type":"link out","z":"f602e6ba.609d28","g":"79694877249c9902","name":"","links":["4422f61c.847d88"],"x":595,"y":1400,"wires":[]},{"id":"576b66fa1bd202a3","type":"link in","z":"f602e6ba.609d28","g":"79694877249c9902","name":"","links":["8c060f00.cf577"],"x":135,"y":1380,"wires":[["06d6255efdc31c47"]]},{"id":"7350c911a0b1a86d","type":"api-current-state","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"Force Run","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.irrigation_force_run","state_type":"str","blockInputOverrides":false,"outputProperties":[],"for":0,"forType":"num","forUnits":"minutes","x":250,"y":2720,"wires":[["abb8777dd08aa743"],["4f2902edc77f2d3b"]]},{"id":"fdcfa1521191fa40","type":"link out","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"","links":["b403eec7866aea22"],"x":595,"y":2700,"wires":[]},{"id":"4f2902edc77f2d3b","type":"link out","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"","links":["6bcf06fb.9ca748"],"x":595,"y":2740,"wires":[]},{"id":"f6881b4bf93c27c5","type":"link in","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"","links":["c7e5552e.7f8a08"],"x":135,"y":2720,"wires":[["7350c911a0b1a86d"]]},{"id":"882aff35f788008b","type":"api-call-service","z":"f602e6ba.609d28","g":"0f07749a4e1672ad","name":"Turn Off Force Run","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"homeassistant","service":"turn_off","areaId":[],"deviceId":[],"entityId":["input_boolean.irrigation_force_run"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":410,"y":1160,"wires":[[]]},{"id":"a3d75225807b70eb","type":"delay","z":"f602e6ba.609d28","g":"79694877249c9902","name":"30 Minute Delay","pauseType":"delay","timeout":"30","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":280,"y":1760,"wires":[["339ee0ada21856e0"]]},{"id":"e2c37b65c5582c2b","type":"api-call-service","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","name":"Turn Off Start/Stop tracking","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["automation.store_sprinkler_start_stop_times"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1060,"y":300,"wires":[[]]},{"id":"860a4c61d7557dc9","type":"api-call-service","z":"f602e6ba.609d28","g":"43a30fe5a5052c22","name":"Turn On Start/Stop tracking","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["automation.store_sprinkler_start_stop_times"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1360,"y":460,"wires":[[]]},{"id":"aa53225140781dd7","type":"api-render-template","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"Evaluate Template","server":"e1dc0b88.463bb8","version":0,"template":"","resultsLocation":"data.continue","resultsLocationType":"msg","templateLocation":"template","templateLocationType":"msg","x":250,"y":3320,"wires":[["8113d83074ff7701"]]},{"id":"8113d83074ff7701","type":"switch","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"Last Ran >= Template Hrs Ago","property":"data.continue","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"num"},{"t":"eq","v":"0","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":530,"y":3320,"wires":[["a31e3daf.17207"],["f78cdb84200eb171"]]},{"id":"d83b5ff7a2212931","type":"api-call-service","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"Notify via Wrapper","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"script","service":"notify_wrapper","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": alert \t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1270,"y":3260,"wires":[[]]},{"id":"dd9855ca4017c8c0","type":"api-call-service","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"Turn on Boolean","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"homeassistant","service":"turn_on","areaId":[],"deviceId":[],"entityId":["input_boolean.irrigation_rainfall_delay"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":700,"y":580,"wires":[[]]},{"id":"c3a696a117416327","type":"function","z":"f602e6ba.609d28","d":true,"g":"a9182c2cc04d2d9a","name":"Check Rainfall","func":"var rain_override = false\n\nfor (var i = 0; i < msg.payload.length; i++) {\n if (parseFloat(msg.payload[i].state) > 0.25) {\n rain_override = true\n }\n}\n\n// top = proceed\n// bottom = overridden\nif (rain_override === true) {\n return [ null, {rain_override} ];\n} \nelse {\n return [ {rain_override}, null ];\n}","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":500,"y":680,"wires":[["47f1a8018e58e032"],["dd9855ca4017c8c0"]]},{"id":"27f2580e35031830","type":"api-get-history","z":"f602e6ba.609d28","d":true,"g":"a9182c2cc04d2d9a","name":"Rainfall 120h","server":"e1dc0b88.463bb8","version":1,"startDate":"","endDate":"","entityId":"sensor.netatmo_home_rain_sum_rain_today_inches","entityIdType":"equals","useRelativeTime":true,"relativeTime":"120h","flatten":true,"outputType":"array","outputLocationType":"msg","outputLocation":"payload","x":310,"y":680,"wires":[["c3a696a117416327"]]},{"id":"9cb8187c669c6485","type":"comment","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"Rainfall","info":"","x":150,"y":600,"wires":[]},{"id":"47f1a8018e58e032","type":"api-call-service","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"Turn off Boolean","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"homeassistant","service":"turn_off","areaId":[],"deviceId":[],"entityId":["input_boolean.irrigation_rainfall_delay"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":700,"y":660,"wires":[[]]},{"id":"427f7fa58d86cc59","type":"inject","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"*/30","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"1800","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":150,"y":640,"wires":[["27f2580e35031830","93965a61d2c4f5de"]]},{"id":"1d9a4d0bb4645f32","type":"api-call-service","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"Turn on Boolean","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"homeassistant","service":"turn_on","areaId":[],"deviceId":[],"entityId":["input_boolean.irrigation_rain_forecast_delay"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":700,"y":840,"wires":[[]]},{"id":"d9ebbaa37f5911a9","type":"comment","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"Rain Forecast","info":"","x":170,"y":760,"wires":[]},{"id":"eeecfc1e8864e39f","type":"api-call-service","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"Turn off Boolean","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"homeassistant","service":"turn_off","areaId":[],"deviceId":[],"entityId":["input_boolean.irrigation_rain_forecast_delay"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":700,"y":760,"wires":[[]]},{"id":"89487a4efedec1db","type":"inject","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"*/30","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"1800","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":150,"y":800,"wires":[["2c45af5b3ee5cf0a","c3cb1c7d15767014"]]},{"id":"1e4b3bc7c25b294f","type":"function","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"Rain Chance","func":"// Check next 4 precipitation_probability values\n// HA Template: \n// {% for j in state_attr(\"weather.kcll_daynight\",\"forecast\")[:4] %}\n// {{ j.precipitation_probability }}\n// {% endfor %}\n\nvar forecast_override = false\n\n// if (parseFloat(msg.payload) > 40) {\n// forecast_override = true\n// }\n \nfor (var i = 0; i < 4; i++) {\n if (parseFloat(msg.data.attributes.forecast[i].precipitation_probability) >= 60) {\n forecast_override = true\n }\n}\n\n// top = proceed\n// bottom = overridden\nif (forecast_override === true) {\n return [ null, {forecast_override} ];\n} \nelse {\n return [ {forecast_override}, null ];\n}","outputs":2,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":490,"y":800,"wires":[["eeecfc1e8864e39f"],["1d9a4d0bb4645f32"]]},{"id":"2c45af5b3ee5cf0a","type":"api-current-state","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"Weather","server":"e1dc0b88.463bb8","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"weather.kcll_daynight","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":300,"y":800,"wires":[["1e4b3bc7c25b294f"]]},{"id":"d7e50e7a2810667d","type":"api-call-service","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"Turn on Boolean","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"homeassistant","service":"turn_on","areaId":[],"deviceId":[],"entityId":["input_boolean.irrigation_wind_delay"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":700,"y":1000,"wires":[[]]},{"id":"28936ec687ee4eb0","type":"comment","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"Wind","info":"","x":150,"y":920,"wires":[]},{"id":"974833b6a2eca853","type":"api-call-service","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"Turn off Boolean","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"homeassistant","service":"turn_off","areaId":[],"deviceId":[],"entityId":["input_boolean.irrigation_wind_delay"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":700,"y":920,"wires":[[]]},{"id":"478a5a84d38ba181","type":"inject","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"*/5","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"300","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":150,"y":960,"wires":[["c01fd0612615e927"]]},{"id":"c01fd0612615e927","type":"api-current-state","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"Wind <= 10 MPH","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"10","halt_if_type":"num","halt_if_compare":"lte","entity_id":"sensor.nws_wind_speed","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":330,"y":960,"wires":[["974833b6a2eca853"],["d7e50e7a2810667d"]]},{"id":"219b37105a8304f1","type":"api-current-state","z":"f602e6ba.609d28","g":"79694877249c9902","name":"Rainfall Delay","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.irrigation_rainfall_delay","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":260,"y":1480,"wires":[["dcdeabc7.780578"],["d01fbafafbb34692"]]},{"id":"e7430e17f0b24ed8","type":"api-current-state","z":"f602e6ba.609d28","g":"79694877249c9902","name":"Rain Forecast Delay","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.irrigation_rain_forecast_delay","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":280,"y":1600,"wires":[["862ad27a.d347d"],["f5684be88477322f"]]},{"id":"b6e7d5b8891bba6d","type":"api-current-state","z":"f602e6ba.609d28","g":"79694877249c9902","name":"Wind Delay","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.irrigation_wind_delay","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":250,"y":1700,"wires":[["8d4bfe8e.ee805"],["a3d75225807b70eb"]]},{"id":"339ee0ada21856e0","type":"api-current-state","z":"f602e6ba.609d28","g":"79694877249c9902","name":"Wind Delay","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.irrigation_wind_delay","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":250,"y":1820,"wires":[["8d4bfe8e.ee805"],["336585d4eee0ca73"]]},{"id":"ed6e3d4225582e20","type":"api-current-state","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"Rainfall Delay","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.irrigation_rainfall_delay","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":260,"y":2820,"wires":[["f587589f.d739e8"],["f7ac7a90f3da2298"]]},{"id":"593bee0e8c958df8","type":"api-current-state","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"Rain Forecast Delay","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.irrigation_rain_forecast_delay","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":280,"y":2940,"wires":[["4fae5b92.a9cd44"],["67916c3a5554a794","4fae5b92.a9cd44"]]},{"id":"d01fbafafbb34692","type":"api-call-service","z":"f602e6ba.609d28","g":"79694877249c9902","name":"Set Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.lawn_irrigation_reason"],"data":"{\"value\":\"Rainfall\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":630,"y":1500,"wires":[[]]},{"id":"f5684be88477322f","type":"api-call-service","z":"f602e6ba.609d28","g":"79694877249c9902","name":"Set Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.lawn_irrigation_reason"],"data":"{\"value\":\"Rain Forecasted\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":630,"y":1620,"wires":[[]]},{"id":"336585d4eee0ca73","type":"api-call-service","z":"f602e6ba.609d28","g":"79694877249c9902","name":"Set Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.lawn_irrigation_reason"],"data":"{\"value\":\"Wind\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":630,"y":1820,"wires":[[]]},{"id":"b3c4a3638c17629e","type":"api-call-service","z":"f602e6ba.609d28","g":"79694877249c9902","name":"Clear Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.lawn_irrigation_reason"],"data":"{\"value\":\"None\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":260,"y":1900,"wires":[["815fddc0.6604c"]]},{"id":"67916c3a5554a794","type":"api-call-service","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"Set Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.front_bed_irrigation_reason"],"data":"{\"value\":\"Rain Forecasted\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":630,"y":2960,"wires":[[]]},{"id":"f7ac7a90f3da2298","type":"api-call-service","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"Set Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.front_bed_irrigation_reason"],"data":"{\"value\":\"Rainfall\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":630,"y":2840,"wires":[[]]},{"id":"45c5dbbbd8ce50a1","type":"api-call-service","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"Set Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.front_bed_irrigation_reason"],"data":"{\"value\":\"Automation Off\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":630,"y":2640,"wires":[[]]},{"id":"2fc67b25514de5a5","type":"api-call-service","z":"f602e6ba.609d28","g":"79694877249c9902","name":"Set Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.lawn_irrigation_reason"],"data":"{\"value\":\"Force Run\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":450,"y":1360,"wires":[["5420d0eed32223fb"]]},{"id":"08e3098cf183e086","type":"link in","z":"f602e6ba.609d28","g":"79694877249c9902","name":"","links":["5420d0eed32223fb"],"x":325,"y":1960,"wires":[["815fddc0.6604c"]]},{"id":"abb8777dd08aa743","type":"api-call-service","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"Set Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.front_bed_irrigation_reason"],"data":"{\"value\":\"Force Run\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":450,"y":2700,"wires":[["fdcfa1521191fa40"]]},{"id":"d8637d8d96b68fca","type":"api-call-service","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"Clear Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.front_bed_irrigation_reason"],"data":"{\"value\":\"None\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":260,"y":3040,"wires":[["418058c4.af3158"]]},{"id":"b403eec7866aea22","type":"link in","z":"f602e6ba.609d28","g":"68ec980b932fdba7","name":"","links":["fdcfa1521191fa40"],"x":325,"y":3100,"wires":[["418058c4.af3158"]]},{"id":"f2c9c3a5b8b11a64","type":"switch","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Continue?","property":"data.continue","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"eq","v":"1","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":1230,"y":2060,"wires":[["287dd3b1af5dc2d0"],["bf015af2161c5ec2"]]},{"id":"9896327569c234da","type":"link in","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"","links":["af4788fe.215ba8"],"x":95,"y":2060,"wires":[["e95ac52f03478921"]]},{"id":"e95ac52f03478921","type":"template","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Lawn Zones","field":"all_zones","fieldType":"msg","format":"json","syntax":"mustache","template":"[\n {\n \"zone\": \"switch.irrigation_front_lawn\",\n \"name\": \"Front lawn\"\n },\n {\n \"zone\": \"switch.irrigation_left_and_main_rear_lawn\",\n \"name\": \"Left and main rear lawn\"\n },\n {\n \"zone\": \"switch.irrigation_front_and_right_rear_lawn\",\n \"name\": \"Front and right rear lawn\"\n },\n {\n \"zone\": \"switch.irrigation_side_lawn\",\n \"name\": \"Side lawn\"\n }\n]","output":"json","x":290,"y":2060,"wires":[["287dd3b1af5dc2d0"]]},{"id":"174186fb5d054240","type":"api-render-template","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Evaluate Template","server":"e1dc0b88.463bb8","version":0,"template":"","resultsLocation":"data.continue","resultsLocationType":"msg","templateLocation":"template","templateLocationType":"msg","x":1050,"y":2060,"wires":[["f2c9c3a5b8b11a64"]]},{"id":"287dd3b1af5dc2d0","type":"array-loop","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Loop Through Zones","key":"al287dd3b1af5dc2d0","keyType":"msg","reset":true,"resetValue":"value-null","array":"all_zones","arrayType":"msg","x":220,"y":2120,"wires":[["74cd40702021e86d","acdcc72fea065aac"],["224d30a98f52c287"]]},{"id":"74cd40702021e86d","type":"template","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Zone Settings Lawn","field":"zones","fieldType":"msg","format":"json","syntax":"mustache","template":"[\n {\n \"zone\": \"switch.irrigation_front_lawn\",\n \"time\": 10,\n \"name\": \"Front lawn\"\n },\n {\n \"zone\": \"switch.irrigation_left_and_main_rear_lawn\",\n \"time\": 10,\n \"name\": \"Left and main rear lawn\"\n },\n {\n \"zone\": \"switch.irrigation_front_and_right_rear_lawn\",\n \"time\": 10,\n \"name\": \"Front and right rear lawn\"\n },\n {\n \"zone\": \"switch.irrigation_side_lawn\",\n \"time\": 10,\n \"name\": \"Side lawn\"\n },\n {\n \"zone\": \"switch.irrigation_front_lawn\",\n \"time\": 10,\n \"name\": \"Front lawn\"\n },\n {\n \"zone\": \"switch.irrigation_left_and_main_rear_lawn\",\n \"time\": 10,\n \"name\": \"Left and main rear lawn\"\n },\n {\n \"zone\": \"switch.irrigation_front_and_right_rear_lawn\",\n \"time\": 10,\n \"name\": \"Front and right rear lawn\"\n },\n {\n \"zone\": \"switch.irrigation_side_lawn\",\n \"time\": 10,\n \"name\": \"Side lawn\"\n }\n]","output":"json","x":460,"y":2180,"wires":[["151eb6ba5b2d39cd"]]},{"id":"bf015af2161c5ec2","type":"function","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Append Run Zones","func":"if (typeof msg.run_zones === 'undefined'){\n msg.run_zones = []\n}\n\n// Add zone to run_zones\nmsg.run_zones.push(msg.payload.zone)\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":210,"y":2180,"wires":[["287dd3b1af5dc2d0"]]},{"id":"151eb6ba5b2d39cd","type":"array-loop","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Loop Through Zones","key":"al287dd3b1af5dc2d0","keyType":"msg","reset":true,"resetValue":"value-null","array":"zones","arrayType":"msg","x":720,"y":2180,"wires":[[],["45ee74d06e9cac2c"]]},{"id":"45ee74d06e9cac2c","type":"switch","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"If Zone in Run Zone","property":"run_zones","propertyType":"msg","rules":[{"t":"cont","v":"payload.zone","vt":"msg"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":710,"y":2240,"wires":[["8d3c8370996be2da"],["151eb6ba5b2d39cd"]]},{"id":"95a54981805b22f2","type":"api-call-service","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Turn On Zone","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":[],"data":"{ \"entity_id\": payload.zone}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":880,"y":2320,"wires":[["02d1e639f7ac6596","7b985932412db47d"]]},{"id":"a4b3eba196a504dc","type":"api-call-service","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Turn Off Zone","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":[],"data":"{ \"entity_id\": payload.zone}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":540,"y":2500,"wires":[["6ea0448df1383ec2"]]},{"id":"02d1e639f7ac6596","type":"change","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Set Delay Variable","rules":[{"t":"set","p":"delay","pt":"msg","to":"payload.time* 60000","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":550,"y":2380,"wires":[["863b8fa63f210ebe"]]},{"id":"8d3c8370996be2da","type":"api-call-service","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Turn On Master Valve","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.irrigation_master_valve"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":560,"y":2320,"wires":[["b1c9631973c2f4b1","8f83c8d1d4492be0"]]},{"id":"863b8fa63f210ebe","type":"stoptimer-varidelay","z":"f602e6ba.609d28","g":"a08dae6118c91c19","duration":"5","durationType":"num","units":"Millisecond","payloadtype":"num","payloadval":"0","name":"Delay","reporting":"every_second","persist":false,"ignoretimerpass":false,"x":510,"y":2440,"wires":[["a4b3eba196a504dc","de509d99b9d965b3"],[],["7d8374976c01e3dc"]]},{"id":"7d8374976c01e3dc","type":"mqtt out","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Publish Time Remaining","topic":"sensor/irrigation_time_remaining","qos":"","retain":"","broker":"546e31ed.0db1c","x":790,"y":2460,"wires":[]},{"id":"b0debe46542c4c67","type":"api-call-service","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Notify via Wrapper","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"script","service":"notify_wrapper","areaId":[],"deviceId":[],"entityId":[],"data":"{\t \"message\": alert \t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":990,"y":2420,"wires":[[]]},{"id":"de509d99b9d965b3","type":"function","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Create msg object","func":"var message = \"Sprinkler auto-run: \" + msg.payload.name + \" ran for \" + msg.payload.time + \" minutes\"\n\nreturn { alert: message };","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":770,"y":2420,"wires":[["b0debe46542c4c67"]]},{"id":"b1c9631973c2f4b1","type":"delay","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"2s","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"outputs":1,"x":730,"y":2320,"wires":[["95a54981805b22f2"]]},{"id":"6ea0448df1383ec2","type":"delay","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Delay 10","pauseType":"delay","timeout":"10","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"outputs":1,"x":320,"y":2440,"wires":[["151eb6ba5b2d39cd"]]},{"id":"224d30a98f52c287","type":"api-current-state","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Force Run","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.irrigation_force_run","state_type":"str","blockInputOverrides":false,"outputProperties":[],"for":0,"forType":"num","forUnits":"minutes","x":510,"y":2060,"wires":[["bf015af2161c5ec2"],["38affe5cc680d076"]]},{"id":"5a27d31bfb4a6990","type":"comment","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Actually Handle Watering","info":"","x":1150,"y":2340,"wires":[]},{"id":"197853479ad9eeda","type":"comment","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Decide Which Zones to Run","info":"","x":1020,"y":2160,"wires":[]},{"id":"7b985932412db47d","type":"debug","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Log Zone On","active":false,"tosidebar":true,"console":true,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1100,"y":2280,"wires":[]},{"id":"acdcc72fea065aac","type":"debug","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Log Run Zones","active":false,"tosidebar":true,"console":true,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":350,"y":2260,"wires":[]},{"id":"f78cdb84200eb171","type":"api-call-service","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"Set Reason","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.front_bed_irrigation_reason"],"data":"{\"value\":\"Recently Ran\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":750,"y":3380,"wires":[[]]},{"id":"93965a61d2c4f5de","type":"api-current-state","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"< 1\" in 5 Days","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"1","halt_if_type":"num","halt_if_compare":"gte","entity_id":"sensor.neighbor_5in1_rain_last_5_days","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":420,"y":620,"wires":[["dd9855ca4017c8c0"],["47f1a8018e58e032"]]},{"id":"54bad548.7e9fcc","type":"ha-get-entities","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"Get \"On\" Sprinklers","server":"e1dc0b88.463bb8","version":1,"rules":[{"property":"entity_id","logic":"starts_with","value":"switch.irrigation","valueType":"str"},{"property":"entity_id","logic":"does_not_include","value":"switch.irrigation_master_valve,switch.irrigation_24v_power,switch.irrigation_drip","valueType":"str"},{"property":"state","logic":"is","value":"on","valueType":"str"}],"outputType":"array","outputEmptyResults":true,"outputLocationType":"msg","outputLocation":"payload","outputResultsCount":1,"x":390,"y":100,"wires":[["bcbf413e.7b188"]]},{"id":"5a10cd93.8e94b4","type":"inject","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"60","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":170,"y":100,"wires":[["54bad548.7e9fcc"]]},{"id":"a77808ff.3f1288","type":"switch","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"On Longer than 26 minutes?","property":"payload[0].timeSinceChangedMs","propertyType":"msg","rules":[{"t":"gte","v":"1600000","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":720,"y":60,"wires":[["54ae6ec3.1bc63"]]},{"id":"54ae6ec3.1bc63","type":"api-call-service","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"Turn Off Zone","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":[],"data":"{ \"entity_id\": payload[0].entity_id }","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":980,"y":60,"wires":[[]]},{"id":"bcbf413e.7b188","type":"switch","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"More Than 0 Entities?","property":"payload","propertyType":"msg","rules":[{"t":"nempty"},{"t":"empty"}],"checkall":"true","repair":false,"outputs":2,"x":300,"y":160,"wires":[["a77808ff.3f1288","3b848bce.76aea4"],["656ad2cd6fb99f57"]]},{"id":"3b848bce.76aea4","type":"change","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"Reset Delay","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":670,"y":100,"wires":[["cdd3b7ef.04a618"]]},{"id":"43dedcca.ac7734","type":"api-call-service","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"Turn Off Master","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.irrigation_master_valve"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1340,"y":180,"wires":[["5093cf5ba33eb30a"]]},{"id":"c42e6d62.7a24c","type":"api-current-state","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"Master On?","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"switch.irrigation_master_valve","state_type":"str","blockInputOverrides":true,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":510,"y":200,"wires":[["cdd3b7ef.04a618","21aa3b57a72b3336"],["3b848bce.76aea4","1b05625730953169"]]},{"id":"cdd3b7ef.04a618","type":"trigger","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"Wait 1m","op1":"","op2":"0","op1type":"nul","op2type":"str","duration":"1","extend":false,"overrideDelay":false,"units":"min","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":880,"y":120,"wires":[["5e9007a27732bba9"]]},{"id":"63f07877e73b952a","type":"switch","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"More Than 0 Entities?","property":"payload","propertyType":"msg","rules":[{"t":"nempty"},{"t":"empty"}],"checkall":"true","repair":false,"outputs":2,"x":1100,"y":180,"wires":[[],["749afd72791a5127"]]},{"id":"5e9007a27732bba9","type":"ha-get-entities","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"Get \"On\" Sprinklers","server":"e1dc0b88.463bb8","version":1,"rules":[{"property":"entity_id","logic":"starts_with","value":"switch.irrigation","valueType":"str"},{"property":"entity_id","logic":"does_not_include","value":"switch.irrigation_master_valve,switch.irrigation_24v_power","valueType":"str"},{"property":"state","logic":"is","value":"on","valueType":"str"}],"outputType":"array","outputEmptyResults":true,"outputLocationType":"msg","outputLocation":"payload","outputResultsCount":1,"x":1070,"y":120,"wires":[["63f07877e73b952a"]]},{"id":"061b74f643477dd9","type":"switch","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"More Than 0 Entities?","property":"payload","propertyType":"msg","rules":[{"t":"nempty"},{"t":"empty"}],"checkall":"true","repair":false,"outputs":2,"x":1360,"y":120,"wires":[["43dedcca.ac7734"],[]]},{"id":"749afd72791a5127","type":"trigger","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"Wait 1m","op1":"","op2":"0","op1type":"nul","op2type":"str","duration":"5","extend":false,"overrideDelay":false,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":1260,"y":60,"wires":[["061b74f643477dd9"]]},{"id":"656ad2cd6fb99f57","type":"function","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"clear msg","func":"msg = {}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":280,"y":200,"wires":[["c42e6d62.7a24c"]]},{"id":"c3cb1c7d15767014","type":"api-current-state","z":"f602e6ba.609d28","g":"a9182c2cc04d2d9a","name":"Weather","server":"e1dc0b88.463bb8","version":3,"outputs":2,"halt_if":"50","halt_if_type":"num","halt_if_compare":"gte","entity_id":"sensor.precip_probability","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":300,"y":860,"wires":[["1d9a4d0bb4645f32"],["eeecfc1e8864e39f"]]},{"id":"38affe5cc680d076","type":"template","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Template: Zone Last Ran >= 71 hours","field":"template","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{%- set entity_name = \"input_datetime{{ payload.zone }}\" | regex_replace(find='switch', replace='', ignorecase=False) -%}\n{%- set time = (as_timestamp(now()) - as_timestamp(states(entity_name+\"_last_start\"))) | int -%}\n{% if time >= 71*3600 %}1{% else %}0{% endif %}","output":"str","x":790,"y":2060,"wires":[["174186fb5d054240"]]},{"id":"62b5545bc6d6e627","type":"template","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"Template: Zone Last Ran >= 23 hours","field":"template","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{%- set entity_name = \"input_datetime{{ zones.zone }}\" | regex_replace(find='switch', replace='', ignorecase=False) -%}\n{%- set time = (as_timestamp(now()) - as_timestamp(states(entity_name+\"_last_start\"))) | int -%}\n{% if time >= 23*3600 %}1{% else %}0{% endif %}","output":"str","x":310,"y":3260,"wires":[["aa53225140781dd7"]]},{"id":"5093cf5ba33eb30a","type":"api-call-service","z":"f602e6ba.609d28","g":"3cf0491ac33aecfa","name":"Disable Tracking","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"homeassistant","service":"disable_entity","areaId":[],"deviceId":[],"entityId":["sensor.irrigation_water_usage"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1520,"y":180,"wires":[[]]},{"id":"1b05625730953169","type":"api-call-service","z":"f602e6ba.609d28","d":true,"g":"3cf0491ac33aecfa","name":"Disable Tracking","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"homeassistant","service":"disable_entity","areaId":[],"deviceId":[],"entityId":["sensor.irrigation_water_usage"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":820,"y":200,"wires":[[]]},{"id":"21aa3b57a72b3336","type":"api-call-service","z":"f602e6ba.609d28","d":true,"g":"3cf0491ac33aecfa","name":"Enable Tracking","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"homeassistant","service":"enable_entity","areaId":[],"deviceId":[],"entityId":["sensor.irrigation_water_usage"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":820,"y":160,"wires":[[]]},{"id":"8f83c8d1d4492be0","type":"api-call-service","z":"f602e6ba.609d28","g":"a08dae6118c91c19","name":"Enable Tracking","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"homeassistant","service":"enable_entity","areaId":[],"deviceId":[],"entityId":["sensor.irrigation_water_usage"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":900,"y":2280,"wires":[[]]},{"id":"0fe0d325194604dd","type":"api-call-service","z":"f602e6ba.609d28","g":"55a2162532da4e14","name":"Enable Tracking","server":"e1dc0b88.463bb8","version":5,"debugenabled":false,"domain":"homeassistant","service":"enable_entity","areaId":[],"deviceId":[],"entityId":["sensor.irrigation_water_usage"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":660,"y":3280,"wires":[[]]}]
\ No newline at end of file
diff --git a/extras/appdaemon/apps/apps.yaml b/extras/appdaemon/apps/apps.yaml
index 2af90099..41bc9fd4 100644
--- a/extras/appdaemon/apps/apps.yaml
+++ b/extras/appdaemon/apps/apps.yaml
@@ -174,25 +174,25 @@ Nexus Screen Follow:
# Christmas #
#############
# Christmas Lights:
-# module: entity_timer
-# class: Timer
-# entities: switch.christmas_lights # This is roofline, ground auto follows via link in esphome for device
-# time_on: sunset - 00:20:00
-# time_off: "23:00:00"
-
-# Christmas Trees Follow:
-# module: follow_me
-# class: Follow
-# leader: group.christmas_trees
-# follower: switch.dining_room_christmas_tree,switch.office_christmas_tree,switch.master_bedroom_christmas_tree
-# follow_off: False # Only follow state to on
-
-# Front House Christmas Trees Timer:
-# module: entity_timer
-# class: Timer
-# entities: switch.dining_room_christmas_tree,switch.office_christmas_tree
-# time_on: sunset - 00:20:00
-# time_off: '23:00:00'
+# module: entity_timer
+# class: Timer
+# entities: switch.christmas_lights # This is roofline, ground auto follows via link in esphome for device
+# time_on: sunset - 00:20:00
+# time_off: "23:00:00"
+
+Christmas Trees Follow:
+ module: follow_me
+ class: Follow
+ leader: group.christmas_trees
+ follower: switch.dining_room_christmas_tree,switch.office_christmas_tree,switch.master_bedroom_christmas_tree
+ follow_off: False # Only follow state to on
+
+Front House Christmas Trees Timer:
+ module: entity_timer
+ class: Timer
+ entities: switch.dining_room_christmas_tree,switch.office_christmas_tree
+ time_on: sunset - 00:20:00
+ time_off: '23:00:00'
############
# Aquarium #
@@ -362,7 +362,7 @@ Indoor Light Automation Sunset:
constrain_input_boolean: input_boolean.house_lamps_automation
constrain_presence: anyone
time_on: sunset - 00:20:00
- entities: light.andrew_desk_lamp,light.bethany_desk_lamp,light.living_room_lamps,light.master_bedroom_lamps,group.under_cabinet_lights,light.living_room_sconces,light.curio_cabinet #,group.christmas #,switch.ir_candles
+ entities: light.andrew_desk_lamp,light.bethany_desk_lamp,light.living_room_lamps,light.master_bedroom_lamps,group.under_cabinet_lights,light.living_room_sconces,light.curio_cabinet,group.christmas #,switch.ir_candles
brightness: 255
Guest Light Automation Sunset:
@@ -404,9 +404,9 @@ Entryway Light Sunset Smallgroup:
Front Porch Lights Sunset:
module: entity_timer
class: Timer
- entities: light.front_porch_lights,light.front_sconces # See also NodeRed # disable at christmas
+ entities: light.front_porch_lights,light.front_sconces # See also NodeRed # disable at Christmas and Halloween
#entities: light.front_porch_lights # Christmas only front porch
- #entities: light.front_porch_halloween #,light.front_sconces # Halloween LimitlessLED See also NodeRed
+ #entities: light.front_porch_halloween # Halloween only LimitlessLED See also NodeRed
time_on: sunset - 00:20:00
time_off: sunrise - 00:30:00
brightness: 254
diff --git a/extras/docker-compose/other/docker-compose.yml b/extras/docker-compose/other/docker-compose.yml
index 710c0928..494d4d17 100644
--- a/extras/docker-compose/other/docker-compose.yml
+++ b/extras/docker-compose/other/docker-compose.yml
@@ -538,7 +538,7 @@ services:
privileged: true
restart: always
#image: ghcr.io/blakeblackshear/frigate:stable
- image: ghcr.io/blakeblackshear/frigate:0.14.0
+ image: ghcr.io/blakeblackshear/frigate:0.14.1
shm_size: "256mb"
devices:
- /dev/bus/usb:/dev/bus/usb
diff --git a/extras/docker-compose/unified/docker-compose.yml b/extras/docker-compose/unified/docker-compose.yml
index fce434f0..7fe68190 100644
--- a/extras/docker-compose/unified/docker-compose.yml
+++ b/extras/docker-compose/unified/docker-compose.yml
@@ -753,7 +753,7 @@ services:
privileged: true
restart: always
#image: ghcr.io/blakeblackshear/frigate:stable
- image: ghcr.io/blakeblackshear/frigate:0.14.0
+ image: ghcr.io/blakeblackshear/frigate:0.14.1
shm_size: "256mb"
devices:
- /dev/bus/usb:/dev/bus/usb
diff --git a/extras/esphome/power_plug_2.yaml b/extras/esphome/power_plug_2.yaml
index 889069e9..4707759d 100644
--- a/extras/esphome/power_plug_2.yaml
+++ b/extras/esphome/power_plug_2.yaml
@@ -23,7 +23,7 @@ sensor:
cf1_pin: GPIO14
power:
id: power
- #name: "xbox power"
+ name: "xbox power"
filters:
# Some calibration
- multiply: 0.4545
@@ -53,7 +53,7 @@ binary_sensor:
- platform: template
name: "${friendly_name} Power"
device_class: occupancy
- lambda: if (id(power).state > 5) return true; else return false;
+ lambda: if (id(power).state > 50) return true; else return false;
switch:
- platform: gpio
diff --git a/extras/esphome/tesla_ble.yaml b/extras/esphome/tesla_ble.yaml
new file mode 100644
index 00000000..2cf1f3fc
--- /dev/null
+++ b/extras/esphome/tesla_ble.yaml
@@ -0,0 +1,61 @@
+substitutions:
+ name: tesla_ble
+ friendly_name: "Tesla BLE"
+ charging_amps_max: "40"
+
+<<: !include common.yaml
+
+esp32:
+ board: esp32-c3-devkitm-1
+ framework:
+ type: esp-idf
+ version: 5.2.2
+ platform_version: 6.7.0
+
+logger:
+ level: INFO
+
+esphome:
+ name: ${name}
+ name_add_mac_suffix: true
+ friendly_name: ${friendly_name}
+ # project:
+ # name: yoziru.esphome-tesla-ble
+ # version: "2024.8.1"
+ libraries:
+ #- https://github.com/yoziru/tesla-ble.git#v2.2.1
+ - https://github.com/aneisch/tesla-ble.git
+
+external_components:
+ #- source: github://yoziru/esphome-tesla-ble/tree/main/components
+ - source: github://aneisch/esphome-tesla-ble
+ components: [tesla_ble_vehicle]
+ refresh: 0s
+
+packages:
+ #common: github://yoziru/esphome-tesla-ble/packages/common.yml@main
+ #client: github://yoziru/esphome-tesla-ble/packages/client.yml@main
+ common: github://aneisch/esphome-tesla-ble/packages/common.yml
+ client: github://aneisch/esphome-tesla-ble/packages/client.yml
+
+esp32_ble_tracker:
+ scan_parameters:
+ # Activate scan only after wifi connect, see https://github.com/esphome/issues/issues/2941#issuecomment-1842369092
+ continuous: false
+
+wifi:
+ ssid: "SSID"
+ password: !secret wifi_password
+ # Enable fallback hotspot (captive portal) in case wifi connection fails
+ manual_ip:
+ static_ip: 10.0.0.22
+ gateway: 10.0.1.1
+ subnet: 255.255.254.0
+ ap:
+ password: !secret wifi_password
+ # Activate scan only after wifi connect, see https://github.com/esphome/issues/issues/2941#issuecomment-1842369092
+ on_connect:
+ - esp32_ble_tracker.start_scan:
+ continuous: true
+ on_disconnect:
+ - esp32_ble_tracker.stop_scan:
\ No newline at end of file
diff --git a/extras/traefik/traefik.yaml b/extras/traefik/traefik.yaml
index 5b5b6960..fe835bb9 100644
--- a/extras/traefik/traefik.yaml
+++ b/extras/traefik/traefik.yaml
@@ -44,4 +44,4 @@ experimental:
# log:
# level: DEBUG
-#accessLog: {}
\ No newline at end of file
+accessLog: {}
\ No newline at end of file
diff --git a/group.yaml b/group.yaml
index a0bf5334..0abba36b 100644
--- a/group.yaml
+++ b/group.yaml
@@ -6,7 +6,9 @@ common_areas:
- group.office
- group.garage
- group.dining_room
- #- group.christmas
+ # Start Christmas
+ - group.christmas
+ # End Christmas
office:
name: Office
@@ -27,7 +29,10 @@ master_bedroom:
#- switch.master_bedroom_sound_machine
- light.andrew_nightstand_lamp
- light.bethany_nightstand_lamp
- #- switch.master_bedroom_christmas_tree
+ # Start Christmas
+ - switch.master_bedroom_christmas_tree
+ # End Christmas
+
garage:
name: Garage
@@ -94,9 +99,11 @@ off_at_bedtime:
- light.living_room_sconces
- switch.master_closet_light
- group.master_bathroom_lights
- - group.common_areas # contains christmas group
- #- switch.dining_room_christmas_tree
- #- switch.office_christmas_tree
+ - group.common_areas
+ # Start Christmas
+ - switch.dining_room_christmas_tree
+ - switch.office_christmas_tree
+ # End Christmas
#- switch.ir_candles
- media_player.kitchen_photo_frame
- media_player.office_photo_frame
diff --git a/images/nodered_1.png b/images/nodered_1.png
index 9a4679dd..f9632812 100644
Binary files a/images/nodered_1.png and b/images/nodered_1.png differ
diff --git a/images/nodered_2.png b/images/nodered_2.png
index 59f9dda3..80bd1899 100644
Binary files a/images/nodered_2.png and b/images/nodered_2.png differ
diff --git a/packages/christmas.yaml b/packages/christmas.yaml
index 9570b44c..eb071d98 100644
--- a/packages/christmas.yaml
+++ b/packages/christmas.yaml
@@ -1,3 +1,6 @@
+# Don't forget to uncomment references to Christmas in Appdaemon apps.yaml
+# also check NodeRed and updare appropriately (front sconces and porch lights)
+
automation:
- alias: "315Mhz Remote"
id: "315mhz_remote"
@@ -17,11 +20,10 @@ automation:
group:
###
- # Be sure to also uncomment:
+ # In group.yaml be sure to also uncomment:
# - group.christmas
# - switch.dining_room_christmas_tree
# - switch.office_christmas_tree
- # in group.yaml
###
christmas:
name: Christmas
@@ -36,13 +38,12 @@ group:
christmas_trees:
entities:
- # - switch.dining_room_christmas_tree # On follows other trees via appdaemon, on timer via appdaemon, off via group.off_at_bedtime OR timer
- # - switch.office_christmas_tree # On follows other trees via appdaemon, on timer via appdaemon, off via group.off_at_bedtime OR timer
- # - switch.master_bedroom_christmas_tree # On follows other trees via appdaemon
+ # - switch.dining_room_christmas_tree # Leave Commented -- On follows other trees via appdaemon, on timer via appdaemon, off via group.off_at_bedtime OR timer
+ # - switch.office_christmas_tree # Leave Commented -- On follows other trees via appdaemon, on timer via appdaemon, off via group.off_at_bedtime OR timer
+ # - switch.master_bedroom_christmas_tree # Leave Commented -- On follows other trees via appdaemon
- switch.kitchen_christmas_tree
- switch.living_room_christmas_tree
-
script:
###
# Be sure to also uncomment references to christmas in scripts.yaml
diff --git a/packages/frigate.yaml b/packages/frigate.yaml
index ba586568..7c0136db 100644
--- a/packages/frigate.yaml
+++ b/packages/frigate.yaml
@@ -13,6 +13,20 @@ automation:
data:
clip_id: "{{trigger.payload_json['after']['id']}}"
+ # - alias: Frigate Smoke Alarm Offsite
+ # id: "frigate_smokealarm_offsite"
+ # mode: queued
+ # trigger:
+ # - platform: mqtt
+ # topic: frigate/reviews
+ # payload: true
+ # value_template: "{{ value_json.type == 'end' and 'SmokeAlarm' in value_json.before.data.objects }}"
+ # action:
+ # - delay: '00:00:05'
+ # - action: shell_command.frigate_clips_drive
+ # data:
+ # clip_id: "{{trigger.payload_json['before']['id']}}"
+
- alias: Frigate Notification Person
id: "frigate_notification_person"
mode: parallel
@@ -415,6 +429,11 @@ automation:
entity_id: binary_sensor.garage_interior_door
from: 'off'
to: 'on'
+ - platform: state
+ id: smoke_alarm
+ entity_id: binary_sensor.hardwired_smoke_alarms_smoke_detected
+ from: 'off'
+ to: 'on'
#condition: "{{ is_state('input_boolean.security_status','on') }}"
action:
- if: "{{ trigger.id == 'garage_door' }}"
@@ -457,6 +476,20 @@ automation:
data:
camera: garage
label: GarageInteriorDoorOpened
+ - if: "{{ trigger.id == 'smoke_alarm' }}"
+ then:
+ - action: shell_command.frigate_create_event
+ data:
+ camera: garage
+ label: SmokeAlarm
+ - action: shell_command.frigate_create_event
+ data:
+ camera: back_porch
+ label: SmokeAlarm
+ - action: shell_command.frigate_create_event
+ data:
+ camera: driveway
+ label: SmokeAlarm
# Handled by NodeRed
# - alias: Frigate Timelapse Snapshots
diff --git a/packages/smoke_alarms.yaml b/packages/smoke_alarms.yaml
index 476ccf91..924812f0 100644
--- a/packages/smoke_alarms.yaml
+++ b/packages/smoke_alarms.yaml
@@ -47,6 +47,7 @@ automation:
- binary_sensor.hallway_alarm_smoke_alarm_smoke_alarm_test
- binary_sensor.hallway_alarm_smoke_alarm_smoke_detected
- binary_sensor.hardwired_smoke_alarms_smoke_detected
+ - binary_sensor.garage_heat_alarm_detected
from: "off"
to: "on"
action:
diff --git a/packages/tesla.yaml b/packages/tesla.yaml
index e8e1b8cc..072eaa4f 100644
--- a/packages/tesla.yaml
+++ b/packages/tesla.yaml
@@ -596,55 +596,100 @@ automation:
id: total
entity_id: sensor.total_power
above: 15000
+ - platform: numeric_state
+ id: total
+ entity_id: sensor.total_power
+ above: 20000
- platform: numeric_state
id: dryer
entity_id: sensor.dryer_power
- above: 5000
+ above: 1000
- platform: numeric_state
id: oven
entity_id: sensor.oven_power
- above: 5000
+ above: 3500
action:
- if: "{{ (states('sensor.total_power') | int) < 15000}}"
alias: "Less than 15k"
then:
- - action: emporia_vue.set_charger_current
- data:
- current: 20
- target:
- entity_id: switch.emporia_charger
+ # If charging and not already lowered, notify
+ - if: "{{ state_attr('switch.emporia_charger','charging_rate') not in [6,20] and is_state('sensor.tesla_state', 'charging') }}"
+ then:
+ - action: script.notify_wrapper
+ data:
+ message: Charge rate automation triggered by {{ trigger.id }}! Total power {{ states('sensor.total_power') }}W. Limiting charge rate to 20A.
+ # If not already lowered, lower
+ - if: "{{ state_attr('switch.emporia_charger','charging_rate') not in [6,20] }}"
+ then:
+ # Limit on charger
+ - action: emporia_vue.set_charger_current
+ data:
+ current: 20
+ target:
+ entity_id: switch.emporia_charger
+ # Limit on vehicle directly
+ - action: number.set_value
+ data:
+ value: "20"
+ target:
+ entity_id: number.tesla_ble_882c04_charging_amps
- action: timer.start
data:
duration: "00:15:00"
target:
entity_id: timer.tesla_charge_backoff
- - if: "{{ state_attr('switch.emporia_charger','charging_rate') != 20 }}"
+
+ - if: "{{ 15000 <= (states('sensor.total_power') | int) <= 20000 }}"
+ alias: "Between 15k and 20k"
+ then:
+ # If charging and not already lowered all the way, notify
+ - if: "{{ state_attr('switch.emporia_charger','charging_rate') not in [6] and is_state('sensor.tesla_state', 'charging') }}"
then:
- action: script.notify_wrapper
data:
- message: Charge rate automation triggered by {{ trigger.id }}! Total power {{ states('sensor.total_power') }}W. Limiting charge rate to 20A.
+ message: Total power has exceeded 15kW! Total power {{ states('sensor.total_power') }}W. Limiting charge rate to 6A.
data:
- priority: "{% if (is_state('sensor.tesla_state', 'charging') and state_attr('switch.emporia_charger','charging_rate') < 20) %}1{% else %}0{% endif %}"
- else:
+ priority: 1
+ # Limit on charger (min 6)
- action: emporia_vue.set_charger_current
data:
- current: 1
+ current: 6
target:
entity_id: switch.emporia_charger
- # - action: switch.turn_off
- # entity_id: switch.emporia_charger
+ # Limit on vehicle directly (min 5)
+ - action: number.set_value
+ data:
+ value: "5"
+ target:
+ entity_id: number.tesla_ble_882c04_charging_amps
- action: timer.start
data:
duration: "00:15:00"
target:
entity_id: timer.tesla_charge_backoff
- - if: "{{ state_attr('switch.emporia_charger','charging_rate') != 1 }}"
+
+ - if: "{{ (states('sensor.total_power') | int) >= 20000 }}"
+ alias: "Greater than 20k"
+ then:
+ # If charging and not already off, notify
+ - if: "{{ (is_state('switch.emporia_charger', 'on') or is_state('switch.tesla_ble_882c04_charger_switch', 'on')) and is_state('sensor.tesla_state', 'charging') }}"
then:
- action: script.notify_wrapper
data:
- message: Total power has exceeded 15kW! Total power {{ states('sensor.total_power') }}W. Limiting charge rate to 1A.
+ message: Total power has exceeded 20kW! Total power {{ states('sensor.total_power') }}W. Disabling charger for 15 minutes.
data:
priority: 1
+ # Turn off charger
+ - action: switch.turn_off
+ entity_id: switch.emporia_charger
+ # Tell vehicle to stop charging
+ - action: switch.turn_off
+ entity_id: switch.tesla_ble_882c04_charger_switch
+ - action: timer.start
+ data:
+ duration: "00:15:00"
+ target:
+ entity_id: timer.tesla_charge_backoff
- alias: "Auto Raise Charge Rate"
id: auto_raise_charge_rate
@@ -660,14 +705,26 @@ automation:
action:
- action: switch.turn_on
entity_id: switch.emporia_charger
- - action: script.notify_wrapper
- data:
- message: Timer expired, increasing charge rate to 40A.
+ # Allow vehicle to start charging
+ - action: switch.turn_on
+ entity_id: switch.tesla_ble_882c04_charger_switch
+ - if: "{{ state_attr('switch.emporia_charger','charging_rate') != 1 and is_state('sensor.tesla_state', 'charging') }}"
+ then:
+ - action: script.notify_wrapper
+ data:
+ message: Timer expired, increasing charge rate to 40A.
+ # Limit on charger
- action: emporia_vue.set_charger_current
data:
current: 40
target:
entity_id: switch.emporia_charger
+ # Limit on vehicle directly
+ - action: number.set_value
+ data:
+ value: "40"
+ target:
+ entity_id: number.tesla_ble_882c04_charging_amps
- id: update_tesla_charging_cost
alias: Update Tesla Charging Cost
@@ -687,7 +744,7 @@ automation:
platform: numeric_state
entity_id: sensor.tesla_active_route_minutes_to_arrival
below: 31
- condition: "{{ is_state('sensor.tesla_active_route_destination','home')}}"
+ condition: "{{ is_state('device_tracker.tesla_active_route_location','home')}}"
action:
- action: script.notify_wrapper
data:
diff --git a/scripts.yaml b/scripts.yaml
index 883d2c90..7d67aa2a 100644
--- a/scripts.yaml
+++ b/scripts.yaml
@@ -14,18 +14,22 @@ home_empty:
- group.master_bedroom
- group.master_bathroom_lights
- group.common_areas
- #- switch.master_bedroom_christmas_tree # manually turn off because of goodnight script
+ # Start Christmas
+ - switch.master_bedroom_christmas_tree #manually turn off because of goodnight script
+ # End Christmas
- media_player.kitchen_photo_frame
- media_player.office_photo_frame
- media_player.misc_photo_frame
- # If before dark, turn off christmas trees in front
-
- # - if: "{{ now().hour < 16 }}"
- # then:
- # - action: switch.turn_off
- # entity_id:
- # - switch.office_christmas_tree
- # - switch.dining_room_christmas_tree
+ # Start Christmas
+ # If before dark, turn off christmas trees in front
+ - if: "{{ now().hour < 16 }}"
+ then:
+ - action: switch.turn_off
+ entity_id:
+ - switch.office_christmas_tree
+ - switch.dining_room_christmas_tree
+ # End Christmas
+
# Turn on lights and disarm security
home_occupied:
@@ -51,8 +55,10 @@ home_occupied:
data:
entity_id:
- group.under_cabinet_lights
- #- group.christmas # dining, office, master tree follow 'on' via appdaemon
- #- switch.master_bedroom_christmas_tree # manually turn on because of goodnight script
+ # Start Christmas
+ - group.christmas # Christmas -- FYI: dining, office, master tree follow 'on' via appdaemon
+ - switch.master_bedroom_christmas_tree # Christmas -- we manually turn on because of goodnight script
+ # End Christmas
- action: media_player.turn_on
entity_id:
- media_player.kitchen_photo_frame
@@ -112,11 +118,13 @@ security_arm:
master_bedroom_wakeup:
sequence:
- # - if: "{{ now().hour < 11 }}"
- # then:
- # - action: script.turn_on
- # entity_id:
- # - script.christmas_wakeup
+ # Start Christmas
+ - if: "{{ now().hour < 11 }}"
+ then:
+ - action: script.turn_on
+ entity_id:
+ - script.christmas_wakeup
+ # End Christmas
- action: cover.open_cover
entity_id: cover.master_bedroom_blinds
- action: switch.turn_off
@@ -134,7 +142,9 @@ master_bedroom_wakeup:
entity_id: input_boolean.goodnight
- action: homeassistant.turn_on
entity_id:
- #- group.christmas
+ # Start Christmas
+ - group.christmas
+ # End Christmas
- media_player.kitchen_photo_frame
- media_player.office_photo_frame
@@ -142,10 +152,12 @@ master_bedroom_bedtime:
sequence:
- action: cover.close_cover
entity_id: cover.master_bedroom_blinds
- # - action: script.turn_on # Calling this way allows the sequence to continue without blocking
- # entity_id: script.christmas_goodnight
+ # Start Christmas
+ - action: script.turn_on # Calling this way allows the sequence to continue without blocking
+ entity_id: script.christmas_goodnight
+ # End Christmas
- action: script.appdaemon_ac_night
- - action: switch.turn_off #revert this
+ - action: switch.turn_on #revert this
data:
entity_id: switch.master_bedroom_ceiling_fan
#- action: switch.turn_on
diff --git a/switches.yaml b/switches.yaml
index 78f7f93e..2f019e46 100644
--- a/switches.yaml
+++ b/switches.yaml
@@ -51,13 +51,19 @@
friendly_name: Mac Focus Mode
value_template: "{{ is_state('binary_sensor.weasel_focus', 'on') }}"
turn_on:
- service: shell_command.weasel_shortcut
- data:
- shortcut: focus-in-a-meeting-on
+ - service: shell_command.weasel_shortcut
+ data:
+ shortcut: focus-in-a-meeting-on
+ - service: shell_command.weasel_shortcut
+ data:
+ shortcut: set-volume-0
turn_off:
- service: shell_command.weasel_shortcut
- data:
- shortcut: focus-in-a-meeting-off
+ - service: shell_command.weasel_shortcut
+ data:
+ shortcut: focus-in-a-meeting-off
+ - service: shell_command.weasel_shortcut
+ data:
+ shortcut: set-volume-15
icon_template: >
{% if is_state('binary_sensor.weasel_focus', 'off') %}
mdi:bell
diff --git a/ui-lovelace/02-heads_up.yaml b/ui-lovelace/02-heads_up.yaml
index 41fecd13..73dfd839 100644
--- a/ui-lovelace/02-heads_up.yaml
+++ b/ui-lovelace/02-heads_up.yaml
@@ -16,6 +16,7 @@ cards:
- entity_id: "group.under_cabinet_lights"
state: "on"
exclude:
+ - entity_id: "*tesla_ble_*"
- entity_id: "switch.emporia_charger"
- entity_id: "*polling"
- entity_id: "*_pre_release"
diff --git a/ui-lovelace/03-common.yaml b/ui-lovelace/03-common.yaml
index ddbb8496..9c65eb7a 100644
--- a/ui-lovelace/03-common.yaml
+++ b/ui-lovelace/03-common.yaml
@@ -161,21 +161,22 @@ cards:
# action: call-service
# service: esphome.twinkle_lights_string_8_steady_on
-# Christmas
- # - type: 'custom:auto-entities'
- # filter:
- # include:
- # - entity_id: "light.*christmas*"
- # - entity_id: "switch.*christmas*"
- # - entity_id: switch.santa_tree
- # - entity_id: switch.ferris_wheel
- # - entity_id: switch.nativity
- # card:
- # type: entities
- # title: Christmas
- # # show_header_toggle: false
- # sort:
- # method: name
+# Start Christmas
+ - type: 'custom:auto-entities'
+ filter:
+ include:
+ - entity_id: "light.*christmas*"
+ - entity_id: "switch.*christmas*"
+ - entity_id: switch.santa_tree
+ - entity_id: switch.ferris_wheel
+ - entity_id: switch.nativity
+ card:
+ type: entities
+ title: Christmas
+ # show_header_toggle: false
+ sort:
+ method: name
+# End Christmas
- type: entities
show_header_toggle: false
@@ -194,8 +195,8 @@ cards:
show_header_toggle: false
title: Outside
entities:
- - light.front_porch_lights
- #- light.front_porch_halloween
+ #- light.front_porch_lights
+ - light.front_porch_halloween
- light.front_sconces
# - light.back_porch_light # ring
# - entity: light.garage_exterior_light #ring
diff --git a/ui-lovelace/05-server.yaml b/ui-lovelace/05-server.yaml
index a893787e..db316183 100644
--- a/ui-lovelace/05-server.yaml
+++ b/ui-lovelace/05-server.yaml
@@ -108,6 +108,7 @@ cards:
icon: mdi:flash
- type: markdown
content: >
+ Tesla Energy This Month: {{ states('sensor.tesla_energy_this_month') | int }} kWh
Monthly Tesla Home Charging Cost: ${{ states('input_text.electricity_cost_monthly_tesla') }}
diff --git a/ui-lovelace/06-car.yaml b/ui-lovelace/06-car.yaml
index 254cc657..5e5155d9 100644
--- a/ui-lovelace/06-car.yaml
+++ b/ui-lovelace/06-car.yaml
@@ -49,20 +49,99 @@ cards:
- type: entities
entities:
- switch.emporia_charger
- - sensor.tesla_miles_per_month
- sensor.tesla_energy_this_month
- entity: sensor.tesla_charger_actual_current
name: Charger Current
- - entity: sensor.tesla_charger_power
- name: Charger Power
- - entity: sensor.tesla_charger_voltage
- name: Charger Voltage
- entity: sensor.tesla_time_to_full_charge
name: Time To Full Charge
+ - timer.tesla_charge_backoff
+ - number.tesla_ble_882c04_charging_amps
+ - switch.tesla_ble_882c04_hvac_switch
- type: markdown
content: >
+ {% set current_time = now() %}
+ {% set future_time = as_local(as_datetime( ((now() + timedelta( hours = (states('sensor.tesla_time_to_full_charge')| float))) | string)[:-16] )) %}
+ {% set time_distance = future_time - current_time %}
+
+ {% if is_state('sensor.tesla_state', 'charging')%}Finishing in {{ relative_time(current_time - time_distance) }} @ {{ ((now() + timedelta( hours = (states('sensor.tesla_time_to_full_charge')| float))) | string)[:-16] }}{% endif %}
+
+ Offering rate: {{ state_attr('switch.emporia_charger','charging_rate') }}A
Tesla Home Charging Cost This Month: ${{ states('input_text.electricity_cost_monthly_tesla') }}
+ - type: horizontal-stack
+ cards:
+ - type: vertical-stack
+ cards:
+ - type: custom:mushroom-template-card
+ primary: "Charge Limit"
+ secondary: "70"
+ card_mod:
+ style: |
+ ha-card {
+ {% if is_state('number.tesla_ble_882c04_charging_limit','70.0') %}
+ background: gray;
+ {% endif %}
+ }
+ tap_action:
+ action: call-service
+ service: number.set_value
+ data:
+ value: "70"
+ target:
+ entity_id: number.tesla_ble_882c04_charging_limit
+ - type: custom:mushroom-template-card
+ primary: "Charge Limit"
+ secondary: "90"
+ card_mod:
+ style: |
+ ha-card {
+ {% if is_state('number.tesla_ble_882c04_charging_limit','90.0') %}
+ background: gray;
+ {% endif %}
+ }
+ tap_action:
+ action: call-service
+ service: number.set_value
+ data:
+ value: "90"
+ target:
+ entity_id: number.tesla_ble_882c04_charging_limit
+ - type: vertical-stack
+ cards:
+ - type: custom:mushroom-template-card
+ primary: "Charge Limit"
+ secondary: "80"
+ card_mod:
+ style: |
+ ha-card {
+ {% if is_state('number.tesla_ble_882c04_charging_limit','80.0') %}
+ background: gray;
+ {% endif %}
+ }
+ tap_action:
+ action: call-service
+ service: number.set_value
+ data:
+ value: "80"
+ target:
+ entity_id: number.tesla_ble_882c04_charging_limit
+ - type: custom:mushroom-template-card
+ primary: "Charge Limit"
+ secondary: "100"
+ card_mod:
+ style: |
+ ha-card {
+ {% if is_state('number.tesla_ble_882c04_charging_limit','100.0') %}
+ background: gray;
+ {% endif %}
+ }
+ tap_action:
+ action: call-service
+ service: number.set_value
+ data:
+ value: "100"
+ target:
+ entity_id: number.tesla_ble_882c04_charging_limit
- type: entities
entities:
@@ -70,29 +149,17 @@ cards:
name: Status
- entity: sensor.tesla_since
name: Last Status Change
- - entity: binary_sensor.tesla_healthy
- name: Logger Healthy
- entity: sensor.tesla_version
name: Software Version
- entity: binary_sensor.tesla_update_available
name: Available Update Status
- entity: sensor.tesla_update_version
name: Available Update Version
- - entity: sensor.tesla_geofence
- name: Geo-fence Name
- device_tracker.tesla_location
- - entity: sensor.tesla_shift_state
- name: Shifter State
- entity: sensor.tesla_speed
name: Speed
- entity: sensor.tesla_elevation
name: Elevation
- - entity: binary_sensor.tesla_locked
- name: Locked
- - entity: binary_sensor.tesla_sentry_mode
- name: Sentry Mode Enabled
- - entity: binary_sensor.tesla_windows_open
- name: Windows Open
- entity: binary_sensor.tesla_doors_open
name: Doors Open
- entity: binary_sensor.tesla_trunk_open
@@ -111,18 +178,13 @@ cards:
name: Preconditioning
- entity: sensor.tesla_odometer
name: Odometer
+ - sensor.tesla_miles_per_month
- entity: sensor.tesla_est_battery_range
name: Estimated Battery Range
- entity: sensor.tesla_rated_battery_range
name: Rated Battery Range
- entity: sensor.tesla_ideal_battery_range
name: Ideal Battery Range
- - entity: sensor.tesla_battery_level
- name: Battery Level
- - entity: sensor.tesla_usable_battery_level
- name: Usable Battery Level
- - entity: binary_sensor.tesla_plugged_in
- name: Plugged In
- entity: sensor.tesla_charge_energy_added
name: Charge Energy Added
- entity: sensor.tesla_charge_limit_soc
diff --git a/www/community/lovelace-mushroom/mushroom.js b/www/community/lovelace-mushroom/mushroom.js
index 7445eca4..62947473 100644
--- a/www/community/lovelace-mushroom/mushroom.js
+++ b/www/community/lovelace-mushroom/mushroom.js
@@ -1,173 +1,47 @@
-var t="https://github.com/piitaya/lovelace-mushroom",e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},e(t,i)};function i(t,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}var o=function(){return o=Object.assign||function(t){for(var e,i=1,o=arguments.length;i=0;s--)(n=t[s])&&(a=(r<3?n(a):r>3?n(e,i,a):n(e,i))||a);return r>3&&a&&Object.defineProperty(e,i,a),a}function r(t){var e="function"==typeof Symbol&&Symbol.iterator,i=e&&t[e],o=0;if(i)return i.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&o>=t.length&&(t=void 0),{value:t&&t[o++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}
+var t,e,n,i,o,r,a,l,s,c,d,u,h,p,m,f,v,g,_,y,b,k,x,w,C,E,A,S,O,T,I,z,$,M,j,P,L,D,N,R,U,V,B,F,H,W,Y,K,X,q,G,Z,J,Q,tt,et,nt,it,ot,rt,at,lt,st,ct,dt,ut,ht,pt,mt,ft,vt,gt,_t,yt,bt,kt,xt,wt,Ct,Et,At,St,Ot,Tt,It,zt,$t,Mt,jt,Pt,Lt,Dt,Nt,Rt,Ut,Vt,Bt,Ft,Ht,Wt,Yt,Kt,Xt,qt,Gt,Zt,Jt,Qt,te,ee,ne,ie,oe,re,ae,le,se,ce,de,ue,he,pe,me,fe,ve,ge,_e,ye,be,ke,xe,we,Ce,Ee,Ae,Se,Oe,Te,Ie,ze,$e,Me,je,Pe,Le,De,Ne,Re,Ue,Ve,Be,Fe,He,We,Ye,Ke,Xe,qe,Ge,Ze,Je,Qe,tn,en,nn,on,rn,an,ln,sn,cn,dn,un,hn,pn,mn,fn,vn,gn,_n,yn,bn,kn,xn,wn,Cn,En,An,Sn,On,Tn,In,zn,$n,Mn,jn,Pn,Ln,Dn,Nn,Rn,Un,Vn,Bn,Fn,Hn,Wn,Yn,Kn,Xn,qn,Gn,Zn,Jn,Qn,ti,ei,ni,ii,oi,ri,ai,li,si,ci,di,ui,hi,pi,mi,fi,vi,gi,_i,yi,bi,ki,xi,wi,Ci,Ei,Ai,Si,Oi,Ti,Ii,zi,$i,Mi,ji,Pi,Li,Di,Ni,Ri,Ui,Vi,Bi,Fi,Hi,Wi,Yi,Ki,Xi,qi,Gi,Zi,Ji,Qi,to,eo,no,io,oo,ro,ao,lo,so,co,uo,ho,po,mo,fo,vo,go,_o,yo,bo,ko,xo,wo,Co,Eo,Ao,So,Oo,To,Io,zo,$o,Mo,jo,Po,Lo,Do,No,Ro,Uo,Vo,Bo,Fo,Ho,Wo,Yo,Ko,Xo,qo,Go,Zo,Jo,Qo,tr,er,nr,ir=["message","explanation"];function or(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function rr(t){return vr(t)||pr(t)||Tr(t)||fr()}var ar=gr().mark(Wl);function lr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function sr(t){for(var e=1;e=0;--r){var a=this.tryEntries[r],l=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=i.call(a,"catchLoc"),c=i.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;T(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,i){return this.delegate={iterator:z(e),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=t),v}},e}function _r(t,e,n,i,o,r,a){try{var l=t[r](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(i,o)}function yr(t){return function(){var e=this,n=arguments;return new Promise((function(i,o){var r=t.apply(e,n);function a(t){_r(r,i,o,a,l,"next",t)}function l(t){_r(r,i,o,a,l,"throw",t)}a(void 0)}))}}function br(t,e,n){return e=Sr(e),kr(t,Er()?Reflect.construct(e,n||[],Sr(t).constructor):e.apply(t,n))}function kr(t,e){if(e&&("object"==Pr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return xr(t)}function xr(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function wr(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ar(t,e)}function Cr(t){var e="function"==typeof Map?new Map:void 0;return Cr=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return function(t,e,n){if(Er())return Reflect.construct.apply(null,arguments);var i=[null];i.push.apply(i,e);var o=new(t.bind.apply(t,i));return n&&Ar(o,n.prototype),o}(t,arguments,Sr(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Ar(n,t)},Cr(t)}function Er(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Er=function(){return!!t})()}function Ar(t,e){return Ar=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ar(t,e)}function Sr(t){return Sr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Sr(t)}function Or(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=Tr(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,o=function(){};return{s:o,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){l=!0,r=t},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw r}}}}function Tr(t,e){if(t){if("string"==typeof t)return Ir(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ir(t,e):void 0}}function Ir(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n=0;l--)(o=t[l])&&(a=(r<3?o(a):r>3?o(e,n,a):o(e,n))||a);return r>3&&a&&Object.defineProperty(e,n,a),a}function Vr(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}
/**
* @license
* Copyright 2019 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
- */const a=window,s=a.ShadowRoot&&(void 0===a.ShadyCSS||a.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,l=Symbol(),c=new WeakMap;let d=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==l)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(s&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=c.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&c.set(e,t))}return t}toString(){return this.cssText}};const u=t=>new d("string"==typeof t?t:t+"",void 0,l),h=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[o+1]),t[0]);return new d(i,t,l)},m=s?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return u(e)})(t):t
-/**
- * @license
- * Copyright 2017 Google LLC
- * SPDX-License-Identifier: BSD-3-Clause
- */;var p;const f=window,g=f.trustedTypes,_=g?g.emptyScript:"",v=f.reactiveElementPolyfillSupport,b={toAttribute(t,e){switch(e){case Boolean:t=t?_:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},y=(t,e)=>e!==t&&(e==e||t==t),x={attribute:!0,type:String,converter:b,reflect:!1,hasChanged:y},w="finalized";let k=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;this.finalize(),(null!==(e=this.h)&&void 0!==e?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const o=this._$Ep(i,e);void 0!==o&&(this._$Ev.set(o,i),t.push(o))})),t}static createProperty(t,e=x){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,o=this.getPropertyDescriptor(t,i,e);void 0!==o&&Object.defineProperty(this.prototype,t,o)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(o){const n=this[t];this[e]=o,this.requestUpdate(t,n,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||x}static finalize(){if(this.hasOwnProperty(w))return!1;this[w]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(m(t))}else void 0!==t&&e.push(m(t));return e}static _$Ep(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{s?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),o=a.litNonce;void 0!==o&&i.setAttribute("nonce",o),i.textContent=e.cssText,t.appendChild(i)}))})(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=x){var o;const n=this.constructor._$Ep(t,i);if(void 0!==n&&!0===i.reflect){const r=(void 0!==(null===(o=i.converter)||void 0===o?void 0:o.toAttribute)?i.converter:b).toAttribute(e,i.type);this._$El=t,null==r?this.removeAttribute(n):this.setAttribute(n,r),this._$El=null}}_$AK(t,e){var i;const o=this.constructor,n=o._$Ev.get(t);if(void 0!==n&&this._$El!==n){const t=o.getPropertyOptions(n),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(i=t.converter)||void 0===i?void 0:i.fromAttribute)?t.converter:b;this._$El=n,this[n]=r.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,i){let o=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||y)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,i))):o=!1),!this.isUpdatePending&&o&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$Ek()}catch(t){throw e=!1,this._$Ek(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}};
+ */var Br=globalThis,Fr=Br.ShadowRoot&&(void 0===Br.ShadyCSS||Br.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Hr=Symbol(),Wr=new WeakMap,Yr=function(){return Mr((function t(e,n,i){if(zr(this,t),this._$cssResult$=!0,i!==Hr)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=n}),[{key:"styleSheet",get:function(){var t=this.o,e=this.t;if(Fr&&void 0===t){var n=void 0!==e&&1===e.length;n&&(t=Wr.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&Wr.set(e,t))}return t}},{key:"toString",value:function(){return this.cssText}}])}(),Kr=function(t){return new Yr("string"==typeof t?t:t+"",void 0,Hr)},Xr=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i0&&(this._$Ep=e)}},{key:"createRenderRoot",value:function(){var t,e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return function(t,e){if(Fr)t.adoptedStyleSheets=e.map((function(t){return t instanceof CSSStyleSheet?t:t.styleSheet}));else{var n,i=Or(e);try{for(i.s();!(n=i.n()).done;){var o=n.value,r=document.createElement("style"),a=Br.litNonce;void 0!==a&&r.setAttribute("nonce",a),r.textContent=o.cssText,t.appendChild(r)}}catch(t){i.e(t)}finally{i.f()}}}(e,this.constructor.elementStyles),e}},{key:"connectedCallback",value:function(){var t,e;null!==(t=this.renderRoot)&&void 0!==t||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(e=this._$EO)||void 0===e||e.forEach((function(t){var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}},{key:"enableUpdating",value:function(t){}},{key:"disconnectedCallback",value:function(){var t;null===(t=this._$EO)||void 0===t||t.forEach((function(t){var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}},{key:"attributeChangedCallback",value:function(t,e,n){this._$AK(t,n)}},{key:"_$EC",value:function(t,e){var n=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,n);if(void 0!==i&&!0===n.reflect){var o,r=(void 0!==(null===(o=n.converter)||void 0===o?void 0:o.toAttribute)?n.converter:la).toAttribute(e,n.type);this._$Em=t,null==r?this.removeAttribute(i):this.setAttribute(i,r),this._$Em=null}}},{key:"_$AK",value:function(t,e){var n=this.constructor,i=n._$Eh.get(t);if(void 0!==i&&this._$Em!==i){var o,r=n.getPropertyOptions(i),a="function"==typeof r.converter?{fromAttribute:r.converter}:void 0!==(null===(o=r.converter)||void 0===o?void 0:o.fromAttribute)?r.converter:la;this._$Em=i,this[i]=a.fromAttribute(e,r.type),this._$Em=null}}},{key:"requestUpdate",value:function(t,e,n){if(void 0!==t){var i,o;if(null!==(i=n)&&void 0!==i||(n=this.constructor.getPropertyOptions(t)),!(null!==(o=n.hasChanged)&&void 0!==o?o:sa)(this[t],e))return;this.P(t,e,n)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}},{key:"P",value:function(t,e,n){var i;this._$AL.has(t)||this._$AL.set(t,e),!0===n.reflect&&this._$Em!==t&&(null!==(i=this._$Ej)&&void 0!==i?i:this._$Ej=new Set).add(t)}},{key:"_$ET",value:(n=yr(gr().mark((function t(){var e;return gr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.isUpdatePending=!0,t.prev=1,t.next=4,this._$ES;case 4:t.next=9;break;case 6:t.prev=6,t.t0=t.catch(1),Promise.reject(t.t0);case 9:if(e=this.scheduleUpdate(),t.t1=null!=e,!t.t1){t.next=14;break}return t.next=14,e;case 14:return t.abrupt("return",!this.isUpdatePending);case 15:case"end":return t.stop()}}),t,this,[[1,6]])}))),function(){return n.apply(this,arguments)})},{key:"scheduleUpdate",value:function(){return this.performUpdate()}},{key:"performUpdate",value:function(){if(this.isUpdatePending){if(!this.hasUpdated){var t;if(null!==(t=this.renderRoot)&&void 0!==t||(this.renderRoot=this.createRenderRoot()),this._$Ep){var e,n=Or(this._$Ep);try{for(n.s();!(e=n.n()).done;){var i=mr(e.value,2),o=i[0],r=i[1];this[o]=r}}catch(t){n.e(t)}finally{n.f()}this._$Ep=void 0}var a=this.constructor.elementProperties;if(a.size>0){var l,s=Or(a);try{for(s.s();!(l=s.n()).done;){var c=mr(l.value,2),d=c[0],u=c[1];!0!==u.wrapped||this._$AL.has(d)||void 0===this[d]||this.P(d,this[d],u)}}catch(t){s.e(t)}finally{s.f()}}}var h=!1,p=this._$AL;try{var m;(h=this.shouldUpdate(p))?(this.willUpdate(p),null!==(m=this._$EO)&&void 0!==m&&m.forEach((function(t){var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(p)):this._$EU()}catch(p){throw h=!1,this._$EU(),p}h&&this._$AE(p)}}},{key:"willUpdate",value:function(t){}},{key:"_$AE",value:function(t){var e;null!==(e=this._$EO)&&void 0!==e&&e.forEach((function(t){var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}},{key:"_$EU",value:function(){this._$AL=new Map,this.isUpdatePending=!1}},{key:"updateComplete",get:function(){return this.getUpdateComplete()}},{key:"getUpdateComplete",value:function(){return this._$ES}},{key:"shouldUpdate",value:function(t){return!0}},{key:"update",value:function(t){var e=this;this._$Ej&&(this._$Ej=this._$Ej.forEach((function(t){return e._$EC(t,e[t])}))),this._$EU()}},{key:"updated",value:function(t){}},{key:"firstUpdated",value:function(t){}}],[{key:"addInitializer",value:function(t){var e;this._$Ei(),(null!==(e=this.l)&&void 0!==e?e:this.l=[]).push(t)}},{key:"observedAttributes",get:function(){return this.finalize(),this._$Eh&&hr(this._$Eh.keys())}},{key:"createProperty",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ca;if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){var n=Symbol(),i=this.getPropertyDescriptor(t,n,e);void 0!==i&&Zr(this.prototype,t,i)}}},{key:"getPropertyDescriptor",value:function(t,e,n){var i,o=null!==(i=Jr(this.prototype,t))&&void 0!==i?i:{get:function(){return this[e]},set:function(t){this[e]=t}},r=o.get,a=o.set;return{get:function(){return null==r?void 0:r.call(this)},set:function(e){var i=null==r?void 0:r.call(this);a.call(this,e),this.requestUpdate(t,i,n)},configurable:!0,enumerable:!0}}},{key:"getPropertyOptions",value:function(t){var e;return null!==(e=this.elementProperties.get(t))&&void 0!==e?e:ca}},{key:"_$Ei",value:function(){if(!this.hasOwnProperty(aa("elementProperties"))){var t=ea(this);t.finalize(),void 0!==t.l&&(this.l=hr(t.l)),this.elementProperties=new Map(t.elementProperties)}}},{key:"finalize",value:function(){if(!this.hasOwnProperty(aa("finalized"))){if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(aa("properties"))){var t,e=this.properties,n=Or([].concat(hr(Qr(e)),hr(ta(e))));try{for(n.s();!(t=n.n()).done;){var i=t.value;this.createProperty(i,e[i])}}catch(t){n.e(t)}finally{n.f()}}var o=this[Symbol.metadata];if(null!==o){var r=litPropertyMetadata.get(o);if(void 0!==r){var a,l=Or(r);try{for(l.s();!(a=l.n()).done;){var s=mr(a.value,2),c=s[0],d=s[1];this.elementProperties.set(c,d)}}catch(t){l.e(t)}finally{l.f()}}}this._$Eh=new Map;var u,h=Or(this.elementProperties);try{for(h.s();!(u=h.n()).done;){var p=mr(u.value,2),m=p[0],f=p[1],v=this._$Eu(m,f);void 0!==v&&this._$Eh.set(v,m)}}catch(t){h.e(t)}finally{h.f()}this.elementStyles=this.finalizeStyles(this.styles)}}},{key:"finalizeStyles",value:function(t){var e=[];if(Array.isArray(t)){var n,i=Or(new Set(t.flat(1/0).reverse()));try{for(i.s();!(n=i.n()).done;){var o=n.value;e.unshift(qr(o))}}catch(t){i.e(t)}finally{i.f()}}else void 0!==t&&e.push(qr(t));return e}},{key:"_$Eu",value:function(t,e){var n=e.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof t?t.toLowerCase():void 0}}]);var n}();da.elementStyles=[],da.shadowRootOptions={mode:"open"},da[aa("elementProperties")]=new Map,da[aa("finalized")]=new Map,null!=ra&&ra({ReactiveElement:da}),(null!==(n=na.reactiveElementVersions)&&void 0!==n?n:na.reactiveElementVersions=[]).push("2.0.4");
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
-var C;k[w]=!0,k.elementProperties=new Map,k.elementStyles=[],k.shadowRootOptions={mode:"open"},null==v||v({ReactiveElement:k}),(null!==(p=f.reactiveElementVersions)&&void 0!==p?p:f.reactiveElementVersions=[]).push("1.6.2");const $=window,E=$.trustedTypes,A=E?E.createPolicy("lit-html",{createHTML:t=>t}):void 0,S="$lit$",I=`lit$${(Math.random()+"").slice(9)}$`,T="?"+I,z=`<${T}>`,O=document,M=()=>O.createComment(""),j=t=>null===t||"object"!=typeof t&&"function"!=typeof t,D=Array.isArray,L="[ \t\n\f\r]",P=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,N=/-->/g,R=/>/g,F=RegExp(`>|${L}(?:([^\\s"'>=/]+)(${L}*=${L}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),V=/'/g,B=/"/g,U=/^(?:script|style|textarea|title)$/i,H=t=>(e,...i)=>({_$litType$:t,strings:e,values:i}),Y=H(1),W=H(2),X=Symbol.for("lit-noChange"),K=Symbol.for("lit-nothing"),q=new WeakMap,G=O.createTreeWalker(O,129,null,!1);function Z(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==A?A.createHTML(e):e}const J=(t,e)=>{const i=t.length-1,o=[];let n,r=2===e?"":"")),o]};class Q{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let n=0,r=0;const a=t.length-1,s=this.parts,[l,c]=J(t,e);if(this.el=Q.createElement(l,i),G.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=G.nextNode())&&s.length0){o.textContent=E?E.emptyScript:"";for(let i=0;iD(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==K&&j(this._$AH)?this._$AA.nextSibling.data=t:this.$(O.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:o}=t,n="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=Q.createElement(Z(o.h,o.h[0]),this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===n)this._$AH.v(i);else{const t=new et(n,this),e=t.u(this.options);t.v(i),this.$(e),this._$AH=t}}_$AC(t){let e=q.get(t.strings);return void 0===e&&q.set(t.strings,e=new Q(t)),e}T(t){D(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const n of t)o===e.length?e.push(i=new it(this.k(M()),this.k(M()),this,this.options)):i=e[o],i._$AI(n),o++;o2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=K}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const n=this.strings;let r=!1;if(void 0===n)t=tt(this,t,e,0),r=!j(t)||t!==this._$AH&&t!==X,r&&(this._$AH=t);else{const o=t;let a,s;for(t=n[0],a=0;a"),_a=document,ya=function(){return _a.createComment("")},ba=function(t){return null===t||"object"!=Pr(t)&&"function"!=typeof t},ka=Array.isArray,xa="[ \t\n\f\r]",wa=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ca=/-->/g,Ea=/>/g,Aa=RegExp(">|".concat(xa,"(?:([^\\s\"'>=/]+)(").concat(xa,"*=").concat(xa,"*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)"),"g"),Sa=/'/g,Oa=/"/g,Ta=/^(?:script|style|textarea|title)$/i,Ia=function(t){return function(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o":3===e?"":"")),o]}(o,r),u=mr(d,2),h=u[0],p=u[1];if(this.el=t.createElement(h,n),La.currentNode=this.el.content,2===r||3===r){var m=this.el.content.firstChild;m.replaceWith.apply(m,hr(m.childNodes))}for(;null!==(i=La.nextNode())&&c.length0){i.textContent=ha?ha.emptyScript:"";for(var w=0;w2&&void 0!==arguments[2]?arguments[2]:t,s=arguments.length>3?arguments[3]:void 0;if(e===Ma)return e;var c=void 0!==s?null===(n=l._$Co)||void 0===n?void 0:n[s]:l._$Cl,d=ba(e)?void 0:e._$litDirective$;return(null===(i=c)||void 0===i?void 0:i.constructor)!==d&&(null!==(o=c)&&void 0!==o&&null!==(r=o._$AO)&&void 0!==r&&r.call(o,!1),void 0===d?c=void 0:(c=new d(t))._$AT(t,l,s),void 0!==s?(null!==(a=l._$Co)&&void 0!==a?a:l._$Co=[])[s]=c:l._$Cl=c),void 0!==c&&(e=Ra(t,c._$AS(t,e.values),c,s)),e}var Ua=function(){return Mr((function t(e,n){zr(this,t),this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=n}),[{key:"parentNode",get:function(){return this._$AM.parentNode}},{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"u",value:function(t){var e,n=this._$AD,i=n.el.content,o=n.parts,r=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:_a).importNode(i,!0);La.currentNode=r;for(var a=La.nextNode(),l=0,s=0,c=o[0];void 0!==c;){var d;if(l===c.index){var u=void 0;2===c.type?u=new Va(a,a.nextSibling,this,t):1===c.type?u=new c.ctor(a,c.name,c.strings,this,t):6===c.type&&(u=new Ya(a,this,t)),this._$AV.push(u),c=o[++s]}l!==(null===(d=c)||void 0===d?void 0:d.index)&&(a=La.nextNode(),l++)}return La.currentNode=_a,r}},{key:"p",value:function(t){var e,n=0,i=Or(this._$AV);try{for(i.s();!(e=i.n()).done;){var o=e.value;void 0!==o&&(void 0!==o.strings?(o._$AI(t,o,n),n+=o.strings.length-2):o._$AI(t[n])),n++}}catch(t){i.e(t)}finally{i.f()}}}])}(),Va=function(){function t(e,n,i,o){var r;zr(this,t),this.type=2,this._$AH=ja,this._$AN=void 0,this._$AA=e,this._$AB=n,this._$AM=i,this.options=o,this._$Cv=null===(r=null==o?void 0:o.isConnected)||void 0===r||r}return Mr(t,[{key:"_$AU",get:function(){var t,e;return null!==(t=null===(e=this._$AM)||void 0===e?void 0:e._$AU)&&void 0!==t?t:this._$Cv}},{key:"parentNode",get:function(){var t,e=this._$AA.parentNode,n=this._$AM;return void 0!==n&&11===(null===(t=e)||void 0===t?void 0:t.nodeType)&&(e=n.parentNode),e}},{key:"startNode",get:function(){return this._$AA}},{key:"endNode",get:function(){return this._$AB}},{key:"_$AI",value:function(t){t=Ra(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this),ba(t)?t===ja||null==t||""===t?(this._$AH!==ja&&this._$AR(),this._$AH=ja):t!==this._$AH&&t!==Ma&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):function(t){return ka(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator])}(t)?this.k(t):this._(t)}},{key:"O",value:function(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}},{key:"T",value:function(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}},{key:"_",value:function(t){this._$AH!==ja&&ba(this._$AH)?this._$AA.nextSibling.data=t:this.T(_a.createTextNode(t)),this._$AH=t}},{key:"$",value:function(t){var e,n=t.values,i=t._$litType$,o="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=Na.createElement(Da(i.h,i.h[0]),this.options)),i);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===o)this._$AH.p(n);else{var r=new Ua(o,this),a=r.u(this.options);r.p(n),this.T(a),this._$AH=r}}},{key:"_$AC",value:function(t){var e=Pa.get(t.strings);return void 0===e&&Pa.set(t.strings,e=new Na(t)),e}},{key:"k",value:function(e){ka(this._$AH)||(this._$AH=[],this._$AR());var n,i,o=this._$AH,r=0,a=Or(e);try{for(a.s();!(i=a.n()).done;){var l=i.value;r===o.length?o.push(n=new t(this.O(ya()),this.O(ya()),this,this.options)):n=o[r],n._$AI(l),r++}}catch(t){a.e(t)}finally{a.f()}r0&&void 0!==arguments[0]?arguments[0]:this._$AA.nextSibling,e=arguments.length>1?arguments[1]:void 0;for(null===(n=this._$AP)||void 0===n||n.call(this,!1,!0,e);t&&t!==this._$AB;){var n,i=t.nextSibling;t.remove(),t=i}}},{key:"setConnected",value:function(t){var e;void 0===this._$AM&&(this._$Cv=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}])}(),Ba=function(){return Mr((function t(e,n,i,o,r){zr(this,t),this.type=1,this._$AH=ja,this._$AN=void 0,this.element=e,this.name=n,this._$AM=o,this.options=r,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=ja}),[{key:"tagName",get:function(){return this.element.tagName}},{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AI",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=this.strings,r=!1;if(void 0===o)t=Ra(this,t,e,0),(r=!ba(t)||t!==this._$AH&&t!==Ma)&&(this._$AH=t);else{var a,l,s=t;for(t=o[0],a=0;a1&&void 0!==arguments[1]?arguments[1]:this,0))&&void 0!==e?e:ja)!==Ma){var n=this._$AH,i=t===ja&&n!==ja||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,o=t!==ja&&(n===ja||i);i&&this.element.removeEventListener(this.name,this,n),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}}},{key:"handleEvent",value:function(t){var e,n;"function"==typeof this._$AH?this._$AH.call(null!==(e=null===(n=this.options)||void 0===n?void 0:n.host)&&void 0!==e?e:this.element,t):this._$AH.handleEvent(t)}}])}(),Ya=function(){return Mr((function t(e,n,i){zr(this,t),this.element=e,this.type=6,this._$AN=void 0,this._$AM=n,this.options=i}),[{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AI",value:function(t){Ra(this,t)}}])}(),Ka=ua.litHtmlPolyfillSupport;null!=Ka&&Ka(Na,Va),(null!==(i=ua.litHtmlVersions)&&void 0!==i?i:ua.litHtmlVersions=[]).push("3.2.1");var Xa=function(t){function e(){var t;return zr(this,e),(t=br(this,e,arguments)).renderOptions={host:xr(t)},t._$Do=void 0,t}return wr(e,da),Mr(e,[{key:"createRenderRoot",value:function(){var t,n,i=dr(e,"createRenderRoot",this,3)([]);return null!==(n=(t=this.renderOptions).renderBefore)&&void 0!==n||(t.renderBefore=i.firstChild),i}},{key:"update",value:function(t){var n=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),dr(e,"update",this,3)([t]),this._$Do=function(t,e,n){var i,o=null!==(i=null==n?void 0:n.renderBefore)&&void 0!==i?i:e,r=o._$litPart$;if(void 0===r){var a,l=null!==(a=null==n?void 0:n.renderBefore)&&void 0!==a?a:null;o._$litPart$=r=new Va(e.insertBefore(ya(),l),l,void 0,null!=n?n:{})}return r._$AI(t),r}(n,this.renderRoot,this.renderOptions)}},{key:"connectedCallback",value:function(){var t;dr(e,"connectedCallback",this,3)([]),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}},{key:"disconnectedCallback",value:function(){var t;dr(e,"disconnectedCallback",this,3)([]),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}},{key:"render",value:function(){return Ma}}])}();
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
- */
-var dt,ut;let ht=class extends k{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{var o,n;const r=null!==(o=null==i?void 0:i.renderBefore)&&void 0!==o?o:e;let a=r._$litPart$;if(void 0===a){const t=null!==(n=null==i?void 0:i.renderBefore)&&void 0!==n?n:null;r._$litPart$=a=new it(e.insertBefore(M(),t),t,void 0,null!=i?i:{})}return a._$AI(t),a})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return X}};ht.finalized=!0,ht._$litElement$=!0,null===(dt=globalThis.litElementHydrateSupport)||void 0===dt||dt.call(globalThis,{LitElement:ht});const mt=globalThis.litElementPolyfillSupport;null==mt||mt({LitElement:ht}),(null!==(ut=globalThis.litElementVersions)&&void 0!==ut?ut:globalThis.litElementVersions=[]).push("3.3.2");
+ */Xa._$litElement$=!0,Xa.finalized=!0,null===(o=globalThis.litElementHydrateSupport)||void 0===o||o.call(globalThis,{LitElement:Xa});var qa=globalThis.litElementPolyfillSupport;null==qa||qa({LitElement:Xa}),(null!==(r=globalThis.litElementVersions)&&void 0!==r?r:globalThis.litElementVersions=[]).push("4.1.1");
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
-const pt=t=>e=>"function"==typeof e?((t,e)=>(customElements.define(t,e),e))(t,e):((t,e)=>{const{kind:i,elements:o}=e;return{kind:i,elements:o,finisher(e){customElements.define(t,e)}}})(t,e)
-/**
- * @license
- * Copyright 2017 Google LLC
- * SPDX-License-Identifier: BSD-3-Clause
- */,ft=(t,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(i){i.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(i){i.createProperty(e.key,t)}},gt=(t,e,i)=>{e.constructor.createProperty(i,t)};function _t(t){return(e,i)=>void 0!==i?gt(t,e,i):ft(t,e)}
+var Ga=function(t){return function(e,n){void 0!==n?n.addInitializer((function(){customElements.define(t,e)})):customElements.define(t,e)}},Za={attribute:!0,type:String,converter:la,reflect:!1,hasChanged:sa},Ja=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Za,e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,i=n.kind,o=n.metadata,r=globalThis.litPropertyMetadata.get(o);if(void 0===r&&globalThis.litPropertyMetadata.set(o,r=new Map),r.set(n.name,t),"accessor"===i){var a=n.name;return{set:function(n){var i=e.get.call(this);e.set.call(this,n),this.requestUpdate(a,i,t)},init:function(e){return void 0!==e&&this.P(a,void 0,t),e}}}if("setter"===i){var l=n.name;return function(n){var i=this[l];e.call(this,n),this.requestUpdate(l,i,t)}}throw Error("Unsupported decorator location: "+i)};
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
- */function vt(t){return _t({...t,state:!0})}
+ */function Qa(t){return function(e,n){return"object"==Pr(n)?Ja(t,e,n):function(t,e,n){var i=e.hasOwnProperty(n);return e.constructor.createProperty(n,i?sr(sr({},t),{},{wrapped:!0}):t),i?Object.getOwnPropertyDescriptor(e,n):void 0}(t,e,n)}}
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
- */const bt=({finisher:t,descriptor:e})=>(i,o)=>{var n;if(void 0===o){const o=null!==(n=i.originalKey)&&void 0!==n?n:i.key,r=null!=e?{kind:"method",placement:"prototype",key:o,descriptor:e(i.key)}:{...i,key:o};return null!=t&&(r.finisher=function(e){t(e,o)}),r}{const n=i.constructor;void 0!==e&&Object.defineProperty(i,o,e(o)),null==t||t(n,o)}}
+ */function tl(t){return Qa(sr(sr({},t),{},{state:!0,attribute:!1}))}
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
- */;function yt(t){return bt({finisher:(e,i)=>{Object.assign(e.prototype[i],t)}})}
-/**
- * @license
- * Copyright 2017 Google LLC
- * SPDX-License-Identifier: BSD-3-Clause
- */function xt(t,e){return bt({descriptor:e=>{const i={get(){var e,i;return null!==(i=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(t))&&void 0!==i?i:null},enumerable:!0,configurable:!0};return i}})}
-/**
- * @license
- * Copyright 2021 Google LLC
- * SPDX-License-Identifier: BSD-3-Clause
- */var wt;null===(wt=window.HTMLSlotElement)||void 0===wt||wt.prototype.assignedElements;var kt,Ct,$t,Et,At,St=Number.isNaN||function(t){return"number"==typeof t&&t!=t};function It(t,e){if(t.length!==e.length)return!1;for(var i=0;inew Intl.DateTimeFormat(t.language,{weekday:"long",month:"long",day:"numeric",timeZone:"server"===t.time_zone?e:void 0})));const zt=Tt(((t,e)=>new Intl.DateTimeFormat(t.language,{year:"numeric",month:"long",day:"numeric",timeZone:"server"===t.time_zone?e:void 0})));Tt(((t,e)=>{const i=t.date_format===Et.system?void 0:t.language;return t.date_format===Et.language||(t.date_format,Et.system),new Intl.DateTimeFormat(i,{year:"numeric",month:"numeric",day:"numeric",timeZone:"server"===t.time_zone?e:void 0})})),Tt(((t,e)=>new Intl.DateTimeFormat(t.language,{day:"numeric",month:"short",timeZone:"server"===t.time_zone?e:void 0}))),Tt(((t,e)=>new Intl.DateTimeFormat(t.language,{month:"long",year:"numeric",timeZone:"server"===t.time_zone?e:void 0}))),Tt(((t,e)=>new Intl.DateTimeFormat(t.language,{month:"long",timeZone:"server"===t.time_zone?e:void 0}))),Tt(((t,e)=>new Intl.DateTimeFormat(t.language,{year:"numeric",timeZone:"server"===t.time_zone?e:void 0}))),Tt(((t,e)=>new Intl.DateTimeFormat(t.language,{weekday:"long",timeZone:"server"===t.time_zone?e:void 0}))),Tt(((t,e)=>new Intl.DateTimeFormat(t.language,{weekday:"short",timeZone:"server"===t.time_zone?e:void 0})));const Ot=Tt((t=>{if(t.time_format===Ct.language||t.time_format===Ct.system){const e=t.time_format===Ct.language?t.language:void 0,i=(new Date).toLocaleString(e);return i.includes("AM")||i.includes("PM")}return t.time_format===Ct.am_pm})),Mt=Tt(((t,e)=>new Intl.DateTimeFormat("en"!==t.language||Ot(t)?t.language:"en-u-hc-h23",{hour:"numeric",minute:"2-digit",hour12:Ot(t),timeZone:"server"===t.time_zone?e:void 0})));Tt(((t,e)=>new Intl.DateTimeFormat("en"!==t.language||Ot(t)?t.language:"en-u-hc-h23",{hour:Ot(t)?"numeric":"2-digit",minute:"2-digit",second:"2-digit",hour12:Ot(t),timeZone:"server"===t.time_zone?e:void 0}))),Tt(((t,e)=>new Intl.DateTimeFormat("en"!==t.language||Ot(t)?t.language:"en-u-hc-h23",{weekday:"long",hour:Ot(t)?"numeric":"2-digit",minute:"2-digit",hour12:Ot(t),timeZone:"server"===t.time_zone?e:void 0}))),Tt(((t,e)=>new Intl.DateTimeFormat("en-GB",{hour:"numeric",minute:"2-digit",hour12:!1,timeZone:"server"===t.time_zone?e:void 0})));const jt=(t,e,i)=>Dt(e,i.time_zone).format(t),Dt=Tt(((t,e)=>new Intl.DateTimeFormat("en"!==t.language||Ot(t)?t.language:"en-u-hc-h23",{year:"numeric",month:"long",day:"numeric",hour:Ot(t)?"numeric":"2-digit",minute:"2-digit",hour12:Ot(t),timeZone:"server"===t.time_zone?e:void 0})));Tt(((t,e)=>new Intl.DateTimeFormat("en"!==t.language||Ot(t)?t.language:"en-u-hc-h23",{year:"numeric",month:"short",day:"numeric",hour:Ot(t)?"numeric":"2-digit",minute:"2-digit",hour12:Ot(t),timeZone:"server"===t.time_zone?e:void 0}))),Tt(((t,e)=>new Intl.DateTimeFormat("en"!==t.language||Ot(t)?t.language:"en-u-hc-h23",{month:"short",day:"numeric",hour:Ot(t)?"numeric":"2-digit",minute:"2-digit",hour12:Ot(t),timeZone:"server"===t.time_zone?e:void 0}))),Tt(((t,e)=>new Intl.DateTimeFormat("en"!==t.language||Ot(t)?t.language:"en-u-hc-h23",{year:"numeric",month:"long",day:"numeric",hour:Ot(t)?"numeric":"2-digit",minute:"2-digit",second:"2-digit",hour12:Ot(t),timeZone:"server"===t.time_zone?e:void 0})));const Lt=(t,e,i,o)=>{o=o||{},i=null==i?{}:i;const n=new Event(e,{bubbles:void 0===o.bubbles||o.bubbles,cancelable:Boolean(o.cancelable),composed:void 0===o.composed||o.composed});return n.detail=i,t.dispatchEvent(n),n},Pt=t=>t.substr(0,t.indexOf(".")),Nt="unavailable",Rt="unknown",Ft="off",Vt=[Nt,Rt,Ft];function Bt(t){const e=Pt(t.entity_id),i=t.state;if(["button","input_button","scene"].includes(e))return i!==Nt;if(Vt.includes(i))return!1;switch(e){case"cover":case"valve":return!["closed","closing"].includes(i);case"device_tracker":case"person":return"not_home"!==i;case"media_player":return"standby"!==i;case"vacuum":return!["idle","docked","paused"].includes(i);case"plant":return"problem"===i;default:return!0}}function Ut(t){return t.state!==Nt}function Ht(t){return t.state===Ft}function Yt(t){return t.attributes.entity_picture_local||t.attributes.entity_picture}const Wt=(t,e)=>Xt(t.attributes,e),Xt=(t,e)=>0!=(t.supported_features&e);Tt((t=>new Intl.Collator(t))),Tt((t=>new Intl.Collator(t,{sensitivity:"accent"})));const Kt=t=>Xt(t,4)&&"number"==typeof t.in_progress,qt=t=>(t=>Kt(t.attributes))(t)||!!t.attributes.in_progress,Gt=(t,e=2)=>{let i=""+t;for(let t=1;tfunction(t){const e=Math.floor(t/1e3/3600),i=Math.floor(t/1e3%3600/60),o=Math.floor(t/1e3%3600%60),n=Math.floor(t%1e3);return e>0?`${e}:${Gt(i)}:${Gt(o)}`:i>0?`${i}:${Gt(o)}`:o>0||n>0?`${o}${n>0?`.${Gt(n,3)}`:""}`:null}(parseFloat(t)*Zt[e])||"0",Qt=(t,e=2)=>Math.round(t*10**e)/10**e,te=(t,e,i)=>{const o=e?(t=>{switch(t.number_format){case kt.comma_decimal:return["en-US","en"];case kt.decimal_comma:return["de","es","it"];case kt.space_comma:return["fr","sv","cs"];case kt.system:return;default:return t.language}})(e):void 0;if(Number.isNaN=Number.isNaN||function t(e){return"number"==typeof e&&t(e)},(null==e?void 0:e.number_format)!==kt.none&&!Number.isNaN(Number(t))&&Intl)try{return new Intl.NumberFormat(o,ie(t,i)).format(Number(t))}catch(e){return console.error(e),new Intl.NumberFormat(void 0,ie(t,i)).format(Number(t))}return"string"==typeof t?t:`${Qt(t,null==i?void 0:i.maximumFractionDigits).toString()}${"currency"===(null==i?void 0:i.style)?` ${i.currency}`:""}`},ee=(t,e)=>{var i;const o=null==e?void 0:e.display_precision;return null!=o?{maximumFractionDigits:o,minimumFractionDigits:o}:Number.isInteger(Number(null===(i=t.attributes)||void 0===i?void 0:i.step))&&Number.isInteger(Number(t.state))?{maximumFractionDigits:0}:null!=t.attributes.step?{maximumFractionDigits:Math.ceil(Math.log10(1/t.attributes.step))}:void 0},ie=(t,e)=>{const i=Object.assign({maximumFractionDigits:2},e);if("string"!=typeof t)return i;if(!e||void 0===e.minimumFractionDigits&&void 0===e.maximumFractionDigits){const e=t.indexOf(".")>-1?t.split(".")[1].length:0;i.minimumFractionDigits=e,i.maximumFractionDigits=e}return i},oe=t=>{switch(t.language){case"cz":case"de":case"fi":case"fr":case"sk":case"sv":return" ";default:return""}},ne=(t,e,i,o,n,r)=>{const a=n[e.entity_id];return re(t,i,o,a,e.entity_id,e.attributes,void 0!==r?r:e.state)},re=(t,e,i,o,n,r,a)=>{var s;if(a===Rt||a===Nt)return t(`state.default.${a}`);if((t=>!!t.unit_of_measurement||!!t.state_class)(r)){if("duration"===r.device_class&&r.unit_of_measurement&&Zt[r.unit_of_measurement])try{return Jt(a,r.unit_of_measurement)}catch(t){}if("monetary"===r.device_class)try{return te(a,e,Object.assign({style:"currency",currency:r.unit_of_measurement,minimumFractionDigits:2},ee({state:a,attributes:r},o)))}catch(t){}const t=r.unit_of_measurement?"%"===r.unit_of_measurement?oe(e)+"%":` ${r.unit_of_measurement}`:"";return`${te(a,e,ee({state:a,attributes:r},o))}${t}`}const l=Pt(n);if("datetime"===l){const t=new Date(a);return jt(t,e,i)}if(["date","input_datetime","time"].includes(l))try{const t=a.split(" ");if(2===t.length)return jt(new Date(t.join("T")),Object.assign(Object.assign({},e),{time_zone:$t.local}),i);if(1===t.length){if(a.includes("-"))return((t,e,i)=>zt(e,i.time_zone).format(t))(new Date(`${a}T00:00`),Object.assign(Object.assign({},e),{time_zone:$t.local}),i);if(a.includes(":")){const t=new Date;return((t,e,i)=>Mt(e,i.time_zone).format(t))(new Date(`${t.toISOString().split("T")[0]}T${a}`),Object.assign(Object.assign({},e),{time_zone:$t.local}),i)}}return a}catch(t){return a}if("counter"===l||"number"===l||"input_number"===l)return te(a,e,ee({state:a,attributes:r},o));if(["button","event","input_button","scene","stt","tts"].includes(l)||"sensor"===l&&"timestamp"===r.device_class)try{return jt(new Date(a),e,i)}catch(t){return a}return"update"===l?"on"===a?(t=>Kt(t)||!!t.in_progress)(r)?Xt(r,4)&&"number"==typeof r.in_progress?t("ui.card.update.installing_with_progress",{progress:r.in_progress}):t("ui.card.update.installing"):r.latest_version:r.skipped_version===r.latest_version?null!==(s=r.latest_version)&&void 0!==s?s:t("state.default.unavailable"):t("ui.card.update.up_to_date"):(null==o?void 0:o.translation_key)&&t(`component.${o.platform}.entity.${l}.${o.translation_key}.state.${a}`)||r.device_class&&t(`component.${l}.entity_component.${r.device_class}.state.${a}`)||t(`component.${l}.entity_component._.state.${a}`)||a};class ae extends TypeError{constructor(t,e){let i;const{message:o,...n}=t,{path:r}=t;super(0===r.length?o:"At path: "+r.join(".")+" -- "+o),this.value=void 0,this.key=void 0,this.type=void 0,this.refinement=void 0,this.path=void 0,this.branch=void 0,this.failures=void 0,Object.assign(this,n),this.name=this.constructor.name,this.failures=()=>{var o;return null!=(o=i)?o:i=[t,...e()]}}}function se(t){return"object"==typeof t&&null!=t}function le(t){return"string"==typeof t?JSON.stringify(t):""+t}function ce(t,e,i,o){if(!0===t)return;!1===t?t={}:"string"==typeof t&&(t={message:t});const{path:n,branch:r}=e,{type:a}=i,{refinement:s,message:l="Expected a value of type `"+a+"`"+(s?" with refinement `"+s+"`":"")+", but received: `"+le(o)+"`"}=t;return{value:o,type:a,refinement:s,key:n[n.length-1],path:n,branch:r,...t,message:l}}function*de(t,e,i,o){(function(t){return se(t)&&"function"==typeof t[Symbol.iterator]})(t)||(t=[t]);for(const n of t){const t=ce(n,e,i,o);t&&(yield t)}}function*ue(t,e,i){void 0===i&&(i={});const{path:o=[],branch:n=[t],coerce:r=!1,mask:a=!1}=i,s={path:o,branch:n};if(r&&(t=e.coercer(t,s),a&&"type"!==e.type&&se(e.schema)&&se(t)&&!Array.isArray(t)))for(const i in t)void 0===e.schema[i]&&delete t[i];let l=!0;for(const i of e.validator(t,s))l=!1,yield[i,void 0];for(let[i,c,d]of e.entries(t,s)){const e=ue(c,d,{path:void 0===i?o:[...o,i],branch:void 0===i?n:[...n,c],coerce:r,mask:a});for(const o of e)o[0]?(l=!1,yield[o[0],void 0]):r&&(c=o[1],void 0===i?t=c:t instanceof Map?t.set(i,c):t instanceof Set?t.add(c):se(t)&&(t[i]=c))}if(l)for(const i of e.refiner(t,s))l=!1,yield[i,void 0];l&&(yield[void 0,t])}class he{constructor(t){this.TYPE=void 0,this.type=void 0,this.schema=void 0,this.coercer=void 0,this.validator=void 0,this.refiner=void 0,this.entries=void 0;const{type:e,schema:i,validator:o,refiner:n,coercer:r=(t=>t),entries:a=function*(){}}=t;this.type=e,this.schema=i,this.entries=a,this.coercer=r,this.validator=o?(t,e)=>de(o(t,e),e,this,t):()=>[],this.refiner=n?(t,e)=>de(n(t,e),e,this,t):()=>[]}assert(t){return me(t,this)}create(t){return function(t,e){const i=pe(t,e,{coerce:!0});if(i[0])throw i[0];return i[1]}(t,this)}is(t){return function(t,e){const i=pe(t,e);return!i[0]}(t,this)}mask(t){return function(t,e){const i=pe(t,e,{coerce:!0,mask:!0});if(i[0])throw i[0];return i[1]}(t,this)}validate(t,e){return void 0===e&&(e={}),pe(t,this,e)}}function me(t,e){const i=pe(t,e);if(i[0])throw i[0]}function pe(t,e,i){void 0===i&&(i={});const o=ue(t,e,i),n=function(t){const{done:e,value:i}=t.next();return e?void 0:i}(o);if(n[0]){const t=new ae(n[0],(function*(){for(const t of o)t[0]&&(yield t[0])}));return[t,void 0]}return[void 0,n[1]]}function fe(){for(var t=arguments.length,e=new Array(t),i=0;it.schema)),r=Object.assign({},...n);return o?Ae(r):Ce(r)}function ge(t,e){return new he({type:t,schema:null,validator:e})}function _e(t){return new he({type:"dynamic",schema:null,*entries(e,i){const o=t(e,i);yield*o.entries(e,i)},validator:(e,i)=>t(e,i).validator(e,i),coercer:(e,i)=>t(e,i).coercer(e,i),refiner:(e,i)=>t(e,i).refiner(e,i)})}function ve(){return ge("any",(()=>!0))}function be(t){return new he({type:"array",schema:t,*entries(e){if(t&&Array.isArray(e))for(const[i,o]of e.entries())yield[i,o,t]},coercer:t=>Array.isArray(t)?t.slice():t,validator:t=>Array.isArray(t)||"Expected an array value, but received: "+le(t)})}function ye(){return ge("boolean",(t=>"boolean"==typeof t))}function xe(t){const e={},i=t.map((t=>le(t))).join();for(const i of t)e[i]=i;return new he({type:"enums",schema:e,validator:e=>t.includes(e)||"Expected one of `"+i+"`, but received: "+le(e)})}function we(t){const e=le(t),i=typeof t;return new he({type:"literal",schema:"string"===i||"number"===i||"boolean"===i?t:null,validator:i=>i===t||"Expected the literal `"+e+"`, but received: "+le(i)})}function ke(){return ge("number",(t=>"number"==typeof t&&!isNaN(t)||"Expected a number, but received: "+le(t)))}function Ce(t){const e=t?Object.keys(t):[],i=ge("never",(()=>!1));return new he({type:"object",schema:t||null,*entries(o){if(t&&se(o)){const n=new Set(Object.keys(o));for(const i of e)n.delete(i),yield[i,o[i],t[i]];for(const t of n)yield[t,o[t],i]}},validator:t=>se(t)||"Expected an object, but received: "+le(t),coercer:t=>se(t)?{...t}:t})}function $e(t){return new he({...t,validator:(e,i)=>void 0===e||t.validator(e,i),refiner:(e,i)=>void 0===e||t.refiner(e,i)})}function Ee(){return ge("string",(t=>"string"==typeof t||"Expected a string, but received: "+le(t)))}function Ae(t){const e=Object.keys(t);return new he({type:"type",schema:t,*entries(i){if(se(i))for(const o of e)yield[o,i[o],t[o]]},validator:t=>se(t)||"Expected an object, but received: "+le(t)})}function Se(t){const e=t.map((t=>t.type)).join(" | ");return new he({type:"union",schema:null,coercer(e,i){const o=t.find((t=>{const[i]=t.validate(e,{coerce:!0});return!i}))||ge("unknown",(()=>!0));return o.coercer(e,i)},validator(i,o){const n=[];for(const e of t){const[...t]=ue(i,e,o),[r]=t;if(!r[0])return[];for(const[e]of t)e&&n.push(e)}return["Expected the value to satisfy a union of `"+e+"`, but received: "+le(i),...n]}})}function Ie(t){const e=t.language||"en";return t.translationMetadata.translations[e]&&t.translationMetadata.translations[e].isRTL||!1}const Te=(t,e,i=!1)=>{let o;const n=(...n)=>{const r=i&&!o;clearTimeout(o),o=window.setTimeout((()=>{o=void 0,i||t(...n)}),e),r&&t(...n)};return n.cancel=()=>{clearTimeout(o)},n},ze=(t,e)=>{if(t===e)return!0;if(t&&e&&"object"==typeof t&&"object"==typeof e){if(t.constructor!==e.constructor)return!1;let i,o;if(Array.isArray(t)){if(o=t.length,o!==e.length)return!1;for(i=o;0!=i--;)if(!ze(t[i],e[i]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;for(i of t.entries())if(!ze(i[1],e.get(i[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(e)){if(o=t.length,o!==e.length)return!1;for(i=o;0!=i--;)if(t[i]!==e[i])return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();const n=Object.keys(t);if(o=n.length,o!==Object.keys(e).length)return!1;for(i=o;0!=i--;)if(!Object.prototype.hasOwnProperty.call(e,n[i]))return!1;for(i=o;0!=i--;){const o=n[i];if(!ze(t[o],e[o]))return!1}return!0}return t!=t&&e!=e},Oe=()=>new Promise((t=>{var e;e=t,requestAnimationFrame((()=>setTimeout(e,0)))})),Me={auto:1,heat_cool:2,heat:3,cool:4,dry:5,fan_only:6,off:7},je=(t,e)=>Me[t]-Me[e];const De=["hs","xy","rgb","rgbw","rgbww"],Le=[...De,"color_temp","brightness","white"],Pe=16384,Ne="returning",Re=8192,Fe=(t,e,i)=>t.subscribeMessage((t=>e(t)),Object.assign({type:"render_template"},i))
+ */
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
- */,Ve=1,Be=3,Ue=4,He=t=>(...e)=>({_$litDirective$:t,values:e});let Ye=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};const We=(t,e)=>{const i=(()=>{const t=document.body;if(t.querySelector("action-handler"))return t.querySelector("action-handler");const e=document.createElement("action-handler");return t.appendChild(e),e})();i&&i.bind(t,e)},Xe=He(class extends Ye{update(t,[e]){return We(t.element,e),X}render(t){}}),Ke=async(t,e,i,o)=>{Lt(t,"hass-action",{config:i,action:o})};function qe(t){return void 0!==t&&"none"!==t.action}const Ge=Ce({user:Ee()}),Ze=Se([ye(),Ce({text:$e(Ee()),excemptions:$e(be(Ge))})]),Je=Ce({action:we("url"),url_path:Ee(),confirmation:$e(Ze)}),Qe=Ce({action:xe(["call-service","perform-action"]),service:$e(Ee()),perform_action:$e(Ee()),service_data:$e(Ce()),data:$e(Ce()),target:$e(Ce({entity_id:$e(Se([Ee(),be(Ee())])),device_id:$e(Se([Ee(),be(Ee())])),area_id:$e(Se([Ee(),be(Ee())])),floor_id:$e(Se([Ee(),be(Ee())])),label_id:$e(Se([Ee(),be(Ee())]))})),confirmation:$e(Ze)}),ti=Ce({action:we("navigate"),navigation_path:Ee(),confirmation:$e(Ze)}),ei=Ae({action:we("assist"),pipeline_id:$e(Ee()),start_listening:$e(ye())}),ii=Ae({action:we("fire-dom-event")}),oi=Ce({action:xe(["none","toggle","more-info","call-service","perform-action","url","navigate","assist"]),confirmation:$e(Ze)}),ni=_e((t=>{if(t&&"object"==typeof t&&"action"in t)switch(t.action){case"call-service":case"perform-action":return Qe;case"fire-dom-event":return ii;case"navigate":return ti;case"url":return Je;case"assist":return ei}return oi})),ri=h`
- #sortable a:nth-of-type(2n) paper-icon-item {
- animation-name: keyframes1;
- animation-iteration-count: infinite;
- transform-origin: 50% 10%;
- animation-delay: -0.75s;
- animation-duration: 0.25s;
- }
-
- #sortable a:nth-of-type(2n-1) paper-icon-item {
- animation-name: keyframes2;
- animation-iteration-count: infinite;
- animation-direction: alternate;
- transform-origin: 30% 5%;
- animation-delay: -0.5s;
- animation-duration: 0.33s;
- }
-
- #sortable a {
- height: 48px;
- display: flex;
- }
-
- #sortable {
- outline: none;
- display: block !important;
- }
-
- .hidden-panel {
- display: flex !important;
- }
-
- .sortable-fallback {
- display: none;
- }
-
- .sortable-ghost {
- opacity: 0.4;
- }
-
- .sortable-fallback {
- opacity: 0;
- }
-
- @keyframes keyframes1 {
- 0% {
- transform: rotate(-1deg);
- animation-timing-function: ease-in;
- }
-
- 50% {
- transform: rotate(1.5deg);
- animation-timing-function: ease-out;
- }
- }
-
- @keyframes keyframes2 {
- 0% {
- transform: rotate(1deg);
- animation-timing-function: ease-in;
- }
-
- 50% {
- transform: rotate(-1.5deg);
- animation-timing-function: ease-out;
- }
- }
-
- .show-panel,
- .hide-panel {
- display: none;
- position: absolute;
- top: 0;
- right: 4px;
- --mdc-icon-button-size: 40px;
- }
-
- :host([rtl]) .show-panel {
- right: initial;
- left: 4px;
- }
-
- .hide-panel {
- top: 4px;
- right: 8px;
- }
-
- :host([rtl]) .hide-panel {
- right: initial;
- left: 8px;
- }
-
- :host([expanded]) .hide-panel {
- display: block;
- }
-
- :host([expanded]) .show-panel {
- display: inline-flex;
- }
-
- paper-icon-item.hidden-panel,
- paper-icon-item.hidden-panel span,
- paper-icon-item.hidden-panel ha-icon[slot="item-icon"] {
- color: var(--secondary-text-color);
- cursor: pointer;
- }
-`,ai=(t,e,i,o)=>{const[n,r,a]=t.split(".",3);return Number(n)>e||Number(n)===e&&Number(r)>=i||void 0!==o};var si={form:{color_picker:{values:{default:"اللون الإفتراضي"}},info_picker:{values:{default:"المعلومات الافتراضية",name:"الإسم",state:"الحالة","last-changed":"آخر تغيير","last-updated":"آخر تحديث",none:"لا شئ"}},icon_type_picker:{values:{default:"النوع افتراضي",icon:"أيقونة","entity-picture":"صورة الكيان",none:"لا شئ"}},layout_picker:{values:{default:"تخطيط افتراضي",vertical:"تخطيط رأسي",horizontal:"تخطيط أفقي"}},alignment_picker:{values:{default:"المحاذاة الافتراضية",start:"بداية",end:"نهاية",center:"توسيط",justify:"مساواة"}}},card:{generic:{icon_color:"لون الأيقونة",layout:"التخطيط",fill_container:"ملئ الحاوية",primary_info:"المعلومات الأساسية",secondary_info:"المعلومات الفرعية",icon_type:"نوع الأيقونة",content_info:"المحتوى",use_entity_picture:"استخدم صورة الكيان؟",collapsible_controls:"تصغير عناصر التحكم عند الإيقاف",icon_animation:"تحريك الرمز عندما يكون نشطًا؟"},light:{show_brightness_control:"التحكم في السطوع؟",use_light_color:"استخدم لون فاتح",show_color_temp_control:"التحكم في حرارة اللون؟",show_color_control:"التحكم في اللون؟",incompatible_controls:"قد لا يتم عرض بعض عناصر التحكم إذا كان الضوء الخاص بك لا يدعم الميزة."},fan:{show_percentage_control:"التحكم في النسبة المئوية؟",show_oscillate_control:"التحكم في التذبذب؟"},cover:{show_buttons_control:"أزرار التحكم؟",show_position_control:"التحكم في الموقع؟"},template:{primary:"المعلومات الأساسية",secondary:"المعلومات الثانوية",multiline_secondary:"متعدد الأسطر الثانوية؟",entity_extra:"تستخدم في القوالب والإجراءات",content:"المحتوى",badge_icon:"أيقونة الشارة",badge_color:"لون الشارة",picture:"صورة (ستحل محل الأيقونة)"},title:{title:"العنوان",subtitle:"العنوان الفرعي"},chips:{alignment:"محاذاة"},weather:{show_conditions:"الأحوال الجوية؟",show_temperature:"الطقس؟"},update:{show_buttons_control:"أزرار التحكم؟"},vacuum:{commands:"الاوامر"},"media-player":{use_media_info:"استخدم معلومات الوسائط",use_media_artwork:"استخدم صورة الوسائط",show_volume_level:"إظهار مستوى الصوت",media_controls:"التحكم في الوسائط",media_controls_list:{on_off:"تشغيل/إيقاف",shuffle:"خلط",previous:"السابق",play_pause_stop:"تشغيل/إيقاف مؤقت/إيقاف",next:"التالي",repeat:"وضع التكرار"},volume_controls:"التحكم في الصوت",volume_controls_list:{volume_buttons:"أزرار الصوت",volume_set:"مستوى الصوت",volume_mute:"كتم"}},lock:{lock:"مقفل",unlock:"إلغاء قفل",open:"مفتوح"},humidifier:{show_target_humidity_control:"التحكم في الرطوبة؟?"},climate:{show_temperature_control:"التحكم في درجة الحرارة؟",hvac_modes:"أوضاع HVAC"}},chip:{sub_element_editor:{title:"محرر الرقاقة"},conditional:{chip:"رقاقة"},"chip-picker":{chips:"رقاقات",add:"أضف رقاقة",edit:"تعديل",clear:"مسح",select:"اختر الرقاقة",types:{action:"إجراء","alarm-control-panel":"تنبيه",back:"رجوع",conditional:"مشروط",entity:"الكيان",light:"Light",menu:"القائمة",template:"قالب",weather:"الطقس"}}}},li={editor:si},ci={form:{color_picker:{values:{default:"Основен цвят"}},info_picker:{values:{default:"Основна информация",name:"Име",state:"Състояние","last-changed":"Последно Променен","last-updated":"Последно Актуализиран",none:"Липсва"}},icon_type_picker:{values:{default:"Основен тип",icon:"Икона","entity-picture":"Картина на обекта",none:"Липсва"}},layout_picker:{values:{default:"Основно оформление",vertical:"Вертикално оформление",horizontal:"Хоризонтално оформление"}},alignment_picker:{values:{default:"Основно подравняване",start:"Старт",end:"Край",center:"Център",justify:"Подравнен"}}},card:{generic:{icon_color:"Цвят на икона",layout:"Оформление",fill_container:"Изпълване на контейнера",primary_info:"Първостепенна информация",secondary_info:"Второстепенна информация",icon_type:"Тип на икона",content_info:"Съдържание",use_entity_picture:"Използвай снимката на обекта?",collapsible_controls:"Свий контролите при изключен",icon_animation:"Анимирай иконата при активен?"},light:{show_brightness_control:"Контрол на яркостта?",use_light_color:"Използвай цвета на светлината",show_color_temp_control:"Контрол на температурата?",show_color_control:"Контрол на цвета?",incompatible_controls:"Някои опции могат да бъдат скрити при условие че осветителното тяло не поддържа фунцията."},fan:{show_percentage_control:"Процентов контрол?",show_oscillate_control:"Контрол на трептенето?"},cover:{show_buttons_control:"Контролни бутони?",show_position_control:"Контрол на позицията?",show_tilt_position_control:"Контрол на наклона?"},template:{primary:"Първостепенна информация",secondary:"Второстепенна информация",multiline_secondary:"Много-редова второстепенна информация?",entity_extra:"Използван в шаблони и действия",content:"Съдържание",badge_icon:"Икона на значка",badge_color:"Цвят на значка",picture:"Картина (ще замени иконата)"},title:{title:"Заглавие",subtitle:"Подзаглавие"},chips:{alignment:"Подравняване"},weather:{show_conditions:"Условия?",show_temperature:"Температура?"},update:{show_buttons_control:"Контролни бутони?"},vacuum:{commands:"Конади",commands_list:{on_off:"Вкл./Изкл."}},"media-player":{use_media_info:"Използвай информация от медията",use_media_artwork:"Използвай визуалните детайли от медията",show_volume_level:"Покажи контрола за звук",media_controls:"Контрол на Медиата",media_controls_list:{on_off:"Вкл./Изкл.",shuffle:"Разбъркано",previous:"Предишен",play_pause_stop:"Пусни/пауза/стоп",next:"Следващ",repeat:"Повтаряне"},volume_controls:"Контрол на звука",volume_controls_list:{volume_buttons:"Бутони за звук",volume_set:"Ниво на звука",volume_mute:"Заглуши"}},lock:{lock:"Заключен",unlock:"Отключен",open:"Отворен"},humidifier:{show_target_humidity_control:"Контрол на влажността?"},climate:{show_temperature_control:"Контрол на температурата?",hvac_modes:"HVAC Режими"}},chip:{sub_element_editor:{title:"Чип редактор"},conditional:{chip:"Чип"},"chip-picker":{chips:"Чипове",add:"Добави чип",edit:"Редактирай",clear:"Изчисти",select:"Избери чип",types:{action:"Действия","alarm-control-panel":"Аларма",back:"Назад",conditional:"Условни",entity:"Обект",light:"Осветление",menu:"Меню",template:"Шаблон",weather:"Време"}}}},di={editor:ci},ui={form:{color_picker:{values:{default:"Color per defecte"}},info_picker:{values:{default:"Informació per defecte",name:"Nom",state:"Estat","last-changed":"Últim Canvi","last-updated":"Última Actualització",none:"Cap"}},icon_type_picker:{values:{default:"Tipus per defecte",icon:"Icona","entity-picture":"Entitat d'imatge",none:"Cap"}},layout_picker:{values:{default:"Distribució per defecte",vertical:"Distribució vertical",horizontal:"Distribució horitzontal"}},alignment_picker:{values:{default:"Alineació per defecte",start:"Inici",end:"Final",center:"Centre",justify:"Justifica"}}},card:{generic:{icon_color:"Color d'icona",layout:"Distribució",fill_container:"Emplena el contenidor",primary_info:"Informació primaria",secondary_info:"Informació secundaria",icon_type:"Tipus d'icona",content_info:"Contingut",use_entity_picture:"Fer servir la imatge de l'entitat?",collapsible_controls:"Amaga els controls en desactivar",icon_animation:"Animar icona en activar?"},light:{show_brightness_control:"Control de brillantor?",use_light_color:"Fes servir el color del llum",show_color_temp_control:"Control de la temperatura del color?",show_color_control:"Control de color?",incompatible_controls:"Alguns controls no es mostraran si l'entitat no suporta eixa funció."},fan:{show_percentage_control:"Control de percentatge?",show_oscillate_control:"Control d'oscil·lació?"},cover:{show_buttons_control:"Botons de control?",show_position_control:"Control de posició?",show_tilt_position_control:"Control d'inclinació?"},template:{primary:"Informació primaria",secondary:"Informació secundaria",multiline_secondary:"Secundaria en varies línies?",entity_extra:"Utilitzats en plantilles i accions",content:"Contingut",badge_icon:"Icona de la insígnia",badge_color:"Color de la insígnia",picture:"Imatge (reemplaçarà la icona)"},title:{title:"Títol",subtitle:"Subtítol",title_tap_action:"Acció en tocar el títol",subtitle_tap_action:"Acció en tocar el subtítol"},chips:{alignment:"Alineació"},weather:{show_conditions:"Condicions?",show_temperature:"Temperatura?"},update:{show_buttons_control:"Botons de control?"},vacuum:{commands:"Comandaments",commands_list:{on_off:"Engegar/Apagar"}},"media-player":{use_media_info:"Empra la informació multimèdia",use_media_artwork:"Fes servir l'art multimèdia",show_volume_level:"Mostra el nivell de volum",media_controls:"Controls multimèdia",media_controls_list:{on_off:"Engegar/Apagar",shuffle:"Mesclar",previous:"Pista anterior",play_pause_stop:"Reproduïr/Pausar/Detindre",next:"Pista següent",repeat:"Mode de repetició"},volume_controls:"Controls de volum",volume_controls_list:{volume_buttons:"Botons de volum",volume_set:"Nivell de volum",volume_mute:"Silenci"}},lock:{lock:"Bloqueja",unlock:"Desbloqueja",open:"Obri"},humidifier:{show_target_humidity_control:"Control d'humitat?"},climate:{show_temperature_control:"Control de temperatura?",hvac_modes:"Modes HVAC"},number:{display_mode:"Mode de visualització",display_mode_list:{default:"Per defecte (lliscant)",slider:"Lliscant",buttons:"Botons"}}},chip:{sub_element_editor:{title:"Editor de xips"},conditional:{chip:"Xip"},"chip-picker":{chips:"Xips",add:"Afegir xip",edit:"Editar",clear:"Buidar",select:"Seleccionar chip",types:{action:"Acció","alarm-control-panel":"Alarma",back:"Tornar",conditional:"Condicional",entity:"Entitat",light:"Llum",menu:"Menú",spacer:"Espai",template:"Plantilla",weather:"Oratge"}}}},hi={not_found:"No s'ha trobat l'entitat"},mi={editor:ui,card:hi},pi={form:{color_picker:{values:{default:"Výchozí barva"}},info_picker:{values:{default:"Výchozí informace",name:"Název",state:"Stav","last-changed":"Poslední změna","last-updated":"Poslední aktualizace",none:"Nic"}},icon_type_picker:{values:{default:"Výchozí typ",icon:"Ikona","entity-picture":"Ikona entity",none:"Nic"}},layout_picker:{values:{default:"Výchozí rozložení",vertical:"Svislé rozložení",horizontal:"Vodorovné rozložení"}},alignment_picker:{values:{default:"Výchozí zarovnání",start:"Na začátek",end:"Na konec",center:"Na střed",justify:"Do bloku"}}},card:{generic:{icon_color:"Barva ikony",layout:"Rozložení",fill_container:"Vyplnit prostor",primary_info:"Primární informace",secondary_info:"Sekundární informace",icon_type:"Typ ikony",content_info:"Obsah",use_entity_picture:"Použít ikonu entity?",collapsible_controls:"Pokud je vypnuto, skrýt ovládací prvky",icon_animation:"Pokud je aktivní, animovat ikonu?"},light:{show_brightness_control:"Ovládání jasu?",use_light_color:"Ikona podle barvy světla?",show_color_temp_control:"Ovládání teploty světla?",show_color_control:"Ovládání barvy světla?",incompatible_controls:"Některé ovládací prvky se nemusí zobrazit, pokud vaše světlo tuto funkci nepodporuje."},fan:{show_percentage_control:"Ovládání v procentech?",show_oscillate_control:"Ovládání oscilaceM"},cover:{show_buttons_control:"Zobrazit ovládací tlačítka?",show_position_control:"Zobrazit ovládání polohy?",show_tilt_position_control:"Zobrazit ovládání náklonu?"},template:{primary:"Primární informace",secondary:"Sekundární informace",multiline_secondary:"Víceřádková sekundární informace?",entity_extra:"Použito v šablonách a akcích",content:"Obsah",badge_icon:"Ikona odznaku",badge_color:"Barva odznaku",picture:"Obrázek (nahradí ikonu)"},title:{title:"Nadpis",subtitle:"Popis",title_tap_action:"Akce při klepnutí na nadpis",subtitle_tap_action:"Akce při klepnutí na popis"},chips:{alignment:"Zarovnání"},weather:{show_conditions:"Zobrazit podmínky?",show_temperature:"Zobrazit teplotu?"},update:{show_buttons_control:"Zobrazit ovládací tlačítka?"},vacuum:{commands:"Příkazy",commands_list:{on_off:"Zapnout/Vypnout"}},"media-player":{use_media_info:"Použít informace z média",use_media_artwork:"Použít artwork z média",show_volume_level:"Zobrazit úroveň hlasitosti",media_controls:"Ovládání médií",media_controls_list:{on_off:"Zapnout/Vypnout",shuffle:"Zamíchat",previous:"Předchozí stopa",play_pause_stop:"Přehrát/Pauza/Zastavit",next:"Další stopa",repeat:"Režim opakování"},volume_controls:"Ovládání hlasitosti",volume_controls_list:{volume_buttons:"Tlačítka hlasitosti",volume_set:"Úroveň hlasitosti",volume_mute:"Ztlumit"}},lock:{lock:"Zamčeno",unlock:"Odemčeno",open:"Otevřeno"},humidifier:{show_target_humidity_control:"Ovládání vlhkosti?"},climate:{show_temperature_control:"Ovládání teploty?",hvac_modes:"Režimy HVAC"},number:{display_mode:"Režim zobrazení",display_mode_list:{default:"Výchozí (posuvník)",slider:"Posuvník",buttons:"Tlačítka"}}},chip:{sub_element_editor:{title:"Editor tlačítek"},conditional:{chip:"Tlačítko"},"chip-picker":{chips:"Tlačítka",add:"Přidat tlačítko",edit:"Upravit",clear:"Vymazat",select:"Vybrat tlačítko",types:{action:"Akce","alarm-control-panel":"Alarm",back:"Zpět",conditional:"Podmínka",entity:"Entita",light:"Světlo",menu:"Menu",spacer:"Mezera",template:"Šablona",weather:"Počasí"}}}},fi={not_found:"Entita nebyla nalezena"},gi={editor:pi,card:fi},_i={form:{color_picker:{values:{default:"Standardfarve"}},info_picker:{values:{default:"Standard information",name:"Navn",state:"Status","last-changed":"Sidst ændret","last-updated":"Sidst opdateret",none:"Ingen"}},icon_type_picker:{values:{default:"Standard type",icon:"Ikon","entity-picture":"Enhedsbillede",none:"Ingen"}},layout_picker:{values:{default:"Standard layout",vertical:"Vertikal layout",horizontal:"Horisontal layout"}},alignment_picker:{values:{default:"Standard justering",start:"Start",end:"Slut",center:"Centrer",justify:"Lige margener"}}},card:{generic:{color:"Farve",icon_color:"Ikon farve",layout:"Layout",fill_container:"Fyld container",primary_info:"Primær information",secondary_info:"Sekundær information",icon_type:"Ikon type",content_info:"Indhold",use_entity_picture:"Brug enhedsbillede?",collapsible_controls:"Skjul kontroller når slukket",icon_animation:"Animér ikon når aktiv?"},light:{show_brightness_control:"Lysstyrkekontrol?",use_light_color:"Brug lysfarve",show_color_temp_control:"Temperaturfarvekontrol?",show_color_control:"Farvekontrol?",incompatible_controls:"Nogle kontroller vises muligvis ikke, hvis dit lys ikke understøtter funktionen."},fan:{show_percentage_control:"Procentkontrol?",show_oscillate_control:"Oscillationskontrol?"},cover:{show_buttons_control:"Betjeningsknapper?",show_position_control:"Positionskontrol?",show_tilt_position_control:"Tiltkontrol?"},template:{primary:"Primær information",secondary:"Sekundær information",multiline_secondary:"Multi-linje sekundær?",entity_extra:"Anvendes i skabeloner og handlinger",label:"Label",content:"Indhold",badge_icon:"Badge ikon",badge_color:"Badge farve",picture:"Billede (erstatter ikonet)"},title:{title:"Titel",subtitle:"Undertitel",title_tap_action:"Title tryk handling",subtitle_tap_action:"Undertitel tryk handling"},chips:{alignment:"Justering"},weather:{show_conditions:"Vejrforhold?",show_temperature:"Temperatur?"},update:{show_buttons_control:"Betjeningsknapper?"},vacuum:{commands:"Kommandoer",commands_list:{on_off:"Slå til/fra"}},"media-player":{use_media_info:"Brug medieinformation",use_media_artwork:"Brug mediebilleder",show_volume_level:"Vis lydstyrke",media_controls:"Mediekontrol",media_controls_list:{on_off:"Tænd/Sluk",shuffle:"Bland",previous:"Forrige nummer",play_pause_stop:"Afspil/Pause/Stop",next:"Næste nummer",repeat:"Gentagelsestilstand"},volume_controls:"Lydstyrkekontrol",volume_controls_list:{volume_buttons:"Lydstyrkeknapper",volume_set:"Lydstyrke",volume_mute:"Lydløs"}},lock:{lock:"Lås",unlock:"Lås op",open:"Åben"},humidifier:{show_target_humidity_control:"Luftfugtighedskontrol?"},climate:{show_temperature_control:"Temperaturkontrol?",hvac_modes:"HVAC-tilstande"},number:{display_mode:"Visningstilstand",display_mode_list:{default:"Standard (slider)",slider:"Slider",buttons:"Knapper"}}},chip:{sub_element_editor:{title:"Chip-editor"},conditional:{chip:"Chip"},"chip-picker":{chips:"Chips",add:"Tilføj chip",edit:"Rediger",clear:"Nulstil",select:"Vælg chip",types:{action:"Handling","alarm-control-panel":"Alarm",back:"Tilbage",conditional:"Betinget",entity:"Enhed",light:"Lys",menu:"Menu",spacer:"Afstand",template:"Skabelon",weather:"Vejr"}}}},vi={not_found:"Enhed ikke fundet"},bi={editor:_i,card:vi},yi={form:{color_picker:{values:{default:"Standardfarbe"}},info_picker:{values:{default:"Standard-Information",name:"Name",state:"Zustand","last-changed":"Letzte Änderung","last-updated":"Letzte Aktualisierung",none:"Keine"}},icon_type_picker:{values:{default:"Standard-Typ",icon:"Icon","entity-picture":"Entitätsbild",none:"Keines"}},layout_picker:{values:{default:"Standard-Layout",vertical:"Vertikales Layout",horizontal:"Horizontales Layout"}},alignment_picker:{values:{default:"Standard",start:"Anfang",end:"Ende",center:"Mitte",justify:"Ausrichten"}}},card:{generic:{icon_color:"Icon-Farbe",layout:"Layout",fill_container:"Container ausfüllen",primary_info:"Primäre Information",secondary_info:"Sekundäre Information",icon_type:"Icon-Typ",content_info:"Inhalt",use_entity_picture:"Entitätsbild verwenden?",collapsible_controls:"Schieberegler einklappen, wenn aus",icon_animation:"Icon animieren, wenn aktiv?"},light:{show_brightness_control:"Helligkeitsregelung?",use_light_color:"Farbsteuerung verwenden",show_color_temp_control:"Farbtemperatursteuerung?",show_color_control:"Farbsteuerung?",incompatible_controls:"Einige Steuerelemente werden möglicherweise nicht angezeigt, wenn Ihr Licht diese Funktion nicht unterstützt."},fan:{show_percentage_control:"Prozentuale Kontrolle?",show_oscillate_control:"Oszillationssteuerung?"},cover:{show_buttons_control:"Schaltflächensteuerung?",show_position_control:"Positionssteuerung?",show_tilt_position_control:"Winkelsteuerung?"},template:{primary:"Primäre Information",secondary:"Sekundäre Information",multiline_secondary:"Mehrzeilig sekundär?",entity_extra:"Wird in Vorlagen und Aktionen verwendet",content:"Inhalt",badge_icon:"Badge-Icon",badge_color:"Badge-Farbe",picture:"Bild (ersetzt das Icon)"},title:{title:"Titel",subtitle:"Untertitel",title_tap_action:"Titel Tipp-Aktion",subtitle_tap_action:"Untertitel Tipp-Aktion"},chips:{alignment:"Ausrichtung"},weather:{show_conditions:"Bedingungen?",show_temperature:"Temperatur?"},update:{show_buttons_control:"Schaltflächensteuerung?"},vacuum:{commands:"Befehle",commands_list:{on_off:"An/Ausschalten"}},"media-player":{use_media_info:"Medieninfos verwenden",use_media_artwork:"Mediengrafik verwenden",show_volume_level:"Lautstärke-Level anzeigen",media_controls:"Mediensteuerung",media_controls_list:{on_off:"Ein/Aus",shuffle:"Zufällige Wiedergabe",previous:"Vorheriger Titel",play_pause_stop:"Play/Pause/Stop",next:"Nächster Titel",repeat:"Wiederholen"},volume_controls:"Lautstärkesteuerung",volume_controls_list:{volume_buttons:"Lautstärke-Buttons",volume_set:"Lautstärke-Level",volume_mute:"Stumm"}},lock:{lock:"Verriegeln",unlock:"Entriegeln",open:"Öffnen"},humidifier:{show_target_humidity_control:"Luftfeuchtigkeitssteuerung?"},climate:{show_temperature_control:"Temperatursteuerung?",hvac_modes:"HVAC-Modi"},number:{display_mode:"Anzeigemodus",display_mode_list:{default:"Standard (Schieberegler)",slider:"Schieberegler",buttons:"Buttons"}}},chip:{sub_element_editor:{title:"Chip Editor"},conditional:{chip:"Chip"},"chip-picker":{chips:"Chips",add:"Chip hinzufügen",edit:"Editieren",clear:"Löschen",select:"Chip auswählen",types:{action:"Aktion","alarm-control-panel":"Alarm",back:"Zurück",conditional:"Bedingung",entity:"Entität",light:"Licht",menu:"Menü",spacer:"Abstand",template:"Vorlage",weather:"Wetter"}}}},xi={not_found:"Entität nicht gefunden"},wi={editor:yi,card:xi},ki={form:{color_picker:{values:{default:"Προεπιλεγμένο χρώμα"}},info_picker:{values:{default:"Προεπιλεγμένες πληροφορίες",name:"Όνομα",state:"Κατάσταση","last-changed":"Τελευταία αλλαγή","last-updated":"Τελευταία ενημέρωση",none:"Τίποτα"}},layout_picker:{values:{default:"Προεπιλεγμένη διάταξη",vertical:"Κάθετη διάταξη",horizontal:"Οριζόντια διάταξη"}},alignment_picker:{values:{default:"Προεπιλεγμένη στοίχιση",start:"Στοίχιση αριστερά",end:"Στοίχιση δεξιά",center:"Στοίχιση στο κέντρο",justify:"Πλήρης στοίχιση"}}},card:{generic:{icon_color:"Χρώμα εικονιδίου",layout:"Διάταξη",primary_info:"Πρωτεύουσες πληροφορίες",secondary_info:"Δευτερεύουσες πληροφορίες",content_info:"Περιεχόμενο",use_entity_picture:"Χρήση εικόνας οντότητας;",icon_animation:"Κίνηση εικονιδίου όταν είναι ενεργό;"},light:{show_brightness_control:"Έλεγχος φωτεινότητας;",use_light_color:"Χρήση χρώματος φωτος",show_color_temp_control:"Έλεγχος χρώματος θερμοκρασίας;",show_color_control:"Έλεγχος χρώματος;",incompatible_controls:"Ορισμένα στοιχεία ελέγχου ενδέχεται να μην εμφανίζονται εάν το φωτιστικό σας δεν υποστηρίζει τη λειτουργία."},fan:{show_percentage_control:"Έλεγχος ποσοστού;",show_oscillate_control:"Έλεγχος ταλάντωσης;"},cover:{show_buttons_control:"Έλεγχος κουμπιών;",show_position_control:"Έλεγχος θέσης;"},template:{primary:"Πρωτεύουσες πληροφορίες",secondary:"Δευτερεύουσες πληροφορίες",multiline_secondary:"Δευτερεύουσες πολλαπλών γραμμών;",entity_extra:"Χρησιμοποιείται σε πρότυπα και ενέργειες",content:"Περιεχόμενο"},title:{title:"Τίτλος",subtitle:"Υπότιτλος"},chips:{alignment:"Ευθυγράμμιση"},weather:{show_conditions:"Συνθήκες;",show_temperature:"Θερμοκρασία;"},update:{show_buttons_control:"Έλεγχος κουμπιών;"},vacuum:{commands:"Εντολές"},"media-player":{use_media_info:"Χρήση πληροφοριών πολυμέσων",use_media_artwork:"Χρήση έργων τέχνης πολυμέσων",media_controls:"Έλεγχος πολυμέσων",media_controls_list:{on_off:"Ενεργοποίηση/απενεργοποίηση",shuffle:"Τυχαία σειρά",previous:"Προηγούμενο κομμάτι",play_pause_stop:"Αναπαραγωγή/παύση/διακοπή",next:"Επόμενο κομμάτι",repeat:"Λειτουργία επανάληψης"},volume_controls:"Χειριστήρια έντασης ήχου",volume_controls_list:{volume_buttons:"Κουμπιά έντασης ήχου",volume_set:"Επίπεδο έντασης ήχου",volume_mute:"Σίγαση"}}},chip:{sub_element_editor:{title:"Επεξεργαστής Chip"},conditional:{chip:"Chip"},"chip-picker":{chips:"Chips",add:"Προσθήκη chip",edit:"Επεξεργασία",clear:"Καθαρισμός",select:"Επιλογή chip",types:{action:"Ενέργεια","alarm-control-panel":"Συναγερμός",back:"Πίσω",conditional:"Υπό προϋποθέσεις",entity:"Οντότητα",light:"Φως",menu:"Μενού",template:"Πρότυπο",weather:"Καιρός"}}}},Ci={editor:ki},$i={form:{color_picker:{values:{default:"Default color"}},info_picker:{values:{default:"Default information",name:"Name",state:"State","last-changed":"Last Changed","last-updated":"Last Updated",none:"None"}},icon_type_picker:{values:{default:"Default type",icon:"Icon","entity-picture":"Entity picture",none:"None"}},layout_picker:{values:{default:"Default layout",vertical:"Vertical layout",horizontal:"Horizontal layout"}},alignment_picker:{values:{default:"Default alignment",start:"Start",end:"End",center:"Center",justify:"Justify"}}},card:{generic:{color:"Color",icon_color:"Icon color",layout:"Layout",fill_container:"Fill container",primary_info:"Primary information",secondary_info:"Secondary information",icon_type:"Icon type",content_info:"Content",use_entity_picture:"Use entity picture?",collapsible_controls:"Collapse controls when off",icon_animation:"Animate icon when active?"},light:{show_brightness_control:"Brightness control?",use_light_color:"Use light color",show_color_temp_control:"Temperature color control?",show_color_control:"Color control?",incompatible_controls:"Some controls may not be displayed if your light does not support the feature."},fan:{show_percentage_control:"Percentage control?",show_oscillate_control:"Oscillate control?"},cover:{show_buttons_control:"Control buttons?",show_position_control:"Position control?",show_tilt_position_control:"Tilt control?"},template:{primary:"Primary information",secondary:"Secondary information",multiline_secondary:"Multiline secondary?",entity_extra:"Used in templates and actions",label:"Label",content:"Content",badge_icon:"Badge icon",badge_color:"Badge color",picture:"Picture (will replace the icon)"},title:{title:"Title",subtitle:"Subtitle",title_tap_action:"Title tap action",subtitle_tap_action:"Subtitle tap action"},chips:{alignment:"Alignment"},weather:{show_conditions:"Conditions?",show_temperature:"Temperature?"},update:{show_buttons_control:"Control buttons?"},vacuum:{commands:"Commands",commands_list:{on_off:"Turn on/off"}},"media-player":{use_media_info:"Use media info",use_media_artwork:"Use media artwork",show_volume_level:"Show volume level",media_controls:"Media controls",media_controls_list:{on_off:"Turn on/off",shuffle:"Shuffle",previous:"Previous track",play_pause_stop:"Play/pause/stop",next:"Next track",repeat:"Repeat mode"},volume_controls:"Volume controls",volume_controls_list:{volume_buttons:"Volume buttons",volume_set:"Volume level",volume_mute:"Mute"}},lock:{lock:"Lock",unlock:"Unlock",open:"Open"},humidifier:{show_target_humidity_control:"Humidity control?"},climate:{show_temperature_control:"Temperature control?",hvac_modes:"HVAC Modes"},number:{display_mode:"Display Mode",display_mode_list:{default:"Default (slider)",slider:"Slider",buttons:"Buttons"}}},chip:{sub_element_editor:{title:"Chip editor"},conditional:{chip:"Chip"},"chip-picker":{chips:"Chips",add:"Add chip",edit:"Edit",clear:"Clear",select:"Select chip",types:{action:"Action","alarm-control-panel":"Alarm",back:"Back",conditional:"Conditional",entity:"Entity",light:"Light",menu:"Menu",spacer:"Spacer",template:"Template",weather:"Weather"}}}},Ei={not_found:"Entity not found"},Ai={editor:$i,card:Ei},Si={form:{color_picker:{values:{default:"Color predeterminado"}},info_picker:{values:{default:"Información predeterminada",name:"Nombre",state:"Estado","last-changed":"Último cambio","last-updated":"Última actualización",none:"Ninguno"}},icon_type_picker:{values:{default:"Por defecto",icon:"Icono","entity-picture":"Imagen de entidad",none:"Ninguno"}},layout_picker:{values:{default:"Diseño predeterminado",vertical:"Diseño vertical",horizontal:"Diseño horizontal"}},alignment_picker:{values:{default:"Alineación predeterminada",start:"Inicio",end:"Final",center:"Centrado",justify:"Justificado"}}},card:{generic:{icon_color:"Color de icono",layout:"Diseño",fill_container:"Rellenar",primary_info:"Información primaria",secondary_info:"Información secundaria",icon_type:"Icono",content_info:"Contenido",use_entity_picture:"¿Usar imagen de entidad?",collapsible_controls:"Contraer controles cuando está apagado",icon_animation:"¿Icono animado cuando está activo?"},light:{show_brightness_control:"¿Controlar brillo?",use_light_color:"Usar color de la luz",show_color_temp_control:"¿Controlar temperatura del color?",show_color_control:"¿Controlar color?",incompatible_controls:"Es posible que algunos controles no se muestren si la luz no es compatible con esta función."},fan:{show_percentage_control:"¿Controlar porcentaje?",show_oscillate_control:"¿Controlar oscilación?"},cover:{show_buttons_control:"¿Botones de control?",show_position_control:"¿Control de posición?",show_tilt_position_control:"¿Control de inclinación?"},template:{primary:"Información primaria",secondary:"Información secundaria",multiline_secondary:"¿Secundaria multilínea?",entity_extra:"Utilizado en plantillas y acciones.",content:"Contenido",badge_icon:"Icono del distintivo",badge_color:"Color del distintivo",picture:"Imagen (sustituirá al icono)"},title:{title:"Título",subtitle:"Subtítulo",title_tap_action:"Acción al tocar el título",subtitle_tap_action:"Acción al tocar el subtítulo"},chips:{alignment:"Alineación"},weather:{show_conditions:"¿Condiciones?",show_temperature:"¿Temperatura?"},update:{show_buttons_control:"¿Botones de control?"},vacuum:{commands:"Comandos",commands_list:{on_off:"Activar/desactivar"}},"media-player":{use_media_info:"Usar información multimedia",use_media_artwork:"Usar ilustraciones multimedia",show_volume_level:"Mostrar nivel de volumen",media_controls:"Controles multimedia",media_controls_list:{on_off:"Activar/desactivar",shuffle:"Aleatoria",previous:"Pista anterior",play_pause_stop:"Reproducir/pausa/parar",next:"Pista siguiente",repeat:"Modo de repetición"},volume_controls:"Controles de volumen",volume_controls_list:{volume_buttons:"Botones de volumen",volume_set:"Nivel de volumen",volume_mute:"Silenciar"}},lock:{lock:"Bloquear",unlock:"Desbloquear",open:"Abrir"},humidifier:{show_target_humidity_control:"¿Controlar humedad?"},climate:{show_temperature_control:"¿Control de temperatura?",hvac_modes:"Modos de climatización"}},chip:{sub_element_editor:{title:"Editor de chip"},conditional:{chip:"Chip"},"chip-picker":{chips:"Chips",add:"Añadir chip",edit:"Editar",clear:"Limpiar",select:"Seleccionar chip",types:{action:"Acción","alarm-control-panel":"Alarma",back:"Volver",conditional:"Condicional",entity:"Entidad",light:"Luz",menu:"Menú",template:"Plantilla",weather:"Clima"}}}},Ii={editor:Si},Ti={form:{color_picker:{values:{default:"Oletusväri"}},info_picker:{values:{default:"Oletustiedot",name:"Nimi",state:"Tila","last-changed":"Viimeksi muuttunut","last-updated":"Viimeksi päivittynyt",none:"Ei mitään"}},icon_type_picker:{values:{default:"Oletustyyppi",icon:"Kuvake","entity-picture":"Kohteen kuva",none:"Ei mitään"}},layout_picker:{values:{default:"Oletusasettelu",vertical:"Pystysuuntainen",horizontal:"Vaakasuuntainen"}},alignment_picker:{values:{default:"Keskitys",start:"Alku",end:"Loppu",center:"Keskitä",justify:"Sovita"}}},card:{generic:{icon_color:"Ikonin väri",layout:"Asettelu",fill_container:"Täytä alue",primary_info:"Ensisijaiset tiedot",secondary_info:"Toissijaiset tiedot",icon_type:"Kuvakkeen tyyppi",content_info:"Sisältö",use_entity_picture:"Käytä kohteen kuvaa?",collapsible_controls:"Piilota toiminnot off-tilassa",icon_animation:"Animoi kuvake, kun aktiivinen?"},light:{show_brightness_control:"Kirkkauden säätö?",use_light_color:"Käytä valaisimen väriä",show_color_temp_control:"Värilämpötilan säätö?",show_color_control:"Värin säätö?",incompatible_controls:"Jotkin toiminnot eivät näy, jos valaisimesi ei tue niitä."},fan:{show_percentage_control:"Prosentuaalinen säätö?",show_oscillate_control:"Oskillaation säätö?"},cover:{show_buttons_control:"Toimintopainikkeet?",show_position_control:"Sijainnin hallinta?"},template:{primary:"Ensisijaiset tiedot",secondary:"Toissijaiset tiedot",multiline_secondary:"Monirivinen toissijainen tieto?",entity_extra:"Käytetään malleissa ja toiminnoissa",content:"Sisältö",badge_icon:"Merkin kuvake",badge_color:"Merkin väri",picture:"Kuva (korvaa kuvakkeen)"},title:{title:"Otsikko",subtitle:"Tekstitys"},chips:{alignment:"Asettelu"},weather:{show_conditions:"Ehdot?",show_temperature:"Lämpötila?"},update:{show_buttons_control:"Toimintopainikkeet?"},vacuum:{commands:"Komennot"},"media-player":{use_media_info:"Käytä median tietoja",use_media_artwork:"Käytä median kuvituksia",show_volume_level:"Näytä äänenvoimakkuuden hallinta",media_controls:"Toiminnot",media_controls_list:{on_off:"Päälle/pois",shuffle:"Sekoita",previous:"Edellinen kappale",play_pause_stop:"Toista/keskeytä/pysäytä",next:"Seuraava kappale",repeat:"Jatkuva toisto"},volume_controls:"Äänenvoimakkuuden hallinta",volume_controls_list:{volume_buttons:"Äänenvoimakkuuspainikkeet",volume_set:"Äänenvoimakkuus",volume_mute:"Mykistä"}},lock:{lock:"Lukitse",unlock:"Poista lukitus",open:"Avaa"},humidifier:{show_target_humidity_control:"Kosteudenhallinta?"}},chip:{sub_element_editor:{title:"Merkkieditori"},conditional:{chip:"Merkki"},"chip-picker":{chips:"Merkit",add:"Lisää merkki",edit:"Muokkaa",clear:"Tyhjennä",select:"Valitse merkki",types:{action:"Toiminto","alarm-control-panel":"Hälytys",back:"Takaisin",conditional:"Ehdollinen",entity:"Kohde",light:"Valaisin",menu:"Valikko",template:"Malli",weather:"Sää"}}}},zi={editor:Ti},Oi={form:{color_picker:{values:{default:"Couleur par défaut"}},info_picker:{values:{default:"Information par défaut",name:"Nom",state:"État","last-changed":"Dernière modification","last-updated":"Dernière mise à jour",none:"Aucune"}},icon_type_picker:{values:{default:"Type par défaut",icon:"Icône","entity-picture":"Image de l'entité",none:"Aucune"}},layout_picker:{values:{default:"Disposition par défault",vertical:"Disposition verticale",horizontal:"Disposition horizontale"}},alignment_picker:{values:{default:"Alignement par défaut",start:"Début",end:"Fin",center:"Centré",justify:"Justifié"}}},card:{generic:{icon_color:"Couleur de l'icône",layout:"Disposition",fill_container:"Remplir le conteneur",primary_info:"Information principale",secondary_info:"Information secondaire",icon_type:"Type d'icône",content_info:"Contenu",use_entity_picture:"Utiliser l'image de l'entité ?",collapsible_controls:"Reduire les contrôles quand éteint",icon_animation:"Animation de l'icône ?"},light:{show_brightness_control:"Contrôle de luminosité ?",use_light_color:"Utiliser la couleur de la lumière",show_color_temp_control:"Contrôle de la température ?",show_color_control:"Contrôle de la couleur ?",incompatible_controls:"Certains contrôles peuvent ne pas être affichés si votre lumière ne supporte pas la fonctionnalité."},fan:{show_percentage_control:"Contrôle de la vitesse ?",show_oscillate_control:"Contrôle de l'oscillation ?"},cover:{show_buttons_control:"Contrôle avec boutons ?",show_position_control:"Contrôle de la position ?"},template:{primary:"Information principale",secondary:"Information secondaire",multiline_secondary:"Information secondaire sur plusieurs lignes ?",entity_extra:"Utilisée pour les templates et les actions",content:"Contenu",badge_icon:"Icône du badge",badge_color:"Couleur du badge",picture:"Picture (remplacera l'icône)"},title:{title:"Titre",subtitle:"Sous-titre",title_tap_action:"Appui sur le titre",subtitle_tap_action:"Appui sur le sous-titre"},chips:{alignment:"Alignement"},weather:{show_conditons:"Conditions ?",show_temperature:"Température ?"},update:{show_buttons_control:"Contrôle avec boutons ?"},vacuum:{commands:"Commandes",commands_list:{on_off:"Allumer/Éteindre"}},"media-player":{use_media_info:"Utiliser les informations du media",use_media_artwork:"Utiliser l'illustration du media",show_volume_level:"Afficher le niveau de volume",media_controls:"Contrôles du media",media_controls_list:{on_off:"Allumer/Éteindre",shuffle:"Lecture aléatoire",previous:"Précédent",play_pause_stop:"Lecture/pause/stop",next:"Suivant",repeat:"Mode de répétition"},volume_controls:"Contrôles du volume",volume_controls_list:{volume_buttons:"Bouton de volume",volume_set:"Niveau de volume",volume_mute:"Muet"}},lock:{lock:"Verrouiller",unlock:"Déverrouiller",open:"Ouvrir"},humidifier:{show_target_humidity_control:"Contrôle d'humidité ?"},climate:{show_temperature_control:"Contrôle de la température?",hvac_modes:"Modes du thermostat"},number:{display_mode:"Mode d'affichage",display_mode_list:{default:"Par défaut (Curseur)",slider:"Curseur",buttons:"Boutons"}}},chip:{sub_element_editor:{title:'Éditeur de "chip"'},conditional:{chip:"Chip"},"chip-picker":{chips:'"Chips"',add:'Ajouter une "chip"',edit:"Modifier",clear:"Effacer",select:'Sélectionner une "chip"',types:{action:"Action","alarm-control-panel":"Alarme",back:"Retour",conditional:"Conditionnel",entity:"Entité",light:"Lumière",menu:"Menu",spacer:"Espacement",template:"Template",weather:"Météo"}}}},Mi={editor:Oi},ji={form:{color_picker:{values:{default:"צבע ברירת מחדל"}},info_picker:{values:{default:"מידע ברירת מחדל",name:"שם",state:"מצב","last-changed":"שונה לאחרונה","last-updated":"עודכן לאחרונה",none:"ריק"}},layout_picker:{values:{default:"סידור ברירת מחדל",vertical:"סידור מאונך",horizontal:"סידור מאוזן"}},alignment_picker:{values:{default:"יישור ברירת מחדל",start:"התחלה",end:"סוף",center:"אמצע",justify:"מוצדק"}}},card:{generic:{icon_color:"צבע אייקון",layout:"סידור",fill_container:"מלא גבולות",primary_info:"מידע ראשי",secondary_info:"מידע מישני",content_info:"תוכן",use_entity_picture:"השתמש בתמונת ישות",collapsible_controls:"הסתר שליטה כשאר מכובה",icon_animation:"הנפש אייקון"},light:{show_brightness_control:"שליטה בבהירות?",use_light_color:"השתמש בצבע האור",show_color_temp_control:"הצג פקד גוון תאורה?",show_color_control:"הצג פקד צבע",incompatible_controls:"יתכן וחלק מהכפתורים לא יופיעו אם התאורה אינה תומכת בתכונה."},fan:{show_percentage_control:"שליטה באחוז?",show_oscillate_control:"שליטה בהתנדנדות?"},cover:{show_buttons_control:"הצג כפתורי שליטה",show_position_control:"הצג פקדי מיקום"},template:{primary:"מידע ראשי",secondary:"מידע מישני",multiline_secondary:"מידע מישני רב קווי",entity_extra:"משמש בתבניות ופעולות",content:"תוכן"},title:{title:"כותרת",subtitle:"כתובית"},chips:{alignment:"יישור"},weather:{show_conditions:"הצג תנאים?",show_temperature:"הצג טמפרטורה?"},update:{show_buttons_control:"הצג כפתורי שליטה?"},vacuum:{commands:"פקודות",icon_animation:"הנפשת אייקון"},"media-player":{use_media_info:"השתמש במידע מדיה",use_media_artwork:"השתמש באומנות מדיה",show_volume_level:"הצג שליטת ווליום",media_controls:"שליטה במדיה",media_controls_list:{on_off:"הדלק/כבה",shuffle:"ערבב",previous:"רצועה קודמת",play_pause_stop:"נגן/השהה/הפסק",next:"רצועה הבאה",repeat:"חזרה"},volume_controls:"שליטה בווליום",volume_controls_list:{volume_buttons:"כפתורי ווליום",volume_set:"רמת ווליום",volume_mute:"השתק"}},lock:{lock:"נעל",unlock:"בטל נעילה",open:"פתח"},humidifier:{show_target_humidity_control:"הצג פקדי לחות"}},chip:{sub_element_editor:{title:"עורך שבב"},conditional:{chip:"שבב"},"chip-picker":{chips:"שבבים",add:"הוסף שבב",edit:"ערוך",clear:"נקה",select:"בחר שבב",types:{action:"פעולה","alarm-control-panel":"אזעקה",back:"חזור",conditional:"מותנה",entity:"ישות",light:"אור",menu:"תפריט",template:"תבנית",weather:"מזג אוויר"}}}},Di={editor:ji},Li={form:{color_picker:{values:{default:"Alapértelmezett szín"}},info_picker:{values:{default:"Alepértelmezett információ",name:"Név",state:"Állapot","last-changed":"Utoljára módosítva","last-updated":"Utoljára frissítve",none:"Egyik sem"}},icon_type_picker:{values:{default:"Alapértelmezett típus",icon:"Ikon","entity-picture":"Entitás kép",none:"Egyik sem"}},layout_picker:{values:{default:"Alapértelmezet elrendezés",vertical:"Függőleges elrendezés",horizontal:"Vízszintes elrendezés"}},alignment_picker:{values:{default:"Alapértelmezett rendezés",start:"Kezdete",end:"Vége",center:"Közepe",justify:"Sorkizárt"}}},card:{generic:{icon_color:"Ikon szín",layout:"Elrendezés",fill_container:"Tároló kitöltése",primary_info:"Elsődleges információ",secondary_info:"Másodlagos információ",icon_type:"Ikon típus",content_info:"Tartalom",use_entity_picture:"Entitás kép használata",collapsible_controls:"Vezérlők összezárása kikapcsolt állapotban",icon_animation:"Ikon animálása aktív állapotban"},light:{show_brightness_control:"Fényerő vezérlő",use_light_color:"Fény szín használata",show_color_temp_control:"Színhőmérséklet vezérlő",show_color_control:"Szín vezérlő",incompatible_controls:"Azok a vezérlők nem lesznek megjelenítve, amelyeket a fényforrás nem támogat."},fan:{show_percentage_control:"Százalékos vezérlő",show_oscillate_control:"Oszcilláció vezérlő"},cover:{show_buttons_control:"Vezérlő gombok",show_position_control:"Pozíció vezérlő",show_tilt_position_control:"Dőlésszög szabályzó"},template:{primary:"Elsődleges információ",secondary:"Másodlagos információ",multiline_secondary:"Másodlagost több sorba?",entity_extra:"Műveletek és sablonok használatakor",content:"Tartalom",badge_icon:"Jelvény ikon",badge_color:"Jelvény szín",picture:"Kép (lecseréli az ikont)"},title:{title:"Fejléc",subtitle:"Alcím",title_tap_action:"Fejlécre koppintáskor",subtitle_tap_action:"Alcímre koppintáskor"},chips:{alignment:"Rendezés"},weather:{show_conditions:"Állapotok",show_temperature:"Hőmérséklet"},update:{show_buttons_control:"Vezérlő gombok"},vacuum:{commands:"Utasítások",commands_list:{on_off:"Ki/Bekapcsolás"}},"media-player":{use_media_info:"Média infó használata",use_media_artwork:"Média borító használata",show_volume_level:"Hangerő mutatása",media_controls:"Média vezérlők",media_controls_list:{on_off:"Ki/bekapcsolás",shuffle:"Véletlen lejátszás",previous:"Előző szám",play_pause_stop:"Lejátszás/szünet/állj",next:"Következő szám",repeat:"Ismétlés módja"},volume_controls:"Hangerő vezérlők",volume_controls_list:{volume_buttons:"Hangerő gombok",volume_set:"Hangerő szint",volume_mute:"Némítás"}},lock:{lock:"Zár",unlock:"Nyit",open:"Nyitva"},humidifier:{show_target_humidity_control:"Páratartalom vezérlő"},climate:{show_temperature_control:"Hőmérséklet vezérlő",hvac_modes:"HVAC mód"},number:{display_mode:"Megjelenítési mód",display_mode_list:{default:"Alepértelmezett (csúszka)",slider:"Csúszka",buttons:"Gombok"}}},chip:{sub_element_editor:{title:"Chip szerkesztő"},conditional:{chip:"Chip"},"chip-picker":{chips:"Chip-ek",add:"Chip hozzáadása",edit:"Szerkesztés",clear:"Ürítés",select:"Chip kiválasztása",types:{action:"Művelet","alarm-control-panel":"Riasztó",back:"Vissza",conditional:"Feltételes",entity:"Entitás",light:"Fényforrás",menu:"Menü",spacer:"Térköz",template:"Sablon",weather:"Időjárás"}}}},Pi={not_found:"Entitás nem található"},Ni={editor:Li,card:Pi},Ri={form:{color_picker:{values:{default:"Warna bawaan"}},info_picker:{values:{default:"Informasi bawaan",name:"Nama",state:"Status","last-changed":"Terakhir Diubah","last-updated":"Terakhir Diperbarui",none:"Tidak ada"}},icon_type_picker:{values:{default:"Tipe bawaan",icon:"Ikon","entity-picture":"Gambar entitas",none:"Tidak ada"}},layout_picker:{values:{default:"Tata letak bawaan",vertical:"Tata letak vertikal",horizontal:"Tata letak horizontal"}},alignment_picker:{values:{default:"Perataan bawaan",start:"Awal",end:"Akhir",center:"Tengah",justify:"Rata kanan-kiri"}}},card:{generic:{icon_color:"Warna ikon",layout:"Tata letak",fill_container:"Isi kontainer",primary_info:"Informasi primer",secondary_info:"Informasi sekunder",icon_type:"Tipe ikon",content_info:"Konten",use_entity_picture:"Gunakan gambar entitas?",collapsible_controls:"Sembunyikan kontrol saat mati",icon_animation:"Animasikan ikon saat aktif?"},light:{show_brightness_control:"Kontrol kecerahan?",use_light_color:"Gunakan warna lampu",show_color_temp_control:"Kontrol suhu warna?",show_color_control:"Kontrol warna?",incompatible_controls:"Beberapa kontrol mungkin tidak ditampilkan jika lampu Anda tidak mendukung fitur tersebut."},fan:{show_percentage_control:"Kontrol persentase?",show_oscillate_control:"Kontrol osilasi?"},cover:{show_buttons_control:"Tombol kontrol?",show_position_control:"Kontrol posisi?",show_tilt_position_control:"Kontrol kemiringan?"},template:{primary:"Informasi primer",secondary:"Informasi sekunder",multiline_secondary:"Info sekunder multibaris?",entity_extra:"Digunakan dalam templat dan tindakan",content:"Konten",badge_icon:"Ikon lencana",badge_color:"Warna lencana",picture:"Gambar (akan menggantikan ikon)"},title:{title:"Judul",subtitle:"Subjudul",title_tap_action:"Tindakan ketuk judul",subtitle_tap_action:"Tindakan ketuk subjudul"},chips:{alignment:"Perataan"},weather:{show_conditions:"Kondisi?",show_temperature:"Suhu?"},update:{show_buttons_control:"Tombol kontrol?"},vacuum:{commands:"Perintah",commands_list:{on_off:"Nyalakan/Matikan"}},"media-player":{use_media_info:"Gunakan info media",use_media_artwork:"Gunakan gambar seni media",show_volume_level:"Tampilkan level volume",media_controls:"Kontrol media",media_controls_list:{on_off:"Nyalakan/Matikan",shuffle:"Acak",previous:"Lagu sebelumnya",play_pause_stop:"Putar/jeda/stop",next:"Lagu berikutnya",repeat:"Mode pengulangan"},volume_controls:"Kontrol volume",volume_controls_list:{volume_buttons:"Tombol volume",volume_set:"Level volume",volume_mute:"Bisukan"}},lock:{lock:"Kunci",unlock:"Buka kunci",open:"Buka"},humidifier:{show_target_humidity_control:"Kontrol kelembapan?"},climate:{show_temperature_control:"Kontrol suhu?",hvac_modes:"Mode HVAC"},number:{display_mode:"Mode Tampilan",display_mode_list:{default:"Bawaan (geser)",slider:"Geser",buttons:"Tombol"}}},chip:{sub_element_editor:{title:"Editor cip"},conditional:{chip:"Cip"},"chip-picker":{chips:"Cip",add:"Tambah cip",edit:"Edit",clear:"Hapus",select:"Pilih cip",types:{action:"Tindakan","alarm-control-panel":"Alarm",back:"Kembali",conditional:"Kondisional",entity:"Entitas",light:"Lampu",menu:"Menu",spacer:"Pemisah",template:"Templat",weather:"Cuaca"}}}},Fi={not_found:"Entitas tidak ditemukan"},Vi={editor:Ri,card:Fi},Bi={form:{color_picker:{values:{default:"Colore predefinito"}},info_picker:{values:{default:"Informazione predefinita",name:"Nome",state:"Stato","last-changed":"Ultimo cambiamento","last-updated":"Ultimo aggiornamento",none:"Nessuno"}},icon_type_picker:{values:{default:"Tipo predefinito",icon:"Icona","entity-picture":"Immagine dell'entità",none:"Nessuna"}},layout_picker:{values:{default:"Disposizione predefinita",vertical:"Disposizione verticale",horizontal:"Disposizione orizzontale"}},alignment_picker:{values:{default:"Allineamento predefinito",start:"Inizio",end:"Fine",center:"Centro",justify:"Giustificato"}}},card:{generic:{icon_color:"Colore dell'icona",layout:"Disposizione",fill_container:"Riempi il contenitore",primary_info:"Informazione primaria",secondary_info:"Informazione secondaria",icon_type:"Tipo icona",content_info:"Contenuto",use_entity_picture:"Usa l'immagine dell'entità",collapsible_controls:"Nascondi i controlli quando spento",icon_animation:"Anima l'icona quando attiva"},light:{use_light_color:"Usa il colore della luce",show_brightness_control:"Controllo luminosità",show_color_temp_control:"Controllo temperatura",show_color_control:"Controllo colore",incompatible_controls:"Alcuni controlli potrebbero non essere mostrati se la tua luce non li supporta."},fan:{show_percentage_control:"Controllo potenza",show_oscillate_control:"Controllo oscillazione"},cover:{show_buttons_control:"Pulsanti di controllo",show_position_control:"Controllo percentuale apertura",show_tilt_position_control:"Controllo percentuale inclinazione"},template:{primary:"Informazione primaria",secondary:"Informazione secondaria",multiline_secondary:"Abilita frasi multilinea",entity_extra:"Usato in templates ed azioni",content:"Contenuto",badge_icon:"Icona del badge",badge_color:"Colore del badge",picture:"Immagine (sostituirà l'icona)"},title:{title:"Titolo",subtitle:"Sottotitolo",title_tap_action:"Azione di tap sul titolo",subtitle_tap_action:"Azione di tap sul sottotitolo"},chips:{alignment:"Allineamento"},weather:{show_conditions:"Condizioni",show_temperature:"Temperatura"},update:{show_buttons_control:"Pulsanti di controllo"},vacuum:{commands:"Comandi",commands_list:{on_off:"Accendi/Spegni"}},"media-player":{use_media_info:"Mostra le informazioni della sorgente",use_media_artwork:"Usa la copertina della sorgente",show_volume_level:"Mostra volume",media_controls:"Controlli media",media_controls_list:{on_off:"Accendi/Spegni",shuffle:"Riproduzione casuale",previous:"Traccia precedente",play_pause_stop:"Play/Pausa/Stop",next:"Traccia successiva",repeat:"Ciclo continuo"},volume_controls:"Controlli del Volume",volume_controls_list:{volume_buttons:"Bottoni del volume",volume_set:"Livello del volume",volume_mute:"Silenzia"}},lock:{lock:"Blocca",unlock:"Sblocca",open:"Aperto"},humidifier:{show_target_humidity_control:"Controllo umidità"},climate:{show_temperature_control:"Controllo della temperatura?",hvac_modes:"Modalità del termostato"},number:{display_mode:"Modalità di visualizzazione",display_mode_list:{default:"Predefinito (cursore)",slider:"Cursore",buttons:"Pulsanti"}}},chip:{sub_element_editor:{title:"Editor di chip"},conditional:{chip:"Chip"},"chip-picker":{chips:"Chips",add:"Aggiungi chip",edit:"Modifica",clear:"Rimuovi",select:"Seleziona chip",types:{action:"Azione","alarm-control-panel":"Allarme",back:"Pulsante indietro",conditional:"Condizione",entity:"Entità",light:"Luce",menu:"Menù",spacer:"Distanziere",template:"Modello",weather:"Meteo"}}}},Ui={not_found:"Entità non trovata"},Hi={editor:Bi,card:Ui},Yi={form:{color_picker:{values:{default:"기본 색"}},info_picker:{values:{default:"기본 정보",name:"이름",state:"상태","last-changed":"마지막 변경","last-updated":"마지막 업데이트",none:"없음"}},icon_type_picker:{values:{default:"기본 타입",icon:"아이콘","entity-picture":"엔티티 사진",none:"없음"}},layout_picker:{values:{default:"기본 레이아웃",vertical:"수직 레이아웃",horizontal:"수평 레이아웃"}},alignment_picker:{values:{default:"기본 정렬",start:"시작",end:"끝",center:"중앙",justify:"행 정렬"}}},card:{generic:{icon_color:"아이콘 색",layout:"레이아웃",fill_container:"콘테이너 채우기",primary_info:"기본 정보",secondary_info:"보조 정보",icon_type:"아이콘 타입",content_info:"내용 정보",use_entity_picture:"엔티티 사진 사용",collapsible_controls:"꺼져있을 때 컨트롤 접기",icon_animation:"활성화 시 아이콘 애니메이션 사용"},light:{show_brightness_control:"밝기 컨트롤 표시",use_light_color:"조명 색 사용",show_color_temp_control:"색 온도 컨트롤 표시",show_color_control:"색 컨트롤 표시",incompatible_controls:"조명이 기능을 지원하지 않는 경우 일부 컨트롤이 표시되지 않을 수 있습니다."},fan:{show_percentage_control:"퍼센트 컨트롤",show_oscillate_control:"오실레이트 컨트롤"},cover:{show_buttons_control:"컨트롤 버튼 표시",show_position_control:"위치 컨트롤 표시",show_tilt_position_control:"기울기 컨트롤 표시"},template:{primary:"기본 정보",secondary:"보조 정보",multiline_secondary:"Multiline secondary?",entity_extra:"템플릿 및 작업에 사용",content:"내용",badge_icon:"뱃지 아이콘",badge_color:"뱃지 색",picture:"그림 (아이콘 대체)"},title:{title:"제목",subtitle:"부제목",title_tap_action:"제목 탭 액션",subtitle_tap_action:"부제목 탭 액션"},chips:{alignment:"정렬"},weather:{show_conditions:"조건 표시",show_temperature:"온도 표시"},update:{show_buttons_control:"컨트롤 버튼 표시"},vacuum:{commands:"명령어",commands_list:{on_off:"켜기/끄기"}},"media-player":{use_media_info:"미디어 정보 사용",use_media_artwork:"미디어 아트워크 사용",show_volume_level:"볼륨 레벨 표시",media_controls:"미디어 컨트롤",media_controls_list:{on_off:"켜기/끄기",shuffle:"섞기",previous:"이전 트랙",play_pause_stop:"재생/일시 정지/정지",next:"다음 트랙",repeat:"반복 모드"},volume_controls:"볼륨 컨트롤",volume_controls_list:{volume_buttons:"볼륨 버튼",volume_set:"볼륨 레벨",volume_mute:"음소거"}},lock:{lock:"잠금",unlock:"잠금 해제",open:"열기"},humidifier:{show_target_humidity_control:"습도 조절 표시"},climate:{show_temperature_control:"온도 조절 표시",hvac_modes:"HVAC 모드"}},chip:{sub_element_editor:{title:"칩 에디터"},conditional:{chip:"칩"},"chip-picker":{chips:"칩",add:"칩 추가",edit:"수정",clear:"클리어",select:"칩 선택",types:{action:"액션","alarm-control-panel":"알람",back:"이전",conditional:"Conditional",entity:"엔티티",light:"조명",menu:"메뉴",template:"템플릿",weather:"날씨"}}}},Wi={editor:Yi},Xi={form:{color_picker:{values:{default:"Standard farge"}},info_picker:{values:{default:"Standard informasjon",name:"Navn",state:"Tilstand","last-changed":"Sist endret","last-updated":"Sist oppdatert",none:"Ingen"}},layout_picker:{values:{default:"Standardoppsett",vertical:"Vertikalt oppsett",horizontal:"Horisontalt oppsett"}},alignment_picker:{values:{default:"Standard justering",start:"Start",end:"Slutt",center:"Senter",justify:"Bekreft"}}},card:{generic:{icon_color:"Ikon farge",layout:"Oppsett",primary_info:"Primærinformasjon",secondary_info:"Sekundærinformasjon",content_info:"Innhold",use_entity_picture:"Bruk enhetsbilde?",icon_animation:"Animer ikon når aktivt?"},light:{show_brightness_control:"Lysstyrkekontroll?",use_light_color:"Bruk lys farge",show_color_temp_control:"Temperatur fargekontroll?",show_color_control:"Fargekontroll?",incompatible_controls:"Noen kontroller vises kanskje ikke hvis lyset ditt ikke støtter denne funksjonen."},fan:{show_percentage_control:"Prosentvis kontroll?",show_oscillate_control:"Oscillerende kontroll?"},cover:{show_buttons_control:"Kontollere med knapper?",show_position_control:"Posisjonskontroll?"},template:{primary:"Primærinformasjon",secondary:"Sekundærinformasjon",multiline_secondary:"Multiline sekundær?",entity_extra:"Brukes i maler og handlinger",content:"Inhold"},title:{title:"Tittel",subtitle:"Undertekst"},chips:{alignment:"Justering"},weather:{show_conditions:"Forhold?",show_temperature:"Temperatur?"},vacuum:{commands:"Kommandoer"}},chip:{sub_element_editor:{title:"Chip redaktør"},conditional:{chip:"Chip"},"chip-picker":{chips:"Chips",add:"Legg til chip",edit:"Endre",clear:"Klare",select:"Velg chip",types:{action:"Handling","alarm-control-panel":"Alarm",back:"Tilbake",conditional:"Betinget",entity:"Entitet",light:"Lys",menu:"Meny",template:"Mal",weather:"Vær"}}}},Ki={editor:Xi},qi={form:{color_picker:{values:{default:"Standaard kleur"}},info_picker:{values:{default:"Standaard informatie",name:"Naam",state:"Staat","last-changed":"Laatst gewijzigd","last-updated":"Laatst bijgewerkt",none:"Geen"}},icon_type_picker:{values:{default:"Standaard icoon type",icon:"Icoon","entity-picture":"Entiteit afbeelding",none:"Geen"}},layout_picker:{values:{default:"Standaard lay-out",vertical:"Verticale lay-out",horizontal:"Horizontale lay-out"}},alignment_picker:{values:{default:"Standaard uitlijning",start:"Begin",end:"Einde",center:"Midden",justify:"Uitlijnen "}}},card:{generic:{icon_color:"Icoon kleur",layout:"Lay-out",fill_container:"Vul container",primary_info:"Primaire informatie",secondary_info:"Secundaire informatie",icon_type:"Icoon type",content_info:"Inhoud",use_entity_picture:"Gebruik entiteit afbeelding",collapsible_controls:"Bedieningselementen verbergen wanneer uitgeschakeld",icon_animation:"Pictogram animeren indien actief"},light:{show_brightness_control:"Bediening helderheid",use_light_color:"Gebruik licht kleur",show_color_temp_control:"Bediening kleurtemperatuur",show_color_control:"Bediening kleur",incompatible_controls:"Sommige bedieningselementen worden mogelijk niet weergegeven als uw lamp deze functie niet ondersteunt."},fan:{show_percentage_control:"Bediening middels percentage",show_oscillate_control:"Bediening oscillatie"},cover:{show_buttons_control:"Toon knoppen",show_position_control:"Toon positie bediening",show_tilt_position_control:"Toon tilt control"},template:{primary:"Primaire informatie",secondary:"Secundaire informatie",multiline_secondary:"Secundaire informatie op meerdere lijnen weergeven",entity_extra:"Gebruikt in sjablonen en acties",content:"Inhoud",badge_icon:"Badge icoon",badge_color:"Badge kleur",picture:"Afbeelding (zal het icoon vervangen)"},title:{title:"Titel",subtitle:"Ondertitel",title_tap_action:"Titel tik actie",subtitle_tap_action:"Ondertitel tik actie"},chips:{alignment:"Uitlijning"},weather:{show_conditions:"Weerbeeld",show_temperature:"Temperatuur"},update:{show_buttons_control:"Bedieningsknoppen"},vacuum:{commands:"Commando's",commands_list:{on_off:"Zet aan/uit"}},"media-player":{use_media_info:"Gebruik media informatie",use_media_artwork:"Gebruik media omslag",show_volume_level:"Toon volumeniveau",media_controls:"Mediabediening",media_controls_list:{on_off:"zet aan/uit",shuffle:"Shuffle",previous:"Vorige nummer",play_pause_stop:"Speel/pauze/stop",next:"Volgende nummer",repeat:"Herhalen"},volume_controls:"Volumeregeling",volume_controls_list:{volume_buttons:"Volume knoppen",volume_set:"Volumeniveau",volume_mute:"Dempen"}},lock:{lock:"Vergrendel",unlock:"Ontgrendel",open:"Open"},humidifier:{show_target_humidity_control:"Vochtigheid controle?"},climate:{show_temperature_control:"Temperatuur controle",hvac_modes:"HVAC Modes"},number:{display_mode:"Weergave Modus",display_mode_list:{default:"Standaard (schuifbalk)",slider:"Schuifbalk",buttons:"Knoppen"}}},chip:{sub_element_editor:{title:"Chip editor"},conditional:{chip:"Chip"},"chip-picker":{chips:"Chips",add:"Toevoegen chip",edit:"Bewerk",clear:"Maak leeg",select:"Selecteer chip",types:{action:"Actie","alarm-control-panel":"Alarm",back:"Terug",conditional:"Voorwaardelijk",entity:"Entiteit",light:"Licht",menu:"Menu",spacer:"Afstandhouder",template:"Sjabloon",weather:"Weer"}}}},Gi={not_found:"Entiteit niet gevonden"},Zi={editor:qi,card:Gi},Ji={form:{color_picker:{values:{default:"Domyślny kolor"}},info_picker:{values:{default:"Domyślne informacje",name:"Nazwa",state:"Stan","last-changed":"Ostatnia zmiana","last-updated":"Ostatnia aktualizacja",none:"Brak"}},icon_type_picker:{values:{default:"Domyślny typ",icon:"Ikona","entity-picture":"Obraz encji",none:"Brak"}},layout_picker:{values:{default:"Układ domyślny",vertical:"Układ pionowy",horizontal:"Układ poziomy"}},alignment_picker:{values:{default:"Wyrównanie domyślne",start:"Wyrównanie do lewej",end:"Wyrównanie do prawej",center:"Wyśrodkowanie",justify:"Justowanie"}}},card:{generic:{icon_color:"Kolor ikony",layout:"Układ",fill_container:"Wypełnij zawartością",primary_info:"Informacje główne",secondary_info:"Informacje drugorzędne",icon_type:"Typ ikony",content_info:"Zawartość",use_entity_picture:"Użyć obrazu encji?",collapsible_controls:"Zwiń sterowanie, jeśli wyłączone",icon_animation:"Animować, gdy aktywny?"},light:{show_brightness_control:"Sterowanie jasnością?",use_light_color:"Użyj koloru światła",show_color_temp_control:"Sterowanie temperaturą światła?",show_color_control:"Sterowanie kolorami?",incompatible_controls:"Niektóre funkcje są niewidoczne, jeśli światło ich nie obsługuje."},fan:{show_percentage_control:"Sterowanie procentowe?",show_oscillate_control:"Sterowanie oscylacją?"},cover:{show_buttons_control:"Przyciski sterujące?",show_position_control:"Sterowanie położeniem?",show_tilt_position_control:"Sterowanie poziomem otwarcia?"},template:{primary:"Informacje główne",secondary:"Informacje drugorzędne",multiline_secondary:"Drugorzędne wielowierszowe?",entity_extra:"Używane w szablonach i akcjach",content:"Zawartość",badge_icon:"Ikona odznaki",badge_color:"Kolor odznaki",picture:"Obraz (zamiast ikony)"},title:{title:"Tytuł",subtitle:"Podtytuł"},chips:{alignment:"Wyrównanie"},weather:{show_conditions:"Warunki?",show_temperature:"Temperatura?"},update:{show_buttons_control:"Przyciski sterujące?"},vacuum:{commands:"Polecenia"},"media-player":{use_media_info:"Użyj informacji o multimediach",use_media_artwork:"Użyj okładek multimediów",show_volume_level:"Wyświetl poziom głośności",media_controls:"Sterowanie multimediami",media_controls_list:{on_off:"Włącz/wyłącz",shuffle:"Losowo",previous:"Poprzednie nagranie",play_pause_stop:"Odtwórz/Pauza/Zatrzymaj",next:"Następne nagranie",repeat:"Powtarzanie"},volume_controls:"Sterowanie głośnością",volume_controls_list:{volume_buttons:"Przyciski głośności",volume_set:"Poziom głośności",volume_mute:"Wycisz"}},lock:{lock:"Zablokuj",unlock:"Odblokuj",open:"Otwórz"},humidifier:{show_target_humidity_control:"Sterowanie wilgotnością?"},climate:{show_temperature_control:"Sterowanie temperaturą?",hvac_modes:"Tryby urządzenia"}},chip:{sub_element_editor:{title:"Edytor czipów"},conditional:{chip:"Czip"},"chip-picker":{chips:"Czipy",add:"Dodaj czip",edit:"Edytuj",clear:"Wyczyść",select:"Wybierz czip",types:{action:"Akcja","alarm-control-panel":"Alarm",back:"Wstecz",conditional:"Warunkowy",entity:"Encja",light:"Światło",menu:"Menu",spacer:"Odstęp",template:"Szablon",weather:"Pogoda"}}}},Qi={editor:Ji},to={form:{color_picker:{values:{default:"Cor padrão"}},info_picker:{values:{default:"Informação padrão",name:"Nome",state:"Estado","last-changed":"Última alteração","last-updated":"Última atualização",none:"Nenhum"}},icon_type_picker:{values:{default:"Tipo padrão",icon:"Ícone","entity-picture":"Imagem da entidade",none:"Nenhum"}},layout_picker:{values:{default:"Layout padrão",vertical:"Layout vertical",horizontal:"Layout horizontal"}},alignment_picker:{values:{default:"Alinhamento padrão",start:"Início",end:"Fim",center:"Centro",justify:"Justificado"}}},card:{generic:{color:"Cor",icon_color:"Cor do ícone",layout:"Layout",fill_container:"Prencher",primary_info:"Informação primária",secondary_info:"Informação secundária",icon_type:"Tipo do ícone",content_info:"Conteúdo",use_entity_picture:"Usar imagem da entidade?",collapsible_controls:"Recolher controles quando desligado",icon_animation:"Animar ícone quando ativo?"},light:{show_brightness_control:"Controle de brilho?",use_light_color:"Usar cor da luz",show_color_temp_control:"Controle de temperatura de cor?",show_color_control:"Controle de cor?",incompatible_controls:"Alguns controles podem não ser exibidos se sua luz não suportar o recurso."},fan:{show_percentage_control:"Controle de porcentagem?",show_oscillate_control:"Controle de oscilação?"},cover:{show_buttons_control:"Botões de controle?",show_position_control:"Controle de posição?",show_tilt_position_control:"Controle de inclinação?"},template:{primary:"Informação primária",secondary:"Informação secundária",multiline_secondary:"Multilinha secundária?",entity_extra:"Usado em modelos e ações",label:"Label",content:"Conteúdo",badge_icon:"Ícone do badge",badge_color:"Cor do badge",picture:"Imagem (irá substituir o ícone)"},title:{title:"Título",subtitle:"Legenda",title_tap_action:"Ação de toque no título",subtitle_tap_action:"Ação de toque na legenda"},chips:{alignment:"Alinhamento"},weather:{show_conditions:"Condições?",show_temperature:"Temperatura?"},update:{show_buttons_control:"Botões de controle?"},vacuum:{commands:"Comandos",commands_list:{on_off:"Ligar/Desligar"}},"media-player":{use_media_info:"Usar informação da mídia",use_media_artwork:"Usar arte da mídia",show_volume_level:"Mostrar nível de volume",media_controls:"Controles de mídia",media_controls_list:{on_off:"Ligar/Desligar",shuffle:"Embaralhar",previous:"Faixa anterior",play_pause_stop:"Reproduzir/pausar/parar",next:"Próxima faixa",repeat:"Modo repetição"},volume_controls:"Controles de volume",volume_controls_list:{volume_buttons:"Botões de volume",volume_set:"Nível de volume",volume_mute:"Mudo"}},lock:{lock:"Bloquear",unlock:"Desbloquear",open:"Abrir"},humidifier:{show_target_humidity_control:"Controle de umidade?"},climate:{show_temperature_control:"Controle de temperatura?",hvac_modes:"Modos do HVAC"},number:{display_mode:"Modo de exibição",display_mode_list:{default:"Padrão (deslizante)",slider:"Deslizante",buttons:"Botões"}}},chip:{sub_element_editor:{title:"Editor de chip"},conditional:{chip:"Chip"},"chip-picker":{chips:"Chips",add:"Adicionar chip",edit:"Editar",clear:"Limpar",select:"Selecionar chip",types:{action:"Ação","alarm-control-panel":"Alarme",back:"Voltar",conditional:"Condicional",entity:"Entidade",light:"Luz",menu:"Menu",spacer:"Espaçador",template:"Template",weather:"Clima"}}}},eo={not_found:"Entidade não encontrada"},io={editor:to,card:eo},oo={form:{color_picker:{values:{default:"Cor padrão"}},info_picker:{values:{default:"Informações padrão",name:"Nome",state:"Estado","last-changed":"Última alteração","last-updated":"Última atualização",none:"Nenhum"}},layout_picker:{values:{default:"Layout padrão",vertical:"Layout vertical",horizontal:"Layout horizontal"}},alignment_picker:{values:{default:"Padrão (inicio)",end:"Fim",center:"Centrado",justify:"Justificado"}}},card:{generic:{icon_color:"Cor do ícone?",layout:"Layout",primary_info:"Informações primárias",secondary_info:"Informações secundárias",use_entity_picture:"Usar imagem da entidade?",icon_animation:"Animar ícone quando ativo?"},light:{show_brightness_control:"Mostrar controle de brilho?",use_light_color:"Usar cor da luz?",show_color_temp_control:"Mostrar controle de temperatura?",show_color_control:"Mostrar controle de cor?",incompatible_controls:"Alguns controles podem não ser exibidos se a luz não suportar o recurso."},fan:{show_percentage_control:"Mostrar controle de porcentagem?",show_oscillate_control:"Mostrar controle de oscilação?"},cover:{show_buttons_control:"Mostrar botões?",show_position_control:"Mostrar controle de posição?"},template:{primary:"Informações primárias",secondary:"Informações secundárias",multiline_secondary:"Multilinha secundária?",content:"Conteúdo"},title:{title:"Título",subtitle:"Subtítulo"},chips:{alignment:"Alinhamento"},weather:{show_conditions:"Condições?",show_temperature:"Temperatura?"}},chip:{sub_element_editor:{title:"Editor de fichas"},conditional:{chip:"Ficha"},"chip-picker":{chips:"Fichas",add:"Adicionar ficha",edit:"Editar",clear:"Limpar",select:"Selecionar ficha",types:{action:"Ação","alarm-control-panel":"Alarme",back:"Voltar",conditional:"Condicional",entity:"Entidade",light:"Iluminação",menu:"Menu",template:"Modelo",weather:"Clima"}}}},no={editor:oo},ro={form:{color_picker:{values:{default:"Culoare implicită"}},info_picker:{values:{default:"Informație implicită",name:"Nume",state:"Stare","last-changed":"Ultima modificare","last-updated":"Ultima actulizare",none:"Niciuna"}},icon_type_picker:{values:{default:"Tip implicit",icon:"Pictogramă","entity-picture":"Imagine",none:"Niciuna"}},layout_picker:{values:{default:"Aranjare implicită",vertical:"Verticală",horizontal:"Orizontală"}},alignment_picker:{values:{default:"Aliniere implicită",start:"Stânga",end:"Dreapta",center:"Centrat",justify:"Umplere"}}},card:{generic:{icon_color:"Culoare pictogramă",layout:"Aranjare",fill_container:"Umplere container",primary_info:"Informație principală",secondary_info:"Informație secundară",icon_type:"Tip pictogramă",content_info:"Conținut",use_entity_picture:"Imagine?",collapsible_controls:"Restrângere la dezactivare"},light:{show_brightness_control:"Comandă pentru strălucire?",use_light_color:"Folosește culoarea luminii",show_color_temp_control:"Comandă pentru temperatură de culoare?",show_color_control:"Comandă pentru culoare?",incompatible_controls:"Unele comenzi ar putea să nu fie afișate dacă lumina nu suportă această caracteristică."},fan:{icon_animation:"Animare pictograma la activare?",show_percentage_control:"Comandă procent?",show_oscillate_control:"Comandă oscilație?"},cover:{show_buttons_control:"Comenzi pentru control?",show_position_control:"Comandă pentru poziție?",show_tilt_position_control:"Comandă pentru înclinare?"},template:{primary:"Informație principală",secondary:"Informație secundară",multiline_secondary:"Informație secundară pe mai multe linii?",entity_extra:"Folosită în șabloane și acțiuni",content:"Conținut",badge_icon:"Pictogramă insignă",badge_color:"Culoare insignă",picture:"Imagine (inlocuiește pictograma)"},title:{title:"Titlu",subtitle:"Subtitlu"},chips:{alignment:"Aliniere"},weather:{show_conditions:"Condiții?",show_temperature:"Temperatură?"},update:{show_buttons_control:"Comenzi control?"},vacuum:{commands:"Comenzi"},"media-player":{use_media_info:"Informații media",use_media_artwork:"Grafică media",show_volume_level:"Nivel volum",media_controls:"Comenzi media",media_controls_list:{on_off:"Pornit/Oprit",shuffle:"Amestecare",previous:"Pista anterioară",play_pause_stop:"Redare/Pauză/Stop",next:"Pista următoare",repeat:"Mod repetare"},volume_controls:"Comenzi volum",volume_controls_list:{volume_buttons:"Comenzi volum",volume_set:"Nivel volum",volume_mute:"Dezactivare sunet"}},lock:{lock:"Încuie",unlock:"Descuie",open:"Deschide"},humidifier:{show_target_humidity_control:"Comenzi umiditate?"},climate:{show_temperature_control:"Comenzi temperatură?",hvac_modes:"Moduri HVAC"}},chip:{sub_element_editor:{title:"Editor jeton"},conditional:{chip:"Jeton"},"chip-picker":{chips:"Jetoane",add:"Adaugă jeton",edit:"Modifică",clear:"Șterge",select:"Alege jeton",types:{action:"Acțiune","alarm-control-panel":"Alarmă",back:"Înapoi",conditional:"Condițional",entity:"Entitate",light:"Lumină",menu:"Meniu",template:"Șablon",weather:"Vreme"}}}},ao={editor:ro},so={form:{color_picker:{values:{default:"Цвет по умолчанию"}},info_picker:{values:{default:"По умолчанию",name:"Имя",state:"Статус","last-changed":"Последнее изменение","last-updated":"Последнее обновление",none:"Нет"}},icon_type_picker:{values:{default:"По умолчанию",icon:"Иконка","entity-picture":"Изображение",none:"Нет"}},layout_picker:{values:{default:"Расположение по умолчанию",vertical:"Вертикальное расположение",horizontal:"Горизонтальное расположение"}},alignment_picker:{values:{default:"Выравнивание по умолчанию",start:"К началу",end:"К концу",center:"По центру",justify:"На всю ширину"}}},card:{generic:{icon_color:"Цвет иконки",layout:"Расположение",fill_container:"Заполнение",primary_info:"Основная информация",secondary_info:"Второстепенная информация",icon_type:"Тип иконки",content_info:"Содержимое",use_entity_picture:"Использовать изображение объекта?",collapsible_controls:"Сворачивать элементы управления при выключении"},light:{show_brightness_control:"Управлять яркостью?",use_light_color:"Использовать текущий цвет света",show_color_temp_control:"Управлять цветовой температурой?",show_color_control:"Управлять цветом?",incompatible_controls:"Некоторые элементы управления могут не отображаться, если ваш светильник не поддерживает эти функции."},fan:{icon_animation:"Анимировать иконку когда включено?",show_percentage_control:"Управлять процентами?",show_oscillate_control:"Oscillate control?"},cover:{show_buttons_control:"Добавить кнопки управления?",show_position_control:"Управлять позицией?",show_tilt_position_control:"Управлять наклоном?"},template:{primary:"Основная информация",secondary:"Второстепенная информация",multiline_secondary:"Многострочная Второстепенная информация?",entity_extra:"Используется в шаблонах и действиях",content:"Содержимое",badge_icon:"Иконка значка",badge_color:"Цвет значка",picture:"Изображение (заменить иконку)"},title:{title:"Заголовок",subtitle:"Подзаголовок"},chips:{alignment:"Выравнивание"},weather:{show_conditions:"Условия?",show_temperature:"Температура?"},update:{show_buttons_control:"Кнопки управления?"},vacuum:{commands:"Команды"},"media-player":{use_media_info:"Использовать информацию с медиа-устройства",use_media_artwork:"Использовать обложку с медиа-устройства",show_volume_level:"Показать уровень громкости",media_controls:"Управление медиа-устройством",media_controls_list:{on_off:"Включение/выключение",shuffle:"Перемешивание",previous:"Предыдущий трек",play_pause_stop:"Воспроизведение/пауза/остановка",next:"Следующий трек",repeat:"Режим повтора"},volume_controls:"Регулятор громкости",volume_controls_list:{volume_buttons:"Кнопки громкости",volume_set:"Уровень громкости",volume_mute:"Без звука"}},lock:{lock:"Закрыто",unlock:"Разблокировано",open:"Открыто"},humidifier:{show_target_humidity_control:"Управлять целевым уровенем влажности?"},climate:{show_temperature_control:"Управлять целевой температурой?",hvac_modes:"Режимы работы"}},chip:{sub_element_editor:{title:"Редактор мини-карточек"},conditional:{chip:"Мини-карточка"},"chip-picker":{chips:"Мини-карточки",add:"Добавить мини-карточку",edit:"Изменить",clear:"Очистить",select:"Выбрать мини-карточку",types:{action:"Действие","alarm-control-panel":"Тревога",back:"Назад",conditional:"Условия",entity:"Объект",light:"Освещение",menu:"Меню",template:"Шаблон",weather:"Погода"}}}},lo={editor:so},co={form:{color_picker:{values:{default:"Privzeta barva"}},info_picker:{values:{default:"Privzete informacije",name:"Naziv",state:"Stanje","last-changed":"Zadnja sprememba","last-updated":"Zadnja posodobitev",none:"Brez"}},icon_type_picker:{values:{default:"Privzeta vrsta",icon:"Ikona","entity-picture":"Slika entitete",none:"Brez"}},layout_picker:{values:{default:"Privzeta postavitev",vertical:"Vertikalna postavitev",horizontal:"Horizontalna postavitev"}},alignment_picker:{values:{default:"Privzeta poravnava",start:"Pričetek",end:"Konec",center:"Center",justify:"Poravnava"}}},card:{generic:{icon_color:"Barva ikone",layout:"Postavitev",fill_container:"Zapolnitev prostora",primary_info:"Primarna informacija",secondary_info:"Sekundarna informacija",icon_type:"Vrsta ikone",content_info:"Vsebina",use_entity_picture:"Uporabi sliko entitete?",collapsible_controls:"Strni kontrolnike, ko so izklopljeni",icon_animation:"Animacija ikone, ko je aktivna?"},light:{show_brightness_control:"Nadzor svetlosti?",use_light_color:"Uporabi svetlo barvo",show_color_temp_control:"Nadzor temperature barve?",show_color_control:"Nadzor barv?",incompatible_controls:"Nekateri kontrolniki morda ne bodo prikazani, če vaša luč ne podpira te funkcije."},fan:{show_percentage_control:"Kontrola v odstotkih?",show_oscillate_control:"Kontrola nihanja?"},cover:{show_buttons_control:"Gumbi za upravljanje?",show_position_control:"Nadzor položaja?",show_tilt_position_control:"Nadzor nagiba?"},template:{primary:"Primarna informacija",secondary:"Sekundarna informacija",multiline_secondary:"Večvrstični sekundarni?",entity_extra:"Uporablja se v predlogah in dejanjih",content:"Vsebina",badge_icon:"Ikona značke",badge_color:"Barva značke",picture:"Slika (nadomestila bo ikono)"},title:{title:"Naziv",subtitle:"Podnaslov",title_tap_action:"Dejanje dotika naslova",subtitle_tap_action:"Dejanje dotika podnapisov"},chips:{alignment:"Poravnava"},weather:{show_conditions:"Pogoji?",show_temperature:"Temperatura?"},update:{show_buttons_control:"Gumbi za upravljanje?"},vacuum:{commands:"Ukazi",commands_list:{on_off:"Vklop/izklop"}},"media-player":{use_media_info:"Uporabite informacije o medijih",use_media_artwork:"Uporabite medijsko umetniško delo",show_volume_level:"Pokaži raven glasnosti",media_controls:"Nadzor medijev",media_controls_list:{on_off:"Vklop/izklop",shuffle:"Naključno",previous:"Prejšnja skladba",play_pause_stop:"Predvajaj/pavza/ustavi",next:"Naslednja skladba",repeat:"Ponavljajoči način"},volume_controls:"Kontrole glasnosti",volume_controls_list:{volume_buttons:"Gumbi za glasnost",volume_set:"Raven glasnosti",volume_mute:"Tiho"}},lock:{lock:"Zaklepanje",unlock:"Odkleni",open:"Odprto"},humidifier:{show_target_humidity_control:"Nadzor vlažnosti?"},climate:{show_temperature_control:"Nadzor temperature?",hvac_modes:"HVAC načini"},number:{display_mode:"Način prikaza",display_mode_list:{default:"Privzeto (drsnik)",slider:"Drsnik",buttons:"Gumbi"}}},chip:{sub_element_editor:{title:"Urejevalnik čipov"},conditional:{chip:"Ćiš"},"chip-picker":{chips:"Čipi",add:"Dodaj čip",edit:"Uredi",clear:"Pobriši",select:"Izbira čipa",types:{action:"Dejanje","alarm-control-panel":"Alarm",back:"Nazaj",conditional:"Pogojno",entity:"Entiteta",light:"Svetloba",menu:"Meni",spacer:"Distančnik",template:"Predloga",weather:"Vreme"}}}},uo={not_found:"Entiteta ni najdena"},ho={editor:co,card:uo},mo={form:{color_picker:{values:{default:"Predvolená farba"}},info_picker:{values:{default:"Predvolené informácie",name:"Názov",state:"Stav","last-changed":"Posledná zmena","last-updated":"Posledná aktualizácia",none:"Žiadna"}},icon_type_picker:{values:{default:"Predvolený typ",icon:"Ikona","entity-picture":"Obrázok entity",none:"Žiadny"}},layout_picker:{values:{default:"Predvolené rozloženie",vertical:"Zvislé rozloženie",horizontal:"Vodorovné rozloženie"}},alignment_picker:{values:{default:"Predvolené zarovnanie",start:"Začiatok",end:"Koniec",center:"Stred",justify:"Vyplniť"}}},card:{generic:{icon_color:"Farba ikony",layout:"Rozloženie",fill_container:"Vyplniť priestor",primary_info:"Základné info",secondary_info:"Doplnkové info",icon_type:"Typ ikony",content_info:"Obsah",use_entity_picture:"Použiť obrázok entity?",collapsible_controls:"Skryť ovládanie v stave VYP.",icon_animation:"Animovaná ikona v stave ZAP?"},light:{show_brightness_control:"Ovládanie jasu?",use_light_color:"Použiť farbu svetla",show_color_temp_control:"Ovládanie teploty?",show_color_control:"Ovládanie farby?",incompatible_controls:"Niektoré ovládacie prvky sa nemusia zobraziť, pokiaľ ich svetlo nepodporuje."},fan:{show_percentage_control:"Ovládanie rýchlosti v percentách?",show_oscillate_control:"Ovládanie oscilácie?"},cover:{show_buttons_control:"Zobraziť ovládacie tlačidlá?",show_position_control:"Ovládanie pozície?",show_tilt_position_control:"Ovládanie natočenia?"},template:{primary:"Základné info",secondary:"Doplnkové info",multiline_secondary:"Viacriadkové doplnkové info?",entity_extra:"Použitá v šablónach a akciách",content:"Obsah",badge_icon:"Ikona odznaku",badge_color:"Farba odznaku",picture:"Obrázok (nahrádza ikonu)"},title:{title:"Nadpis",subtitle:"Podnadpis",title_tap_action:"Akcia klepnutia na názov",subtitle_tap_action:"Akcia klepnutia na titulky"},chips:{alignment:"Zarovnanie"},weather:{show_conditions:"Zobraziť podmienky?",show_temperature:"Zobraziť teplotu?"},update:{show_buttons_control:"Zobraziť ovládacie tlačidlá?"},vacuum:{commands:"Príkazy",commands_list:{on_off:"Zapnúť/Vypnúť"}},"media-player":{use_media_info:"Použiť info o médiu",use_media_artwork:"Použiť obrázok z média",show_volume_level:"Zobraziť úroveň hlasitosti",media_controls:"Ovládanie média",media_controls_list:{on_off:"Zap / Vyp",shuffle:"Premiešať",previous:"Predchádzajúca",play_pause_stop:"Spustiť/pauza/stop",next:"Ďalšia",repeat:"Opakovať"},volume_controls:"Ovládanie hlasitosti",volume_controls_list:{volume_buttons:"Tlačidlá hlasitosti",volume_set:"Úroveň hlasitosti",volume_mute:"Stlmiť"}},lock:{lock:"Zamknuté",unlock:"Odomknuté",open:"Otvorené"},humidifier:{show_target_humidity_control:"Ovládanie vlhkosti?"},climate:{show_temperature_control:"Ovládanie teploty?",hvac_modes:"HVAC mód"},number:{display_mode:"Režim zobrazenia",display_mode_list:{default:"Predvolené (posúvač)",slider:"Posúvač",buttons:"Tlačidlá"}}},chip:{sub_element_editor:{title:"Editor štítkov"},conditional:{chip:"Štítok"},"chip-picker":{chips:"Štítky",add:"Pridať štítok",edit:"Editovať",clear:"Vymazať",select:"Vybrať štítok",types:{action:"Akcia","alarm-control-panel":"Alarm",back:"Späť",conditional:"Podmienené",entity:"Entita",light:"Svetlo",menu:"Menu",spacer:"Medzera",template:"Šablóna",weather:"Počasie"}}}},po={not_found:"Entita nenájdená"},fo={editor:mo,card:po},go={form:{color_picker:{values:{default:"Standardfärg"}},info_picker:{values:{default:"Förvald information",name:"Namn",state:"Status","last-changed":"Sist ändrad","last-updated":"Sist uppdaterad",none:"Ingen"}},layout_picker:{values:{default:"Standard",vertical:"Vertikal",horizontal:"Horisontell"}},alignment_picker:{values:{default:"Standard (början)",end:"Slutet",center:"Centrerad",justify:"Anpassa"}}},card:{generic:{color:"Färg",icon_color:"Ikonens färg",layout:"Layout",icon_type:"Ikontyp",primary_info:"Primär information",secondary_info:"Sekundär information",use_entity_picture:"Använd enhetens bild?",collapsible_controls:"Dölj kontroller när enehten är av",icon_animation:"Animera ikonen när enheten är på?"},light:{show_brightness_control:"Styr ljushet?",use_light_color:"Styr ljusets färg",show_color_temp_control:"Styr färgtemperatur?",show_color_control:"Styr färg?",incompatible_controls:"Kontroller som inte stöds av enheten kommer inte visas"},fan:{show_percentage_control:"Procentuell kontroll?",show_oscillate_control:"Kontroll för oscillera?"},cover:{show_buttons_control:"Visa kontrollknappar?",show_position_control:"Visa positionskontroll?",show_tilt_position_control:"Visa lutningskontroll?"},template:{primary:"Primär information",secondary:"Sekundär information",multiline_secondary:"Sekundär med flera rader?",content:"Innehåll",picture:"Bild (ersätter ikonen)"},title:{title:"Rubrik",subtitle:"Underrubrik"},chips:{alignment:"Justering"},weather:{show_conditions:"Förhållanden?",show_temperature:"Temperatur?"},update:{show_buttons_control:"Visa kontrollknappar?"},vacuum:{commands:"Kommandon"},climate:{show_temperature_control:"Temperaturkontroll?",hvac_modes:"HVAC-lägen"},"media-player":{use_media_artwork:"Visa mediaomslag",show_volume_level:"Volymkontroll",media_controls:"Mediakontroller",media_controls_list:{on_off:"Slå på/av",previous:"Föregående spår",play_pause_stop:"Spela/pausa/stoppa",next:"Nästa spår",repeat:"Upprepa"},volume_controls:"Volymkontroller",volume_controls_list:{volume_buttons:"Volymknappar",volume_set:"Volymnivå",volume_mute:"Ljud av"}},lock:{lock:"Lås",unlock:"Lås upp",open:"Öppna"}},chip:{sub_element_editor:{title:"Chipredigerare"},conditional:{chip:"Chip"},"chip-picker":{chips:"Chips",add:"Lägg till chip",edit:"Redigera",clear:"Rensa",select:"Välj chip",types:{action:"Åtgärd","alarm-control-panel":"Alarm",back:"Bakåt",conditional:"Villkorad",entity:"Enhet",light:"Ljus",menu:"Meny",template:"Mall",weather:"Väder"}}}},_o={editor:go},vo={form:{color_picker:{values:{default:"Varsayılan renk"}},info_picker:{values:{default:"Varsayılan bilgi",name:"İsim",state:"Durum","last-changed":"Son Değişim","last-updated":"Son Güncelleme",none:"None"}},layout_picker:{values:{default:"Varsayılan düzen",vertical:"Dikey düzen",horizontal:"Yatay düzen"}},alignment_picker:{values:{default:"Varsayılan hizalama",start:"Sola yasla",end:"Sağa yasla",center:"Ortala",justify:"İki yana yasla"}}},card:{generic:{icon_color:"Simge renki",layout:"Düzen",primary_info:"Birinci bilgi",secondary_info:"İkinci bilgi",content_info:"İçerik",use_entity_picture:"Varlık resmi kullanılsın",icon_animation:"Aktif olduğunda simgeyi hareket ettir"},light:{show_brightness_control:"Parlaklık kontrolü",use_light_color:"Işık rengini kullan",show_color_temp_control:"Renk ısısı kontrolü",show_color_control:"Renk kontrolü",incompatible_controls:"Kullandığınız lamba bu özellikleri desteklemiyorsa bazı kontroller görüntülenemeyebilir."},fan:{show_percentage_control:"Yüzde kontrolü",show_oscillate_control:"Salınım kontrolü"},cover:{show_buttons_control:"Düğme kontrolleri",show_position_control:"Pozisyon kontrolü"},template:{primary:"Birinci bilgi",secondary:"İkinci bilgi",multiline_secondary:"İkinci bilgi çok satır olsun",entity_extra:"Şablonlarda ve eylemlerde kullanılsın",content:"İçerik"},title:{title:"Başlık",subtitle:"Altbaşlık"},chips:{alignment:"Hizalama"},weather:{show_conditions:"Hava koşulu",show_temperature:"Sıcaklık"},update:{show_buttons_control:"Düğme kontrolü"},vacuum:{commands:"Komutlar"}},chip:{sub_element_editor:{title:"Chip düzenleyici"},conditional:{chip:"Chip"},"chip-picker":{chips:"Chips",add:"Chip ekle",edit:"Düzenle",clear:"Temizle",select:"Chip seç",types:{action:"Eylem","alarm-control-panel":"Alarm",back:"Geri",conditional:"Koşullu",entity:"Varlık",light:"Işık",menu:"Menü",template:"Şablon",weather:"Hava Durumu"}}}},bo={editor:vo},yo={form:{color_picker:{values:{default:"Колір за замовчуванням"}},info_picker:{values:{default:"Інформація за замовчуванням",name:"Назва",state:"Стан","last-changed":"Востаннє змінено","last-updated":"Востаннє оновлено",none:"Нічого"}},icon_type_picker:{values:{default:"За замовчуванням",icon:"Іконка","entity-picture":"Зображення сутності",none:"Нічого"}},layout_picker:{values:{default:"Розташування за замовчуванням",vertical:"Вертикальне розташування",horizontal:"Горизонтальне розташування"}},alignment_picker:{values:{default:"Вирівнювання за замовчуванням",start:"На початку",end:"В кінці",center:"По центру",justify:"Вирівняти"}}},card:{generic:{icon_color:"Колір іконки",layout:"Розташування",fill_container:"Заповнити контейнер",primary_info:"Головна інформація",secondary_info:"Додаткова інформація",icon_type:"Тип іконки",content_info:"Вміст",use_entity_picture:"Використовувати зображення сутності?",collapsible_controls:"Приховувати елементи керування коли вимкнено?",icon_animation:"Анімувати іконку при активації?"},light:{show_brightness_control:"Контроль яскравості?",use_light_color:"Використовувати колір світла",show_color_temp_control:"Керування температурою світла?",show_color_control:"Керування кольором світла?",incompatible_controls:"Деякі елементи керування можуть не відображатись якщо ваш пристрій не підтримує цю функцію."},fan:{show_percentage_control:"Керування швидкістю?",show_oscillate_control:"Керування повротом?"},cover:{show_buttons_control:"Кнопки керування?",show_position_control:"Керування позицією?",show_tilt_position_control:"Керування нахилом?"},template:{primary:"Головна інформація",secondary:"Додаткова інформація",multiline_secondary:"Багаторядкова додаткова інформація?",entity_extra:"Використовується в шаблонах та діях",content:"Вміст",badge_icon:"Іконка значка",badge_color:"Колір значка",picture:"Зображення (замінить іконку)"},title:{title:"Заголовок",subtitle:"Підзаголовок",title_tap_action:"Дія при дотику до заголовку",subtitle_tap_action:"Дія при дотику до підзаголовку"},chips:{alignment:"Вирівнювання"},weather:{show_conditions:"Умови?",show_temperature:"Температура?"},update:{show_buttons_control:"Кнопки керування?"},vacuum:{commands:"Команди",commands_list:{on_off:"Увімкнути/Вимкнути"}},"media-player":{use_media_info:"Використовувати інформацію медіа",use_media_artwork:"Використовувати зображення медіа",show_volume_level:"Показати рівень гучності",media_controls:"Керування медіа",media_controls_list:{on_off:"Увімкнути/Вимкнути",shuffle:"Перемішати",previous:"Попередній трек",play_pause_stop:"Відтворити/пауза/стоп",next:"Наступний трек",repeat:"Режим повторення"},volume_controls:"Елементи керування гучністю",volume_controls_list:{volume_buttons:"Кнопки гучності",volume_set:"Рівень гучності",volume_mute:"Вимк. звук"}},lock:{lock:"Зачинити",unlock:"Відчинити",open:"Відкрити"},humidifier:{show_target_humidity_control:"Керування вологістю?"},climate:{show_temperature_control:"Керування температурою?",hvac_modes:"Режими"},number:{display_mode:"Відображати режим",display_mode_list:{default:"За замовчуванням (повзунок)",slider:"Повзунок",buttons:"Кнопки"}}},chip:{sub_element_editor:{title:"Редактор міні-карток"},conditional:{chip:"Міні-картка"},"chip-picker":{chips:"Міні-картки",add:"Додати міні-картку",edit:"Редагувати",clear:"Очистити",select:"Обрати міні-картку",types:{action:"Дія","alarm-control-panel":"Сигналізація",back:"Назад",conditional:"Умовна",entity:"Сутність",light:"Світло",menu:"Меню",spacer:"Порожнє місце",template:"Вручну",weather:"Погода"}}}},xo={not_found:"Сутність не знайдено"},wo={editor:yo,card:xo},ko={form:{color_picker:{values:{default:"Màu mặc định"}},info_picker:{values:{default:"Thông tin mặc định",name:"Tên",state:"Trạng thái","last-changed":"Lần thay đổi cuối","last-updated":"Lần cập nhật cuối",none:"Không có"}},icon_type_picker:{values:{default:"Kiểu mặc định",icon:"Biểu tượng","entity-picture":"Ảnh thực thể",none:"Không có"}},layout_picker:{values:{default:"Bố cục mặc định",vertical:"Bố cục dọc",horizontal:"Bố cục ngang"}},alignment_picker:{values:{default:"Căn chỉnh mặc định",start:"Căn đầu",end:"Căn cuối",center:"Căn giữa",justify:"Căn hai bên"}}},card:{generic:{icon_color:"Màu biểu tượng",layout:"Bố cục",fill_container:"Làm đầy ô chứa",primary_info:"Thông tin chính",secondary_info:"Thông tin phụ",icon_type:"Kiểu biểu tượng",content_info:"Nội dung",use_entity_picture:"Dùng ảnh của thực thể?",collapsible_controls:"Thu nhỏ điều kiển khi tắt",icon_animation:"Biểu tượng chuyển động khi kích hoạt?"},light:{show_brightness_control:"Điều khiển độ sáng?",use_light_color:"Dùng màu đèn",show_color_temp_control:"Điều khiển nhiệt độ màu?",show_color_control:"Điều khiển màu sắc?",incompatible_controls:"Một số điều khiển sẽ không được hiển thị nếu đèn của bạn không hỗ trợ tính năng đó."},fan:{show_percentage_control:"Điều khiển dạng phần trăm?",show_oscillate_control:"Điều khiển xoay?"},cover:{show_buttons_control:"Điều khiển nút bấm?",show_position_control:"Điều khiển vị trí?",show_tilt_position_control:"Điều khiển độ nghiêng?"},template:{primary:"Thông tin chính",secondary:"Thông tin phụ",multiline_secondary:"Nhiều dòng thông tin phụ?",entity_extra:"Được sử dụng trong bản mẫu và hành động",content:"Nội dung",badge_icon:"Biểu tượng huy hiệu",badge_color:"Màu huy hiệu",picture:"Ảnh (thay cho biểu tượng)"},title:{title:"Tiêu đề",subtitle:"Phụ đề",title_tap_action:"Hành động khi nhấp tiêu đề",subtitle_tap_action:"Hành động khi nhấp phụ đề"},chips:{alignment:"Căn chỉnh"},weather:{show_conditions:"Điều kiện?",show_temperature:"Nhiệt độ?"},update:{show_buttons_control:"Điều khiển nút bấm?"},vacuum:{commands:"Mệnh lệnh",commands_list:{on_off:"Bật/tắt"}},"media-player":{use_media_info:"Dùng thông tin đa phương tiện",use_media_artwork:"Dùng ảnh đa phương tiện",show_volume_level:"Hiện mức âm lượng",media_controls:"Điều khiển đa phương tiện",media_controls_list:{on_off:"Bật/tắt",shuffle:"Xáo trộn",previous:"Bài trước",play_pause_stop:"Phát/tạm dừng/dừng",next:"Bài tiếp theo",repeat:"Chế độ lặp lại"},volume_controls:"Điều khiển âm lượng",volume_controls_list:{volume_buttons:"Nút âm lượng",volume_set:"Mức âm lượng",volume_mute:"Im lặng"}},lock:{lock:"Khóa",unlock:"Mở khóa",open:"Mở"},humidifier:{show_target_humidity_control:"Điều khiển độ ẩm?"},climate:{show_temperature_control:"Điều khiển nhiệt độ?",hvac_modes:"Chế độ điều hòa"},number:{display_mode:"Chế độ hiển thị",display_mode_list:{default:"Mặc định (thanh trượt)",slider:"Thanh trượt",buttons:"Nút"}}},chip:{sub_element_editor:{title:"Trình soạn phỉnh"},conditional:{chip:"Phỉnh"},"chip-picker":{chips:"Phỉnh",add:"Thêm phỉnh",edit:"Chỉnh sửa",clear:"Tẩy trống",select:"Chọn phỉnh",types:{action:"Hành động","alarm-control-panel":"Báo động",back:"Quay về",conditional:"Điều kiện",entity:"Thực thể",light:"Đèn",menu:"Trình đơn",spacer:"Ngăn cách",template:"Mẫu",weather:"Thời tiết"}}}},Co={not_found:"Không tìm thấy thực thể"},$o={editor:ko,card:Co},Eo={form:{color_picker:{values:{default:"默认颜色"}},info_picker:{values:{default:"默认信息",name:"名称",state:"状态","last-changed":"变更时间","last-updated":"更新时间",none:"无"}},icon_type_picker:{values:{default:"默认类型",icon:"图标","entity-picture":"实体图片",none:"无"}},layout_picker:{values:{default:"默认布局",vertical:"垂直布局",horizontal:"水平布局"}},alignment_picker:{values:{default:"默认",start:"左对齐",end:"右对齐",center:"居中对齐",justify:"两端对齐"}}},card:{generic:{icon_color:"图标颜色",layout:"布局",fill_container:"填满容器",primary_info:"首要信息",secondary_info:"次要信息",icon_type:"图标类型",content_info:"内容",use_entity_picture:"使用实体图片?",collapsible_controls:"关闭时隐藏控制器",icon_animation:"激活时使用动态图标?"},light:{show_brightness_control:"亮度控制?",use_light_color:"使用灯光颜色",show_color_temp_control:"色温控制?",show_color_control:"颜色控制?",incompatible_controls:"设备不支持的控制器将不会显示。"},fan:{show_percentage_control:"百分比控制?",show_oscillate_control:"摆动控制?"},cover:{show_buttons_control:"按钮控制?",show_position_control:"位置控制?",show_tilt_position_control:"角度控制?"},template:{primary:"首要信息",secondary:"次要信息",multiline_secondary:"多行次要信息?",entity_extra:"用于模板和动作",content:"内容",badge_icon:"徽标图标",badge_color:"徽标颜色",picture:"图片 (将会替代图标)"},title:{title:"标题",subtitle:"子标题",title_tap_action:"标题点击动作",subtitle_tap_action:"子标题点击动作"},chips:{alignment:"对齐"},weather:{show_conditions:"条件?",show_temperature:"温度?"},update:{show_buttons_control:"控制按钮?"},vacuum:{commands:"命令",commands_list:{on_off:"开/关"}},"media-player":{use_media_info:"使用媒体信息",use_media_artwork:"使用媒体插图",show_volume_level:"显示音量大小",media_controls:"媒体控制",media_controls_list:{on_off:"开启/关闭",shuffle:"随机",previous:"上一曲",play_pause_stop:"播放/暂停/停止",next:"下一曲",repeat:"循环模式"},volume_controls:"音量控制",volume_controls_list:{volume_buttons:"音量按钮",volume_set:"音量等级",volume_mute:"静音"}},lock:{lock:"锁定",unlock:"解锁",open:"打开"},humidifier:{show_target_humidity_control:"湿度控制?"},climate:{show_temperature_control:"温度控制?",hvac_modes:"空调模式"},number:{display_mode:"显示模式",display_mode_list:{default:"默认 (滑块)",slider:"滑块",buttons:"按钮"}}},chip:{sub_element_editor:{title:"Chip 编辑"},conditional:{chip:"Chip"},"chip-picker":{chips:"Chips",add:"添加 chip",edit:"编辑",clear:"清除",select:"选择 chip",types:{action:"动作","alarm-control-panel":"警戒控制台",back:"返回",conditional:"条件显示",entity:"实体",light:"灯光",menu:"菜单",spacer:"占位符",template:"模板",weather:"天气"}}}},Ao={not_found:"未找到实体"},So={editor:Eo,card:Ao},Io={form:{color_picker:{values:{default:"預設顏色"}},info_picker:{values:{default:"預設訊息",name:"名稱",state:"狀態","last-changed":"最近變動時間","last-updated":"最近更新時間",none:"無"}},icon_type_picker:{values:{default:"預設樣式",icon:"圖示","entity-picture":"實體圖片",none:"無"}},layout_picker:{values:{default:"預設佈局",vertical:"垂直佈局",horizontal:"水平佈局"}},alignment_picker:{values:{default:"預設對齊",start:"居左對齊",end:"居右對齊",center:"居中對齊",justify:"兩端對齊"}}},card:{generic:{icon_color:"圖示顏色",layout:"佈局",fill_container:"填滿容器",primary_info:"主要訊息",secondary_info:"次要訊息",icon_type:"圖示樣式",content_info:"內容",use_entity_picture:"使用實體圖片?",collapsible_controls:"關閉時隱藏控制項",icon_animation:"啟動時使用動態圖示?"},light:{show_brightness_control:"亮度控制?",use_light_color:"使用燈光顏色",show_color_temp_control:"色溫控制?",show_color_control:"色彩控制?",incompatible_controls:"不會顯示裝置不支援的控制。"},fan:{show_percentage_control:"百分比控制?",show_oscillate_control:"擺頭控制?"},cover:{show_buttons_control:"按鈕控制?",show_position_control:"位置控制?",show_tilt_position_control:"角度控制?"},template:{primary:"主要訊息",secondary:"次要訊息",multiline_secondary:"多行次要訊息?",entity_extra:"用於模板與動作",content:"內容",badge_icon:"角標圖示",badge_color:"角標顏色",picture:"圖片 (將會取代圖示)"},title:{title:"標題",subtitle:"副標題",title_tap_action:"標題點擊動作",subtitle_tap_action:"副標題點擊動作"},chips:{alignment:"對齊"},weather:{show_conditions:"狀況?",show_temperature:"溫度?"},update:{show_buttons_control:"按鈕控制?"},vacuum:{commands:"指令",commands_list:{on_off:"開啟、關閉"}},"media-player":{use_media_info:"使用媒體資訊",use_media_artwork:"使用媒體插圖",show_volume_level:"顯示音量大小",media_controls:"媒體控制",media_controls_list:{on_off:"開啟、關閉",shuffle:"隨機播放",previous:"上一首",play_pause_stop:"播放、暫停、停止",next:"下一首",repeat:"重複播放"},volume_controls:"音量控制",volume_controls_list:{volume_buttons:"音量按鈕",volume_set:"音量等級",volume_mute:"靜音"}},lock:{lock:"上鎖",unlock:"解鎖",open:"打開"},humidifier:{show_target_humidity_control:"溼度控制?"},climate:{show_temperature_control:"溫度控制?",hvac_modes:"空調模式"},number:{display_mode:"顯示模式",display_mode_list:{default:"預設 (滑桿)",slider:"滑桿",buttons:"按鈕"}}},chip:{sub_element_editor:{title:"小卡片編輯器"},conditional:{chip:"小卡片"},"chip-picker":{chips:"小卡片",add:"新增小卡片",edit:"編輯",clear:"清除",select:"選擇小卡片",types:{action:"動作","alarm-control-panel":"警報器控制",back:"返回",conditional:"條件",entity:"實體",light:"燈光",menu:"選單",spacer:"佔位符",template:"模板",weather:"天氣"}}}},To={not_found:"未找到實體"},zo={editor:Io,card:To};const Oo={ar:Object.freeze({__proto__:null,default:li,editor:si}),bg:Object.freeze({__proto__:null,default:di,editor:ci}),ca:Object.freeze({__proto__:null,card:hi,default:mi,editor:ui}),cs:Object.freeze({__proto__:null,card:fi,default:gi,editor:pi}),da:Object.freeze({__proto__:null,card:vi,default:bi,editor:_i}),de:Object.freeze({__proto__:null,card:xi,default:wi,editor:yi}),el:Object.freeze({__proto__:null,default:Ci,editor:ki}),en:Object.freeze({__proto__:null,card:Ei,default:Ai,editor:$i}),es:Object.freeze({__proto__:null,default:Ii,editor:Si}),fi:Object.freeze({__proto__:null,default:zi,editor:Ti}),fr:Object.freeze({__proto__:null,default:Mi,editor:Oi}),he:Object.freeze({__proto__:null,default:Di,editor:ji}),hu:Object.freeze({__proto__:null,card:Pi,default:Ni,editor:Li}),id:Object.freeze({__proto__:null,card:Fi,default:Vi,editor:Ri}),it:Object.freeze({__proto__:null,card:Ui,default:Hi,editor:Bi}),"ko-KR":Object.freeze({__proto__:null,default:Wi,editor:Yi}),nb:Object.freeze({__proto__:null,default:Ki,editor:Xi}),nl:Object.freeze({__proto__:null,card:Gi,default:Zi,editor:qi}),pl:Object.freeze({__proto__:null,default:Qi,editor:Ji}),"pt-BR":Object.freeze({__proto__:null,card:eo,default:io,editor:to}),"pt-PT":Object.freeze({__proto__:null,default:no,editor:oo}),ro:Object.freeze({__proto__:null,default:ao,editor:ro}),ru:Object.freeze({__proto__:null,default:lo,editor:so}),sl:Object.freeze({__proto__:null,card:uo,default:ho,editor:co}),sk:Object.freeze({__proto__:null,card:po,default:fo,editor:mo}),sv:Object.freeze({__proto__:null,default:_o,editor:go}),tr:Object.freeze({__proto__:null,default:bo,editor:vo}),uk:Object.freeze({__proto__:null,card:xo,default:wo,editor:yo}),vi:Object.freeze({__proto__:null,card:Co,default:$o,editor:ko}),"zh-Hans":Object.freeze({__proto__:null,card:Ao,default:So,editor:Eo}),"zh-Hant":Object.freeze({__proto__:null,card:To,default:zo,editor:Io})};function Mo(t,e){try{return t.split(".").reduce(((t,e)=>t[e]),Oo[e])}catch(t){return}}function jo(t){return function(e){var i;let o=Mo(e,null!==(i=null==t?void 0:t.locale.language)&&void 0!==i?i:"en");return o||(o=Mo(e,"en")),null!=o?o:e}}
+ */
+function el(t,e){return function(e,n,i){return function(t,e,n){return n.configurable=!0,n.enumerable=!0,Reflect.decorate&&"object"!=Pr(e)&&Object.defineProperty(t,e,n),n}(e,n,{get:function(){return function(e){var n,i;return null!==(n=null===(i=e.renderRoot)||void 0===i?void 0:i.querySelector(t))&&void 0!==n?n:null}(this)}})}}var nl,il,ol,rl,al,ll=Number.isNaN||function(t){return"number"==typeof t&&t!=t};function sl(t,e){if(t.length!==e.length)return!1;for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:2,n=""+t,i=1;i0?"".concat(e,":").concat(Tl(n),":").concat(Tl(i)):n>0?"".concat(n,":").concat(Tl(i)):i>0||o>0?"".concat(i).concat(o>0?".".concat(Tl(o,3)):""):null}(parseFloat(t)*Il[e])||"0"},$l=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return Math.round(t*Math.pow(10,e))/Math.pow(10,e)},Ml=function(t,e,n){var i=e?function(t){switch(t.number_format){case nl.comma_decimal:return["en-US","en"];case nl.decimal_comma:return["de","es","it"];case nl.space_comma:return["fr","sv","cs"];case nl.system:return;default:return t.language}}(e):void 0;if(Number.isNaN=Number.isNaN||function t(e){return"number"==typeof e&&t(e)},(null==e?void 0:e.number_format)!==nl.none&&!Number.isNaN(Number(t))&&Intl)try{return new Intl.NumberFormat(i,Pl(t,n)).format(Number(t))}catch(e){return console.error(e),new Intl.NumberFormat(void 0,Pl(t,n)).format(Number(t))}return"string"==typeof t?t:"".concat($l(t,null==n?void 0:n.maximumFractionDigits).toString()).concat("currency"===(null==n?void 0:n.style)?" ".concat(n.currency):"")},jl=function(t,e){var n,i=null==e?void 0:e.display_precision;return null!=i?{maximumFractionDigits:i,minimumFractionDigits:i}:Number.isInteger(Number(null===(n=t.attributes)||void 0===n?void 0:n.step))&&Number.isInteger(Number(t.state))?{maximumFractionDigits:0}:null!=t.attributes.step?{maximumFractionDigits:Math.ceil(Math.log10(1/t.attributes.step))}:void 0},Pl=function(t,e){var n=Object.assign({maximumFractionDigits:2},e);if("string"!=typeof t)return n;if(!e||void 0===e.minimumFractionDigits&&void 0===e.maximumFractionDigits){var i=t.indexOf(".")>-1?t.split(".")[1].length:0;n.minimumFractionDigits=i,n.maximumFractionDigits=i}return n},Ll=function(t){switch(t.language){case"cz":case"de":case"fi":case"fr":case"sk":case"sv":return" ";default:return""}},Dl=function(t,e,n,i,o,r){var a=o[e.entity_id];return Nl(t,n,i,a,e.entity_id,e.attributes,void 0!==r?r:e.state)},Nl=function(t,e,n,i,o,r,a){var l;if(a===_l||a===gl)return t("state.default.".concat(a));if(function(t){return!!t.unit_of_measurement||!!t.state_class}(r)){if("duration"===r.device_class&&r.unit_of_measurement&&Il[r.unit_of_measurement])try{return zl(a,r.unit_of_measurement)}catch(t){}if("monetary"===r.device_class)try{return Ml(a,e,Object.assign({style:"currency",currency:r.unit_of_measurement,minimumFractionDigits:2},jl({state:a,attributes:r},i)))}catch(t){}var s=r.unit_of_measurement?"%"===r.unit_of_measurement?Ll(e)+"%":" ".concat(r.unit_of_measurement):"";return"".concat(Ml(a,e,jl({state:a,attributes:r},i))).concat(s)}var c=vl(o);if("datetime"===c){var d=new Date(a);return pl(d,e,n)}if(["date","input_datetime","time"].includes(c))try{var u=a.split(" ");if(2===u.length)return pl(new Date(u.join("T")),Object.assign(Object.assign({},e),{time_zone:ol.local}),n);if(1===u.length){if(a.includes("-"))return function(t,e,n){return dl(e,n.time_zone).format(t)}(new Date("".concat(a,"T00:00")),Object.assign(Object.assign({},e),{time_zone:ol.local}),n);if(a.includes(":")){var h=new Date;return function(t,e,n){return hl(e,n.time_zone).format(t)}(new Date("".concat(h.toISOString().split("T")[0],"T").concat(a)),Object.assign(Object.assign({},e),{time_zone:ol.local}),n)}}return a}catch(t){return a}if("counter"===c||"number"===c||"input_number"===c)return Ml(a,e,jl({state:a,attributes:r},i));if(["button","event","input_button","scene","stt","tts"].includes(c)||"sensor"===c&&"timestamp"===r.device_class)try{return pl(new Date(a),e,n)}catch(t){return a}return"update"===c?"on"===a?function(t){return Sl(t)||!!t.in_progress}(r)?Al(r,4)&&"number"==typeof r.in_progress?t("ui.card.update.installing_with_progress",{progress:r.in_progress}):t("ui.card.update.installing"):r.latest_version:r.skipped_version===r.latest_version?null!==(l=r.latest_version)&&void 0!==l?l:t("state.default.unavailable"):t("ui.card.update.up_to_date"):(null==i?void 0:i.translation_key)&&t("component.".concat(i.platform,".entity.").concat(c,".").concat(i.translation_key,".state.").concat(a))||r.device_class&&t("component.".concat(c,".entity_component.").concat(r.device_class,".state.").concat(a))||t("component.".concat(c,".entity_component._.state.").concat(a))||a},Rl=function(t){function e(t,n){var i,o;zr(this,e);var r=t.message,a=t.explanation,l=function(t,e){if(null==t)return{};var n,i,o=function(t,e){if(null==t)return{};var n={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(e.includes(i))continue;n[i]=t[i]}return n}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(i=0;i2&&void 0!==arguments[2]?arguments[2]:{};return gr().mark((function i(){var o,r,a,l,s,c,d,u,h,p,m,f,v,g,_,y,b,k,x,w,C,E,A,S,O,T;return gr().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:o=n.path,r=void 0===o?[]:o,a=n.branch,l=void 0===a?[t]:a,s=n.coerce,c=void 0!==s&&s,d=n.mask,h={path:r,branch:l,mask:u=void 0!==d&&d},c&&(t=e.coercer(t,h)),p="valid",m=Or(e.validator(t,h)),i.prev=5,m.s();case 7:if((f=m.n()).done){i.next=15;break}return(v=f.value).explanation=n.message,p="not_valid",i.next=13,[v,void 0];case 13:i.next=7;break;case 15:i.next=20;break;case 17:i.prev=17,i.t0=i.catch(5),m.e(i.t0);case 20:return i.prev=20,m.f(),i.finish(20);case 23:g=Or(e.entries(t,h)),i.prev=24,g.s();case 26:if((_=g.n()).done){i.next=53;break}y=mr(_.value,3),b=y[0],k=y[1],x=y[2],w=Yl(k,x,{path:void 0===b?r:[].concat(hr(r),[b]),branch:void 0===b?l:[].concat(hr(l),[k]),coerce:c,mask:u,message:n.message}),C=Or(w),i.prev=30,C.s();case 32:if((E=C.n()).done){i.next=43;break}if(!(A=E.value)[0]){i.next=40;break}return p=null!=A[0].refinement?"not_refined":"not_valid",i.next=38,[A[0],void 0];case 38:i.next=41;break;case 40:c&&(k=A[1],void 0===b?t=k:t instanceof Map?t.set(b,k):t instanceof Set?t.add(k):Vl(t)&&(void 0!==k||b in t)&&(t[b]=k));case 41:i.next=32;break;case 43:i.next=48;break;case 45:i.prev=45,i.t1=i.catch(30),C.e(i.t1);case 48:return i.prev=48,C.f(),i.finish(48);case 51:i.next=26;break;case 53:i.next=58;break;case 55:i.prev=55,i.t2=i.catch(24),g.e(i.t2);case 58:return i.prev=58,g.f(),i.finish(58);case 61:if("not_valid"===p){i.next=81;break}S=Or(e.refiner(t,h)),i.prev=63,S.s();case 65:if((O=S.n()).done){i.next=73;break}return(T=O.value).explanation=n.message,p="not_refined",i.next=71,[T,void 0];case 71:i.next=65;break;case 73:i.next=78;break;case 75:i.prev=75,i.t3=i.catch(63),S.e(i.t3);case 78:return i.prev=78,S.f(),i.finish(78);case 81:if("valid"!==p){i.next=84;break}return i.next=84,[void 0,t];case 84:case"end":return i.stop()}}),i,null,[[5,17,20,23],[24,55,58,61],[30,45,48,51],[63,75,78,81]])}))()}var Kl=function(){return Mr((function t(e){var n=this;zr(this,t);var i=e.type,o=e.schema,r=e.validator,a=e.refiner,l=e.coercer,s=void 0===l?function(t){return t}:l,c=e.entries,d=void 0===c?gr().mark((function t(){return gr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)})):c;this.type=i,this.schema=o,this.entries=d,this.coercer=s,this.validator=r?function(t,e){return Wl(r(t,e),e,n,t)}:function(){return[]},this.refiner=a?function(t,e){return Wl(a(t,e),e,n,t)}:function(){return[]}}),[{key:"assert",value:function(t,e){return Xl(t,this,e)}},{key:"create",value:function(t,e){return function(t,e,n){var i=ql(t,e,{coerce:!0,message:n});if(i[0])throw i[0];return i[1]}(t,this,e)}},{key:"is",value:function(t){return function(t,e){var n=ql(t,e);return!n[0]}(t,this)}},{key:"mask",value:function(t,e){return function(t,e,n){var i=ql(t,e,{coerce:!0,mask:!0,message:n});if(i[0])throw i[0];return i[1]}(t,this,e)}},{key:"validate",value:function(t){return ql(t,this,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}}])}();function Xl(t,e,n){var i=ql(t,e,{message:n});if(i[0])throw i[0]}function ql(t,e){var n=Yl(t,e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}),i=function(t){var e=t.next(),n=e.done,i=e.value;return n?void 0:i}(n);return i[0]?[new Rl(i[0],gr().mark((function t(){var e,i,o;return gr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=Or(n),t.prev=1,e.s();case 3:if((i=e.n()).done){t.next=10;break}if(!(o=i.value)[0]){t.next=8;break}return t.next=8,o[0];case 8:t.next=3;break;case 10:t.next=15;break;case 12:t.prev=12,t.t0=t.catch(1),e.e(t.t0);case 15:return t.prev=15,e.f(),t.finish(15);case 18:case"end":return t.stop()}}),t,null,[[1,12,15,18]])}))),void 0]:[void 0,i[1]]}function Gl(){for(var t=arguments.length,e=new Array(t),n=0;n2&&void 0!==arguments[2]&&arguments[2],o=function(){for(var o=arguments.length,r=new Array(o),a=0;ae||Number(r)===e&&Number(a)>=n||void 0!==i},Vs={form:{color_picker:{values:{default:"اللون الإفتراضي"}},info_picker:{values:{default:"المعلومات الافتراضية",name:"الإسم",state:"الحالة","last-changed":"آخر تغيير","last-updated":"آخر تحديث",none:"لا شئ"}},icon_type_picker:{values:{default:"النوع افتراضي",icon:"أيقونة","entity-picture":"صورة الكيان",none:"لا شئ"}},layout_picker:{values:{default:"تخطيط افتراضي",vertical:"تخطيط رأسي",horizontal:"تخطيط أفقي"}},alignment_picker:{values:{default:"المحاذاة الافتراضية",start:"بداية",end:"نهاية",center:"توسيط",justify:"مساواة"}}},card:{generic:{icon_color:"لون الأيقونة",layout:"التخطيط",fill_container:"ملئ الحاوية",primary_info:"المعلومات الأساسية",secondary_info:"المعلومات الفرعية",icon_type:"نوع الأيقونة",content_info:"المحتوى",use_entity_picture:"استخدم صورة الكيان؟",collapsible_controls:"تصغير عناصر التحكم عند الإيقاف",icon_animation:"تحريك الرمز عندما يكون نشطًا؟"},light:{show_brightness_control:"التحكم في السطوع؟",use_light_color:"استخدم لون فاتح",show_color_temp_control:"التحكم في حرارة اللون؟",show_color_control:"التحكم في اللون؟",incompatible_controls:"قد لا يتم عرض بعض عناصر التحكم إذا كان الضوء الخاص بك لا يدعم الميزة."},fan:{show_percentage_control:"التحكم في النسبة المئوية؟",show_oscillate_control:"التحكم في التذبذب؟"},cover:{show_buttons_control:"أزرار التحكم؟",show_position_control:"التحكم في الموقع؟"},template:{primary:"المعلومات الأساسية",secondary:"المعلومات الثانوية",multiline_secondary:"متعدد الأسطر الثانوية؟",entity_extra:"تستخدم في القوالب والإجراءات",content:"المحتوى",badge_icon:"أيقونة الشارة",badge_color:"لون الشارة",picture:"صورة (ستحل محل الأيقونة)"},title:{title:"العنوان",subtitle:"العنوان الفرعي"},chips:{alignment:"محاذاة"},weather:{show_conditions:"الأحوال الجوية؟",show_temperature:"الطقس؟"},update:{show_buttons_control:"أزرار التحكم؟"},vacuum:{commands:"الاوامر"},"media-player":{use_media_info:"استخدم معلومات الوسائط",use_media_artwork:"استخدم صورة الوسائط",show_volume_level:"إظهار مستوى الصوت",media_controls:"التحكم في الوسائط",media_controls_list:{on_off:"تشغيل/إيقاف",shuffle:"خلط",previous:"السابق",play_pause_stop:"تشغيل/إيقاف مؤقت/إيقاف",next:"التالي",repeat:"وضع التكرار"},volume_controls:"التحكم في الصوت",volume_controls_list:{volume_buttons:"أزرار الصوت",volume_set:"مستوى الصوت",volume_mute:"كتم"}},lock:{lock:"مقفل",unlock:"إلغاء قفل",open:"مفتوح"},humidifier:{show_target_humidity_control:"التحكم في الرطوبة؟?"},climate:{show_temperature_control:"التحكم في درجة الحرارة؟",hvac_modes:"أوضاع HVAC"}},chip:{sub_element_editor:{title:"محرر الرقاقة"},conditional:{chip:"رقاقة"},"chip-picker":{chips:"رقاقات",add:"أضف رقاقة",edit:"تعديل",clear:"مسح",select:"اختر الرقاقة",types:{action:"إجراء","alarm-control-panel":"تنبيه",back:"رجوع",conditional:"مشروط",entity:"الكيان",light:"Light",menu:"القائمة",template:"قالب",weather:"الطقس"}}}},Bs={editor:Vs},Fs={form:{color_picker:{values:{default:"Основен цвят"}},info_picker:{values:{default:"Основна информация",name:"Име",state:"Състояние","last-changed":"Последно Променен","last-updated":"Последно Актуализиран",none:"Липсва"}},icon_type_picker:{values:{default:"Основен тип",icon:"Икона","entity-picture":"Картина на обекта",none:"Липсва"}},layout_picker:{values:{default:"Основно оформление",vertical:"Вертикално оформление",horizontal:"Хоризонтално оформление"}},alignment_picker:{values:{default:"Основно подравняване",start:"Старт",end:"Край",center:"Център",justify:"Подравнен"}}},card:{generic:{icon_color:"Цвят на икона",layout:"Оформление",fill_container:"Изпълване на контейнера",primary_info:"Първостепенна информация",secondary_info:"Второстепенна информация",icon_type:"Тип на икона",content_info:"Съдържание",use_entity_picture:"Използвай снимката на обекта?",collapsible_controls:"Свий контролите при изключен",icon_animation:"Анимирай иконата при активен?"},light:{show_brightness_control:"Контрол на яркостта?",use_light_color:"Използвай цвета на светлината",show_color_temp_control:"Контрол на температурата?",show_color_control:"Контрол на цвета?",incompatible_controls:"Някои опции могат да бъдат скрити при условие че осветителното тяло не поддържа фунцията."},fan:{show_percentage_control:"Процентов контрол?",show_oscillate_control:"Контрол на трептенето?"},cover:{show_buttons_control:"Контролни бутони?",show_position_control:"Контрол на позицията?",show_tilt_position_control:"Контрол на наклона?"},template:{primary:"Първостепенна информация",secondary:"Второстепенна информация",multiline_secondary:"Много-редова второстепенна информация?",entity_extra:"Използван в шаблони и действия",content:"Съдържание",badge_icon:"Икона на значка",badge_color:"Цвят на значка",picture:"Картина (ще замени иконата)"},title:{title:"Заглавие",subtitle:"Подзаглавие"},chips:{alignment:"Подравняване"},weather:{show_conditions:"Условия?",show_temperature:"Температура?"},update:{show_buttons_control:"Контролни бутони?"},vacuum:{commands:"Конади",commands_list:{on_off:"Вкл./Изкл."}},"media-player":{use_media_info:"Използвай информация от медията",use_media_artwork:"Използвай визуалните детайли от медията",show_volume_level:"Покажи контрола за звук",media_controls:"Контрол на Медиата",media_controls_list:{on_off:"Вкл./Изкл.",shuffle:"Разбъркано",previous:"Предишен",play_pause_stop:"Пусни/пауза/стоп",next:"Следващ",repeat:"Повтаряне"},volume_controls:"Контрол на звука",volume_controls_list:{volume_buttons:"Бутони за звук",volume_set:"Ниво на звука",volume_mute:"Заглуши"}},lock:{lock:"Заключен",unlock:"Отключен",open:"Отворен"},humidifier:{show_target_humidity_control:"Контрол на влажността?"},climate:{show_temperature_control:"Контрол на температурата?",hvac_modes:"HVAC Режими"}},chip:{sub_element_editor:{title:"Чип редактор"},conditional:{chip:"Чип"},"chip-picker":{chips:"Чипове",add:"Добави чип",edit:"Редактирай",clear:"Изчисти",select:"Избери чип",types:{action:"Действия","alarm-control-panel":"Аларма",back:"Назад",conditional:"Условни",entity:"Обект",light:"Осветление",menu:"Меню",template:"Шаблон",weather:"Време"}}}},Hs={editor:Fs},Ws={form:{color_picker:{values:{default:"Color per defecte"}},info_picker:{values:{default:"Informació per defecte",name:"Nom",state:"Estat","last-changed":"Últim Canvi","last-updated":"Última Actualització",none:"Cap"}},icon_type_picker:{values:{default:"Tipus per defecte",icon:"Icona","entity-picture":"Entitat d'imatge",none:"Cap"}},layout_picker:{values:{default:"Distribució per defecte",vertical:"Distribució vertical",horizontal:"Distribució horitzontal"}},alignment_picker:{values:{default:"Alineació per defecte",start:"Inici",end:"Final",center:"Centre",justify:"Justifica"}}},card:{generic:{icon_color:"Color d'icona",layout:"Distribució",fill_container:"Emplena el contenidor",primary_info:"Informació primaria",secondary_info:"Informació secundaria",icon_type:"Tipus d'icona",content_info:"Contingut",use_entity_picture:"Fer servir la imatge de l'entitat?",collapsible_controls:"Amaga els controls en desactivar",icon_animation:"Animar icona en activar?"},light:{show_brightness_control:"Control de brillantor?",use_light_color:"Fes servir el color del llum",show_color_temp_control:"Control de la temperatura del color?",show_color_control:"Control de color?",incompatible_controls:"Alguns controls no es mostraran si l'entitat no suporta eixa funció."},fan:{show_percentage_control:"Control de percentatge?",show_oscillate_control:"Control d'oscil·lació?"},cover:{show_buttons_control:"Botons de control?",show_position_control:"Control de posició?",show_tilt_position_control:"Control d'inclinació?"},template:{primary:"Informació primaria",secondary:"Informació secundaria",multiline_secondary:"Secundaria en varies línies?",entity_extra:"Utilitzats en plantilles i accions",content:"Contingut",badge_icon:"Icona de la insígnia",badge_color:"Color de la insígnia",picture:"Imatge (reemplaçarà la icona)"},title:{title:"Títol",subtitle:"Subtítol",title_tap_action:"Acció en tocar el títol",subtitle_tap_action:"Acció en tocar el subtítol"},chips:{alignment:"Alineació"},weather:{show_conditions:"Condicions?",show_temperature:"Temperatura?"},update:{show_buttons_control:"Botons de control?"},vacuum:{commands:"Comandaments",commands_list:{on_off:"Engegar/Apagar"}},"media-player":{use_media_info:"Empra la informació multimèdia",use_media_artwork:"Fes servir l'art multimèdia",show_volume_level:"Mostra el nivell de volum",media_controls:"Controls multimèdia",media_controls_list:{on_off:"Engegar/Apagar",shuffle:"Mesclar",previous:"Pista anterior",play_pause_stop:"Reproduïr/Pausar/Detindre",next:"Pista següent",repeat:"Mode de repetició"},volume_controls:"Controls de volum",volume_controls_list:{volume_buttons:"Botons de volum",volume_set:"Nivell de volum",volume_mute:"Silenci"}},lock:{lock:"Bloqueja",unlock:"Desbloqueja",open:"Obri"},humidifier:{show_target_humidity_control:"Control d'humitat?"},climate:{show_temperature_control:"Control de temperatura?",hvac_modes:"Modes HVAC"},number:{display_mode:"Mode de visualització",display_mode_list:{default:"Per defecte (lliscant)",slider:"Lliscant",buttons:"Botons"}}},chip:{sub_element_editor:{title:"Editor de xips"},conditional:{chip:"Xip"},"chip-picker":{chips:"Xips",add:"Afegir xip",edit:"Editar",clear:"Buidar",select:"Seleccionar chip",types:{action:"Acció","alarm-control-panel":"Alarma",back:"Tornar",conditional:"Condicional",entity:"Entitat",light:"Llum",menu:"Menú",spacer:"Espai",template:"Plantilla",weather:"Oratge"}}}},Ys={not_found:"No s'ha trobat l'entitat"},Ks={editor:Ws,card:Ys},Xs={form:{color_picker:{values:{default:"Výchozí barva"}},info_picker:{values:{default:"Výchozí informace",name:"Název",state:"Stav","last-changed":"Poslední změna","last-updated":"Poslední aktualizace",none:"Nic"}},icon_type_picker:{values:{default:"Výchozí typ",icon:"Ikona","entity-picture":"Ikona entity",none:"Nic"}},layout_picker:{values:{default:"Výchozí rozložení",vertical:"Svislé rozložení",horizontal:"Vodorovné rozložení"}},alignment_picker:{values:{default:"Výchozí zarovnání",start:"Na začátek",end:"Na konec",center:"Na střed",justify:"Do bloku"}}},card:{generic:{icon_color:"Barva ikony",layout:"Rozložení",fill_container:"Vyplnit prostor",primary_info:"Primární informace",secondary_info:"Sekundární informace",icon_type:"Typ ikony",content_info:"Obsah",use_entity_picture:"Použít ikonu entity?",collapsible_controls:"Pokud je vypnuto, skrýt ovládací prvky",icon_animation:"Pokud je aktivní, animovat ikonu?"},light:{show_brightness_control:"Ovládání jasu?",use_light_color:"Ikona podle barvy světla?",show_color_temp_control:"Ovládání teploty světla?",show_color_control:"Ovládání barvy světla?",incompatible_controls:"Některé ovládací prvky se nemusí zobrazit, pokud vaše světlo tuto funkci nepodporuje."},fan:{show_percentage_control:"Ovládání v procentech?",show_oscillate_control:"Ovládání oscilaceM"},cover:{show_buttons_control:"Zobrazit ovládací tlačítka?",show_position_control:"Zobrazit ovládání polohy?",show_tilt_position_control:"Zobrazit ovládání náklonu?"},template:{primary:"Primární informace",secondary:"Sekundární informace",multiline_secondary:"Víceřádková sekundární informace?",entity_extra:"Použito v šablonách a akcích",content:"Obsah",badge_icon:"Ikona odznaku",badge_color:"Barva odznaku",picture:"Obrázek (nahradí ikonu)"},title:{title:"Nadpis",subtitle:"Popis",title_tap_action:"Akce při klepnutí na nadpis",subtitle_tap_action:"Akce při klepnutí na popis"},chips:{alignment:"Zarovnání"},weather:{show_conditions:"Zobrazit podmínky?",show_temperature:"Zobrazit teplotu?"},update:{show_buttons_control:"Zobrazit ovládací tlačítka?"},vacuum:{commands:"Příkazy",commands_list:{on_off:"Zapnout/Vypnout"}},"media-player":{use_media_info:"Použít informace z média",use_media_artwork:"Použít artwork z média",show_volume_level:"Zobrazit úroveň hlasitosti",media_controls:"Ovládání médií",media_controls_list:{on_off:"Zapnout/Vypnout",shuffle:"Zamíchat",previous:"Předchozí stopa",play_pause_stop:"Přehrát/Pauza/Zastavit",next:"Další stopa",repeat:"Režim opakování"},volume_controls:"Ovládání hlasitosti",volume_controls_list:{volume_buttons:"Tlačítka hlasitosti",volume_set:"Úroveň hlasitosti",volume_mute:"Ztlumit"}},lock:{lock:"Zamčeno",unlock:"Odemčeno",open:"Otevřeno"},humidifier:{show_target_humidity_control:"Ovládání vlhkosti?"},climate:{show_temperature_control:"Ovládání teploty?",hvac_modes:"Režimy HVAC"},number:{display_mode:"Režim zobrazení",display_mode_list:{default:"Výchozí (posuvník)",slider:"Posuvník",buttons:"Tlačítka"}}},chip:{sub_element_editor:{title:"Editor tlačítek"},conditional:{chip:"Tlačítko"},"chip-picker":{chips:"Tlačítka",add:"Přidat tlačítko",edit:"Upravit",clear:"Vymazat",select:"Vybrat tlačítko",types:{action:"Akce","alarm-control-panel":"Alarm",back:"Zpět",conditional:"Podmínka",entity:"Entita",light:"Světlo",menu:"Menu",spacer:"Mezera",template:"Šablona",weather:"Počasí"}}}},qs={not_found:"Entita nebyla nalezena"},Gs={editor:Xs,card:qs},Zs={form:{color_picker:{values:{default:"Standardfarve"}},info_picker:{values:{default:"Standard information",name:"Navn",state:"Status","last-changed":"Sidst ændret","last-updated":"Sidst opdateret",none:"Ingen"}},icon_type_picker:{values:{default:"Standard type",icon:"Ikon","entity-picture":"Enhedsbillede",none:"Ingen"}},layout_picker:{values:{default:"Standard layout",vertical:"Vertikal layout",horizontal:"Horisontal layout"}},alignment_picker:{values:{default:"Standard justering",start:"Start",end:"Slut",center:"Centrer",justify:"Lige margener"}}},card:{generic:{color:"Farve",icon_color:"Ikon farve",layout:"Layout",fill_container:"Fyld container",primary_info:"Primær information",secondary_info:"Sekundær information",icon_type:"Ikon type",content_info:"Indhold",use_entity_picture:"Brug enhedsbillede?",collapsible_controls:"Skjul kontroller når slukket",icon_animation:"Animér ikon når aktiv?"},light:{show_brightness_control:"Lysstyrkekontrol?",use_light_color:"Brug lysfarve",show_color_temp_control:"Temperaturfarvekontrol?",show_color_control:"Farvekontrol?",incompatible_controls:"Nogle kontroller vises muligvis ikke, hvis dit lys ikke understøtter funktionen."},fan:{show_percentage_control:"Procentkontrol?",show_oscillate_control:"Oscillationskontrol?"},cover:{show_buttons_control:"Betjeningsknapper?",show_position_control:"Positionskontrol?",show_tilt_position_control:"Tiltkontrol?"},template:{primary:"Primær information",secondary:"Sekundær information",multiline_secondary:"Multi-linje sekundær?",entity_extra:"Anvendes i skabeloner og handlinger",label:"Label",content:"Indhold",badge_icon:"Badge ikon",badge_color:"Badge farve",picture:"Billede (erstatter ikonet)"},title:{title:"Titel",subtitle:"Undertitel",title_tap_action:"Title tryk handling",subtitle_tap_action:"Undertitel tryk handling"},chips:{alignment:"Justering"},weather:{show_conditions:"Vejrforhold?",show_temperature:"Temperatur?"},update:{show_buttons_control:"Betjeningsknapper?"},vacuum:{commands:"Kommandoer",commands_list:{on_off:"Slå til/fra"}},"media-player":{use_media_info:"Brug medieinformation",use_media_artwork:"Brug mediebilleder",show_volume_level:"Vis lydstyrke",media_controls:"Mediekontrol",media_controls_list:{on_off:"Tænd/Sluk",shuffle:"Bland",previous:"Forrige nummer",play_pause_stop:"Afspil/Pause/Stop",next:"Næste nummer",repeat:"Gentagelsestilstand"},volume_controls:"Lydstyrkekontrol",volume_controls_list:{volume_buttons:"Lydstyrkeknapper",volume_set:"Lydstyrke",volume_mute:"Lydløs"}},lock:{lock:"Lås",unlock:"Lås op",open:"Åben"},humidifier:{show_target_humidity_control:"Luftfugtighedskontrol?"},climate:{show_temperature_control:"Temperaturkontrol?",hvac_modes:"HVAC-tilstande"},number:{display_mode:"Visningstilstand",display_mode_list:{default:"Standard (slider)",slider:"Slider",buttons:"Knapper"}}},chip:{sub_element_editor:{title:"Chip-editor"},conditional:{chip:"Chip"},"chip-picker":{chips:"Chips",add:"Tilføj chip",edit:"Rediger",clear:"Nulstil",select:"Vælg chip",types:{action:"Handling","alarm-control-panel":"Alarm",back:"Tilbage",conditional:"Betinget",entity:"Enhed",light:"Lys",menu:"Menu",spacer:"Afstand",template:"Skabelon",weather:"Vejr"}}}},Js={not_found:"Enhed ikke fundet"},Qs={editor:Zs,card:Js},tc={form:{color_picker:{values:{default:"Standardfarbe"}},info_picker:{values:{default:"Standard-Information",name:"Name",state:"Zustand","last-changed":"Letzte Änderung","last-updated":"Letzte Aktualisierung",none:"Keine"}},icon_type_picker:{values:{default:"Standard-Typ",icon:"Icon","entity-picture":"Entitätsbild",none:"Keines"}},layout_picker:{values:{default:"Standard-Layout",vertical:"Vertikales Layout",horizontal:"Horizontales Layout"}},alignment_picker:{values:{default:"Standard",start:"Anfang",end:"Ende",center:"Mitte",justify:"Ausrichten"}}},card:{generic:{icon_color:"Icon-Farbe",layout:"Layout",fill_container:"Container ausfüllen",primary_info:"Primäre Information",secondary_info:"Sekundäre Information",icon_type:"Icon-Typ",content_info:"Inhalt",use_entity_picture:"Entitätsbild verwenden?",collapsible_controls:"Schieberegler einklappen, wenn aus",icon_animation:"Icon animieren, wenn aktiv?"},light:{show_brightness_control:"Helligkeitsregelung?",use_light_color:"Farbsteuerung verwenden",show_color_temp_control:"Farbtemperatursteuerung?",show_color_control:"Farbsteuerung?",incompatible_controls:"Einige Steuerelemente werden möglicherweise nicht angezeigt, wenn Ihr Licht diese Funktion nicht unterstützt."},fan:{show_percentage_control:"Prozentuale Kontrolle?",show_oscillate_control:"Oszillationssteuerung?"},cover:{show_buttons_control:"Schaltflächensteuerung?",show_position_control:"Positionssteuerung?",show_tilt_position_control:"Winkelsteuerung?"},template:{primary:"Primäre Information",secondary:"Sekundäre Information",multiline_secondary:"Mehrzeilig sekundär?",entity_extra:"Wird in Vorlagen und Aktionen verwendet",content:"Inhalt",badge_icon:"Badge-Icon",badge_color:"Badge-Farbe",picture:"Bild (ersetzt das Icon)"},title:{title:"Titel",subtitle:"Untertitel",title_tap_action:"Titel Tipp-Aktion",subtitle_tap_action:"Untertitel Tipp-Aktion"},chips:{alignment:"Ausrichtung"},weather:{show_conditions:"Bedingungen?",show_temperature:"Temperatur?"},update:{show_buttons_control:"Schaltflächensteuerung?"},vacuum:{commands:"Befehle",commands_list:{on_off:"An/Ausschalten"}},"media-player":{use_media_info:"Medieninfos verwenden",use_media_artwork:"Mediengrafik verwenden",show_volume_level:"Lautstärke-Level anzeigen",media_controls:"Mediensteuerung",media_controls_list:{on_off:"Ein/Aus",shuffle:"Zufällige Wiedergabe",previous:"Vorheriger Titel",play_pause_stop:"Play/Pause/Stop",next:"Nächster Titel",repeat:"Wiederholen"},volume_controls:"Lautstärkesteuerung",volume_controls_list:{volume_buttons:"Lautstärke-Buttons",volume_set:"Lautstärke-Level",volume_mute:"Stumm"}},lock:{lock:"Verriegeln",unlock:"Entriegeln",open:"Öffnen"},humidifier:{show_target_humidity_control:"Luftfeuchtigkeitssteuerung?"},climate:{show_temperature_control:"Temperatursteuerung?",hvac_modes:"HVAC-Modi"},number:{display_mode:"Anzeigemodus",display_mode_list:{default:"Standard (Schieberegler)",slider:"Schieberegler",buttons:"Buttons"}}},chip:{sub_element_editor:{title:"Chip Editor"},conditional:{chip:"Chip"},"chip-picker":{chips:"Chips",add:"Chip hinzufügen",edit:"Editieren",clear:"Löschen",select:"Chip auswählen",types:{action:"Aktion","alarm-control-panel":"Alarm",back:"Zurück",conditional:"Bedingung",entity:"Entität",light:"Licht",menu:"Menü",spacer:"Abstand",template:"Vorlage",weather:"Wetter"}}}},ec={not_found:"Entität nicht gefunden"},nc={editor:tc,card:ec},ic={form:{color_picker:{values:{default:"Προεπιλεγμένο χρώμα"}},info_picker:{values:{default:"Προεπιλεγμένες πληροφορίες",name:"Όνομα",state:"Κατάσταση","last-changed":"Τελευταία αλλαγή","last-updated":"Τελευταία ενημέρωση",none:"Τίποτα"}},layout_picker:{values:{default:"Προεπιλεγμένη διάταξη",vertical:"Κάθετη διάταξη",horizontal:"Οριζόντια διάταξη"}},alignment_picker:{values:{default:"Προεπιλεγμένη στοίχιση",start:"Στοίχιση αριστερά",end:"Στοίχιση δεξιά",center:"Στοίχιση στο κέντρο",justify:"Πλήρης στοίχιση"}}},card:{generic:{icon_color:"Χρώμα εικονιδίου",layout:"Διάταξη",primary_info:"Πρωτεύουσες πληροφορίες",secondary_info:"Δευτερεύουσες πληροφορίες",content_info:"Περιεχόμενο",use_entity_picture:"Χρήση εικόνας οντότητας;",icon_animation:"Κίνηση εικονιδίου όταν είναι ενεργό;"},light:{show_brightness_control:"Έλεγχος φωτεινότητας;",use_light_color:"Χρήση χρώματος φωτος",show_color_temp_control:"Έλεγχος χρώματος θερμοκρασίας;",show_color_control:"Έλεγχος χρώματος;",incompatible_controls:"Ορισμένα στοιχεία ελέγχου ενδέχεται να μην εμφανίζονται εάν το φωτιστικό σας δεν υποστηρίζει τη λειτουργία."},fan:{show_percentage_control:"Έλεγχος ποσοστού;",show_oscillate_control:"Έλεγχος ταλάντωσης;"},cover:{show_buttons_control:"Έλεγχος κουμπιών;",show_position_control:"Έλεγχος θέσης;"},template:{primary:"Πρωτεύουσες πληροφορίες",secondary:"Δευτερεύουσες πληροφορίες",multiline_secondary:"Δευτερεύουσες πολλαπλών γραμμών;",entity_extra:"Χρησιμοποιείται σε πρότυπα και ενέργειες",content:"Περιεχόμενο"},title:{title:"Τίτλος",subtitle:"Υπότιτλος"},chips:{alignment:"Ευθυγράμμιση"},weather:{show_conditions:"Συνθήκες;",show_temperature:"Θερμοκρασία;"},update:{show_buttons_control:"Έλεγχος κουμπιών;"},vacuum:{commands:"Εντολές"},"media-player":{use_media_info:"Χρήση πληροφοριών πολυμέσων",use_media_artwork:"Χρήση έργων τέχνης πολυμέσων",media_controls:"Έλεγχος πολυμέσων",media_controls_list:{on_off:"Ενεργοποίηση/απενεργοποίηση",shuffle:"Τυχαία σειρά",previous:"Προηγούμενο κομμάτι",play_pause_stop:"Αναπαραγωγή/παύση/διακοπή",next:"Επόμενο κομμάτι",repeat:"Λειτουργία επανάληψης"},volume_controls:"Χειριστήρια έντασης ήχου",volume_controls_list:{volume_buttons:"Κουμπιά έντασης ήχου",volume_set:"Επίπεδο έντασης ήχου",volume_mute:"Σίγαση"}}},chip:{sub_element_editor:{title:"Επεξεργαστής Chip"},conditional:{chip:"Chip"},"chip-picker":{chips:"Chips",add:"Προσθήκη chip",edit:"Επεξεργασία",clear:"Καθαρισμός",select:"Επιλογή chip",types:{action:"Ενέργεια","alarm-control-panel":"Συναγερμός",back:"Πίσω",conditional:"Υπό προϋποθέσεις",entity:"Οντότητα",light:"Φως",menu:"Μενού",template:"Πρότυπο",weather:"Καιρός"}}}},oc={editor:ic},rc={form:{color_picker:{values:{default:"Default color"}},info_picker:{values:{default:"Default information",name:"Name",state:"State","last-changed":"Last Changed","last-updated":"Last Updated",none:"None"}},icon_type_picker:{values:{default:"Default type",icon:"Icon","entity-picture":"Entity picture",none:"None"}},layout_picker:{values:{default:"Default layout",vertical:"Vertical layout",horizontal:"Horizontal layout"}},alignment_picker:{values:{default:"Default alignment",start:"Start",end:"End",center:"Center",justify:"Justify"}}},card:{generic:{color:"Color",icon_color:"Icon color",layout:"Layout",fill_container:"Fill container",primary_info:"Primary information",secondary_info:"Secondary information",icon_type:"Icon type",content_info:"Content",use_entity_picture:"Use entity picture?",collapsible_controls:"Collapse controls when off",icon_animation:"Animate icon when active?"},light:{show_brightness_control:"Brightness control?",use_light_color:"Use light color",show_color_temp_control:"Temperature color control?",show_color_control:"Color control?",incompatible_controls:"Some controls may not be displayed if your light does not support the feature."},fan:{show_percentage_control:"Percentage control?",show_oscillate_control:"Oscillate control?"},cover:{show_buttons_control:"Control buttons?",show_position_control:"Position control?",show_tilt_position_control:"Tilt control?"},template:{primary:"Primary information",secondary:"Secondary information",multiline_secondary:"Multiline secondary?",entity_extra:"Used in templates and actions",label:"Label",content:"Content",badge_icon:"Badge icon",badge_color:"Badge color",picture:"Picture (will replace the icon)"},title:{title:"Title",subtitle:"Subtitle",title_tap_action:"Title tap action",subtitle_tap_action:"Subtitle tap action"},chips:{alignment:"Alignment"},weather:{show_conditions:"Conditions?",show_temperature:"Temperature?"},update:{show_buttons_control:"Control buttons?"},vacuum:{commands:"Commands",commands_list:{on_off:"Turn on/off"}},"media-player":{use_media_info:"Use media info",use_media_artwork:"Use media artwork",show_volume_level:"Show volume level",media_controls:"Media controls",media_controls_list:{on_off:"Turn on/off",shuffle:"Shuffle",previous:"Previous track",play_pause_stop:"Play/pause/stop",next:"Next track",repeat:"Repeat mode"},volume_controls:"Volume controls",volume_controls_list:{volume_buttons:"Volume buttons",volume_set:"Volume level",volume_mute:"Mute"}},lock:{lock:"Lock",unlock:"Unlock",open:"Open"},humidifier:{show_target_humidity_control:"Humidity control?"},climate:{show_temperature_control:"Temperature control?",hvac_modes:"HVAC Modes"},number:{display_mode:"Display Mode",display_mode_list:{default:"Default (slider)",slider:"Slider",buttons:"Buttons"}}},chip:{sub_element_editor:{title:"Chip editor"},conditional:{chip:"Chip"},"chip-picker":{chips:"Chips",add:"Add chip",edit:"Edit",clear:"Clear",select:"Select chip",types:{action:"Action","alarm-control-panel":"Alarm",back:"Back",conditional:"Conditional",entity:"Entity",light:"Light",menu:"Menu",spacer:"Spacer",template:"Template",weather:"Weather"}}}},ac={not_found:"Entity not found"},lc={editor:rc,card:ac},sc={form:{color_picker:{values:{default:"Color predeterminado"}},info_picker:{values:{default:"Información predeterminada",name:"Nombre",state:"Estado","last-changed":"Último cambio","last-updated":"Última actualización",none:"Ninguno"}},icon_type_picker:{values:{default:"Por defecto",icon:"Icono","entity-picture":"Imagen de entidad",none:"Ninguno"}},layout_picker:{values:{default:"Diseño predeterminado",vertical:"Diseño vertical",horizontal:"Diseño horizontal"}},alignment_picker:{values:{default:"Alineación predeterminada",start:"Inicio",end:"Final",center:"Centrado",justify:"Justificado"}}},card:{generic:{icon_color:"Color de icono",layout:"Diseño",fill_container:"Rellenar",primary_info:"Información primaria",secondary_info:"Información secundaria",icon_type:"Icono",content_info:"Contenido",use_entity_picture:"¿Usar imagen de entidad?",collapsible_controls:"Contraer controles cuando está apagado",icon_animation:"¿Icono animado cuando está activo?"},light:{show_brightness_control:"¿Controlar brillo?",use_light_color:"Usar color de la luz",show_color_temp_control:"¿Controlar temperatura del color?",show_color_control:"¿Controlar color?",incompatible_controls:"Es posible que algunos controles no se muestren si la luz no es compatible con esta función."},fan:{show_percentage_control:"¿Controlar porcentaje?",show_oscillate_control:"¿Controlar oscilación?"},cover:{show_buttons_control:"¿Botones de control?",show_position_control:"¿Control de posición?",show_tilt_position_control:"¿Control de inclinación?"},template:{primary:"Información primaria",secondary:"Información secundaria",multiline_secondary:"¿Secundaria multilínea?",entity_extra:"Utilizado en plantillas y acciones.",content:"Contenido",badge_icon:"Icono del distintivo",badge_color:"Color del distintivo",picture:"Imagen (sustituirá al icono)"},title:{title:"Título",subtitle:"Subtítulo",title_tap_action:"Acción al tocar el título",subtitle_tap_action:"Acción al tocar el subtítulo"},chips:{alignment:"Alineación"},weather:{show_conditions:"¿Condiciones?",show_temperature:"¿Temperatura?"},update:{show_buttons_control:"¿Botones de control?"},vacuum:{commands:"Comandos",commands_list:{on_off:"Activar/desactivar"}},"media-player":{use_media_info:"Usar información multimedia",use_media_artwork:"Usar ilustraciones multimedia",show_volume_level:"Mostrar nivel de volumen",media_controls:"Controles multimedia",media_controls_list:{on_off:"Activar/desactivar",shuffle:"Aleatoria",previous:"Pista anterior",play_pause_stop:"Reproducir/pausa/parar",next:"Pista siguiente",repeat:"Modo de repetición"},volume_controls:"Controles de volumen",volume_controls_list:{volume_buttons:"Botones de volumen",volume_set:"Nivel de volumen",volume_mute:"Silenciar"}},lock:{lock:"Bloquear",unlock:"Desbloquear",open:"Abrir"},humidifier:{show_target_humidity_control:"¿Controlar humedad?"},climate:{show_temperature_control:"¿Control de temperatura?",hvac_modes:"Modos de climatización"}},chip:{sub_element_editor:{title:"Editor de chip"},conditional:{chip:"Chip"},"chip-picker":{chips:"Chips",add:"Añadir chip",edit:"Editar",clear:"Limpiar",select:"Seleccionar chip",types:{action:"Acción","alarm-control-panel":"Alarma",back:"Volver",conditional:"Condicional",entity:"Entidad",light:"Luz",menu:"Menú",template:"Plantilla",weather:"Clima"}}}},cc={editor:sc},dc={form:{color_picker:{values:{default:"Oletusväri"}},info_picker:{values:{default:"Oletustiedot",name:"Nimi",state:"Tila","last-changed":"Viimeksi muuttunut","last-updated":"Viimeksi päivittynyt",none:"Ei mitään"}},icon_type_picker:{values:{default:"Oletustyyppi",icon:"Kuvake","entity-picture":"Kohteen kuva",none:"Ei mitään"}},layout_picker:{values:{default:"Oletusasettelu",vertical:"Pystysuuntainen",horizontal:"Vaakasuuntainen"}},alignment_picker:{values:{default:"Keskitys",start:"Alku",end:"Loppu",center:"Keskitä",justify:"Sovita"}}},card:{generic:{icon_color:"Ikonin väri",layout:"Asettelu",fill_container:"Täytä alue",primary_info:"Ensisijaiset tiedot",secondary_info:"Toissijaiset tiedot",icon_type:"Kuvakkeen tyyppi",content_info:"Sisältö",use_entity_picture:"Käytä kohteen kuvaa?",collapsible_controls:"Piilota toiminnot off-tilassa",icon_animation:"Animoi kuvake, kun aktiivinen?"},light:{show_brightness_control:"Kirkkauden säätö?",use_light_color:"Käytä valaisimen väriä",show_color_temp_control:"Värilämpötilan säätö?",show_color_control:"Värin säätö?",incompatible_controls:"Jotkin toiminnot eivät näy, jos valaisimesi ei tue niitä."},fan:{show_percentage_control:"Prosentuaalinen säätö?",show_oscillate_control:"Oskillaation säätö?"},cover:{show_buttons_control:"Toimintopainikkeet?",show_position_control:"Sijainnin hallinta?"},template:{primary:"Ensisijaiset tiedot",secondary:"Toissijaiset tiedot",multiline_secondary:"Monirivinen toissijainen tieto?",entity_extra:"Käytetään malleissa ja toiminnoissa",content:"Sisältö",badge_icon:"Merkin kuvake",badge_color:"Merkin väri",picture:"Kuva (korvaa kuvakkeen)"},title:{title:"Otsikko",subtitle:"Tekstitys"},chips:{alignment:"Asettelu"},weather:{show_conditions:"Ehdot?",show_temperature:"Lämpötila?"},update:{show_buttons_control:"Toimintopainikkeet?"},vacuum:{commands:"Komennot"},"media-player":{use_media_info:"Käytä median tietoja",use_media_artwork:"Käytä median kuvituksia",show_volume_level:"Näytä äänenvoimakkuuden hallinta",media_controls:"Toiminnot",media_controls_list:{on_off:"Päälle/pois",shuffle:"Sekoita",previous:"Edellinen kappale",play_pause_stop:"Toista/keskeytä/pysäytä",next:"Seuraava kappale",repeat:"Jatkuva toisto"},volume_controls:"Äänenvoimakkuuden hallinta",volume_controls_list:{volume_buttons:"Äänenvoimakkuuspainikkeet",volume_set:"Äänenvoimakkuus",volume_mute:"Mykistä"}},lock:{lock:"Lukitse",unlock:"Poista lukitus",open:"Avaa"},humidifier:{show_target_humidity_control:"Kosteudenhallinta?"}},chip:{sub_element_editor:{title:"Merkkieditori"},conditional:{chip:"Merkki"},"chip-picker":{chips:"Merkit",add:"Lisää merkki",edit:"Muokkaa",clear:"Tyhjennä",select:"Valitse merkki",types:{action:"Toiminto","alarm-control-panel":"Hälytys",back:"Takaisin",conditional:"Ehdollinen",entity:"Kohde",light:"Valaisin",menu:"Valikko",template:"Malli",weather:"Sää"}}}},uc={editor:dc},hc={form:{color_picker:{values:{default:"Couleur par défaut"}},info_picker:{values:{default:"Information par défaut",name:"Nom",state:"État","last-changed":"Dernière modification","last-updated":"Dernière mise à jour",none:"Aucune"}},icon_type_picker:{values:{default:"Type par défaut",icon:"Icône","entity-picture":"Image de l'entité",none:"Aucune"}},layout_picker:{values:{default:"Disposition par défault",vertical:"Disposition verticale",horizontal:"Disposition horizontale"}},alignment_picker:{values:{default:"Alignement par défaut",start:"Début",end:"Fin",center:"Centré",justify:"Justifié"}}},card:{generic:{color:"Couleur",icon_color:"Couleur de l'icône",layout:"Disposition",fill_container:"Remplir le conteneur",primary_info:"Information principale",secondary_info:"Information secondaire",icon_type:"Type d'icône",content_info:"Contenu",use_entity_picture:"Utiliser l'image de l'entité ?",collapsible_controls:"Reduire les contrôles quand éteint",icon_animation:"Animation de l'icône ?"},light:{show_brightness_control:"Contrôle de luminosité ?",use_light_color:"Utiliser la couleur de la lumière",show_color_temp_control:"Contrôle de la température ?",show_color_control:"Contrôle de la couleur ?",incompatible_controls:"Certains contrôles peuvent ne pas être affichés si votre lumière ne supporte pas la fonctionnalité."},fan:{show_percentage_control:"Contrôle de la vitesse ?",show_oscillate_control:"Contrôle de l'oscillation ?"},cover:{show_buttons_control:"Contrôle avec boutons ?",show_position_control:"Contrôle de la position ?",show_tilt_position_control:"Contrôle de l'inclinaison ?"},template:{primary:"Information principale",secondary:"Information secondaire",multiline_secondary:"Information secondaire sur plusieurs lignes ?",entity_extra:"Utilisée pour les modèles et les actions",label:"Libellé",content:"Contenu",badge_icon:"Icône du badge",badge_color:"Couleur du badge",picture:"Image (remplacera l'icône)"},title:{title:"Titre",subtitle:"Sous-titre",title_tap_action:"Appui sur le titre",subtitle_tap_action:"Appui sur le sous-titre"},chips:{alignment:"Alignement"},weather:{show_conditons:"Conditions ?",show_temperature:"Température ?"},update:{show_buttons_control:"Contrôle avec boutons ?"},vacuum:{commands:"Commandes",commands_list:{on_off:"Allumer/Éteindre"}},"media-player":{use_media_info:"Utiliser les informations du media",use_media_artwork:"Utiliser l'illustration du media",show_volume_level:"Afficher le niveau de volume",media_controls:"Contrôles du media",media_controls_list:{on_off:"Allumer/Éteindre",shuffle:"Lecture aléatoire",previous:"Précédent",play_pause_stop:"Lecture/pause/stop",next:"Suivant",repeat:"Mode de répétition"},volume_controls:"Contrôles du volume",volume_controls_list:{volume_buttons:"Bouton de volume",volume_set:"Niveau de volume",volume_mute:"Muet"}},lock:{lock:"Verrouiller",unlock:"Déverrouiller",open:"Ouvrir"},humidifier:{show_target_humidity_control:"Contrôle d'humidité ?"},climate:{show_temperature_control:"Contrôle de la température?",hvac_modes:"Modes du thermostat"},number:{display_mode:"Mode d'affichage",display_mode_list:{default:"Par défaut (Curseur)",slider:"Curseur",buttons:"Boutons"}}},chip:{sub_element_editor:{title:'Éditeur de "chip"'},conditional:{chip:"Chip"},"chip-picker":{chips:'"Chips"',add:'Ajouter une "chip"',edit:"Modifier",clear:"Effacer",select:'Sélectionner une "chip"',types:{action:"Action","alarm-control-panel":"Alarme",back:"Retour",conditional:"Conditionnel",entity:"Entité",light:"Lumière",menu:"Menu",spacer:"Espacement",template:"Modèle",weather:"Météo"}}}},pc={not_found:"Entité inconnue"},mc={editor:hc,card:pc},fc={form:{color_picker:{values:{default:"צבע ברירת מחדל"}},info_picker:{values:{default:"מידע ברירת מחדל",name:"שם",state:"מצב","last-changed":"שונה לאחרונה","last-updated":"עודכן לאחרונה",none:"ריק"}},layout_picker:{values:{default:"סידור ברירת מחדל",vertical:"סידור מאונך",horizontal:"סידור מאוזן"}},alignment_picker:{values:{default:"יישור ברירת מחדל",start:"התחלה",end:"סוף",center:"אמצע",justify:"מוצדק"}}},card:{generic:{icon_color:"צבע אייקון",layout:"סידור",fill_container:"מלא גבולות",primary_info:"מידע ראשי",secondary_info:"מידע מישני",content_info:"תוכן",use_entity_picture:"השתמש בתמונת ישות",collapsible_controls:"הסתר שליטה כשאר מכובה",icon_animation:"הנפש אייקון"},light:{show_brightness_control:"שליטה בבהירות?",use_light_color:"השתמש בצבע האור",show_color_temp_control:"הצג פקד גוון תאורה?",show_color_control:"הצג פקד צבע",incompatible_controls:"יתכן וחלק מהכפתורים לא יופיעו אם התאורה אינה תומכת בתכונה."},fan:{show_percentage_control:"שליטה באחוז?",show_oscillate_control:"שליטה בהתנדנדות?"},cover:{show_buttons_control:"הצג כפתורי שליטה",show_position_control:"הצג פקדי מיקום"},template:{primary:"מידע ראשי",secondary:"מידע מישני",multiline_secondary:"מידע מישני רב קווי",entity_extra:"משמש בתבניות ופעולות",content:"תוכן"},title:{title:"כותרת",subtitle:"כתובית"},chips:{alignment:"יישור"},weather:{show_conditions:"הצג תנאים?",show_temperature:"הצג טמפרטורה?"},update:{show_buttons_control:"הצג כפתורי שליטה?"},vacuum:{commands:"פקודות",icon_animation:"הנפשת אייקון"},"media-player":{use_media_info:"השתמש במידע מדיה",use_media_artwork:"השתמש באומנות מדיה",show_volume_level:"הצג שליטת ווליום",media_controls:"שליטה במדיה",media_controls_list:{on_off:"הדלק/כבה",shuffle:"ערבב",previous:"רצועה קודמת",play_pause_stop:"נגן/השהה/הפסק",next:"רצועה הבאה",repeat:"חזרה"},volume_controls:"שליטה בווליום",volume_controls_list:{volume_buttons:"כפתורי ווליום",volume_set:"רמת ווליום",volume_mute:"השתק"}},lock:{lock:"נעל",unlock:"בטל נעילה",open:"פתח"},humidifier:{show_target_humidity_control:"הצג פקדי לחות"}},chip:{sub_element_editor:{title:"עורך שבב"},conditional:{chip:"שבב"},"chip-picker":{chips:"שבבים",add:"הוסף שבב",edit:"ערוך",clear:"נקה",select:"בחר שבב",types:{action:"פעולה","alarm-control-panel":"אזעקה",back:"חזור",conditional:"מותנה",entity:"ישות",light:"אור",menu:"תפריט",template:"תבנית",weather:"מזג אוויר"}}}},vc={editor:fc},gc={form:{color_picker:{values:{default:"Alapértelmezett szín"}},info_picker:{values:{default:"Alepértelmezett információ",name:"Név",state:"Állapot","last-changed":"Utoljára módosítva","last-updated":"Utoljára frissítve",none:"Egyik sem"}},icon_type_picker:{values:{default:"Alapértelmezett típus",icon:"Ikon","entity-picture":"Entitás kép",none:"Egyik sem"}},layout_picker:{values:{default:"Alapértelmezet elrendezés",vertical:"Függőleges elrendezés",horizontal:"Vízszintes elrendezés"}},alignment_picker:{values:{default:"Alapértelmezett rendezés",start:"Kezdete",end:"Vége",center:"Közepe",justify:"Sorkizárt"}}},card:{generic:{icon_color:"Ikon szín",layout:"Elrendezés",fill_container:"Tároló kitöltése",primary_info:"Elsődleges információ",secondary_info:"Másodlagos információ",icon_type:"Ikon típus",content_info:"Tartalom",use_entity_picture:"Entitás kép használata",collapsible_controls:"Vezérlők összezárása kikapcsolt állapotban",icon_animation:"Ikon animálása aktív állapotban"},light:{show_brightness_control:"Fényerő vezérlő",use_light_color:"Fény szín használata",show_color_temp_control:"Színhőmérséklet vezérlő",show_color_control:"Szín vezérlő",incompatible_controls:"Azok a vezérlők nem lesznek megjelenítve, amelyeket a fényforrás nem támogat."},fan:{show_percentage_control:"Százalékos vezérlő",show_oscillate_control:"Oszcilláció vezérlő"},cover:{show_buttons_control:"Vezérlő gombok",show_position_control:"Pozíció vezérlő",show_tilt_position_control:"Dőlésszög szabályzó"},template:{primary:"Elsődleges információ",secondary:"Másodlagos információ",multiline_secondary:"Másodlagost több sorba?",entity_extra:"Műveletek és sablonok használatakor",content:"Tartalom",badge_icon:"Jelvény ikon",badge_color:"Jelvény szín",picture:"Kép (lecseréli az ikont)"},title:{title:"Fejléc",subtitle:"Alcím",title_tap_action:"Fejlécre koppintáskor",subtitle_tap_action:"Alcímre koppintáskor"},chips:{alignment:"Rendezés"},weather:{show_conditions:"Állapotok",show_temperature:"Hőmérséklet"},update:{show_buttons_control:"Vezérlő gombok"},vacuum:{commands:"Utasítások",commands_list:{on_off:"Ki/Bekapcsolás"}},"media-player":{use_media_info:"Média infó használata",use_media_artwork:"Média borító használata",show_volume_level:"Hangerő mutatása",media_controls:"Média vezérlők",media_controls_list:{on_off:"Ki/bekapcsolás",shuffle:"Véletlen lejátszás",previous:"Előző szám",play_pause_stop:"Lejátszás/szünet/állj",next:"Következő szám",repeat:"Ismétlés módja"},volume_controls:"Hangerő vezérlők",volume_controls_list:{volume_buttons:"Hangerő gombok",volume_set:"Hangerő szint",volume_mute:"Némítás"}},lock:{lock:"Zár",unlock:"Nyit",open:"Nyitva"},humidifier:{show_target_humidity_control:"Páratartalom vezérlő"},climate:{show_temperature_control:"Hőmérséklet vezérlő",hvac_modes:"HVAC mód"},number:{display_mode:"Megjelenítési mód",display_mode_list:{default:"Alepértelmezett (csúszka)",slider:"Csúszka",buttons:"Gombok"}}},chip:{sub_element_editor:{title:"Chip szerkesztő"},conditional:{chip:"Chip"},"chip-picker":{chips:"Chip-ek",add:"Chip hozzáadása",edit:"Szerkesztés",clear:"Ürítés",select:"Chip kiválasztása",types:{action:"Művelet","alarm-control-panel":"Riasztó",back:"Vissza",conditional:"Feltételes",entity:"Entitás",light:"Fényforrás",menu:"Menü",spacer:"Térköz",template:"Sablon",weather:"Időjárás"}}}},_c={not_found:"Entitás nem található"},yc={editor:gc,card:_c},bc={form:{color_picker:{values:{default:"Warna bawaan"}},info_picker:{values:{default:"Informasi bawaan",name:"Nama",state:"Status","last-changed":"Terakhir Diubah","last-updated":"Terakhir Diperbarui",none:"Tidak ada"}},icon_type_picker:{values:{default:"Tipe bawaan",icon:"Ikon","entity-picture":"Gambar entitas",none:"Tidak ada"}},layout_picker:{values:{default:"Tata letak bawaan",vertical:"Tata letak vertikal",horizontal:"Tata letak horizontal"}},alignment_picker:{values:{default:"Perataan bawaan",start:"Awal",end:"Akhir",center:"Tengah",justify:"Rata kanan-kiri"}}},card:{generic:{icon_color:"Warna ikon",layout:"Tata letak",fill_container:"Isi kontainer",primary_info:"Informasi primer",secondary_info:"Informasi sekunder",icon_type:"Tipe ikon",content_info:"Konten",use_entity_picture:"Gunakan gambar entitas?",collapsible_controls:"Sembunyikan kontrol saat mati",icon_animation:"Animasikan ikon saat aktif?"},light:{show_brightness_control:"Kontrol kecerahan?",use_light_color:"Gunakan warna lampu",show_color_temp_control:"Kontrol suhu warna?",show_color_control:"Kontrol warna?",incompatible_controls:"Beberapa kontrol mungkin tidak ditampilkan jika lampu Anda tidak mendukung fitur tersebut."},fan:{show_percentage_control:"Kontrol persentase?",show_oscillate_control:"Kontrol osilasi?"},cover:{show_buttons_control:"Tombol kontrol?",show_position_control:"Kontrol posisi?",show_tilt_position_control:"Kontrol kemiringan?"},template:{primary:"Informasi primer",secondary:"Informasi sekunder",multiline_secondary:"Info sekunder multibaris?",entity_extra:"Digunakan dalam templat dan tindakan",content:"Konten",badge_icon:"Ikon lencana",badge_color:"Warna lencana",picture:"Gambar (akan menggantikan ikon)"},title:{title:"Judul",subtitle:"Subjudul",title_tap_action:"Tindakan ketuk judul",subtitle_tap_action:"Tindakan ketuk subjudul"},chips:{alignment:"Perataan"},weather:{show_conditions:"Kondisi?",show_temperature:"Suhu?"},update:{show_buttons_control:"Tombol kontrol?"},vacuum:{commands:"Perintah",commands_list:{on_off:"Nyalakan/Matikan"}},"media-player":{use_media_info:"Gunakan info media",use_media_artwork:"Gunakan gambar seni media",show_volume_level:"Tampilkan level volume",media_controls:"Kontrol media",media_controls_list:{on_off:"Nyalakan/Matikan",shuffle:"Acak",previous:"Lagu sebelumnya",play_pause_stop:"Putar/jeda/stop",next:"Lagu berikutnya",repeat:"Mode pengulangan"},volume_controls:"Kontrol volume",volume_controls_list:{volume_buttons:"Tombol volume",volume_set:"Level volume",volume_mute:"Bisukan"}},lock:{lock:"Kunci",unlock:"Buka kunci",open:"Buka"},humidifier:{show_target_humidity_control:"Kontrol kelembapan?"},climate:{show_temperature_control:"Kontrol suhu?",hvac_modes:"Mode HVAC"},number:{display_mode:"Mode Tampilan",display_mode_list:{default:"Bawaan (geser)",slider:"Geser",buttons:"Tombol"}}},chip:{sub_element_editor:{title:"Editor cip"},conditional:{chip:"Cip"},"chip-picker":{chips:"Cip",add:"Tambah cip",edit:"Edit",clear:"Hapus",select:"Pilih cip",types:{action:"Tindakan","alarm-control-panel":"Alarm",back:"Kembali",conditional:"Kondisional",entity:"Entitas",light:"Lampu",menu:"Menu",spacer:"Pemisah",template:"Templat",weather:"Cuaca"}}}},kc={not_found:"Entitas tidak ditemukan"},xc={editor:bc,card:kc},wc={form:{color_picker:{values:{default:"Colore predefinito"}},info_picker:{values:{default:"Informazione predefinita",name:"Nome",state:"Stato","last-changed":"Ultimo cambiamento","last-updated":"Ultimo aggiornamento",none:"Nessuno"}},icon_type_picker:{values:{default:"Tipo predefinito",icon:"Icona","entity-picture":"Immagine dell'entità",none:"Nessuna"}},layout_picker:{values:{default:"Disposizione predefinita",vertical:"Disposizione verticale",horizontal:"Disposizione orizzontale"}},alignment_picker:{values:{default:"Allineamento predefinito",start:"Inizio",end:"Fine",center:"Centro",justify:"Giustificato"}}},card:{generic:{icon_color:"Colore dell'icona",layout:"Disposizione",fill_container:"Riempi il contenitore",primary_info:"Informazione primaria",secondary_info:"Informazione secondaria",icon_type:"Tipo icona",content_info:"Contenuto",use_entity_picture:"Usa l'immagine dell'entità",collapsible_controls:"Nascondi i controlli quando spento",icon_animation:"Anima l'icona quando attiva"},light:{use_light_color:"Usa il colore della luce",show_brightness_control:"Controllo luminosità",show_color_temp_control:"Controllo temperatura",show_color_control:"Controllo colore",incompatible_controls:"Alcuni controlli potrebbero non essere mostrati se la tua luce non li supporta."},fan:{show_percentage_control:"Controllo potenza",show_oscillate_control:"Controllo oscillazione"},cover:{show_buttons_control:"Pulsanti di controllo",show_position_control:"Controllo percentuale apertura",show_tilt_position_control:"Controllo percentuale inclinazione"},template:{primary:"Informazione primaria",secondary:"Informazione secondaria",multiline_secondary:"Abilita frasi multilinea",entity_extra:"Usato in templates ed azioni",content:"Contenuto",badge_icon:"Icona del badge",badge_color:"Colore del badge",picture:"Immagine (sostituirà l'icona)"},title:{title:"Titolo",subtitle:"Sottotitolo",title_tap_action:"Azione di tap sul titolo",subtitle_tap_action:"Azione di tap sul sottotitolo"},chips:{alignment:"Allineamento"},weather:{show_conditions:"Condizioni",show_temperature:"Temperatura"},update:{show_buttons_control:"Pulsanti di controllo"},vacuum:{commands:"Comandi",commands_list:{on_off:"Accendi/Spegni"}},"media-player":{use_media_info:"Mostra le informazioni della sorgente",use_media_artwork:"Usa la copertina della sorgente",show_volume_level:"Mostra volume",media_controls:"Controlli media",media_controls_list:{on_off:"Accendi/Spegni",shuffle:"Riproduzione casuale",previous:"Traccia precedente",play_pause_stop:"Play/Pausa/Stop",next:"Traccia successiva",repeat:"Ciclo continuo"},volume_controls:"Controlli del Volume",volume_controls_list:{volume_buttons:"Bottoni del volume",volume_set:"Livello del volume",volume_mute:"Silenzia"}},lock:{lock:"Blocca",unlock:"Sblocca",open:"Aperto"},humidifier:{show_target_humidity_control:"Controllo umidità"},climate:{show_temperature_control:"Controllo della temperatura?",hvac_modes:"Modalità del termostato"},number:{display_mode:"Modalità di visualizzazione",display_mode_list:{default:"Predefinito (cursore)",slider:"Cursore",buttons:"Pulsanti"}}},chip:{sub_element_editor:{title:"Editor di chip"},conditional:{chip:"Chip"},"chip-picker":{chips:"Chips",add:"Aggiungi chip",edit:"Modifica",clear:"Rimuovi",select:"Seleziona chip",types:{action:"Azione","alarm-control-panel":"Allarme",back:"Pulsante indietro",conditional:"Condizione",entity:"Entità",light:"Luce",menu:"Menù",spacer:"Distanziere",template:"Modello",weather:"Meteo"}}}},Cc={not_found:"Entità non trovata"},Ec={editor:wc,card:Cc},Ac={form:{color_picker:{values:{default:"기본 색"}},info_picker:{values:{default:"기본 정보",name:"이름",state:"상태","last-changed":"마지막 변경","last-updated":"마지막 업데이트",none:"없음"}},icon_type_picker:{values:{default:"기본 타입",icon:"아이콘","entity-picture":"엔티티 사진",none:"없음"}},layout_picker:{values:{default:"기본 레이아웃",vertical:"수직 레이아웃",horizontal:"수평 레이아웃"}},alignment_picker:{values:{default:"기본 정렬",start:"시작",end:"끝",center:"중앙",justify:"행 정렬"}}},card:{generic:{icon_color:"아이콘 색",layout:"레이아웃",fill_container:"콘테이너 채우기",primary_info:"기본 정보",secondary_info:"보조 정보",icon_type:"아이콘 타입",content_info:"내용 정보",use_entity_picture:"엔티티 사진 사용",collapsible_controls:"꺼져있을 때 컨트롤 접기",icon_animation:"활성화 시 아이콘 애니메이션 사용"},light:{show_brightness_control:"밝기 컨트롤 표시",use_light_color:"조명 색 사용",show_color_temp_control:"색 온도 컨트롤 표시",show_color_control:"색 컨트롤 표시",incompatible_controls:"조명이 기능을 지원하지 않는 경우 일부 컨트롤이 표시되지 않을 수 있습니다."},fan:{show_percentage_control:"퍼센트 컨트롤",show_oscillate_control:"오실레이트 컨트롤"},cover:{show_buttons_control:"컨트롤 버튼 표시",show_position_control:"위치 컨트롤 표시",show_tilt_position_control:"기울기 컨트롤 표시"},template:{primary:"기본 정보",secondary:"보조 정보",multiline_secondary:"Multiline secondary?",entity_extra:"템플릿 및 작업에 사용",content:"내용",badge_icon:"뱃지 아이콘",badge_color:"뱃지 색",picture:"그림 (아이콘 대체)"},title:{title:"제목",subtitle:"부제목",title_tap_action:"제목 탭 액션",subtitle_tap_action:"부제목 탭 액션"},chips:{alignment:"정렬"},weather:{show_conditions:"조건 표시",show_temperature:"온도 표시"},update:{show_buttons_control:"컨트롤 버튼 표시"},vacuum:{commands:"명령어",commands_list:{on_off:"켜기/끄기"}},"media-player":{use_media_info:"미디어 정보 사용",use_media_artwork:"미디어 아트워크 사용",show_volume_level:"볼륨 레벨 표시",media_controls:"미디어 컨트롤",media_controls_list:{on_off:"켜기/끄기",shuffle:"섞기",previous:"이전 트랙",play_pause_stop:"재생/일시 정지/정지",next:"다음 트랙",repeat:"반복 모드"},volume_controls:"볼륨 컨트롤",volume_controls_list:{volume_buttons:"볼륨 버튼",volume_set:"볼륨 레벨",volume_mute:"음소거"}},lock:{lock:"잠금",unlock:"잠금 해제",open:"열기"},humidifier:{show_target_humidity_control:"습도 조절 표시"},climate:{show_temperature_control:"온도 조절 표시",hvac_modes:"HVAC 모드"}},chip:{sub_element_editor:{title:"칩 에디터"},conditional:{chip:"칩"},"chip-picker":{chips:"칩",add:"칩 추가",edit:"수정",clear:"클리어",select:"칩 선택",types:{action:"액션","alarm-control-panel":"알람",back:"이전",conditional:"Conditional",entity:"엔티티",light:"조명",menu:"메뉴",template:"템플릿",weather:"날씨"}}}},Sc={editor:Ac},Oc={form:{color_picker:{values:{default:"Standard farge"}},info_picker:{values:{default:"Standard informasjon",name:"Navn",state:"Tilstand","last-changed":"Sist endret","last-updated":"Sist oppdatert",none:"Ingen"}},icon_type_picker:{values:{default:"Standard type",icon:"Ikon","entity-picture":"Enhetsbilde",none:"Ingen"}},layout_picker:{values:{default:"Standardoppsett",vertical:"Vertikalt oppsett",horizontal:"Horisontalt oppsett"}},alignment_picker:{values:{default:"Standard justering",start:"Start",end:"Slutt",center:"Senter",justify:"Blokkjuster"}}},card:{generic:{icon_color:"Ikon farge",layout:"Oppsett",primary_info:"Primærinformasjon",secondary_info:"Sekundærinformasjon",content_info:"Innhold",use_entity_picture:"Bruk enhetsbilde?",icon_animation:"Animer ikon når aktivt?",color:"Farge",fill_container:"Fyll beholder",icon_type:"Ikontype",collapsible_controls:"Skjul kontroller når av"},light:{show_brightness_control:"Lysstyrkekontroll?",use_light_color:"Bruk lys farge",show_color_temp_control:"Temperatur fargekontroll?",show_color_control:"Fargekontroll?",incompatible_controls:"Noen kontroller vises kanskje ikke hvis lyset ditt ikke støtter denne funksjonen."},fan:{show_percentage_control:"Prosentvis kontroll?",show_oscillate_control:"Oscillerende kontroll?"},cover:{show_buttons_control:"Kontrollere med knapper?",show_position_control:"Posisjonskontroll?",show_tilt_position_control:"Vippe kontroll?"},template:{primary:"Primærinformasjon",secondary:"Sekundærinformasjon",multiline_secondary:"Multilinje sekundær?",entity_extra:"Brukes i maler og handlinger",content:"Innhold",label:"Etikett",badge_icon:"Badge ikon",badge_color:"Badge farge",picture:"Bilde (erstatter ikonet)"},title:{title:"Tittel",subtitle:"Undertekst",title_tap_action:"Tittel tap action",subtitle_tap_action:"Undertekst tap action"},chips:{alignment:"Justering"},weather:{show_conditions:"Forhold?",show_temperature:"Temperatur?"},update:{show_buttons_control:"Kontroller knapper?"},vacuum:{commands:"Kommandoer",commands_list:{on_off:"Slå på/av"}},"media-player":{use_media_info:"Bruk mediainformasjon",use_media_artwork:"Bruk mediabilde",show_volume_level:"Vis volumnivå",media_controls:"Media kontroller",media_controls_list:{on_off:"Slå på/av",shuffle:"Bland",previous:"Forrige spor",play_pause_stop:"Spill/pause/stopp",next:"Neste spor",repeat:"Gjenta"},volume_controls:"Volumkontroller",volume_controls_list:{volume_buttons:"Volumknapper",volume_set:"Volumnivå",volume_mute:"Demp"}},lock:{lock:"Lås",unlock:"Lås opp",open:"Åpne"},humidifier:{show_target_humidity_control:"Fuktighetskontroll?"},climate:{show_temperature_control:"Temperaturkontroll?",hvac_modes:"HVAC-moduser"},number:{display_mode:"Visningsmodus",display_mode_list:{default:"Standard (skyveknapp)",slider:"Skyveknapp",buttons:"Knapper"}}},chip:{sub_element_editor:{title:"Chip redaktør"},conditional:{chip:"Chip"},"chip-picker":{chips:"Chips",add:"Legg til chip",edit:"Endre",clear:"Klare",select:"Velg chip",types:{action:"Handling","alarm-control-panel":"Alarm",back:"Tilbake",conditional:"Betinget",entity:"Entitet",light:"Lys",menu:"Meny",spacer:"Mellomrom",template:"Mal",weather:"Vær"}}}},Tc={not_found:"Enhet ikke funnet"},Ic={editor:Oc,card:Tc},zc={form:{color_picker:{values:{default:"Standaard kleur"}},info_picker:{values:{default:"Standaard informatie",name:"Naam",state:"Staat","last-changed":"Laatst gewijzigd","last-updated":"Laatst bijgewerkt",none:"Geen"}},icon_type_picker:{values:{default:"Standaard icoon type",icon:"Icoon","entity-picture":"Entiteit afbeelding",none:"Geen"}},layout_picker:{values:{default:"Standaard lay-out",vertical:"Verticale lay-out",horizontal:"Horizontale lay-out"}},alignment_picker:{values:{default:"Standaard uitlijning",start:"Begin",end:"Einde",center:"Midden",justify:"Uitlijnen "}}},card:{generic:{icon_color:"Icoon kleur",layout:"Lay-out",fill_container:"Vul container",primary_info:"Primaire informatie",secondary_info:"Secundaire informatie",icon_type:"Icoon type",content_info:"Inhoud",use_entity_picture:"Gebruik entiteit afbeelding",collapsible_controls:"Bedieningselementen verbergen wanneer uitgeschakeld",icon_animation:"Pictogram animeren indien actief"},light:{show_brightness_control:"Bediening helderheid",use_light_color:"Gebruik licht kleur",show_color_temp_control:"Bediening kleurtemperatuur",show_color_control:"Bediening kleur",incompatible_controls:"Sommige bedieningselementen worden mogelijk niet weergegeven als uw lamp deze functie niet ondersteunt."},fan:{show_percentage_control:"Bediening middels percentage",show_oscillate_control:"Bediening oscillatie"},cover:{show_buttons_control:"Toon knoppen",show_position_control:"Toon positie bediening",show_tilt_position_control:"Toon tilt control"},template:{primary:"Primaire informatie",secondary:"Secundaire informatie",multiline_secondary:"Secundaire informatie op meerdere lijnen weergeven",entity_extra:"Gebruikt in sjablonen en acties",content:"Inhoud",badge_icon:"Badge icoon",badge_color:"Badge kleur",picture:"Afbeelding (zal het icoon vervangen)"},title:{title:"Titel",subtitle:"Ondertitel",title_tap_action:"Titel tik actie",subtitle_tap_action:"Ondertitel tik actie"},chips:{alignment:"Uitlijning"},weather:{show_conditions:"Weerbeeld",show_temperature:"Temperatuur"},update:{show_buttons_control:"Bedieningsknoppen"},vacuum:{commands:"Commando's",commands_list:{on_off:"Zet aan/uit"}},"media-player":{use_media_info:"Gebruik media informatie",use_media_artwork:"Gebruik media omslag",show_volume_level:"Toon volumeniveau",media_controls:"Mediabediening",media_controls_list:{on_off:"zet aan/uit",shuffle:"Shuffle",previous:"Vorige nummer",play_pause_stop:"Speel/pauze/stop",next:"Volgende nummer",repeat:"Herhalen"},volume_controls:"Volumeregeling",volume_controls_list:{volume_buttons:"Volume knoppen",volume_set:"Volumeniveau",volume_mute:"Dempen"}},lock:{lock:"Vergrendel",unlock:"Ontgrendel",open:"Open"},humidifier:{show_target_humidity_control:"Vochtigheid controle?"},climate:{show_temperature_control:"Temperatuur controle",hvac_modes:"HVAC Modes"},number:{display_mode:"Weergave Modus",display_mode_list:{default:"Standaard (schuifbalk)",slider:"Schuifbalk",buttons:"Knoppen"}}},chip:{sub_element_editor:{title:"Chip editor"},conditional:{chip:"Chip"},"chip-picker":{chips:"Chips",add:"Toevoegen chip",edit:"Bewerk",clear:"Maak leeg",select:"Selecteer chip",types:{action:"Actie","alarm-control-panel":"Alarm",back:"Terug",conditional:"Voorwaardelijk",entity:"Entiteit",light:"Licht",menu:"Menu",spacer:"Afstandhouder",template:"Sjabloon",weather:"Weer"}}}},$c={not_found:"Entiteit niet gevonden"},Mc={editor:zc,card:$c},jc={form:{color_picker:{values:{default:"Domyślny kolor"}},info_picker:{values:{default:"Domyślne informacje",name:"Nazwa",state:"Stan","last-changed":"Ostatnia zmiana","last-updated":"Ostatnia aktualizacja",none:"Brak"}},icon_type_picker:{values:{default:"Domyślny typ",icon:"Ikona","entity-picture":"Obraz encji",none:"Brak"}},layout_picker:{values:{default:"Układ domyślny",vertical:"Układ pionowy",horizontal:"Układ poziomy"}},alignment_picker:{values:{default:"Wyrównanie domyślne",start:"Wyrównanie do lewej",end:"Wyrównanie do prawej",center:"Wyśrodkowanie",justify:"Justowanie"}}},card:{generic:{icon_color:"Kolor ikony",layout:"Układ",fill_container:"Wypełnij zawartością",primary_info:"Informacje główne",secondary_info:"Informacje drugorzędne",icon_type:"Typ ikony",content_info:"Zawartość",use_entity_picture:"Użyć obrazu encji?",collapsible_controls:"Zwiń sterowanie, jeśli wyłączone",icon_animation:"Animować, gdy aktywny?"},light:{show_brightness_control:"Sterowanie jasnością?",use_light_color:"Użyj koloru światła",show_color_temp_control:"Sterowanie temperaturą światła?",show_color_control:"Sterowanie kolorami?",incompatible_controls:"Niektóre funkcje są niewidoczne, jeśli światło ich nie obsługuje."},fan:{show_percentage_control:"Sterowanie procentowe?",show_oscillate_control:"Sterowanie oscylacją?"},cover:{show_buttons_control:"Przyciski sterujące?",show_position_control:"Sterowanie położeniem?",show_tilt_position_control:"Sterowanie poziomem otwarcia?"},template:{primary:"Informacje główne",secondary:"Informacje drugorzędne",multiline_secondary:"Drugorzędne wielowierszowe?",entity_extra:"Używane w szablonach i akcjach",content:"Zawartość",badge_icon:"Ikona odznaki",badge_color:"Kolor odznaki",picture:"Obraz (zamiast ikony)"},title:{title:"Tytuł",subtitle:"Podtytuł"},chips:{alignment:"Wyrównanie"},weather:{show_conditions:"Warunki?",show_temperature:"Temperatura?"},update:{show_buttons_control:"Przyciski sterujące?"},vacuum:{commands:"Polecenia"},"media-player":{use_media_info:"Użyj informacji o multimediach",use_media_artwork:"Użyj okładek multimediów",show_volume_level:"Wyświetl poziom głośności",media_controls:"Sterowanie multimediami",media_controls_list:{on_off:"Włącz/wyłącz",shuffle:"Losowo",previous:"Poprzednie nagranie",play_pause_stop:"Odtwórz/Pauza/Zatrzymaj",next:"Następne nagranie",repeat:"Powtarzanie"},volume_controls:"Sterowanie głośnością",volume_controls_list:{volume_buttons:"Przyciski głośności",volume_set:"Poziom głośności",volume_mute:"Wycisz"}},lock:{lock:"Zablokuj",unlock:"Odblokuj",open:"Otwórz"},humidifier:{show_target_humidity_control:"Sterowanie wilgotnością?"},climate:{show_temperature_control:"Sterowanie temperaturą?",hvac_modes:"Tryby urządzenia"}},chip:{sub_element_editor:{title:"Edytor czipów"},conditional:{chip:"Czip"},"chip-picker":{chips:"Czipy",add:"Dodaj czip",edit:"Edytuj",clear:"Wyczyść",select:"Wybierz czip",types:{action:"Akcja","alarm-control-panel":"Alarm",back:"Wstecz",conditional:"Warunkowy",entity:"Encja",light:"Światło",menu:"Menu",spacer:"Odstęp",template:"Szablon",weather:"Pogoda"}}}},Pc={editor:jc},Lc={form:{color_picker:{values:{default:"Cor padrão"}},info_picker:{values:{default:"Informação padrão",name:"Nome",state:"Estado","last-changed":"Última alteração","last-updated":"Última atualização",none:"Nenhum"}},icon_type_picker:{values:{default:"Tipo padrão",icon:"Ícone","entity-picture":"Imagem da entidade",none:"Nenhum"}},layout_picker:{values:{default:"Layout padrão",vertical:"Layout vertical",horizontal:"Layout horizontal"}},alignment_picker:{values:{default:"Alinhamento padrão",start:"Início",end:"Fim",center:"Centro",justify:"Justificado"}}},card:{generic:{color:"Cor",icon_color:"Cor do ícone",layout:"Layout",fill_container:"Prencher",primary_info:"Informação primária",secondary_info:"Informação secundária",icon_type:"Tipo do ícone",content_info:"Conteúdo",use_entity_picture:"Usar imagem da entidade?",collapsible_controls:"Recolher controles quando desligado",icon_animation:"Animar ícone quando ativo?"},light:{show_brightness_control:"Controle de brilho?",use_light_color:"Usar cor da luz",show_color_temp_control:"Controle de temperatura de cor?",show_color_control:"Controle de cor?",incompatible_controls:"Alguns controles podem não ser exibidos se sua luz não suportar o recurso."},fan:{show_percentage_control:"Controle de porcentagem?",show_oscillate_control:"Controle de oscilação?"},cover:{show_buttons_control:"Botões de controle?",show_position_control:"Controle de posição?",show_tilt_position_control:"Controle de inclinação?"},template:{primary:"Informação primária",secondary:"Informação secundária",multiline_secondary:"Multilinha secundária?",entity_extra:"Usado em modelos e ações",label:"Label",content:"Conteúdo",badge_icon:"Ícone do badge",badge_color:"Cor do badge",picture:"Imagem (irá substituir o ícone)"},title:{title:"Título",subtitle:"Legenda",title_tap_action:"Ação de toque no título",subtitle_tap_action:"Ação de toque na legenda"},chips:{alignment:"Alinhamento"},weather:{show_conditions:"Condições?",show_temperature:"Temperatura?"},update:{show_buttons_control:"Botões de controle?"},vacuum:{commands:"Comandos",commands_list:{on_off:"Ligar/Desligar"}},"media-player":{use_media_info:"Usar informação da mídia",use_media_artwork:"Usar arte da mídia",show_volume_level:"Mostrar nível de volume",media_controls:"Controles de mídia",media_controls_list:{on_off:"Ligar/Desligar",shuffle:"Embaralhar",previous:"Faixa anterior",play_pause_stop:"Reproduzir/pausar/parar",next:"Próxima faixa",repeat:"Modo repetição"},volume_controls:"Controles de volume",volume_controls_list:{volume_buttons:"Botões de volume",volume_set:"Nível de volume",volume_mute:"Mudo"}},lock:{lock:"Bloquear",unlock:"Desbloquear",open:"Abrir"},humidifier:{show_target_humidity_control:"Controle de umidade?"},climate:{show_temperature_control:"Controle de temperatura?",hvac_modes:"Modos do HVAC"},number:{display_mode:"Modo de exibição",display_mode_list:{default:"Padrão (deslizante)",slider:"Deslizante",buttons:"Botões"}}},chip:{sub_element_editor:{title:"Editor de chip"},conditional:{chip:"Chip"},"chip-picker":{chips:"Chips",add:"Adicionar chip",edit:"Editar",clear:"Limpar",select:"Selecionar chip",types:{action:"Ação","alarm-control-panel":"Alarme",back:"Voltar",conditional:"Condicional",entity:"Entidade",light:"Luz",menu:"Menu",spacer:"Espaçador",template:"Template",weather:"Clima"}}}},Dc={not_found:"Entidade não encontrada"},Nc={editor:Lc,card:Dc},Rc={form:{color_picker:{values:{default:"Cor padrão"}},info_picker:{values:{default:"Informações padrão",name:"Nome",state:"Estado","last-changed":"Última alteração","last-updated":"Última atualização",none:"Nenhum"}},layout_picker:{values:{default:"Layout padrão",vertical:"Layout vertical",horizontal:"Layout horizontal"}},alignment_picker:{values:{default:"Padrão (inicio)",end:"Fim",center:"Centrado",justify:"Justificado"}}},card:{generic:{icon_color:"Cor do ícone?",layout:"Layout",primary_info:"Informações primárias",secondary_info:"Informações secundárias",use_entity_picture:"Usar imagem da entidade?",icon_animation:"Animar ícone quando ativo?"},light:{show_brightness_control:"Mostrar controle de brilho?",use_light_color:"Usar cor da luz?",show_color_temp_control:"Mostrar controle de temperatura?",show_color_control:"Mostrar controle de cor?",incompatible_controls:"Alguns controles podem não ser exibidos se a luz não suportar o recurso."},fan:{show_percentage_control:"Mostrar controle de porcentagem?",show_oscillate_control:"Mostrar controle de oscilação?"},cover:{show_buttons_control:"Mostrar botões?",show_position_control:"Mostrar controle de posição?"},template:{primary:"Informações primárias",secondary:"Informações secundárias",multiline_secondary:"Multilinha secundária?",content:"Conteúdo"},title:{title:"Título",subtitle:"Subtítulo"},chips:{alignment:"Alinhamento"},weather:{show_conditions:"Condições?",show_temperature:"Temperatura?"}},chip:{sub_element_editor:{title:"Editor de fichas"},conditional:{chip:"Ficha"},"chip-picker":{chips:"Fichas",add:"Adicionar ficha",edit:"Editar",clear:"Limpar",select:"Selecionar ficha",types:{action:"Ação","alarm-control-panel":"Alarme",back:"Voltar",conditional:"Condicional",entity:"Entidade",light:"Iluminação",menu:"Menu",template:"Modelo",weather:"Clima"}}}},Uc={editor:Rc},Vc={form:{color_picker:{values:{default:"Culoare implicită"}},info_picker:{values:{default:"Informație implicită",name:"Nume",state:"Stare","last-changed":"Ultima modificare","last-updated":"Ultima actulizare",none:"Niciuna"}},icon_type_picker:{values:{default:"Tip implicit",icon:"Pictogramă","entity-picture":"Imagine",none:"Niciuna"}},layout_picker:{values:{default:"Aranjare implicită",vertical:"Verticală",horizontal:"Orizontală"}},alignment_picker:{values:{default:"Aliniere implicită",start:"Stânga",end:"Dreapta",center:"Centrat",justify:"Umplere"}}},card:{generic:{icon_color:"Culoare pictogramă",layout:"Aranjare",fill_container:"Umplere container",primary_info:"Informație principală",secondary_info:"Informație secundară",icon_type:"Tip pictogramă",content_info:"Conținut",use_entity_picture:"Imagine?",collapsible_controls:"Restrângere la dezactivare"},light:{show_brightness_control:"Comandă pentru strălucire?",use_light_color:"Folosește culoarea luminii",show_color_temp_control:"Comandă pentru temperatură de culoare?",show_color_control:"Comandă pentru culoare?",incompatible_controls:"Unele comenzi ar putea să nu fie afișate dacă lumina nu suportă această caracteristică."},fan:{icon_animation:"Animare pictograma la activare?",show_percentage_control:"Comandă procent?",show_oscillate_control:"Comandă oscilație?"},cover:{show_buttons_control:"Comenzi pentru control?",show_position_control:"Comandă pentru poziție?",show_tilt_position_control:"Comandă pentru înclinare?"},template:{primary:"Informație principală",secondary:"Informație secundară",multiline_secondary:"Informație secundară pe mai multe linii?",entity_extra:"Folosită în șabloane și acțiuni",content:"Conținut",badge_icon:"Pictogramă insignă",badge_color:"Culoare insignă",picture:"Imagine (inlocuiește pictograma)"},title:{title:"Titlu",subtitle:"Subtitlu"},chips:{alignment:"Aliniere"},weather:{show_conditions:"Condiții?",show_temperature:"Temperatură?"},update:{show_buttons_control:"Comenzi control?"},vacuum:{commands:"Comenzi"},"media-player":{use_media_info:"Informații media",use_media_artwork:"Grafică media",show_volume_level:"Nivel volum",media_controls:"Comenzi media",media_controls_list:{on_off:"Pornit/Oprit",shuffle:"Amestecare",previous:"Pista anterioară",play_pause_stop:"Redare/Pauză/Stop",next:"Pista următoare",repeat:"Mod repetare"},volume_controls:"Comenzi volum",volume_controls_list:{volume_buttons:"Comenzi volum",volume_set:"Nivel volum",volume_mute:"Dezactivare sunet"}},lock:{lock:"Încuie",unlock:"Descuie",open:"Deschide"},humidifier:{show_target_humidity_control:"Comenzi umiditate?"},climate:{show_temperature_control:"Comenzi temperatură?",hvac_modes:"Moduri HVAC"}},chip:{sub_element_editor:{title:"Editor jeton"},conditional:{chip:"Jeton"},"chip-picker":{chips:"Jetoane",add:"Adaugă jeton",edit:"Modifică",clear:"Șterge",select:"Alege jeton",types:{action:"Acțiune","alarm-control-panel":"Alarmă",back:"Înapoi",conditional:"Condițional",entity:"Entitate",light:"Lumină",menu:"Meniu",template:"Șablon",weather:"Vreme"}}}},Bc={editor:Vc},Fc={form:{color_picker:{values:{default:"Цвет по умолчанию"}},info_picker:{values:{default:"По умолчанию",name:"Имя",state:"Статус","last-changed":"Последнее изменение","last-updated":"Последнее обновление",none:"Нет"}},icon_type_picker:{values:{default:"По умолчанию",icon:"Иконка","entity-picture":"Изображение",none:"Нет"}},layout_picker:{values:{default:"Расположение по умолчанию",vertical:"Вертикальное расположение",horizontal:"Горизонтальное расположение"}},alignment_picker:{values:{default:"Выравнивание по умолчанию",start:"К началу",end:"К концу",center:"По центру",justify:"На всю ширину"}}},card:{generic:{icon_color:"Цвет иконки",layout:"Расположение",fill_container:"Заполнение",primary_info:"Основная информация",secondary_info:"Второстепенная информация",icon_type:"Тип иконки",content_info:"Содержимое",use_entity_picture:"Использовать изображение объекта?",collapsible_controls:"Сворачивать элементы управления при выключении"},light:{show_brightness_control:"Управлять яркостью?",use_light_color:"Использовать текущий цвет света",show_color_temp_control:"Управлять цветовой температурой?",show_color_control:"Управлять цветом?",incompatible_controls:"Некоторые элементы управления могут не отображаться, если ваш светильник не поддерживает эти функции."},fan:{icon_animation:"Анимировать иконку когда включено?",show_percentage_control:"Управлять процентами?",show_oscillate_control:"Oscillate control?"},cover:{show_buttons_control:"Добавить кнопки управления?",show_position_control:"Управлять позицией?",show_tilt_position_control:"Управлять наклоном?"},template:{primary:"Основная информация",secondary:"Второстепенная информация",multiline_secondary:"Многострочная Второстепенная информация?",entity_extra:"Используется в шаблонах и действиях",content:"Содержимое",badge_icon:"Иконка значка",badge_color:"Цвет значка",picture:"Изображение (заменить иконку)"},title:{title:"Заголовок",subtitle:"Подзаголовок"},chips:{alignment:"Выравнивание"},weather:{show_conditions:"Условия?",show_temperature:"Температура?"},update:{show_buttons_control:"Кнопки управления?"},vacuum:{commands:"Команды"},"media-player":{use_media_info:"Использовать информацию с медиа-устройства",use_media_artwork:"Использовать обложку с медиа-устройства",show_volume_level:"Показать уровень громкости",media_controls:"Управление медиа-устройством",media_controls_list:{on_off:"Включение/выключение",shuffle:"Перемешивание",previous:"Предыдущий трек",play_pause_stop:"Воспроизведение/пауза/остановка",next:"Следующий трек",repeat:"Режим повтора"},volume_controls:"Регулятор громкости",volume_controls_list:{volume_buttons:"Кнопки громкости",volume_set:"Уровень громкости",volume_mute:"Без звука"}},lock:{lock:"Закрыто",unlock:"Разблокировано",open:"Открыто"},humidifier:{show_target_humidity_control:"Управлять целевым уровенем влажности?"},climate:{show_temperature_control:"Управлять целевой температурой?",hvac_modes:"Режимы работы"}},chip:{sub_element_editor:{title:"Редактор мини-карточек"},conditional:{chip:"Мини-карточка"},"chip-picker":{chips:"Мини-карточки",add:"Добавить мини-карточку",edit:"Изменить",clear:"Очистить",select:"Выбрать мини-карточку",types:{action:"Действие","alarm-control-panel":"Тревога",back:"Назад",conditional:"Условия",entity:"Объект",light:"Освещение",menu:"Меню",template:"Шаблон",weather:"Погода"}}}},Hc={editor:Fc},Wc={form:{color_picker:{values:{default:"Privzeta barva"}},info_picker:{values:{default:"Privzete informacije",name:"Naziv",state:"Stanje","last-changed":"Zadnja sprememba","last-updated":"Zadnja posodobitev",none:"Brez"}},icon_type_picker:{values:{default:"Privzeta vrsta",icon:"Ikona","entity-picture":"Slika entitete",none:"Brez"}},layout_picker:{values:{default:"Privzeta postavitev",vertical:"Vertikalna postavitev",horizontal:"Horizontalna postavitev"}},alignment_picker:{values:{default:"Privzeta poravnava",start:"Pričetek",end:"Konec",center:"Center",justify:"Poravnava"}}},card:{generic:{icon_color:"Barva ikone",layout:"Postavitev",fill_container:"Zapolnitev prostora",primary_info:"Primarna informacija",secondary_info:"Sekundarna informacija",icon_type:"Vrsta ikone",content_info:"Vsebina",use_entity_picture:"Uporabi sliko entitete?",collapsible_controls:"Strni kontrolnike, ko so izklopljeni",icon_animation:"Animacija ikone, ko je aktivna?"},light:{show_brightness_control:"Nadzor svetlosti?",use_light_color:"Uporabi svetlo barvo",show_color_temp_control:"Nadzor temperature barve?",show_color_control:"Nadzor barv?",incompatible_controls:"Nekateri kontrolniki morda ne bodo prikazani, če vaša luč ne podpira te funkcije."},fan:{show_percentage_control:"Kontrola v odstotkih?",show_oscillate_control:"Kontrola nihanja?"},cover:{show_buttons_control:"Gumbi za upravljanje?",show_position_control:"Nadzor položaja?",show_tilt_position_control:"Nadzor nagiba?"},template:{primary:"Primarna informacija",secondary:"Sekundarna informacija",multiline_secondary:"Večvrstični sekundarni?",entity_extra:"Uporablja se v predlogah in dejanjih",content:"Vsebina",badge_icon:"Ikona značke",badge_color:"Barva značke",picture:"Slika (nadomestila bo ikono)"},title:{title:"Naziv",subtitle:"Podnaslov",title_tap_action:"Dejanje dotika naslova",subtitle_tap_action:"Dejanje dotika podnapisov"},chips:{alignment:"Poravnava"},weather:{show_conditions:"Pogoji?",show_temperature:"Temperatura?"},update:{show_buttons_control:"Gumbi za upravljanje?"},vacuum:{commands:"Ukazi",commands_list:{on_off:"Vklop/izklop"}},"media-player":{use_media_info:"Uporabite informacije o medijih",use_media_artwork:"Uporabite medijsko umetniško delo",show_volume_level:"Pokaži raven glasnosti",media_controls:"Nadzor medijev",media_controls_list:{on_off:"Vklop/izklop",shuffle:"Naključno",previous:"Prejšnja skladba",play_pause_stop:"Predvajaj/pavza/ustavi",next:"Naslednja skladba",repeat:"Ponavljajoči način"},volume_controls:"Kontrole glasnosti",volume_controls_list:{volume_buttons:"Gumbi za glasnost",volume_set:"Raven glasnosti",volume_mute:"Tiho"}},lock:{lock:"Zaklepanje",unlock:"Odkleni",open:"Odprto"},humidifier:{show_target_humidity_control:"Nadzor vlažnosti?"},climate:{show_temperature_control:"Nadzor temperature?",hvac_modes:"HVAC načini"},number:{display_mode:"Način prikaza",display_mode_list:{default:"Privzeto (drsnik)",slider:"Drsnik",buttons:"Gumbi"}}},chip:{sub_element_editor:{title:"Urejevalnik čipov"},conditional:{chip:"Ćiš"},"chip-picker":{chips:"Čipi",add:"Dodaj čip",edit:"Uredi",clear:"Pobriši",select:"Izbira čipa",types:{action:"Dejanje","alarm-control-panel":"Alarm",back:"Nazaj",conditional:"Pogojno",entity:"Entiteta",light:"Svetloba",menu:"Meni",spacer:"Distančnik",template:"Predloga",weather:"Vreme"}}}},Yc={not_found:"Entiteta ni najdena"},Kc={editor:Wc,card:Yc},Xc={form:{color_picker:{values:{default:"Predvolená farba"}},info_picker:{values:{default:"Predvolené informácie",name:"Názov",state:"Stav","last-changed":"Posledná zmena","last-updated":"Posledná aktualizácia",none:"Žiadna"}},icon_type_picker:{values:{default:"Predvolený typ",icon:"Ikona","entity-picture":"Obrázok entity",none:"Žiadny"}},layout_picker:{values:{default:"Predvolené rozloženie",vertical:"Zvislé rozloženie",horizontal:"Vodorovné rozloženie"}},alignment_picker:{values:{default:"Predvolené zarovnanie",start:"Začiatok",end:"Koniec",center:"Stred",justify:"Vyplniť"}}},card:{generic:{color:"Farba",icon_color:"Farba ikony",layout:"Rozloženie",fill_container:"Vyplniť priestor",primary_info:"Základné info",secondary_info:"Doplnkové info",icon_type:"Typ ikony",content_info:"Obsah",use_entity_picture:"Použiť obrázok entity?",collapsible_controls:"Skryť ovládanie v stave VYP.",icon_animation:"Animovaná ikona v stave ZAP?"},light:{show_brightness_control:"Ovládanie jasu?",use_light_color:"Použiť farbu svetla",show_color_temp_control:"Ovládanie teploty?",show_color_control:"Ovládanie farby?",incompatible_controls:"Niektoré ovládacie prvky sa nemusia zobraziť, pokiaľ ich svetlo nepodporuje."},fan:{show_percentage_control:"Ovládanie rýchlosti v percentách?",show_oscillate_control:"Ovládanie oscilácie?"},cover:{show_buttons_control:"Zobraziť ovládacie tlačidlá?",show_position_control:"Ovládanie pozície?",show_tilt_position_control:"Ovládanie natočenia?"},template:{primary:"Základné info",secondary:"Doplnkové info",multiline_secondary:"Viacriadkové doplnkové info?",entity_extra:"Použitá v šablónach a akciách",label:"Štítok",content:"Obsah",badge_icon:"Ikona odznaku",badge_color:"Farba odznaku",picture:"Obrázok (nahrádza ikonu)"},title:{title:"Nadpis",subtitle:"Podnadpis",title_tap_action:"Akcia klepnutia na názov",subtitle_tap_action:"Akcia klepnutia na titulky"},chips:{alignment:"Zarovnanie"},weather:{show_conditions:"Zobraziť podmienky?",show_temperature:"Zobraziť teplotu?"},update:{show_buttons_control:"Zobraziť ovládacie tlačidlá?"},vacuum:{commands:"Príkazy",commands_list:{on_off:"Zapnúť/Vypnúť"}},"media-player":{use_media_info:"Použiť info o médiu",use_media_artwork:"Použiť obrázok z média",show_volume_level:"Zobraziť úroveň hlasitosti",media_controls:"Ovládanie média",media_controls_list:{on_off:"Zap / Vyp",shuffle:"Premiešať",previous:"Predchádzajúca",play_pause_stop:"Spustiť/pauza/stop",next:"Ďalšia",repeat:"Opakovať"},volume_controls:"Ovládanie hlasitosti",volume_controls_list:{volume_buttons:"Tlačidlá hlasitosti",volume_set:"Úroveň hlasitosti",volume_mute:"Stlmiť"}},lock:{lock:"Zamknuté",unlock:"Odomknuté",open:"Otvorené"},humidifier:{show_target_humidity_control:"Ovládanie vlhkosti?"},climate:{show_temperature_control:"Ovládanie teploty?",hvac_modes:"HVAC mód"},number:{display_mode:"Režim zobrazenia",display_mode_list:{default:"Predvolené (posúvač)",slider:"Posúvač",buttons:"Tlačidlá"}}},chip:{sub_element_editor:{title:"Editor štítkov"},conditional:{chip:"Štítok"},"chip-picker":{chips:"Štítky",add:"Pridať štítok",edit:"Editovať",clear:"Vymazať",select:"Vybrať štítok",types:{action:"Akcia","alarm-control-panel":"Alarm",back:"Späť",conditional:"Podmienené",entity:"Entita",light:"Svetlo",menu:"Menu",spacer:"Medzera",template:"Šablóna",weather:"Počasie"}}}},qc={not_found:"Entita nenájdená"},Gc={editor:Xc,card:qc},Zc={form:{color_picker:{values:{default:"Standardfärg"}},info_picker:{values:{default:"Förvald information",name:"Namn",state:"Status","last-changed":"Sist ändrad","last-updated":"Sist uppdaterad",none:"Ingen"}},layout_picker:{values:{default:"Standard",vertical:"Vertikal",horizontal:"Horisontell"}},alignment_picker:{values:{default:"Standard (början)",end:"Slutet",center:"Centrerad",justify:"Anpassa"}}},card:{generic:{color:"Färg",icon_color:"Ikonens färg",layout:"Layout",icon_type:"Ikontyp",primary_info:"Primär information",secondary_info:"Sekundär information",use_entity_picture:"Använd enhetens bild?",collapsible_controls:"Dölj kontroller när enehten är av",icon_animation:"Animera ikonen när enheten är på?"},light:{show_brightness_control:"Styr ljushet?",use_light_color:"Styr ljusets färg",show_color_temp_control:"Styr färgtemperatur?",show_color_control:"Styr färg?",incompatible_controls:"Kontroller som inte stöds av enheten kommer inte visas"},fan:{show_percentage_control:"Procentuell kontroll?",show_oscillate_control:"Kontroll för oscillera?"},cover:{show_buttons_control:"Visa kontrollknappar?",show_position_control:"Visa positionskontroll?",show_tilt_position_control:"Visa lutningskontroll?"},template:{primary:"Primär information",secondary:"Sekundär information",multiline_secondary:"Sekundär med flera rader?",content:"Innehåll",picture:"Bild (ersätter ikonen)"},title:{title:"Rubrik",subtitle:"Underrubrik"},chips:{alignment:"Justering"},weather:{show_conditions:"Förhållanden?",show_temperature:"Temperatur?"},update:{show_buttons_control:"Visa kontrollknappar?"},vacuum:{commands:"Kommandon"},climate:{show_temperature_control:"Temperaturkontroll?",hvac_modes:"HVAC-lägen"},"media-player":{use_media_artwork:"Visa mediaomslag",show_volume_level:"Volymkontroll",media_controls:"Mediakontroller",media_controls_list:{on_off:"Slå på/av",previous:"Föregående spår",play_pause_stop:"Spela/pausa/stoppa",next:"Nästa spår",repeat:"Upprepa"},volume_controls:"Volymkontroller",volume_controls_list:{volume_buttons:"Volymknappar",volume_set:"Volymnivå",volume_mute:"Ljud av"}},lock:{lock:"Lås",unlock:"Lås upp",open:"Öppna"}},chip:{sub_element_editor:{title:"Chipredigerare"},conditional:{chip:"Chip"},"chip-picker":{chips:"Chips",add:"Lägg till chip",edit:"Redigera",clear:"Rensa",select:"Välj chip",types:{action:"Åtgärd","alarm-control-panel":"Alarm",back:"Bakåt",conditional:"Villkorad",entity:"Enhet",light:"Ljus",menu:"Meny",template:"Mall",weather:"Väder"}}}},Jc={editor:Zc},Qc={form:{color_picker:{values:{default:"Varsayılan renk"}},info_picker:{values:{default:"Varsayılan bilgi",name:"İsim",state:"Durum","last-changed":"Son Değişim","last-updated":"Son Güncelleme",none:"None"}},layout_picker:{values:{default:"Varsayılan düzen",vertical:"Dikey düzen",horizontal:"Yatay düzen"}},alignment_picker:{values:{default:"Varsayılan hizalama",start:"Sola yasla",end:"Sağa yasla",center:"Ortala",justify:"İki yana yasla"}}},card:{generic:{icon_color:"Simge renki",layout:"Düzen",primary_info:"Birinci bilgi",secondary_info:"İkinci bilgi",content_info:"İçerik",use_entity_picture:"Varlık resmi kullanılsın",icon_animation:"Aktif olduğunda simgeyi hareket ettir"},light:{show_brightness_control:"Parlaklık kontrolü",use_light_color:"Işık rengini kullan",show_color_temp_control:"Renk ısısı kontrolü",show_color_control:"Renk kontrolü",incompatible_controls:"Kullandığınız lamba bu özellikleri desteklemiyorsa bazı kontroller görüntülenemeyebilir."},fan:{show_percentage_control:"Yüzde kontrolü",show_oscillate_control:"Salınım kontrolü"},cover:{show_buttons_control:"Düğme kontrolleri",show_position_control:"Pozisyon kontrolü"},template:{primary:"Birinci bilgi",secondary:"İkinci bilgi",multiline_secondary:"İkinci bilgi çok satır olsun",entity_extra:"Şablonlarda ve eylemlerde kullanılsın",content:"İçerik"},title:{title:"Başlık",subtitle:"Altbaşlık"},chips:{alignment:"Hizalama"},weather:{show_conditions:"Hava koşulu",show_temperature:"Sıcaklık"},update:{show_buttons_control:"Düğme kontrolü"},vacuum:{commands:"Komutlar"}},chip:{sub_element_editor:{title:"Chip düzenleyici"},conditional:{chip:"Chip"},"chip-picker":{chips:"Chips",add:"Chip ekle",edit:"Düzenle",clear:"Temizle",select:"Chip seç",types:{action:"Eylem","alarm-control-panel":"Alarm",back:"Geri",conditional:"Koşullu",entity:"Varlık",light:"Işık",menu:"Menü",template:"Şablon",weather:"Hava Durumu"}}}},td={editor:Qc},ed={form:{color_picker:{values:{default:"Колір за замовчуванням"}},info_picker:{values:{default:"Інформація за замовчуванням",name:"Назва",state:"Стан","last-changed":"Востаннє змінено","last-updated":"Востаннє оновлено",none:"Нічого"}},icon_type_picker:{values:{default:"За замовчуванням",icon:"Іконка","entity-picture":"Зображення сутності",none:"Нічого"}},layout_picker:{values:{default:"Розташування за замовчуванням",vertical:"Вертикальне розташування",horizontal:"Горизонтальне розташування"}},alignment_picker:{values:{default:"Вирівнювання за замовчуванням",start:"На початку",end:"В кінці",center:"По центру",justify:"Вирівняти"}}},card:{generic:{icon_color:"Колір іконки",layout:"Розташування",fill_container:"Заповнити контейнер",primary_info:"Головна інформація",secondary_info:"Додаткова інформація",icon_type:"Тип іконки",content_info:"Вміст",use_entity_picture:"Використовувати зображення сутності?",collapsible_controls:"Приховувати елементи керування коли вимкнено?",icon_animation:"Анімувати іконку при активації?"},light:{show_brightness_control:"Контроль яскравості?",use_light_color:"Використовувати колір світла",show_color_temp_control:"Керування температурою світла?",show_color_control:"Керування кольором світла?",incompatible_controls:"Деякі елементи керування можуть не відображатись якщо ваш пристрій не підтримує цю функцію."},fan:{show_percentage_control:"Керування швидкістю?",show_oscillate_control:"Керування повротом?"},cover:{show_buttons_control:"Кнопки керування?",show_position_control:"Керування позицією?",show_tilt_position_control:"Керування нахилом?"},template:{primary:"Головна інформація",secondary:"Додаткова інформація",multiline_secondary:"Багаторядкова додаткова інформація?",entity_extra:"Використовується в шаблонах та діях",content:"Вміст",badge_icon:"Іконка значка",badge_color:"Колір значка",picture:"Зображення (замінить іконку)"},title:{title:"Заголовок",subtitle:"Підзаголовок",title_tap_action:"Дія при дотику до заголовку",subtitle_tap_action:"Дія при дотику до підзаголовку"},chips:{alignment:"Вирівнювання"},weather:{show_conditions:"Умови?",show_temperature:"Температура?"},update:{show_buttons_control:"Кнопки керування?"},vacuum:{commands:"Команди",commands_list:{on_off:"Увімкнути/Вимкнути"}},"media-player":{use_media_info:"Використовувати інформацію медіа",use_media_artwork:"Використовувати зображення медіа",show_volume_level:"Показати рівень гучності",media_controls:"Керування медіа",media_controls_list:{on_off:"Увімкнути/Вимкнути",shuffle:"Перемішати",previous:"Попередній трек",play_pause_stop:"Відтворити/пауза/стоп",next:"Наступний трек",repeat:"Режим повторення"},volume_controls:"Елементи керування гучністю",volume_controls_list:{volume_buttons:"Кнопки гучності",volume_set:"Рівень гучності",volume_mute:"Вимк. звук"}},lock:{lock:"Зачинити",unlock:"Відчинити",open:"Відкрити"},humidifier:{show_target_humidity_control:"Керування вологістю?"},climate:{show_temperature_control:"Керування температурою?",hvac_modes:"Режими"},number:{display_mode:"Відображати режим",display_mode_list:{default:"За замовчуванням (повзунок)",slider:"Повзунок",buttons:"Кнопки"}}},chip:{sub_element_editor:{title:"Редактор міні-карток"},conditional:{chip:"Міні-картка"},"chip-picker":{chips:"Міні-картки",add:"Додати міні-картку",edit:"Редагувати",clear:"Очистити",select:"Обрати міні-картку",types:{action:"Дія","alarm-control-panel":"Сигналізація",back:"Назад",conditional:"Умовна",entity:"Сутність",light:"Світло",menu:"Меню",spacer:"Порожнє місце",template:"Вручну",weather:"Погода"}}}},nd={not_found:"Сутність не знайдено"},id={editor:ed,card:nd},od={form:{color_picker:{values:{default:"Màu mặc định"}},info_picker:{values:{default:"Thông tin mặc định",name:"Tên",state:"Trạng thái","last-changed":"Lần thay đổi cuối","last-updated":"Lần cập nhật cuối",none:"Không có"}},icon_type_picker:{values:{default:"Kiểu mặc định",icon:"Biểu tượng","entity-picture":"Ảnh thực thể",none:"Không có"}},layout_picker:{values:{default:"Bố cục mặc định",vertical:"Bố cục dọc",horizontal:"Bố cục ngang"}},alignment_picker:{values:{default:"Căn chỉnh mặc định",start:"Căn đầu",end:"Căn cuối",center:"Căn giữa",justify:"Căn hai bên"}}},card:{generic:{icon_color:"Màu biểu tượng",layout:"Bố cục",fill_container:"Làm đầy ô chứa",primary_info:"Thông tin chính",secondary_info:"Thông tin phụ",icon_type:"Kiểu biểu tượng",content_info:"Nội dung",use_entity_picture:"Dùng ảnh của thực thể?",collapsible_controls:"Thu nhỏ điều kiển khi tắt",icon_animation:"Biểu tượng chuyển động khi kích hoạt?"},light:{show_brightness_control:"Điều khiển độ sáng?",use_light_color:"Dùng màu đèn",show_color_temp_control:"Điều khiển nhiệt độ màu?",show_color_control:"Điều khiển màu sắc?",incompatible_controls:"Một số điều khiển sẽ không được hiển thị nếu đèn của bạn không hỗ trợ tính năng đó."},fan:{show_percentage_control:"Điều khiển dạng phần trăm?",show_oscillate_control:"Điều khiển xoay?"},cover:{show_buttons_control:"Điều khiển nút bấm?",show_position_control:"Điều khiển vị trí?",show_tilt_position_control:"Điều khiển độ nghiêng?"},template:{primary:"Thông tin chính",secondary:"Thông tin phụ",multiline_secondary:"Nhiều dòng thông tin phụ?",entity_extra:"Được sử dụng trong bản mẫu và hành động",content:"Nội dung",badge_icon:"Biểu tượng huy hiệu",badge_color:"Màu huy hiệu",picture:"Ảnh (thay cho biểu tượng)"},title:{title:"Tiêu đề",subtitle:"Phụ đề",title_tap_action:"Hành động khi nhấp tiêu đề",subtitle_tap_action:"Hành động khi nhấp phụ đề"},chips:{alignment:"Căn chỉnh"},weather:{show_conditions:"Điều kiện?",show_temperature:"Nhiệt độ?"},update:{show_buttons_control:"Điều khiển nút bấm?"},vacuum:{commands:"Mệnh lệnh",commands_list:{on_off:"Bật/tắt"}},"media-player":{use_media_info:"Dùng thông tin đa phương tiện",use_media_artwork:"Dùng ảnh đa phương tiện",show_volume_level:"Hiện mức âm lượng",media_controls:"Điều khiển đa phương tiện",media_controls_list:{on_off:"Bật/tắt",shuffle:"Xáo trộn",previous:"Bài trước",play_pause_stop:"Phát/tạm dừng/dừng",next:"Bài tiếp theo",repeat:"Chế độ lặp lại"},volume_controls:"Điều khiển âm lượng",volume_controls_list:{volume_buttons:"Nút âm lượng",volume_set:"Mức âm lượng",volume_mute:"Im lặng"}},lock:{lock:"Khóa",unlock:"Mở khóa",open:"Mở"},humidifier:{show_target_humidity_control:"Điều khiển độ ẩm?"},climate:{show_temperature_control:"Điều khiển nhiệt độ?",hvac_modes:"Chế độ điều hòa"},number:{display_mode:"Chế độ hiển thị",display_mode_list:{default:"Mặc định (thanh trượt)",slider:"Thanh trượt",buttons:"Nút"}}},chip:{sub_element_editor:{title:"Trình soạn phỉnh"},conditional:{chip:"Phỉnh"},"chip-picker":{chips:"Phỉnh",add:"Thêm phỉnh",edit:"Chỉnh sửa",clear:"Tẩy trống",select:"Chọn phỉnh",types:{action:"Hành động","alarm-control-panel":"Báo động",back:"Quay về",conditional:"Điều kiện",entity:"Thực thể",light:"Đèn",menu:"Trình đơn",spacer:"Ngăn cách",template:"Mẫu",weather:"Thời tiết"}}}},rd={not_found:"Không tìm thấy thực thể"},ad={editor:od,card:rd},ld={form:{color_picker:{values:{default:"默认颜色"}},info_picker:{values:{default:"默认信息",name:"名称",state:"状态","last-changed":"变更时间","last-updated":"更新时间",none:"无"}},icon_type_picker:{values:{default:"默认类型",icon:"图标","entity-picture":"实体图片",none:"无"}},layout_picker:{values:{default:"默认布局",vertical:"垂直布局",horizontal:"水平布局"}},alignment_picker:{values:{default:"默认",start:"左对齐",end:"右对齐",center:"居中对齐",justify:"两端对齐"}}},card:{generic:{icon_color:"图标颜色",layout:"布局",fill_container:"填满容器",primary_info:"首要信息",secondary_info:"次要信息",icon_type:"图标类型",content_info:"内容",use_entity_picture:"使用实体图片?",collapsible_controls:"关闭时隐藏控制器",icon_animation:"激活时使用动态图标?"},light:{show_brightness_control:"亮度控制?",use_light_color:"使用灯光颜色",show_color_temp_control:"色温控制?",show_color_control:"颜色控制?",incompatible_controls:"设备不支持的控制器将不会显示。"},fan:{show_percentage_control:"百分比控制?",show_oscillate_control:"摆动控制?"},cover:{show_buttons_control:"按钮控制?",show_position_control:"位置控制?",show_tilt_position_control:"角度控制?"},template:{primary:"首要信息",secondary:"次要信息",multiline_secondary:"多行次要信息?",entity_extra:"用于模板和动作",content:"内容",badge_icon:"徽标图标",badge_color:"徽标颜色",picture:"图片 (将会替代图标)"},title:{title:"标题",subtitle:"子标题",title_tap_action:"标题点击动作",subtitle_tap_action:"子标题点击动作"},chips:{alignment:"对齐"},weather:{show_conditions:"条件?",show_temperature:"温度?"},update:{show_buttons_control:"控制按钮?"},vacuum:{commands:"命令",commands_list:{on_off:"开/关"}},"media-player":{use_media_info:"使用媒体信息",use_media_artwork:"使用媒体插图",show_volume_level:"显示音量大小",media_controls:"媒体控制",media_controls_list:{on_off:"开启/关闭",shuffle:"随机",previous:"上一曲",play_pause_stop:"播放/暂停/停止",next:"下一曲",repeat:"循环模式"},volume_controls:"音量控制",volume_controls_list:{volume_buttons:"音量按钮",volume_set:"音量等级",volume_mute:"静音"}},lock:{lock:"锁定",unlock:"解锁",open:"打开"},humidifier:{show_target_humidity_control:"湿度控制?"},climate:{show_temperature_control:"温度控制?",hvac_modes:"空调模式"},number:{display_mode:"显示模式",display_mode_list:{default:"默认 (滑块)",slider:"滑块",buttons:"按钮"}}},chip:{sub_element_editor:{title:"Chip 编辑"},conditional:{chip:"Chip"},"chip-picker":{chips:"Chips",add:"添加 chip",edit:"编辑",clear:"清除",select:"选择 chip",types:{action:"动作","alarm-control-panel":"警戒控制台",back:"返回",conditional:"条件显示",entity:"实体",light:"灯光",menu:"菜单",spacer:"占位符",template:"模板",weather:"天气"}}}},sd={not_found:"未找到实体"},cd={editor:ld,card:sd},dd={form:{color_picker:{values:{default:"預設顏色"}},info_picker:{values:{default:"預設訊息",name:"名稱",state:"狀態","last-changed":"最近變動時間","last-updated":"最近更新時間",none:"無"}},icon_type_picker:{values:{default:"預設樣式",icon:"圖示","entity-picture":"實體圖片",none:"無"}},layout_picker:{values:{default:"預設佈局",vertical:"垂直佈局",horizontal:"水平佈局"}},alignment_picker:{values:{default:"預設對齊",start:"居左對齊",end:"居右對齊",center:"居中對齊",justify:"兩端對齊"}}},card:{generic:{color:"顏色",icon_color:"圖示顏色",layout:"佈局",fill_container:"填滿容器",primary_info:"主要訊息",secondary_info:"次要訊息",icon_type:"圖示樣式",content_info:"內容",use_entity_picture:"使用實體圖片?",collapsible_controls:"關閉時隱藏控制項",icon_animation:"啟動時使用動態圖示?"},light:{show_brightness_control:"亮度控制?",use_light_color:"使用燈光顏色",show_color_temp_control:"色溫控制?",show_color_control:"色彩控制?",incompatible_controls:"不會顯示裝置不支援的控制。"},fan:{show_percentage_control:"百分比控制?",show_oscillate_control:"擺頭控制?"},cover:{show_buttons_control:"按鈕控制?",show_position_control:"位置控制?",show_tilt_position_control:"角度控制?"},template:{primary:"主要訊息",secondary:"次要訊息",multiline_secondary:"多行次要訊息?",entity_extra:"用於模板與動作",label:"標籤",content:"內容",badge_icon:"角標圖示",badge_color:"角標顏色",picture:"圖片 (將會取代圖示)"},title:{title:"標題",subtitle:"副標題",title_tap_action:"標題點擊動作",subtitle_tap_action:"副標題點擊動作"},chips:{alignment:"對齊"},weather:{show_conditions:"狀況?",show_temperature:"溫度?"},update:{show_buttons_control:"按鈕控制?"},vacuum:{commands:"指令",commands_list:{on_off:"開啟、關閉"}},"media-player":{use_media_info:"使用媒體資訊",use_media_artwork:"使用媒體插圖",show_volume_level:"顯示音量大小",media_controls:"媒體控制",media_controls_list:{on_off:"開啟、關閉",shuffle:"隨機播放",previous:"上一首",play_pause_stop:"播放、暫停、停止",next:"下一首",repeat:"重複播放"},volume_controls:"音量控制",volume_controls_list:{volume_buttons:"音量按鈕",volume_set:"音量等級",volume_mute:"靜音"}},lock:{lock:"上鎖",unlock:"解鎖",open:"打開"},humidifier:{show_target_humidity_control:"溼度控制?"},climate:{show_temperature_control:"溫度控制?",hvac_modes:"空調模式"},number:{display_mode:"顯示模式",display_mode_list:{default:"預設 (滑桿)",slider:"滑桿",buttons:"按鈕"}}},chip:{sub_element_editor:{title:"小卡片編輯器"},conditional:{chip:"小卡片"},"chip-picker":{chips:"小卡片",add:"新增小卡片",edit:"編輯",clear:"清除",select:"選擇小卡片",types:{action:"動作","alarm-control-panel":"警報器控制",back:"返回",conditional:"條件",entity:"實體",light:"燈光",menu:"選單",spacer:"佔位符",template:"模板",weather:"天氣"}}}},ud={not_found:"未找到實體"},hd={editor:dd,card:ud},pd={ar:Object.freeze({__proto__:null,default:Bs,editor:Vs}),bg:Object.freeze({__proto__:null,default:Hs,editor:Fs}),ca:Object.freeze({__proto__:null,card:Ys,default:Ks,editor:Ws}),cs:Object.freeze({__proto__:null,card:qs,default:Gs,editor:Xs}),da:Object.freeze({__proto__:null,card:Js,default:Qs,editor:Zs}),de:Object.freeze({__proto__:null,card:ec,default:nc,editor:tc}),el:Object.freeze({__proto__:null,default:oc,editor:ic}),en:Object.freeze({__proto__:null,card:ac,default:lc,editor:rc}),es:Object.freeze({__proto__:null,default:cc,editor:sc}),fi:Object.freeze({__proto__:null,default:uc,editor:dc}),fr:Object.freeze({__proto__:null,card:pc,default:mc,editor:hc}),he:Object.freeze({__proto__:null,default:vc,editor:fc}),hu:Object.freeze({__proto__:null,card:_c,default:yc,editor:gc}),id:Object.freeze({__proto__:null,card:kc,default:xc,editor:bc}),it:Object.freeze({__proto__:null,card:Cc,default:Ec,editor:wc}),"ko-KR":Object.freeze({__proto__:null,default:Sc,editor:Ac}),nb:Object.freeze({__proto__:null,card:Tc,default:Ic,editor:Oc}),nl:Object.freeze({__proto__:null,card:$c,default:Mc,editor:zc}),pl:Object.freeze({__proto__:null,default:Pc,editor:jc}),"pt-BR":Object.freeze({__proto__:null,card:Dc,default:Nc,editor:Lc}),"pt-PT":Object.freeze({__proto__:null,default:Uc,editor:Rc}),ro:Object.freeze({__proto__:null,default:Bc,editor:Vc}),ru:Object.freeze({__proto__:null,default:Hc,editor:Fc}),sl:Object.freeze({__proto__:null,card:Yc,default:Kc,editor:Wc}),sk:Object.freeze({__proto__:null,card:qc,default:Gc,editor:Xc}),sv:Object.freeze({__proto__:null,default:Jc,editor:Zc}),tr:Object.freeze({__proto__:null,default:td,editor:Qc}),uk:Object.freeze({__proto__:null,card:nd,default:id,editor:ed}),vi:Object.freeze({__proto__:null,card:rd,default:ad,editor:od}),"zh-Hans":Object.freeze({__proto__:null,card:sd,default:cd,editor:ld}),"zh-Hant":Object.freeze({__proto__:null,card:ud,default:hd,editor:dd})};function md(t,e){try{return t.split(".").reduce((function(t,e){return t[e]}),pd[e])}catch(t){return}}function fd(t){return function(e){var n,i=md(e,null!==(n=null==t?void 0:t.locale.language)&&void 0!==n?n:"en");return i||(i=md(e,"en")),null!=i?i:e}}
/**
* @license
* Copyright 2020 Google Inc.
@@ -189,7 +63,7 @@ const pt=t=>e=>"function"==typeof e?((t,e)=>(customElements.define(t,e),e))(t,e)
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
- */var Do="Unknown",Lo="Backspace",Po="Enter",No="Spacebar",Ro="PageUp",Fo="PageDown",Vo="End",Bo="Home",Uo="ArrowLeft",Ho="ArrowUp",Yo="ArrowRight",Wo="ArrowDown",Xo="Delete",Ko="Escape",qo="Tab",Go=new Set;Go.add(Lo),Go.add(Po),Go.add(No),Go.add(Ro),Go.add(Fo),Go.add(Vo),Go.add(Bo),Go.add(Uo),Go.add(Ho),Go.add(Yo),Go.add(Wo),Go.add(Xo),Go.add(Ko),Go.add(qo);var Zo=8,Jo=13,Qo=32,tn=33,en=34,on=35,nn=36,rn=37,an=38,sn=39,ln=40,cn=46,dn=27,un=9,hn=new Map;hn.set(Zo,Lo),hn.set(Jo,Po),hn.set(Qo,No),hn.set(tn,Ro),hn.set(en,Fo),hn.set(on,Vo),hn.set(nn,Bo),hn.set(rn,Uo),hn.set(an,Ho),hn.set(sn,Yo),hn.set(ln,Wo),hn.set(cn,Xo),hn.set(dn,Ko),hn.set(un,qo);var mn=new Set;function pn(t){var e=t.key;if(Go.has(e))return e;var i=hn.get(t.keyCode);return i||Do}
+ */var vd="Unknown",gd="Backspace",_d="Enter",yd="Spacebar",bd="PageUp",kd="PageDown",xd="End",wd="Home",Cd="ArrowLeft",Ed="ArrowUp",Ad="ArrowRight",Sd="ArrowDown",Od="Delete",Td="Escape",Id="Tab",zd=new Set;zd.add(gd),zd.add(_d),zd.add(yd),zd.add(bd),zd.add(kd),zd.add(xd),zd.add(wd),zd.add(Cd),zd.add(Ed),zd.add(Ad),zd.add(Sd),zd.add(Od),zd.add(Td),zd.add(Id);var $d=8,Md=13,jd=32,Pd=33,Ld=34,Dd=35,Nd=36,Rd=37,Ud=38,Vd=39,Bd=40,Fd=46,Hd=27,Wd=9,Yd=new Map;Yd.set($d,gd),Yd.set(Md,_d),Yd.set(jd,yd),Yd.set(Pd,bd),Yd.set(Ld,kd),Yd.set(Dd,xd),Yd.set(Nd,wd),Yd.set(Rd,Cd),Yd.set(Ud,Ed),Yd.set(Vd,Ad),Yd.set(Bd,Sd),Yd.set(Fd,Od),Yd.set(Hd,Td),Yd.set(Wd,Id);var Kd=new Set;function Xd(t){var e=t.key;if(zd.has(e))return e;var n=Yd.get(t.keyCode);return n||vd}
/**
* @license
* Copyright 2020 Google Inc.
@@ -211,7 +85,7 @@ const pt=t=>e=>"function"==typeof e?((t,e)=>(customElements.define(t,e),e))(t,e)
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
- */mn.add(Ro),mn.add(Fo),mn.add(Vo),mn.add(Bo),mn.add(Uo),mn.add(Ho),mn.add(Yo),mn.add(Wo);var fn={UNKNOWN:"Unknown",BACKSPACE:"Backspace",ENTER:"Enter",SPACEBAR:"Spacebar",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",END:"End",HOME:"Home",ARROW_LEFT:"ArrowLeft",ARROW_UP:"ArrowUp",ARROW_RIGHT:"ArrowRight",ARROW_DOWN:"ArrowDown",DELETE:"Delete",ESCAPE:"Escape",TAB:"Tab"},gn=new Set;gn.add(fn.BACKSPACE),gn.add(fn.ENTER),gn.add(fn.SPACEBAR),gn.add(fn.PAGE_UP),gn.add(fn.PAGE_DOWN),gn.add(fn.END),gn.add(fn.HOME),gn.add(fn.ARROW_LEFT),gn.add(fn.ARROW_UP),gn.add(fn.ARROW_RIGHT),gn.add(fn.ARROW_DOWN),gn.add(fn.DELETE),gn.add(fn.ESCAPE),gn.add(fn.TAB);var _n=8,vn=13,bn=32,yn=33,xn=34,wn=35,kn=36,Cn=37,$n=38,En=39,An=40,Sn=46,In=27,Tn=9,zn=new Map;zn.set(_n,fn.BACKSPACE),zn.set(vn,fn.ENTER),zn.set(bn,fn.SPACEBAR),zn.set(yn,fn.PAGE_UP),zn.set(xn,fn.PAGE_DOWN),zn.set(wn,fn.END),zn.set(kn,fn.HOME),zn.set(Cn,fn.ARROW_LEFT),zn.set($n,fn.ARROW_UP),zn.set(En,fn.ARROW_RIGHT),zn.set(An,fn.ARROW_DOWN),zn.set(Sn,fn.DELETE),zn.set(In,fn.ESCAPE),zn.set(Tn,fn.TAB);var On,Mn,jn=new Set;function Dn(t){var e=t.key;if(gn.has(e))return e;var i=zn.get(t.keyCode);return i||fn.UNKNOWN}
+ */Kd.add(bd),Kd.add(kd),Kd.add(xd),Kd.add(wd),Kd.add(Cd),Kd.add(Ed),Kd.add(Ad),Kd.add(Sd);var qd={UNKNOWN:"Unknown",BACKSPACE:"Backspace",ENTER:"Enter",SPACEBAR:"Spacebar",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",END:"End",HOME:"Home",ARROW_LEFT:"ArrowLeft",ARROW_UP:"ArrowUp",ARROW_RIGHT:"ArrowRight",ARROW_DOWN:"ArrowDown",DELETE:"Delete",ESCAPE:"Escape",TAB:"Tab"},Gd=new Set;Gd.add(qd.BACKSPACE),Gd.add(qd.ENTER),Gd.add(qd.SPACEBAR),Gd.add(qd.PAGE_UP),Gd.add(qd.PAGE_DOWN),Gd.add(qd.END),Gd.add(qd.HOME),Gd.add(qd.ARROW_LEFT),Gd.add(qd.ARROW_UP),Gd.add(qd.ARROW_RIGHT),Gd.add(qd.ARROW_DOWN),Gd.add(qd.DELETE),Gd.add(qd.ESCAPE),Gd.add(qd.TAB);var Zd=8,Jd=13,Qd=32,tu=33,eu=34,nu=35,iu=36,ou=37,ru=38,au=39,lu=40,su=46,cu=27,du=9,uu=new Map;uu.set(Zd,qd.BACKSPACE),uu.set(Jd,qd.ENTER),uu.set(Qd,qd.SPACEBAR),uu.set(tu,qd.PAGE_UP),uu.set(eu,qd.PAGE_DOWN),uu.set(nu,qd.END),uu.set(iu,qd.HOME),uu.set(ou,qd.ARROW_LEFT),uu.set(ru,qd.ARROW_UP),uu.set(au,qd.ARROW_RIGHT),uu.set(lu,qd.ARROW_DOWN),uu.set(su,qd.DELETE),uu.set(cu,qd.ESCAPE),uu.set(du,qd.TAB);var hu,pu,mu=new Set;function fu(t){var e=t.key;if(Gd.has(e))return e;var n=uu.get(t.keyCode);return n||qd.UNKNOWN}
/**
* @license
* Copyright 2018 Google Inc.
@@ -233,7 +107,7 @@ const pt=t=>e=>"function"==typeof e?((t,e)=>(customElements.define(t,e),e))(t,e)
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
- */jn.add(fn.PAGE_UP),jn.add(fn.PAGE_DOWN),jn.add(fn.END),jn.add(fn.HOME),jn.add(fn.ARROW_LEFT),jn.add(fn.ARROW_UP),jn.add(fn.ARROW_RIGHT),jn.add(fn.ARROW_DOWN);var Ln="mdc-list-item--activated",Pn="mdc-list-item",Nn="mdc-list-item--disabled",Rn="mdc-list-item--selected",Fn="mdc-list-item__text",Vn="mdc-list-item__primary-text",Bn="mdc-list";(On={})[""+Ln]="mdc-list-item--activated",On[""+Pn]="mdc-list-item",On[""+Nn]="mdc-list-item--disabled",On[""+Rn]="mdc-list-item--selected",On[""+Vn]="mdc-list-item__primary-text",On[""+Bn]="mdc-list";var Un=((Mn={})[""+Ln]="mdc-deprecated-list-item--activated",Mn[""+Pn]="mdc-deprecated-list-item",Mn[""+Nn]="mdc-deprecated-list-item--disabled",Mn[""+Rn]="mdc-deprecated-list-item--selected",Mn[""+Fn]="mdc-deprecated-list-item__text",Mn[""+Vn]="mdc-deprecated-list-item__primary-text",Mn[""+Bn]="mdc-deprecated-list",Mn);Un[Pn],Un[Pn],Un[Pn],Un[Pn],Un[Pn],Un[Pn];var Hn={UNSET_INDEX:-1,TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS:300},Yn=["input","button","textarea","select"],Wn=function(t){var e=t.target;if(e){var i=(""+e.tagName).toLowerCase();-1===Yn.indexOf(i)&&t.preventDefault()}};
+ */mu.add(qd.PAGE_UP),mu.add(qd.PAGE_DOWN),mu.add(qd.END),mu.add(qd.HOME),mu.add(qd.ARROW_LEFT),mu.add(qd.ARROW_UP),mu.add(qd.ARROW_RIGHT),mu.add(qd.ARROW_DOWN);var vu="mdc-list-item--activated",gu="mdc-list-item",_u="mdc-list-item--disabled",yu="mdc-list-item--selected",bu="mdc-list-item__text",ku="mdc-list-item__primary-text",xu="mdc-list";(hu={})[""+vu]="mdc-list-item--activated",hu[""+gu]="mdc-list-item",hu[""+_u]="mdc-list-item--disabled",hu[""+yu]="mdc-list-item--selected",hu[""+ku]="mdc-list-item__primary-text",hu[""+xu]="mdc-list";var wu=((pu={})[""+vu]="mdc-deprecated-list-item--activated",pu[""+gu]="mdc-deprecated-list-item",pu[""+_u]="mdc-deprecated-list-item--disabled",pu[""+yu]="mdc-deprecated-list-item--selected",pu[""+bu]="mdc-deprecated-list-item__text",pu[""+ku]="mdc-deprecated-list-item__primary-text",pu[""+xu]="mdc-deprecated-list",pu);wu[gu],wu[gu],wu[gu],wu[gu],wu[gu],wu[gu];var Cu={UNSET_INDEX:-1,TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS:300},Eu=["input","button","textarea","select"],Au=function(t){var e=t.target;if(e){var n=(""+e.tagName).toLowerCase();-1===Eu.indexOf(n)&&t.preventDefault()}};
/**
* @license
* Copyright 2020 Google Inc.
@@ -255,68 +129,45 @@ const pt=t=>e=>"function"==typeof e?((t,e)=>(customElements.define(t,e),e))(t,e)
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
- */function Xn(t,e){for(var i=new Map,o=0;oe&&!i(r[s].index)){l=s;break}if(-1!==l)return o.sortedIndexCursor=l,r[o.sortedIndexCursor].index;return-1}(r,a,l,e):function(t,e,i){var o=i.typeaheadBuffer[0],n=t.get(o);if(!n)return-1;var r=n[i.sortedIndexCursor];if(0===r.text.lastIndexOf(i.typeaheadBuffer,0)&&!e(r.index))return r.index;var a=(i.sortedIndexCursor+1)%n.length,s=-1;for(;a!==i.sortedIndexCursor;){var l=n[a],c=0===l.text.lastIndexOf(i.typeaheadBuffer,0),d=!e(l.index);if(c&&d){s=a;break}a=(a+1)%n.length}if(-1!==s)return i.sortedIndexCursor=s,n[i.sortedIndexCursor].index;return-1}(r,l,e),-1===i||s||n(i),i}function qn(t){return t.typeaheadBuffer.length>0}function Gn(t){return{addClass:e=>{t.classList.add(e)},removeClass:e=>{t.classList.remove(e)},hasClass:e=>t.classList.contains(e)}}const Zn=()=>{},Jn={get passive(){return!1}};document.addEventListener("x",Zn,Jn),document.removeEventListener("x",Zn);
+ */function Su(t,e){for(var n=new Map,i=0;ie&&!n(r[l].index)){s=l;break}if(-1!==s)return i.sortedIndexCursor=s,r[i.sortedIndexCursor].index;return-1}(r,a,s,e):function(t,e,n){var i=n.typeaheadBuffer[0],o=t.get(i);if(!o)return-1;var r=o[n.sortedIndexCursor];if(0===r.text.lastIndexOf(n.typeaheadBuffer,0)&&!e(r.index))return r.index;var a=(n.sortedIndexCursor+1)%o.length,l=-1;for(;a!==n.sortedIndexCursor;){var s=o[a],c=0===s.text.lastIndexOf(n.typeaheadBuffer,0),d=!e(s.index);if(c&&d){l=a;break}a=(a+1)%o.length}if(-1!==l)return n.sortedIndexCursor=l,o[n.sortedIndexCursor].index;return-1}(r,s,e),-1===n||l||o(n),n}function Tu(t){return t.typeaheadBuffer.length>0}
/**
* @license
- * Copyright 2018 Google LLC
- * SPDX-License-Identifier: Apache-2.0
+ * Copyright 2017 Google LLC
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+var Iu;null===(Iu=window.HTMLSlotElement)||void 0===Iu||Iu.prototype.assignedElements;
+/**
+ * @license
+ * Copyright 2019 Google LLC
+ * SPDX-License-Identifier: BSD-3-Clause
*/
-class Qn extends ht{click(){if(this.mdcRoot)return this.mdcRoot.focus(),void this.mdcRoot.click();super.click()}createFoundation(){void 0!==this.mdcFoundation&&this.mdcFoundation.destroy(),this.mdcFoundationClass&&(this.mdcFoundation=new this.mdcFoundationClass(this.createAdapter()),this.mdcFoundation.init())}firstUpdated(){this.createFoundation()}}
+var zu,$u,Mu=window,ju=Mu.ShadowRoot&&(void 0===Mu.ShadyCSS||Mu.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Pu=Symbol(),Lu=new WeakMap,Du=function(){return Mr((function t(e,n,i){if(zr(this,t),this._$cssResult$=!0,i!==Pu)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=n}),[{key:"styleSheet",get:function(){var t=this.o,e=this.t;if(ju&&void 0===t){var n=void 0!==e&&1===e.length;n&&(t=Lu.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&Lu.set(e,t))}return t}},{key:"toString",value:function(){return this.cssText}}])}(),Nu=ju?function(t){return t}:function(t){return t instanceof CSSStyleSheet?function(t){var e,n="",i=Or(t.cssRules);try{for(i.s();!(e=i.n()).done;){n+=e.value.cssText}}catch(t){i.e(t)}finally{i.f()}return function(t){return new Du("string"==typeof t?t:t+"",void 0,Pu)}(n)}(t):t},Ru=window,Uu=Ru.trustedTypes,Vu=Uu?Uu.emptyScript:"",Bu=Ru.reactiveElementPolyfillSupport,Fu={toAttribute:function(t,e){switch(e){case Boolean:t=t?Vu:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute:function(t,e){var n=t;switch(e){case Boolean:n=null!==t;break;case Number:n=null===t?null:Number(t);break;case Object:case Array:try{n=JSON.parse(t)}catch(t){n=null}}return n}},Hu=function(t,e){return e!==t&&(e==e||t==t)},Wu={attribute:!0,type:String,converter:Fu,reflect:!1,hasChanged:Hu},Yu="finalized",Ku=function(t){function e(){var t;return zr(this,e),(t=br(this,e))._$Ei=new Map,t.isUpdatePending=!1,t.hasUpdated=!1,t._$El=null,t._$Eu(),t}return wr(e,Cr(HTMLElement)),Mr(e,[{key:"_$Eu",value:function(){var t,e=this;this._$E_=new Promise((function(t){return e.enableUpdating=t})),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((function(t){return t(e)}))}},{key:"addController",value:function(t){var e,n;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(n=t.hostConnected)||void 0===n||n.call(t))}},{key:"removeController",value:function(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}},{key:"_$Eg",value:function(){var t=this;this.constructor.elementProperties.forEach((function(e,n){t.hasOwnProperty(n)&&(t._$Ei.set(n,t[n]),delete t[n])}))}},{key:"createRenderRoot",value:function(){var t,e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return function(t,e){ju?t.adoptedStyleSheets=e.map((function(t){return t instanceof CSSStyleSheet?t:t.styleSheet})):e.forEach((function(e){var n=document.createElement("style"),i=Mu.litNonce;void 0!==i&&n.setAttribute("nonce",i),n.textContent=e.cssText,t.appendChild(n)}))}(e,this.constructor.elementStyles),e}},{key:"connectedCallback",value:function(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((function(t){var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}},{key:"enableUpdating",value:function(t){}},{key:"disconnectedCallback",value:function(){var t;null===(t=this._$ES)||void 0===t||t.forEach((function(t){var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}},{key:"attributeChangedCallback",value:function(t,e,n){this._$AK(t,n)}},{key:"_$EO",value:function(t,e){var n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Wu,o=this.constructor._$Ep(t,i);if(void 0!==o&&!0===i.reflect){var r=(void 0!==(null===(n=i.converter)||void 0===n?void 0:n.toAttribute)?i.converter:Fu).toAttribute(e,i.type);this._$El=t,null==r?this.removeAttribute(o):this.setAttribute(o,r),this._$El=null}}},{key:"_$AK",value:function(t,e){var n,i=this.constructor,o=i._$Ev.get(t);if(void 0!==o&&this._$El!==o){var r=i.getPropertyOptions(o),a="function"==typeof r.converter?{fromAttribute:r.converter}:void 0!==(null===(n=r.converter)||void 0===n?void 0:n.fromAttribute)?r.converter:Fu;this._$El=o,this[o]=a.fromAttribute(e,r.type),this._$El=null}}},{key:"requestUpdate",value:function(t,e,n){var i=!0;void 0!==t&&(((n=n||this.constructor.getPropertyOptions(t)).hasChanged||Hu)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===n.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,n))):i=!1),!this.isUpdatePending&&i&&(this._$E_=this._$Ej())}},{key:"_$Ej",value:(n=yr(gr().mark((function t(){var e;return gr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.isUpdatePending=!0,t.prev=1,t.next=4,this._$E_;case 4:t.next=9;break;case 6:t.prev=6,t.t0=t.catch(1),Promise.reject(t.t0);case 9:if(e=this.scheduleUpdate(),t.t1=null!=e,!t.t1){t.next=14;break}return t.next=14,e;case 14:return t.abrupt("return",!this.isUpdatePending);case 15:case"end":return t.stop()}}),t,this,[[1,6]])}))),function(){return n.apply(this,arguments)})},{key:"scheduleUpdate",value:function(){return this.performUpdate()}},{key:"performUpdate",value:function(){var t,e=this;if(this.isUpdatePending){this.hasUpdated,this._$Ei&&(this._$Ei.forEach((function(t,n){return e[n]=t})),this._$Ei=void 0);var n=!1,i=this._$AL;try{(n=this.shouldUpdate(i))?(this.willUpdate(i),null===(t=this._$ES)||void 0===t||t.forEach((function(t){var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$Ek()}catch(t){throw n=!1,this._$Ek(),t}n&&this._$AE(i)}}},{key:"willUpdate",value:function(t){}},{key:"_$AE",value:function(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((function(t){var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}},{key:"_$Ek",value:function(){this._$AL=new Map,this.isUpdatePending=!1}},{key:"updateComplete",get:function(){return this.getUpdateComplete()}},{key:"getUpdateComplete",value:function(){return this._$E_}},{key:"shouldUpdate",value:function(t){return!0}},{key:"update",value:function(t){var e=this;void 0!==this._$EC&&(this._$EC.forEach((function(t,n){return e._$EO(n,e[n],t)})),this._$EC=void 0),this._$Ek()}},{key:"updated",value:function(t){}},{key:"firstUpdated",value:function(t){}}],[{key:"addInitializer",value:function(t){var e;this.finalize(),(null!==(e=this.h)&&void 0!==e?e:this.h=[]).push(t)}},{key:"observedAttributes",get:function(){var t=this;this.finalize();var e=[];return this.elementProperties.forEach((function(n,i){var o=t._$Ep(i,n);void 0!==o&&(t._$Ev.set(o,i),e.push(o))})),e}},{key:"createProperty",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Wu;if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){var n="symbol"==Pr(t)?Symbol():"__"+t,i=this.getPropertyDescriptor(t,n,e);void 0!==i&&Object.defineProperty(this.prototype,t,i)}}},{key:"getPropertyDescriptor",value:function(t,e,n){return{get:function(){return this[e]},set:function(i){var o=this[t];this[e]=i,this.requestUpdate(t,o,n)},configurable:!0,enumerable:!0}}},{key:"getPropertyOptions",value:function(t){return this.elementProperties.get(t)||Wu}},{key:"finalize",value:function(){if(this.hasOwnProperty(Yu))return!1;this[Yu]=!0;var t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=hr(t.h)),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){var e,n=this.properties,i=Or([].concat(hr(Object.getOwnPropertyNames(n)),hr(Object.getOwnPropertySymbols(n))));try{for(i.s();!(e=i.n()).done;){var o=e.value;this.createProperty(o,n[o])}}catch(t){i.e(t)}finally{i.f()}}return this.elementStyles=this.finalizeStyles(this.styles),!0}},{key:"finalizeStyles",value:function(t){var e=[];if(Array.isArray(t)){var n,i=Or(new Set(t.flat(1/0).reverse()));try{for(i.s();!(n=i.n()).done;){var o=n.value;e.unshift(Nu(o))}}catch(t){i.e(t)}finally{i.f()}}else void 0!==t&&e.push(Nu(t));return e}},{key:"_$Ep",value:function(t,e){var n=e.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof t?t.toLowerCase():void 0}}]);var n}();Ku[Yu]=!0,Ku.elementProperties=new Map,Ku.elementStyles=[],Ku.shadowRootOptions={mode:"open"},null==Bu||Bu({ReactiveElement:Ku}),(null!==(zu=Ru.reactiveElementVersions)&&void 0!==zu?zu:Ru.reactiveElementVersions=[]).push("1.6.3");var Xu=window,qu=Xu.trustedTypes,Gu=qu?qu.createPolicy("lit-html",{createHTML:function(t){return t}}):void 0,Zu="$lit$",Ju="lit$".concat((Math.random()+"").slice(9),"$"),Qu="?"+Ju,th="<".concat(Qu,">"),eh=document,nh=function(){return eh.createComment("")},ih=function(t){return null===t||"object"!=Pr(t)&&"function"!=typeof t},oh=Array.isArray,rh="[ \t\n\f\r]",ah=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,lh=/-->/g,sh=/>/g,ch=RegExp(">|".concat(rh,"(?:([^\\s\"'>=/]+)(").concat(rh,"*=").concat(rh,"*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)"),"g"),dh=/'/g,uh=/"/g,hh=/^(?:script|style|textarea|title)$/i,ph=Symbol.for("lit-noChange"),mh=Symbol.for("lit-nothing"),fh=new WeakMap,vh=eh.createTreeWalker(eh,129,null,!1);function gh(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==Gu?Gu.createHTML(e):e}var _h=function(){return Mr((function t(e,n){var i,o=e.strings,r=e._$litType$;zr(this,t),this.parts=[];var a=0,l=0,s=o.length-1,c=this.parts,d=function(t,e){for(var n,i=t.length-1,o=[],r=2===e?"":"")),o]}(o,r),u=mr(d,2),h=u[0],p=u[1];if(this.el=t.createElement(h,n),vh.currentNode=this.el.content,2===r){var m=this.el.content,f=m.firstChild;f.remove(),m.append.apply(m,hr(f.childNodes))}for(;null!==(i=vh.nextNode())&&c.length0){i.textContent=qu?qu.emptyScript:"";for(var O=0;O2&&void 0!==arguments[2]?arguments[2]:t,l=arguments.length>3?arguments[3]:void 0;if(e===ph)return e;var s=void 0!==l?null===(n=a._$Co)||void 0===n?void 0:n[l]:a._$Cl,c=ih(e)?void 0:e._$litDirective$;return(null==s?void 0:s.constructor)!==c&&(null===(i=null==s?void 0:s._$AO)||void 0===i||i.call(s,!1),void 0===c?s=void 0:(s=new c(t))._$AT(t,a,l),void 0!==l?(null!==(o=(r=a)._$Co)&&void 0!==o?o:r._$Co=[])[l]=s:a._$Cl=s),void 0!==s&&(e=yh(t,s._$AS(t,e.values),s,l)),e}var bh=function(){return Mr((function t(e,n){zr(this,t),this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=n}),[{key:"parentNode",get:function(){return this._$AM.parentNode}},{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"u",value:function(t){var e,n=this._$AD,i=n.el.content,o=n.parts,r=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:eh).importNode(i,!0);vh.currentNode=r;for(var a=vh.nextNode(),l=0,s=0,c=o[0];void 0!==c;){if(l===c.index){var d=void 0;2===c.type?d=new kh(a,a.nextSibling,this,t):1===c.type?d=new c.ctor(a,c.name,c.strings,this,t):6===c.type&&(d=new Sh(a,this,t)),this._$AV.push(d),c=o[++s]}l!==(null==c?void 0:c.index)&&(a=vh.nextNode(),l++)}return vh.currentNode=eh,r}},{key:"v",value:function(t){var e,n=0,i=Or(this._$AV);try{for(i.s();!(e=i.n()).done;){var o=e.value;void 0!==o&&(void 0!==o.strings?(o._$AI(t,o,n),n+=o.strings.length-2):o._$AI(t[n])),n++}}catch(t){i.e(t)}finally{i.f()}}}])}(),kh=function(){function t(e,n,i,o){var r;zr(this,t),this.type=2,this._$AH=mh,this._$AN=void 0,this._$AA=e,this._$AB=n,this._$AM=i,this.options=o,this._$Cp=null===(r=null==o?void 0:o.isConnected)||void 0===r||r}return Mr(t,[{key:"_$AU",get:function(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cp}},{key:"parentNode",get:function(){var t=this._$AA.parentNode,e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}},{key:"startNode",get:function(){return this._$AA}},{key:"endNode",get:function(){return this._$AB}},{key:"_$AI",value:function(t){t=yh(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this),ih(t)?t===mh||null==t||""===t?(this._$AH!==mh&&this._$AR(),this._$AH=mh):t!==this._$AH&&t!==ph&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):function(t){return oh(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator])}(t)?this.T(t):this._(t)}},{key:"k",value:function(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}},{key:"$",value:function(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}},{key:"_",value:function(t){this._$AH!==mh&&ih(this._$AH)?this._$AA.nextSibling.data=t:this.$(eh.createTextNode(t)),this._$AH=t}},{key:"g",value:function(t){var e,n=t.values,i=t._$litType$,o="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=_h.createElement(gh(i.h,i.h[0]),this.options)),i);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===o)this._$AH.v(n);else{var r=new bh(o,this),a=r.u(this.options);r.v(n),this.$(a),this._$AH=r}}},{key:"_$AC",value:function(t){var e=fh.get(t.strings);return void 0===e&&fh.set(t.strings,e=new _h(t)),e}},{key:"T",value:function(e){oh(this._$AH)||(this._$AH=[],this._$AR());var n,i,o=this._$AH,r=0,a=Or(e);try{for(a.s();!(i=a.n()).done;){var l=i.value;r===o.length?o.push(n=new t(this.k(nh()),this.k(nh()),this,this.options)):n=o[r],n._$AI(l),r++}}catch(t){a.e(t)}finally{a.f()}r0&&void 0!==arguments[0]?arguments[0]:this._$AA.nextSibling,n=arguments.length>1?arguments[1]:void 0;for(null===(t=this._$AP)||void 0===t||t.call(this,!1,!0,n);e&&e!==this._$AB;){var i=e.nextSibling;e.remove(),e=i}}},{key:"setConnected",value:function(t){var e;void 0===this._$AM&&(this._$Cp=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}])}(),xh=function(){return Mr((function t(e,n,i,o,r){zr(this,t),this.type=1,this._$AH=mh,this._$AN=void 0,this.element=e,this.name=n,this._$AM=o,this.options=r,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=mh}),[{key:"tagName",get:function(){return this.element.tagName}},{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AI",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=this.strings,r=!1;if(void 0===o)t=yh(this,t,e,0),(r=!ih(t)||t!==this._$AH&&t!==ph)&&(this._$AH=t);else{var a,l,s=t;for(t=o[0],a=0;a1&&void 0!==arguments[1]?arguments[1]:this,0))&&void 0!==e?e:mh)!==ph){var n=this._$AH,i=t===mh&&n!==mh||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,o=t!==mh&&(n===mh||i);i&&this.element.removeEventListener(this.name,this,n),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}}},{key:"handleEvent",value:function(t){var e,n;"function"==typeof this._$AH?this._$AH.call(null!==(n=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==n?n:this.element,t):this._$AH.handleEvent(t)}}])}(),Sh=function(){return Mr((function t(e,n,i){zr(this,t),this.element=e,this.type=6,this._$AN=void 0,this._$AM=n,this.options=i}),[{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AI",value:function(t){yh(this,t)}}])}(),Oh=Xu.litHtmlPolyfillSupport;null==Oh||Oh(_h,kh),(null!==($u=Xu.litHtmlVersions)&&void 0!==$u?$u:Xu.litHtmlVersions=[]).push("2.8.0");var Th,Ih,zh=function(t){function e(){var t;return zr(this,e),(t=br(this,e,arguments)).renderOptions={host:xr(t)},t._$Do=void 0,t}return wr(e,Ku),Mr(e,[{key:"createRenderRoot",value:function(){var t,n,i=dr(e,"createRenderRoot",this,3)([]);return null!==(t=(n=this.renderOptions).renderBefore)&&void 0!==t||(n.renderBefore=i.firstChild),i}},{key:"update",value:function(t){var n=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),dr(e,"update",this,3)([t]),this._$Do=function(t,e,n){var i,o,r=null!==(i=null==n?void 0:n.renderBefore)&&void 0!==i?i:e,a=r._$litPart$;if(void 0===a){var l=null!==(o=null==n?void 0:n.renderBefore)&&void 0!==o?o:null;r._$litPart$=a=new kh(e.insertBefore(nh(),l),l,void 0,null!=n?n:{})}return a._$AI(t),a}(n,this.renderRoot,this.renderOptions)}},{key:"connectedCallback",value:function(){var t;dr(e,"connectedCallback",this,3)([]),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}},{key:"disconnectedCallback",value:function(){var t;dr(e,"disconnectedCallback",this,3)([]),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}},{key:"render",value:function(){return ph}}])}();
+/**
+ * @license
+ * Copyright 2017 Google LLC
+ * SPDX-License-Identifier: BSD-3-Clause
+ */zh.finalized=!0,zh._$litElement$=!0,null===(Th=globalThis.litElementHydrateSupport)||void 0===Th||Th.call(globalThis,{LitElement:zh});var $h=globalThis.litElementPolyfillSupport;null==$h||$h({LitElement:zh}),(null!==(Ih=globalThis.litElementVersions)&&void 0!==Ih?Ih:globalThis.litElementVersions=[]).push("3.3.3");function Mh(t){return{addClass:function(e){t.classList.add(e)},removeClass:function(e){t.classList.remove(e)},hasClass:function(e){return t.classList.contains(e)}}}var jh=function(){},Ph={get passive(){return!1}};document.addEventListener("x",jh,Ph),document.removeEventListener("x",jh);
/**
* @license
* Copyright 2018 Google LLC
* SPDX-License-Identifier: Apache-2.0
- */var tr,er;const ir=null!==(er=null===(tr=window.ShadyDOM)||void 0===tr?void 0:tr.inUse)&&void 0!==er&&er;class or extends Qn{constructor(){super(...arguments),this.disabled=!1,this.containingForm=null,this.formDataListener=t=>{this.disabled||this.setFormData(t.formData)}}findFormElement(){if(!this.shadowRoot||ir)return null;const t=this.getRootNode().querySelectorAll("form");for(const e of Array.from(t))if(e.contains(this))return e;return null}connectedCallback(){var t;super.connectedCallback(),this.containingForm=this.findFormElement(),null===(t=this.containingForm)||void 0===t||t.addEventListener("formdata",this.formDataListener)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this.containingForm)||void 0===t||t.removeEventListener("formdata",this.formDataListener),this.containingForm=null}click(){this.formElement&&!this.disabled&&(this.formElement.focus(),this.formElement.click())}firstUpdated(){super.firstUpdated(),this.shadowRoot&&this.mdcRoot.addEventListener("change",(t=>{this.dispatchEvent(new Event("change",t))}))}}or.shadowRootOptions={mode:"open",delegatesFocus:!0},n([_t({type:Boolean})],or.prototype,"disabled",void 0);
+ */var Lh,Dh,Nh=function(t){function e(){return zr(this,e),br(this,e,arguments)}return wr(e,zh),Mr(e,[{key:"click",value:function(){if(this.mdcRoot)return this.mdcRoot.focus(),void this.mdcRoot.click();dr(e,"click",this,3)([])}},{key:"createFoundation",value:function(){void 0!==this.mdcFoundation&&this.mdcFoundation.destroy(),this.mdcFoundationClass&&(this.mdcFoundation=new this.mdcFoundationClass(this.createAdapter()),this.mdcFoundation.init())}},{key:"firstUpdated",value:function(){this.createFoundation()}}])}(),Rh=null!==(Dh=null===(Lh=window.ShadyDOM)||void 0===Lh?void 0:Lh.inUse)&&void 0!==Dh&&Dh,Uh=function(t){function e(){var t;return zr(this,e),(t=br(this,e,arguments)).disabled=!1,t.containingForm=null,t.formDataListener=function(e){t.disabled||t.setFormData(e.formData)},t}return wr(e,Nh),Mr(e,[{key:"findFormElement",value:function(){if(!this.shadowRoot||Rh)return null;for(var t=this.getRootNode().querySelectorAll("form"),e=0,n=Array.from(t);e(e,i)=>{if(e.constructor._observers){if(!e.constructor.hasOwnProperty("_observers")){const t=e.constructor._observers;e.constructor._observers=new Map,t.forEach(((t,i)=>e.constructor._observers.set(i,t)))}}else{e.constructor._observers=new Map;const t=e.updated;e.updated=function(e){t.call(this,e),e.forEach(((t,e)=>{const i=this.constructor._observers.get(e);void 0!==i&&i.call(this,this[e],t)}))}}e.constructor._observers.set(i,t)}
+ */Uh.shadowRootOptions={mode:"open",delegatesFocus:!0},Ur([function(t){return function(e,n){return void 0!==n?function(t,e,n){e.constructor.createProperty(n,t)}(t,e,n):function(t,e){return"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?sr(sr({},e),{},{finisher:function(n){n.createProperty(e.key,t)}}):{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer:function(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher:function(n){n.createProperty(e.key,t)}}}(t,e)}}
/**
* @license
- * Copyright 2016 Google Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */;var rr=function(){function t(t){void 0===t&&(t={}),this.adapter=t}return Object.defineProperty(t,"cssClasses",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{}},enumerable:!1,configurable:!0}),t.prototype.init=function(){},t.prototype.destroy=function(){},t}(),ar={LABEL_FLOAT_ABOVE:"mdc-floating-label--float-above",LABEL_REQUIRED:"mdc-floating-label--required",LABEL_SHAKE:"mdc-floating-label--shake",ROOT:"mdc-floating-label"},sr=function(t){function e(i){var n=t.call(this,o(o({},e.defaultAdapter),i))||this;return n.shakeAnimationEndHandler=function(){n.handleShakeAnimationEnd()},n}return i(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return ar},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},getWidth:function(){return 0},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){this.adapter.registerInteractionHandler("animationend",this.shakeAnimationEndHandler)},e.prototype.destroy=function(){this.adapter.deregisterInteractionHandler("animationend",this.shakeAnimationEndHandler)},e.prototype.getWidth=function(){return this.adapter.getWidth()},e.prototype.shake=function(t){var i=e.cssClasses.LABEL_SHAKE;t?this.adapter.addClass(i):this.adapter.removeClass(i)},e.prototype.float=function(t){var i=e.cssClasses,o=i.LABEL_FLOAT_ABOVE,n=i.LABEL_SHAKE;t?this.adapter.addClass(o):(this.adapter.removeClass(o),this.adapter.removeClass(n))},e.prototype.setRequired=function(t){var i=e.cssClasses.LABEL_REQUIRED;t?this.adapter.addClass(i):this.adapter.removeClass(i)},e.prototype.handleShakeAnimationEnd=function(){var t=e.cssClasses.LABEL_SHAKE;this.adapter.removeClass(t)},e}(rr);
+ * Copyright 2021 Google LLC
+ * SPDX-License-Identifier: BSD-3-Clause
+ */({type:Boolean})],Uh.prototype,"disabled",void 0);
/**
* @license
- * Copyright 2016 Google Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */const lr=He(class extends Ye{constructor(t){switch(super(t),this.foundation=null,this.previousPart=null,t.type){case Ve:case Be:break;default:throw new Error("FloatingLabel directive only support attribute and property parts")}}update(t,[e]){if(t!==this.previousPart){this.foundation&&this.foundation.destroy(),this.previousPart=t;const e=t.element;e.classList.add("mdc-floating-label");const i=(t=>({addClass:e=>t.classList.add(e),removeClass:e=>t.classList.remove(e),getWidth:()=>t.scrollWidth,registerInteractionHandler:(e,i)=>{t.addEventListener(e,i)},deregisterInteractionHandler:(e,i)=>{t.removeEventListener(e,i)}}))(e);this.foundation=new sr(i),this.foundation.init()}return this.render(e)}render(t){return this.foundation}});
+ * Copyright 2018 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+var Vh=function(t){return function(e,n){if(e.constructor._observers){if(!e.constructor.hasOwnProperty("_observers")){var i=e.constructor._observers;e.constructor._observers=new Map,i.forEach((function(t,n){return e.constructor._observers.set(n,t)}))}}else{e.constructor._observers=new Map;var o=e.updated;e.updated=function(t){var e=this;o.call(this,t),t.forEach((function(t,n){var i=e.constructor._observers.get(n);void 0!==i&&i.call(e,e[n],t)}))}}e.constructor._observers.set(n,t)}},Bh=function(){function t(t){void 0===t&&(t={}),this.adapter=t}return Object.defineProperty(t,"cssClasses",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{}},enumerable:!1,configurable:!0}),t.prototype.init=function(){},t.prototype.destroy=function(){},t}(),Fh={LABEL_FLOAT_ABOVE:"mdc-floating-label--float-above",LABEL_REQUIRED:"mdc-floating-label--required",LABEL_SHAKE:"mdc-floating-label--shake",ROOT:"mdc-floating-label"},Hh=function(t){function e(n){var i=t.call(this,Rr(Rr({},e.defaultAdapter),n))||this;return i.shakeAnimationEndHandler=function(){i.handleShakeAnimationEnd()},i}return Nr(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return Fh},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},getWidth:function(){return 0},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){this.adapter.registerInteractionHandler("animationend",this.shakeAnimationEndHandler)},e.prototype.destroy=function(){this.adapter.deregisterInteractionHandler("animationend",this.shakeAnimationEndHandler)},e.prototype.getWidth=function(){return this.adapter.getWidth()},e.prototype.shake=function(t){var n=e.cssClasses.LABEL_SHAKE;t?this.adapter.addClass(n):this.adapter.removeClass(n)},e.prototype.float=function(t){var n=e.cssClasses,i=n.LABEL_FLOAT_ABOVE,o=n.LABEL_SHAKE;t?this.adapter.addClass(i):(this.adapter.removeClass(i),this.adapter.removeClass(o))},e.prototype.setRequired=function(t){var n=e.cssClasses.LABEL_REQUIRED;t?this.adapter.addClass(n):this.adapter.removeClass(n)},e.prototype.handleShakeAnimationEnd=function(){var t=e.cssClasses.LABEL_SHAKE;this.adapter.removeClass(t)},e}(Bh),Wh=1,Yh=3,Kh=function(){return Mr((function t(e){zr(this,t)}),[{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AT",value:function(t,e,n){this._$Ct=t,this._$AM=e,this._$Ci=n}},{key:"_$AS",value:function(t,e){return this.update(t,e)}},{key:"update",value:function(t,e){return this.render.apply(this,hr(e))}}])}(),Xh=function(t){return function(){for(var e=arguments.length,n=new Array(e),i=0;i(e,i)=>{if(e.constructor._observers){if(!e.constructor.hasOwnPropert
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
- */var cr=function(){function t(t){void 0===t&&(t={}),this.adapter=t}return Object.defineProperty(t,"cssClasses",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{}},enumerable:!1,configurable:!0}),t.prototype.init=function(){},t.prototype.destroy=function(){},t}(),dr={LINE_RIPPLE_ACTIVE:"mdc-line-ripple--active",LINE_RIPPLE_DEACTIVATING:"mdc-line-ripple--deactivating"},ur=function(t){function e(i){var n=t.call(this,o(o({},e.defaultAdapter),i))||this;return n.transitionEndHandler=function(t){n.handleTransitionEnd(t)},n}return i(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return dr},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},setStyle:function(){},registerEventHandler:function(){},deregisterEventHandler:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){this.adapter.registerEventHandler("transitionend",this.transitionEndHandler)},e.prototype.destroy=function(){this.adapter.deregisterEventHandler("transitionend",this.transitionEndHandler)},e.prototype.activate=function(){this.adapter.removeClass(dr.LINE_RIPPLE_DEACTIVATING),this.adapter.addClass(dr.LINE_RIPPLE_ACTIVE)},e.prototype.setRippleCenter=function(t){this.adapter.setStyle("transform-origin",t+"px center")},e.prototype.deactivate=function(){this.adapter.addClass(dr.LINE_RIPPLE_DEACTIVATING)},e.prototype.handleTransitionEnd=function(t){var e=this.adapter.hasClass(dr.LINE_RIPPLE_DEACTIVATING);"opacity"===t.propertyName&&e&&(this.adapter.removeClass(dr.LINE_RIPPLE_ACTIVE),this.adapter.removeClass(dr.LINE_RIPPLE_DEACTIVATING))},e}(cr);
+ */_p.add(op),_p.add(rp),_p.add(ap),_p.add(lp),_p.add(sp),_p.add(cp),_p.add(dp),_p.add(up),_p.add(hp),_p.add(pp),_p.add(mp),_p.add(fp),_p.add(vp),_p.add(gp);var yp=8,bp=13,kp=32,xp=33,wp=34,Cp=35,Ep=36,Ap=37,Sp=38,Op=39,Tp=40,Ip=46,zp=27,$p=9,Mp=new Map;Mp.set(yp,op),Mp.set(bp,rp),Mp.set(kp,ap),Mp.set(xp,lp),Mp.set(wp,sp),Mp.set(Cp,cp),Mp.set(Ep,dp),Mp.set(Ap,up),Mp.set(Sp,hp),Mp.set(Op,pp),Mp.set(Tp,mp),Mp.set(Ip,fp),Mp.set(zp,vp),Mp.set($p,gp);var jp,Pp,Lp=new Set;function Dp(t){var e=t.key;if(_p.has(e))return e;var n=Mp.get(t.keyCode);return n||ip}
/**
* @license
* Copyright 2018 Google Inc.
@@ -360,7 +211,7 @@ const nr=t=>(e,i)=>{if(e.constructor._observers){if(!e.constructor.hasOwnPropert
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
- */const hr=He(class extends Ye{constructor(t){switch(super(t),this.previousPart=null,this.foundation=null,t.type){case Ve:case Be:return;default:throw new Error("LineRipple only support attribute and property parts.")}}update(t,e){if(this.previousPart!==t){this.foundation&&this.foundation.destroy(),this.previousPart=t;const e=t.element;e.classList.add("mdc-line-ripple");const i=(t=>({addClass:e=>t.classList.add(e),removeClass:e=>t.classList.remove(e),hasClass:e=>t.classList.contains(e),setStyle:(e,i)=>t.style.setProperty(e,i),registerEventHandler:(e,i)=>{t.addEventListener(e,i)},deregisterEventHandler:(e,i)=>{t.removeEventListener(e,i)}}))(e);this.foundation=new ur(i),this.foundation.init()}return this.render()}render(){return this.foundation}});
+ */Lp.add(lp),Lp.add(sp),Lp.add(cp),Lp.add(dp),Lp.add(up),Lp.add(hp),Lp.add(pp),Lp.add(mp),function(t){t[t.BOTTOM=1]="BOTTOM",t[t.CENTER=2]="CENTER",t[t.RIGHT=4]="RIGHT",t[t.FLIP_RTL=8]="FLIP_RTL"}(jp||(jp={})),function(t){t[t.TOP_LEFT=0]="TOP_LEFT",t[t.TOP_RIGHT=4]="TOP_RIGHT",t[t.BOTTOM_LEFT=1]="BOTTOM_LEFT",t[t.BOTTOM_RIGHT=5]="BOTTOM_RIGHT",t[t.TOP_START=8]="TOP_START",t[t.TOP_END=12]="TOP_END",t[t.BOTTOM_START=9]="BOTTOM_START",t[t.BOTTOM_END=13]="BOTTOM_END"}(Pp||(Pp={}));
/**
* @license
* Copyright 2016 Google Inc.
@@ -382,3114 +233,96 @@ const nr=t=>(e,i)=>{if(e.constructor._observers){if(!e.constructor.hasOwnPropert
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
- */var mr=function(){function t(t){void 0===t&&(t={}),this.adapter=t}return Object.defineProperty(t,"cssClasses",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{}},enumerable:!1,configurable:!0}),t.prototype.init=function(){},t.prototype.destroy=function(){},t}(),pr="Unknown",fr="Backspace",gr="Enter",_r="Spacebar",vr="PageUp",br="PageDown",yr="End",xr="Home",wr="ArrowLeft",kr="ArrowUp",Cr="ArrowRight",$r="ArrowDown",Er="Delete",Ar="Escape",Sr="Tab",Ir=new Set;
+ */
+var Np,Rp,Up={ACTIVATED:"mdc-select--activated",DISABLED:"mdc-select--disabled",FOCUSED:"mdc-select--focused",INVALID:"mdc-select--invalid",MENU_INVALID:"mdc-select__menu--invalid",OUTLINED:"mdc-select--outlined",REQUIRED:"mdc-select--required",ROOT:"mdc-select",WITH_LEADING_ICON:"mdc-select--with-leading-icon"},Vp={ARIA_CONTROLS:"aria-controls",ARIA_DESCRIBEDBY:"aria-describedby",ARIA_SELECTED_ATTR:"aria-selected",CHANGE_EVENT:"MDCSelect:change",HIDDEN_INPUT_SELECTOR:'input[type="hidden"]',LABEL_SELECTOR:".mdc-floating-label",LEADING_ICON_SELECTOR:".mdc-select__icon",LINE_RIPPLE_SELECTOR:".mdc-line-ripple",MENU_SELECTOR:".mdc-select__menu",OUTLINE_SELECTOR:".mdc-notched-outline",SELECTED_TEXT_SELECTOR:".mdc-select__selected-text",SELECT_ANCHOR_SELECTOR:".mdc-select__anchor",VALUE_ATTR:"data-value"},Bp={LABEL_SCALE:.75,UNSET_INDEX:-1,CLICK_DEBOUNCE_TIMEOUT_MS:330},Fp=function(t){function e(n,i){void 0===i&&(i={});var o=t.call(this,Rr(Rr({},e.defaultAdapter),n))||this;return o.disabled=!1,o.isMenuOpen=!1,o.useDefaultValidation=!0,o.customValidity=!0,o.lastSelectedIndex=Bp.UNSET_INDEX,o.clickDebounceTimeout=0,o.recentlyClicked=!1,o.leadingIcon=i.leadingIcon,o.helperText=i.helperText,o}return Nr(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return Up},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return Bp},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return Vp},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},activateBottomLine:function(){},deactivateBottomLine:function(){},getSelectedIndex:function(){return-1},setSelectedIndex:function(){},hasLabel:function(){return!1},floatLabel:function(){},getLabelWidth:function(){return 0},setLabelRequired:function(){},hasOutline:function(){return!1},notchOutline:function(){},closeOutline:function(){},setRippleCenter:function(){},notifyChange:function(){},setSelectedText:function(){},isSelectAnchorFocused:function(){return!1},getSelectAnchorAttr:function(){return""},setSelectAnchorAttr:function(){},removeSelectAnchorAttr:function(){},addMenuClass:function(){},removeMenuClass:function(){},openMenu:function(){},closeMenu:function(){},getAnchorElement:function(){return null},setMenuAnchorElement:function(){},setMenuAnchorCorner:function(){},setMenuWrapFocus:function(){},focusMenuItemAtIndex:function(){},getMenuItemCount:function(){return 0},getMenuItemValues:function(){return[]},getMenuItemTextAtIndex:function(){return""},isTypeaheadInProgress:function(){return!1},typeaheadMatchItem:function(){return-1}}},enumerable:!1,configurable:!0}),e.prototype.getSelectedIndex=function(){return this.adapter.getSelectedIndex()},e.prototype.setSelectedIndex=function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!1),t>=this.adapter.getMenuItemCount()||(t===Bp.UNSET_INDEX?this.adapter.setSelectedText(""):this.adapter.setSelectedText(this.adapter.getMenuItemTextAtIndex(t).trim()),this.adapter.setSelectedIndex(t),e&&this.adapter.closeMenu(),n||this.lastSelectedIndex===t||this.handleChange(),this.lastSelectedIndex=t)},e.prototype.setValue=function(t,e){void 0===e&&(e=!1);var n=this.adapter.getMenuItemValues().indexOf(t);this.setSelectedIndex(n,!1,e)},e.prototype.getValue=function(){var t=this.adapter.getSelectedIndex(),e=this.adapter.getMenuItemValues();return t!==Bp.UNSET_INDEX?e[t]:""},e.prototype.getDisabled=function(){return this.disabled},e.prototype.setDisabled=function(t){this.disabled=t,this.disabled?(this.adapter.addClass(Up.DISABLED),this.adapter.closeMenu()):this.adapter.removeClass(Up.DISABLED),this.leadingIcon&&this.leadingIcon.setDisabled(this.disabled),this.disabled?this.adapter.removeSelectAnchorAttr("tabindex"):this.adapter.setSelectAnchorAttr("tabindex","0"),this.adapter.setSelectAnchorAttr("aria-disabled",this.disabled.toString())},e.prototype.openMenu=function(){this.adapter.addClass(Up.ACTIVATED),this.adapter.openMenu(),this.isMenuOpen=!0,this.adapter.setSelectAnchorAttr("aria-expanded","true")},e.prototype.setHelperTextContent=function(t){this.helperText&&this.helperText.setContent(t)},e.prototype.layout=function(){if(this.adapter.hasLabel()){var t=this.getValue().length>0,e=this.adapter.hasClass(Up.FOCUSED),n=t||e,i=this.adapter.hasClass(Up.REQUIRED);this.notchOutline(n),this.adapter.floatLabel(n),this.adapter.setLabelRequired(i)}},e.prototype.layoutOptions=function(){var t=this.adapter.getMenuItemValues().indexOf(this.getValue());this.setSelectedIndex(t,!1,!0)},e.prototype.handleMenuOpened=function(){if(0!==this.adapter.getMenuItemValues().length){var t=this.getSelectedIndex(),e=t>=0?t:0;this.adapter.focusMenuItemAtIndex(e)}},e.prototype.handleMenuClosing=function(){this.adapter.setSelectAnchorAttr("aria-expanded","false")},e.prototype.handleMenuClosed=function(){this.adapter.removeClass(Up.ACTIVATED),this.isMenuOpen=!1,this.adapter.isSelectAnchorFocused()||this.blur()},e.prototype.handleChange=function(){this.layout(),this.adapter.notifyChange(this.getValue()),this.adapter.hasClass(Up.REQUIRED)&&this.useDefaultValidation&&this.setValid(this.isValid())},e.prototype.handleMenuItemAction=function(t){this.setSelectedIndex(t,!0)},e.prototype.handleFocus=function(){this.adapter.addClass(Up.FOCUSED),this.layout(),this.adapter.activateBottomLine()},e.prototype.handleBlur=function(){this.isMenuOpen||this.blur()},e.prototype.handleClick=function(t){this.disabled||this.recentlyClicked||(this.setClickDebounceTimeout(),this.isMenuOpen?this.adapter.closeMenu():(this.adapter.setRippleCenter(t),this.openMenu()))},e.prototype.handleKeydown=function(t){if(!this.isMenuOpen&&this.adapter.hasClass(Up.FOCUSED)){var e=Dp(t)===rp,n=Dp(t)===ap,i=Dp(t)===hp,o=Dp(t)===mp;if(!(t.ctrlKey||t.metaKey)&&(!n&&t.key&&1===t.key.length||n&&this.adapter.isTypeaheadInProgress())){var r=n?" ":t.key,a=this.adapter.typeaheadMatchItem(r,this.getSelectedIndex());return a>=0&&this.setSelectedIndex(a),void t.preventDefault()}(e||n||i||o)&&(this.openMenu(),t.preventDefault())}},e.prototype.notchOutline=function(t){if(this.adapter.hasOutline()){var e=this.adapter.hasClass(Up.FOCUSED);if(t){var n=Bp.LABEL_SCALE,i=this.adapter.getLabelWidth()*n;this.adapter.notchOutline(i)}else e||this.adapter.closeOutline()}},e.prototype.setLeadingIconAriaLabel=function(t){this.leadingIcon&&this.leadingIcon.setAriaLabel(t)},e.prototype.setLeadingIconContent=function(t){this.leadingIcon&&this.leadingIcon.setContent(t)},e.prototype.getUseDefaultValidation=function(){return this.useDefaultValidation},e.prototype.setUseDefaultValidation=function(t){this.useDefaultValidation=t},e.prototype.setValid=function(t){this.useDefaultValidation||(this.customValidity=t),this.adapter.setSelectAnchorAttr("aria-invalid",(!t).toString()),t?(this.adapter.removeClass(Up.INVALID),this.adapter.removeMenuClass(Up.MENU_INVALID)):(this.adapter.addClass(Up.INVALID),this.adapter.addMenuClass(Up.MENU_INVALID)),this.syncHelperTextValidity(t)},e.prototype.isValid=function(){return this.useDefaultValidation&&this.adapter.hasClass(Up.REQUIRED)&&!this.adapter.hasClass(Up.DISABLED)?this.getSelectedIndex()!==Bp.UNSET_INDEX&&(0!==this.getSelectedIndex()||Boolean(this.getValue())):this.customValidity},e.prototype.setRequired=function(t){t?this.adapter.addClass(Up.REQUIRED):this.adapter.removeClass(Up.REQUIRED),this.adapter.setSelectAnchorAttr("aria-required",t.toString()),this.adapter.setLabelRequired(t)},e.prototype.getRequired=function(){return"true"===this.adapter.getSelectAnchorAttr("aria-required")},e.prototype.init=function(){var t=this.adapter.getAnchorElement();t&&(this.adapter.setMenuAnchorElement(t),this.adapter.setMenuAnchorCorner(Pp.BOTTOM_START)),this.adapter.setMenuWrapFocus(!1),this.setDisabled(this.adapter.hasClass(Up.DISABLED)),this.syncHelperTextValidity(!this.adapter.hasClass(Up.INVALID)),this.layout(),this.layoutOptions()},e.prototype.blur=function(){this.adapter.removeClass(Up.FOCUSED),this.layout(),this.adapter.deactivateBottomLine(),this.adapter.hasClass(Up.REQUIRED)&&this.useDefaultValidation&&this.setValid(this.isValid())},e.prototype.syncHelperTextValidity=function(t){if(this.helperText){this.helperText.setValidity(t);var e=this.helperText.isVisible(),n=this.helperText.getId();e&&n?this.adapter.setSelectAnchorAttr(Vp.ARIA_DESCRIBEDBY,n):this.adapter.removeSelectAnchorAttr(Vp.ARIA_DESCRIBEDBY)}},e.prototype.setClickDebounceTimeout=function(){var t=this;clearTimeout(this.clickDebounceTimeout),this.clickDebounceTimeout=setTimeout((function(){t.recentlyClicked=!1}),Bp.CLICK_DEBOUNCE_TIMEOUT_MS),this.recentlyClicked=!0},e}(np),Hp=window,Wp=Hp.ShadowRoot&&(void 0===Hp.ShadyCSS||Hp.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Yp=Symbol(),Kp=new WeakMap,Xp=function(){return Mr((function t(e,n,i){if(zr(this,t),this._$cssResult$=!0,i!==Yp)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=n}),[{key:"styleSheet",get:function(){var t=this.o,e=this.t;if(Wp&&void 0===t){var n=void 0!==e&&1===e.length;n&&(t=Kp.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&Kp.set(e,t))}return t}},{key:"toString",value:function(){return this.cssText}}])}(),qp=Wp?function(t){return t}:function(t){return t instanceof CSSStyleSheet?function(t){var e,n="",i=Or(t.cssRules);try{for(i.s();!(e=i.n()).done;){n+=e.value.cssText}}catch(t){i.e(t)}finally{i.f()}return function(t){return new Xp("string"==typeof t?t:t+"",void 0,Yp)}(n)}(t):t},Gp=window,Zp=Gp.trustedTypes,Jp=Zp?Zp.emptyScript:"",Qp=Gp.reactiveElementPolyfillSupport,tm={toAttribute:function(t,e){switch(e){case Boolean:t=t?Jp:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute:function(t,e){var n=t;switch(e){case Boolean:n=null!==t;break;case Number:n=null===t?null:Number(t);break;case Object:case Array:try{n=JSON.parse(t)}catch(t){n=null}}return n}},em=function(t,e){return e!==t&&(e==e||t==t)},nm={attribute:!0,type:String,converter:tm,reflect:!1,hasChanged:em},im="finalized",om=function(t){function e(){var t;return zr(this,e),(t=br(this,e))._$Ei=new Map,t.isUpdatePending=!1,t.hasUpdated=!1,t._$El=null,t._$Eu(),t}return wr(e,Cr(HTMLElement)),Mr(e,[{key:"_$Eu",value:function(){var t,e=this;this._$E_=new Promise((function(t){return e.enableUpdating=t})),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((function(t){return t(e)}))}},{key:"addController",value:function(t){var e,n;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(n=t.hostConnected)||void 0===n||n.call(t))}},{key:"removeController",value:function(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}},{key:"_$Eg",value:function(){var t=this;this.constructor.elementProperties.forEach((function(e,n){t.hasOwnProperty(n)&&(t._$Ei.set(n,t[n]),delete t[n])}))}},{key:"createRenderRoot",value:function(){var t,e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return function(t,e){Wp?t.adoptedStyleSheets=e.map((function(t){return t instanceof CSSStyleSheet?t:t.styleSheet})):e.forEach((function(e){var n=document.createElement("style"),i=Hp.litNonce;void 0!==i&&n.setAttribute("nonce",i),n.textContent=e.cssText,t.appendChild(n)}))}(e,this.constructor.elementStyles),e}},{key:"connectedCallback",value:function(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((function(t){var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}},{key:"enableUpdating",value:function(t){}},{key:"disconnectedCallback",value:function(){var t;null===(t=this._$ES)||void 0===t||t.forEach((function(t){var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}},{key:"attributeChangedCallback",value:function(t,e,n){this._$AK(t,n)}},{key:"_$EO",value:function(t,e){var n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:nm,o=this.constructor._$Ep(t,i);if(void 0!==o&&!0===i.reflect){var r=(void 0!==(null===(n=i.converter)||void 0===n?void 0:n.toAttribute)?i.converter:tm).toAttribute(e,i.type);this._$El=t,null==r?this.removeAttribute(o):this.setAttribute(o,r),this._$El=null}}},{key:"_$AK",value:function(t,e){var n,i=this.constructor,o=i._$Ev.get(t);if(void 0!==o&&this._$El!==o){var r=i.getPropertyOptions(o),a="function"==typeof r.converter?{fromAttribute:r.converter}:void 0!==(null===(n=r.converter)||void 0===n?void 0:n.fromAttribute)?r.converter:tm;this._$El=o,this[o]=a.fromAttribute(e,r.type),this._$El=null}}},{key:"requestUpdate",value:function(t,e,n){var i=!0;void 0!==t&&(((n=n||this.constructor.getPropertyOptions(t)).hasChanged||em)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===n.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,n))):i=!1),!this.isUpdatePending&&i&&(this._$E_=this._$Ej())}},{key:"_$Ej",value:(n=yr(gr().mark((function t(){var e;return gr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.isUpdatePending=!0,t.prev=1,t.next=4,this._$E_;case 4:t.next=9;break;case 6:t.prev=6,t.t0=t.catch(1),Promise.reject(t.t0);case 9:if(e=this.scheduleUpdate(),t.t1=null!=e,!t.t1){t.next=14;break}return t.next=14,e;case 14:return t.abrupt("return",!this.isUpdatePending);case 15:case"end":return t.stop()}}),t,this,[[1,6]])}))),function(){return n.apply(this,arguments)})},{key:"scheduleUpdate",value:function(){return this.performUpdate()}},{key:"performUpdate",value:function(){var t,e=this;if(this.isUpdatePending){this.hasUpdated,this._$Ei&&(this._$Ei.forEach((function(t,n){return e[n]=t})),this._$Ei=void 0);var n=!1,i=this._$AL;try{(n=this.shouldUpdate(i))?(this.willUpdate(i),null===(t=this._$ES)||void 0===t||t.forEach((function(t){var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$Ek()}catch(t){throw n=!1,this._$Ek(),t}n&&this._$AE(i)}}},{key:"willUpdate",value:function(t){}},{key:"_$AE",value:function(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((function(t){var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}},{key:"_$Ek",value:function(){this._$AL=new Map,this.isUpdatePending=!1}},{key:"updateComplete",get:function(){return this.getUpdateComplete()}},{key:"getUpdateComplete",value:function(){return this._$E_}},{key:"shouldUpdate",value:function(t){return!0}},{key:"update",value:function(t){var e=this;void 0!==this._$EC&&(this._$EC.forEach((function(t,n){return e._$EO(n,e[n],t)})),this._$EC=void 0),this._$Ek()}},{key:"updated",value:function(t){}},{key:"firstUpdated",value:function(t){}}],[{key:"addInitializer",value:function(t){var e;this.finalize(),(null!==(e=this.h)&&void 0!==e?e:this.h=[]).push(t)}},{key:"observedAttributes",get:function(){var t=this;this.finalize();var e=[];return this.elementProperties.forEach((function(n,i){var o=t._$Ep(i,n);void 0!==o&&(t._$Ev.set(o,i),e.push(o))})),e}},{key:"createProperty",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:nm;if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){var n="symbol"==Pr(t)?Symbol():"__"+t,i=this.getPropertyDescriptor(t,n,e);void 0!==i&&Object.defineProperty(this.prototype,t,i)}}},{key:"getPropertyDescriptor",value:function(t,e,n){return{get:function(){return this[e]},set:function(i){var o=this[t];this[e]=i,this.requestUpdate(t,o,n)},configurable:!0,enumerable:!0}}},{key:"getPropertyOptions",value:function(t){return this.elementProperties.get(t)||nm}},{key:"finalize",value:function(){if(this.hasOwnProperty(im))return!1;this[im]=!0;var t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=hr(t.h)),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){var e,n=this.properties,i=Or([].concat(hr(Object.getOwnPropertyNames(n)),hr(Object.getOwnPropertySymbols(n))));try{for(i.s();!(e=i.n()).done;){var o=e.value;this.createProperty(o,n[o])}}catch(t){i.e(t)}finally{i.f()}}return this.elementStyles=this.finalizeStyles(this.styles),!0}},{key:"finalizeStyles",value:function(t){var e=[];if(Array.isArray(t)){var n,i=Or(new Set(t.flat(1/0).reverse()));try{for(i.s();!(n=i.n()).done;){var o=n.value;e.unshift(qp(o))}}catch(t){i.e(t)}finally{i.f()}}else void 0!==t&&e.push(qp(t));return e}},{key:"_$Ep",value:function(t,e){var n=e.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof t?t.toLowerCase():void 0}}]);var n}();om[im]=!0,om.elementProperties=new Map,om.elementStyles=[],om.shadowRootOptions={mode:"open"},null==Qp||Qp({ReactiveElement:om}),(null!==(Np=Gp.reactiveElementVersions)&&void 0!==Np?Np:Gp.reactiveElementVersions=[]).push("1.6.3");var rm=window,am=rm.trustedTypes,lm=am?am.createPolicy("lit-html",{createHTML:function(t){return t}}):void 0,sm="$lit$",cm="lit$".concat((Math.random()+"").slice(9),"$"),dm="?"+cm,um="<".concat(dm,">"),hm=document,pm=function(){return hm.createComment("")},mm=function(t){return null===t||"object"!=Pr(t)&&"function"!=typeof t},fm=Array.isArray,vm="[ \t\n\f\r]",gm=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_m=/-->/g,ym=/>/g,bm=RegExp(">|".concat(vm,"(?:([^\\s\"'>=/]+)(").concat(vm,"*=").concat(vm,"*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)"),"g"),km=/'/g,xm=/"/g,wm=/^(?:script|style|textarea|title)$/i,Cm=function(t){return function(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o":"",a=gm,l=0;l"===d[0]?(a=null!=n?n:gm,u=-1):void 0===d[1]?u=-2:(u=a.lastIndex-d[2].length,c=d[1],a=void 0===d[3]?bm:'"'===d[3]?xm:km):a===xm||a===km?a=bm:a===_m||a===ym?a=gm:(a=bm,n=void 0);var p=a===bm&&t[l+1].startsWith("/>")?" ":"";r+=a===gm?s+um:u>=0?(o.push(c),s.slice(0,u)+sm+s.slice(u)+cm+p):s+cm+(-2===u?(o.push(void 0),l):p)}return[Tm(t,r+(t[i]||">")+(2===e?"":"")),o]}(o,r),u=mr(d,2),h=u[0],p=u[1];if(this.el=t.createElement(h,n),Om.currentNode=this.el.content,2===r){var m=this.el.content,f=m.firstChild;f.remove(),m.append.apply(m,hr(f.childNodes))}for(;null!==(i=Om.nextNode())&&c.length0){i.textContent=am?am.emptyScript:"";for(var O=0;O2&&void 0!==arguments[2]?arguments[2]:t,l=arguments.length>3?arguments[3]:void 0;if(e===Em)return e;var s=void 0!==l?null===(n=a._$Co)||void 0===n?void 0:n[l]:a._$Cl,c=mm(e)?void 0:e._$litDirective$;return(null==s?void 0:s.constructor)!==c&&(null===(i=null==s?void 0:s._$AO)||void 0===i||i.call(s,!1),void 0===c?s=void 0:(s=new c(t))._$AT(t,a,l),void 0!==l?(null!==(o=(r=a)._$Co)&&void 0!==o?o:r._$Co=[])[l]=s:a._$Cl=s),void 0!==s&&(e=zm(t,s._$AS(t,e.values),s,l)),e}var $m=function(){return Mr((function t(e,n){zr(this,t),this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=n}),[{key:"parentNode",get:function(){return this._$AM.parentNode}},{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"u",value:function(t){var e,n=this._$AD,i=n.el.content,o=n.parts,r=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:hm).importNode(i,!0);Om.currentNode=r;for(var a=Om.nextNode(),l=0,s=0,c=o[0];void 0!==c;){if(l===c.index){var d=void 0;2===c.type?d=new Mm(a,a.nextSibling,this,t):1===c.type?d=new c.ctor(a,c.name,c.strings,this,t):6===c.type&&(d=new Rm(a,this,t)),this._$AV.push(d),c=o[++s]}l!==(null==c?void 0:c.index)&&(a=Om.nextNode(),l++)}return Om.currentNode=hm,r}},{key:"v",value:function(t){var e,n=0,i=Or(this._$AV);try{for(i.s();!(e=i.n()).done;){var o=e.value;void 0!==o&&(void 0!==o.strings?(o._$AI(t,o,n),n+=o.strings.length-2):o._$AI(t[n])),n++}}catch(t){i.e(t)}finally{i.f()}}}])}(),Mm=function(){function t(e,n,i,o){var r;zr(this,t),this.type=2,this._$AH=Am,this._$AN=void 0,this._$AA=e,this._$AB=n,this._$AM=i,this.options=o,this._$Cp=null===(r=null==o?void 0:o.isConnected)||void 0===r||r}return Mr(t,[{key:"_$AU",get:function(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cp}},{key:"parentNode",get:function(){var t=this._$AA.parentNode,e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}},{key:"startNode",get:function(){return this._$AA}},{key:"endNode",get:function(){return this._$AB}},{key:"_$AI",value:function(t){t=zm(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this),mm(t)?t===Am||null==t||""===t?(this._$AH!==Am&&this._$AR(),this._$AH=Am):t!==this._$AH&&t!==Em&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):function(t){return fm(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator])}(t)?this.T(t):this._(t)}},{key:"k",value:function(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}},{key:"$",value:function(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}},{key:"_",value:function(t){this._$AH!==Am&&mm(this._$AH)?this._$AA.nextSibling.data=t:this.$(hm.createTextNode(t)),this._$AH=t}},{key:"g",value:function(t){var e,n=t.values,i=t._$litType$,o="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=Im.createElement(Tm(i.h,i.h[0]),this.options)),i);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===o)this._$AH.v(n);else{var r=new $m(o,this),a=r.u(this.options);r.v(n),this.$(a),this._$AH=r}}},{key:"_$AC",value:function(t){var e=Sm.get(t.strings);return void 0===e&&Sm.set(t.strings,e=new Im(t)),e}},{key:"T",value:function(e){fm(this._$AH)||(this._$AH=[],this._$AR());var n,i,o=this._$AH,r=0,a=Or(e);try{for(a.s();!(i=a.n()).done;){var l=i.value;r===o.length?o.push(n=new t(this.k(pm()),this.k(pm()),this,this.options)):n=o[r],n._$AI(l),r++}}catch(t){a.e(t)}finally{a.f()}r0&&void 0!==arguments[0]?arguments[0]:this._$AA.nextSibling,n=arguments.length>1?arguments[1]:void 0;for(null===(t=this._$AP)||void 0===t||t.call(this,!1,!0,n);e&&e!==this._$AB;){var i=e.nextSibling;e.remove(),e=i}}},{key:"setConnected",value:function(t){var e;void 0===this._$AM&&(this._$Cp=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}])}(),jm=function(){return Mr((function t(e,n,i,o,r){zr(this,t),this.type=1,this._$AH=Am,this._$AN=void 0,this.element=e,this.name=n,this._$AM=o,this.options=r,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=Am}),[{key:"tagName",get:function(){return this.element.tagName}},{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AI",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=this.strings,r=!1;if(void 0===o)t=zm(this,t,e,0),(r=!mm(t)||t!==this._$AH&&t!==Em)&&(this._$AH=t);else{var a,l,s=t;for(t=o[0],a=0;a1&&void 0!==arguments[1]?arguments[1]:this,0))&&void 0!==e?e:Am)!==Em){var n=this._$AH,i=t===Am&&n!==Am||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,o=t!==Am&&(n===Am||i);i&&this.element.removeEventListener(this.name,this,n),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}}},{key:"handleEvent",value:function(t){var e,n;"function"==typeof this._$AH?this._$AH.call(null!==(n=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==n?n:this.element,t):this._$AH.handleEvent(t)}}])}(),Rm=function(){return Mr((function t(e,n,i){zr(this,t),this.element=e,this.type=6,this._$AN=void 0,this._$AM=n,this.options=i}),[{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AI",value:function(t){zm(this,t)}}])}(),Um=rm.litHtmlPolyfillSupport;null==Um||Um(Im,Mm),(null!==(Rp=rm.litHtmlVersions)&&void 0!==Rp?Rp:rm.litHtmlVersions=[]).push("2.8.0");var Vm,Bm,Fm=function(t){function e(){var t;return zr(this,e),(t=br(this,e,arguments)).renderOptions={host:xr(t)},t._$Do=void 0,t}return wr(e,om),Mr(e,[{key:"createRenderRoot",value:function(){var t,n,i=dr(e,"createRenderRoot",this,3)([]);return null!==(t=(n=this.renderOptions).renderBefore)&&void 0!==t||(n.renderBefore=i.firstChild),i}},{key:"update",value:function(t){var n=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),dr(e,"update",this,3)([t]),this._$Do=function(t,e,n){var i,o,r=null!==(i=null==n?void 0:n.renderBefore)&&void 0!==i?i:e,a=r._$litPart$;if(void 0===a){var l=null!==(o=null==n?void 0:n.renderBefore)&&void 0!==o?o:null;r._$litPart$=a=new Mm(e.insertBefore(pm(),l),l,void 0,null!=n?n:{})}return a._$AI(t),a}(n,this.renderRoot,this.renderOptions)}},{key:"connectedCallback",value:function(){var t;dr(e,"connectedCallback",this,3)([]),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}},{key:"disconnectedCallback",value:function(){var t;dr(e,"disconnectedCallback",this,3)([]),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}},{key:"render",value:function(){return Em}}])}();
/**
* @license
- * Copyright 2020 Google Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */Ir.add(fr),Ir.add(gr),Ir.add(_r),Ir.add(vr),Ir.add(br),Ir.add(yr),Ir.add(xr),Ir.add(wr),Ir.add(kr),Ir.add(Cr),Ir.add($r),Ir.add(Er),Ir.add(Ar),Ir.add(Sr);var Tr=8,zr=13,Or=32,Mr=33,jr=34,Dr=35,Lr=36,Pr=37,Nr=38,Rr=39,Fr=40,Vr=46,Br=27,Ur=9,Hr=new Map;Hr.set(Tr,fr),Hr.set(zr,gr),Hr.set(Or,_r),Hr.set(Mr,vr),Hr.set(jr,br),Hr.set(Dr,yr),Hr.set(Lr,xr),Hr.set(Pr,wr),Hr.set(Nr,kr),Hr.set(Rr,Cr),Hr.set(Fr,$r),Hr.set(Vr,Er),Hr.set(Br,Ar),Hr.set(Ur,Sr);var Yr,Wr,Xr=new Set;function Kr(t){var e=t.key;if(Ir.has(e))return e;var i=Hr.get(t.keyCode);return i||pr}
+ * Copyright 2017 Google LLC
+ * SPDX-License-Identifier: BSD-3-Clause
+ */Fm.finalized=!0,Fm._$litElement$=!0,null===(Vm=globalThis.litElementHydrateSupport)||void 0===Vm||Vm.call(globalThis,{LitElement:Fm});var Hm=globalThis.litElementPolyfillSupport;null==Hm||Hm({LitElement:Fm}),(null!==(Bm=globalThis.litElementVersions)&&void 0!==Bm?Bm:globalThis.litElementVersions=[]).push("3.3.3");
/**
* @license
- * Copyright 2018 Google Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */Xr.add(vr),Xr.add(br),Xr.add(yr),Xr.add(xr),Xr.add(wr),Xr.add(kr),Xr.add(Cr),Xr.add($r),function(t){t[t.BOTTOM=1]="BOTTOM",t[t.CENTER=2]="CENTER",t[t.RIGHT=4]="RIGHT",t[t.FLIP_RTL=8]="FLIP_RTL"}(Yr||(Yr={})),function(t){t[t.TOP_LEFT=0]="TOP_LEFT",t[t.TOP_RIGHT=4]="TOP_RIGHT",t[t.BOTTOM_LEFT=1]="BOTTOM_LEFT",t[t.BOTTOM_RIGHT=5]="BOTTOM_RIGHT",t[t.TOP_START=8]="TOP_START",t[t.TOP_END=12]="TOP_END",t[t.BOTTOM_START=9]="BOTTOM_START",t[t.BOTTOM_END=13]="BOTTOM_END"}(Wr||(Wr={}));
+ * Copyright 2017 Google LLC
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+var Wm=function(t,e){return"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?sr(sr({},e),{},{finisher:function(n){n.createProperty(e.key,t)}}):{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer:function(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher:function(n){n.createProperty(e.key,t)}}},Ym=function(t,e,n){e.constructor.createProperty(n,t)};function Km(t){return function(e,n){return void 0!==n?Ym(t,e,n):Wm(t,e)}}
/**
* @license
- * Copyright 2016 Google Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-var qr={ACTIVATED:"mdc-select--activated",DISABLED:"mdc-select--disabled",FOCUSED:"mdc-select--focused",INVALID:"mdc-select--invalid",MENU_INVALID:"mdc-select__menu--invalid",OUTLINED:"mdc-select--outlined",REQUIRED:"mdc-select--required",ROOT:"mdc-select",WITH_LEADING_ICON:"mdc-select--with-leading-icon"},Gr={ARIA_CONTROLS:"aria-controls",ARIA_DESCRIBEDBY:"aria-describedby",ARIA_SELECTED_ATTR:"aria-selected",CHANGE_EVENT:"MDCSelect:change",HIDDEN_INPUT_SELECTOR:'input[type="hidden"]',LABEL_SELECTOR:".mdc-floating-label",LEADING_ICON_SELECTOR:".mdc-select__icon",LINE_RIPPLE_SELECTOR:".mdc-line-ripple",MENU_SELECTOR:".mdc-select__menu",OUTLINE_SELECTOR:".mdc-notched-outline",SELECTED_TEXT_SELECTOR:".mdc-select__selected-text",SELECT_ANCHOR_SELECTOR:".mdc-select__anchor",VALUE_ATTR:"data-value"},Zr={LABEL_SCALE:.75,UNSET_INDEX:-1,CLICK_DEBOUNCE_TIMEOUT_MS:330},Jr=function(t){function e(i,n){void 0===n&&(n={});var r=t.call(this,o(o({},e.defaultAdapter),i))||this;return r.disabled=!1,r.isMenuOpen=!1,r.useDefaultValidation=!0,r.customValidity=!0,r.lastSelectedIndex=Zr.UNSET_INDEX,r.clickDebounceTimeout=0,r.recentlyClicked=!1,r.leadingIcon=n.leadingIcon,r.helperText=n.helperText,r}return i(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return qr},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return Zr},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return Gr},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},activateBottomLine:function(){},deactivateBottomLine:function(){},getSelectedIndex:function(){return-1},setSelectedIndex:function(){},hasLabel:function(){return!1},floatLabel:function(){},getLabelWidth:function(){return 0},setLabelRequired:function(){},hasOutline:function(){return!1},notchOutline:function(){},closeOutline:function(){},setRippleCenter:function(){},notifyChange:function(){},setSelectedText:function(){},isSelectAnchorFocused:function(){return!1},getSelectAnchorAttr:function(){return""},setSelectAnchorAttr:function(){},removeSelectAnchorAttr:function(){},addMenuClass:function(){},removeMenuClass:function(){},openMenu:function(){},closeMenu:function(){},getAnchorElement:function(){return null},setMenuAnchorElement:function(){},setMenuAnchorCorner:function(){},setMenuWrapFocus:function(){},focusMenuItemAtIndex:function(){},getMenuItemCount:function(){return 0},getMenuItemValues:function(){return[]},getMenuItemTextAtIndex:function(){return""},isTypeaheadInProgress:function(){return!1},typeaheadMatchItem:function(){return-1}}},enumerable:!1,configurable:!0}),e.prototype.getSelectedIndex=function(){return this.adapter.getSelectedIndex()},e.prototype.setSelectedIndex=function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1),t>=this.adapter.getMenuItemCount()||(t===Zr.UNSET_INDEX?this.adapter.setSelectedText(""):this.adapter.setSelectedText(this.adapter.getMenuItemTextAtIndex(t).trim()),this.adapter.setSelectedIndex(t),e&&this.adapter.closeMenu(),i||this.lastSelectedIndex===t||this.handleChange(),this.lastSelectedIndex=t)},e.prototype.setValue=function(t,e){void 0===e&&(e=!1);var i=this.adapter.getMenuItemValues().indexOf(t);this.setSelectedIndex(i,!1,e)},e.prototype.getValue=function(){var t=this.adapter.getSelectedIndex(),e=this.adapter.getMenuItemValues();return t!==Zr.UNSET_INDEX?e[t]:""},e.prototype.getDisabled=function(){return this.disabled},e.prototype.setDisabled=function(t){this.disabled=t,this.disabled?(this.adapter.addClass(qr.DISABLED),this.adapter.closeMenu()):this.adapter.removeClass(qr.DISABLED),this.leadingIcon&&this.leadingIcon.setDisabled(this.disabled),this.disabled?this.adapter.removeSelectAnchorAttr("tabindex"):this.adapter.setSelectAnchorAttr("tabindex","0"),this.adapter.setSelectAnchorAttr("aria-disabled",this.disabled.toString())},e.prototype.openMenu=function(){this.adapter.addClass(qr.ACTIVATED),this.adapter.openMenu(),this.isMenuOpen=!0,this.adapter.setSelectAnchorAttr("aria-expanded","true")},e.prototype.setHelperTextContent=function(t){this.helperText&&this.helperText.setContent(t)},e.prototype.layout=function(){if(this.adapter.hasLabel()){var t=this.getValue().length>0,e=this.adapter.hasClass(qr.FOCUSED),i=t||e,o=this.adapter.hasClass(qr.REQUIRED);this.notchOutline(i),this.adapter.floatLabel(i),this.adapter.setLabelRequired(o)}},e.prototype.layoutOptions=function(){var t=this.adapter.getMenuItemValues().indexOf(this.getValue());this.setSelectedIndex(t,!1,!0)},e.prototype.handleMenuOpened=function(){if(0!==this.adapter.getMenuItemValues().length){var t=this.getSelectedIndex(),e=t>=0?t:0;this.adapter.focusMenuItemAtIndex(e)}},e.prototype.handleMenuClosing=function(){this.adapter.setSelectAnchorAttr("aria-expanded","false")},e.prototype.handleMenuClosed=function(){this.adapter.removeClass(qr.ACTIVATED),this.isMenuOpen=!1,this.adapter.isSelectAnchorFocused()||this.blur()},e.prototype.handleChange=function(){this.layout(),this.adapter.notifyChange(this.getValue()),this.adapter.hasClass(qr.REQUIRED)&&this.useDefaultValidation&&this.setValid(this.isValid())},e.prototype.handleMenuItemAction=function(t){this.setSelectedIndex(t,!0)},e.prototype.handleFocus=function(){this.adapter.addClass(qr.FOCUSED),this.layout(),this.adapter.activateBottomLine()},e.prototype.handleBlur=function(){this.isMenuOpen||this.blur()},e.prototype.handleClick=function(t){this.disabled||this.recentlyClicked||(this.setClickDebounceTimeout(),this.isMenuOpen?this.adapter.closeMenu():(this.adapter.setRippleCenter(t),this.openMenu()))},e.prototype.handleKeydown=function(t){if(!this.isMenuOpen&&this.adapter.hasClass(qr.FOCUSED)){var e=Kr(t)===gr,i=Kr(t)===_r,o=Kr(t)===kr,n=Kr(t)===$r;if(!(t.ctrlKey||t.metaKey)&&(!i&&t.key&&1===t.key.length||i&&this.adapter.isTypeaheadInProgress())){var r=i?" ":t.key,a=this.adapter.typeaheadMatchItem(r,this.getSelectedIndex());return a>=0&&this.setSelectedIndex(a),void t.preventDefault()}(e||i||o||n)&&(this.openMenu(),t.preventDefault())}},e.prototype.notchOutline=function(t){if(this.adapter.hasOutline()){var e=this.adapter.hasClass(qr.FOCUSED);if(t){var i=Zr.LABEL_SCALE,o=this.adapter.getLabelWidth()*i;this.adapter.notchOutline(o)}else e||this.adapter.closeOutline()}},e.prototype.setLeadingIconAriaLabel=function(t){this.leadingIcon&&this.leadingIcon.setAriaLabel(t)},e.prototype.setLeadingIconContent=function(t){this.leadingIcon&&this.leadingIcon.setContent(t)},e.prototype.getUseDefaultValidation=function(){return this.useDefaultValidation},e.prototype.setUseDefaultValidation=function(t){this.useDefaultValidation=t},e.prototype.setValid=function(t){this.useDefaultValidation||(this.customValidity=t),this.adapter.setSelectAnchorAttr("aria-invalid",(!t).toString()),t?(this.adapter.removeClass(qr.INVALID),this.adapter.removeMenuClass(qr.MENU_INVALID)):(this.adapter.addClass(qr.INVALID),this.adapter.addMenuClass(qr.MENU_INVALID)),this.syncHelperTextValidity(t)},e.prototype.isValid=function(){return this.useDefaultValidation&&this.adapter.hasClass(qr.REQUIRED)&&!this.adapter.hasClass(qr.DISABLED)?this.getSelectedIndex()!==Zr.UNSET_INDEX&&(0!==this.getSelectedIndex()||Boolean(this.getValue())):this.customValidity},e.prototype.setRequired=function(t){t?this.adapter.addClass(qr.REQUIRED):this.adapter.removeClass(qr.REQUIRED),this.adapter.setSelectAnchorAttr("aria-required",t.toString()),this.adapter.setLabelRequired(t)},e.prototype.getRequired=function(){return"true"===this.adapter.getSelectAnchorAttr("aria-required")},e.prototype.init=function(){var t=this.adapter.getAnchorElement();t&&(this.adapter.setMenuAnchorElement(t),this.adapter.setMenuAnchorCorner(Wr.BOTTOM_START)),this.adapter.setMenuWrapFocus(!1),this.setDisabled(this.adapter.hasClass(qr.DISABLED)),this.syncHelperTextValidity(!this.adapter.hasClass(qr.INVALID)),this.layout(),this.layoutOptions()},e.prototype.blur=function(){this.adapter.removeClass(qr.FOCUSED),this.layout(),this.adapter.deactivateBottomLine(),this.adapter.hasClass(qr.REQUIRED)&&this.useDefaultValidation&&this.setValid(this.isValid())},e.prototype.syncHelperTextValidity=function(t){if(this.helperText){this.helperText.setValidity(t);var e=this.helperText.isVisible(),i=this.helperText.getId();e&&i?this.adapter.setSelectAnchorAttr(Gr.ARIA_DESCRIBEDBY,i):this.adapter.removeSelectAnchorAttr(Gr.ARIA_DESCRIBEDBY)}},e.prototype.setClickDebounceTimeout=function(){var t=this;clearTimeout(this.clickDebounceTimeout),this.clickDebounceTimeout=setTimeout((function(){t.recentlyClicked=!1}),Zr.CLICK_DEBOUNCE_TIMEOUT_MS),this.recentlyClicked=!0},e}(mr);
+ * Copyright 2017 Google LLC
+ * SPDX-License-Identifier: BSD-3-Clause
+ */function Xm(t){return Km(sr(sr({},t),{},{state:!0}))}
/**
* @license
- * Copyright 2018 Google LLC
+ * Copyright 2017 Google LLC
+ * SPDX-License-Identifier: BSD-3-Clause
+ */var qm,Gm=function(t){var e=t.finisher,n=t.descriptor;return function(t,i){var o;if(void 0===i){var r=null!==(o=t.originalKey)&&void 0!==o?o:t.key,a=null!=n?{kind:"method",placement:"prototype",key:r,descriptor:n(t.key)}:sr(sr({},t),{},{key:r});return null!=e&&(a.finisher=function(t){e(t,r)}),a}var l=t.constructor;void 0!==n&&Object.defineProperty(t,i,n(i)),null==e||e(l,i)}};
+/**
+ * @license
+ * Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
-const Qr=He(class extends Ye{constructor(t){var e;if(super(t),t.type!==Ve||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var i,o;if(void 0===this.it){this.it=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(i=this.nt)||void 0===i?void 0:i.has(t))&&this.it.add(t);return this.render(e)}const n=t.element.classList;this.it.forEach((t=>{t in e||(n.remove(t),this.it.delete(t))}));for(const t in e){const i=!!e[t];i===this.it.has(t)||(null===(o=this.nt)||void 0===o?void 0:o.has(t))||(i?(n.add(t),this.it.add(t)):(n.remove(t),this.it.delete(t)))}return X}}),ta=t=>null!=t?t:K
/**
* @license
- * Copyright 2020 Google LLC
- * SPDX-License-Identifier: Apache-2.0
- */,ea=(t={})=>{const e={};for(const i in t)e[i]=t[i];return Object.assign({badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:!0,valueMissing:!1},e)};
+ * Copyright 2017 Google LLC
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+function Zm(t,e){return Gm({descriptor:function(e){var n={get:function(){var e,n;return null!==(n=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(t))&&void 0!==n?n:null},enumerable:!0,configurable:!0};return n}})}
/**
* @license
- * Copyright 2018 Google LLC
+ * Copyright 2021 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
- */class ia extends or{constructor(){super(...arguments),this.mdcFoundationClass=Jr,this.disabled=!1,this.outlined=!1,this.label="",this.outlineOpen=!1,this.outlineWidth=0,this.value="",this.name="",this.selectedText="",this.icon="",this.menuOpen=!1,this.helper="",this.validateOnInitialRender=!1,this.validationMessage="",this.required=!1,this.naturalMenuWidth=!1,this.isUiValid=!0,this.fixedMenuPosition=!1,this.typeaheadState={bufferClearTimeout:0,currentFirstChar:"",sortedIndexCursor:0,typeaheadBuffer:""},this.sortedIndexByFirstChar=new Map,this.menuElement_=null,this.listeners=[],this.onBodyClickBound=()=>{},this._menuUpdateComplete=null,this.valueSetDirectly=!1,this.validityTransform=null,this._validity=ea()}get items(){return this.menuElement_||(this.menuElement_=this.menuElement),this.menuElement_?this.menuElement_.items:[]}get selected(){const t=this.menuElement;return t?t.selected:null}get index(){const t=this.menuElement;return t?t.index:-1}get shouldRenderHelperText(){return!!this.helper||!!this.validationMessage}get validity(){return this._checkValidity(this.value),this._validity}render(){const t={"mdc-select--disabled":this.disabled,"mdc-select--no-label":!this.label,"mdc-select--filled":!this.outlined,"mdc-select--outlined":this.outlined,"mdc-select--with-leading-icon":!!this.icon,"mdc-select--required":this.required,"mdc-select--invalid":!this.isUiValid},e=this.label?"label":void 0,i=this.shouldRenderHelperText?"helper-text":void 0;return Y`
-
-
-
-
- ${this.renderRipple()}
- ${this.outlined?this.renderOutline():this.renderLabel()}
- ${this.renderLeadingIcon()}
-
- ${this.selectedText}
-
-
-
-
- ${this.renderLineRipple()}
-
- ${this.renderMenu()}
-
- ${this.renderHelperText()}`}renderMenu(){const t=this.getMenuClasses();return Y`
-
- ${this.renderMenuContent()}
- `}getMenuClasses(){return{"mdc-select__menu":!0,"mdc-menu":!0,"mdc-menu-surface":!0,"mdc-select__menu--invalid":!this.isUiValid}}renderMenuContent(){return Y``}renderRipple(){return this.outlined?K:Y`
-
- `}renderOutline(){return this.outlined?Y`
-
- ${this.renderLabel()}
- `:K}renderLabel(){return this.label?Y`
- ${this.label}
- `:K}renderLeadingIcon(){return this.icon?Y`${this.icon}
`:K}renderLineRipple(){return this.outlined?K:Y`
-
- `}renderHelperText(){if(!this.shouldRenderHelperText)return K;const t=this.validationMessage&&!this.isUiValid;return Y`
- ${t?this.validationMessage:this.helper}
`}createAdapter(){return Object.assign(Object.assign({},Gn(this.mdcRoot)),{activateBottomLine:()=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.activate()},deactivateBottomLine:()=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.deactivate()},hasLabel:()=>!!this.label,floatLabel:t=>{this.labelElement&&this.labelElement.floatingLabelFoundation.float(t)},getLabelWidth:()=>this.labelElement?this.labelElement.floatingLabelFoundation.getWidth():0,setLabelRequired:t=>{this.labelElement&&this.labelElement.floatingLabelFoundation.setRequired(t)},hasOutline:()=>this.outlined,notchOutline:t=>{this.outlineElement&&!this.outlineOpen&&(this.outlineWidth=t,this.outlineOpen=!0)},closeOutline:()=>{this.outlineElement&&(this.outlineOpen=!1)},setRippleCenter:t=>{if(this.lineRippleElement){this.lineRippleElement.lineRippleFoundation.setRippleCenter(t)}},notifyChange:async t=>{if(!this.valueSetDirectly&&t===this.value)return;this.valueSetDirectly=!1,this.value=t,await this.updateComplete;const e=new Event("change",{bubbles:!0});this.dispatchEvent(e)},setSelectedText:t=>this.selectedText=t,isSelectAnchorFocused:()=>{const t=this.anchorElement;if(!t)return!1;return t.getRootNode().activeElement===t},getSelectAnchorAttr:t=>{const e=this.anchorElement;return e?e.getAttribute(t):null},setSelectAnchorAttr:(t,e)=>{const i=this.anchorElement;i&&i.setAttribute(t,e)},removeSelectAnchorAttr:t=>{const e=this.anchorElement;e&&e.removeAttribute(t)},openMenu:()=>{this.menuOpen=!0},closeMenu:()=>{this.menuOpen=!1},addMenuClass:()=>{},removeMenuClass:()=>{},getAnchorElement:()=>this.anchorElement,setMenuAnchorElement:()=>{},setMenuAnchorCorner:()=>{const t=this.menuElement;t&&(t.corner="BOTTOM_START")},setMenuWrapFocus:t=>{const e=this.menuElement;e&&(e.wrapFocus=t)},focusMenuItemAtIndex:t=>{const e=this.menuElement;if(!e)return;const i=e.items[t];i&&i.focus()},getMenuItemCount:()=>{const t=this.menuElement;return t?t.items.length:0},getMenuItemValues:()=>{const t=this.menuElement;if(!t)return[];return t.items.map((t=>t.value))},getMenuItemTextAtIndex:t=>{const e=this.menuElement;if(!e)return"";const i=e.items[t];return i?i.text:""},getSelectedIndex:()=>this.index,setSelectedIndex:()=>{},isTypeaheadInProgress:()=>qn(this.typeaheadState),typeaheadMatchItem:(t,e)=>{if(!this.menuElement)return-1;const i={focusItemAtIndex:t=>{this.menuElement.focusItemAtIndex(t)},focusedItemIndex:e||this.menuElement.getFocusedItemIndex(),nextChar:t,sortedIndexByFirstChar:this.sortedIndexByFirstChar,skipFocus:!1,isItemAtIndexDisabled:t=>this.items[t].disabled},o=Kn(i,this.typeaheadState);return-1!==o&&this.select(o),o}})}checkValidity(){const t=this._checkValidity(this.value);if(!t){const t=new Event("invalid",{bubbles:!1,cancelable:!0});this.dispatchEvent(t)}return t}reportValidity(){const t=this.checkValidity();return this.isUiValid=t,t}_checkValidity(t){const e=this.formElement.validity;let i=ea(e);if(this.validityTransform){const e=this.validityTransform(t,i);i=Object.assign(Object.assign({},i),e)}return this._validity=i,this._validity.valid}setCustomValidity(t){this.validationMessage=t,this.formElement.setCustomValidity(t)}async getUpdateComplete(){await this._menuUpdateComplete;return await super.getUpdateComplete()}async firstUpdated(){const t=this.menuElement;if(t&&(this._menuUpdateComplete=t.updateComplete,await this._menuUpdateComplete),super.firstUpdated(),this.mdcFoundation.isValid=()=>!0,this.mdcFoundation.setValid=()=>{},this.mdcFoundation.setDisabled(this.disabled),this.validateOnInitialRender&&this.reportValidity(),!this.selected){!this.items.length&&this.slotElement&&this.slotElement.assignedNodes({flatten:!0}).length&&(await new Promise((t=>requestAnimationFrame(t))),await this.layout());const t=this.items.length&&""===this.items[0].value;if(!this.value&&t)return void this.select(0);this.selectByValue(this.value)}this.sortedIndexByFirstChar=Xn(this.items.length,(t=>this.items[t].text))}onItemsUpdated(){this.sortedIndexByFirstChar=Xn(this.items.length,(t=>this.items[t].text))}select(t){const e=this.menuElement;e&&e.select(t)}selectByValue(t){let e=-1;for(let i=0;i0,n=i&&this.index{this.menuElement.focusItemAtIndex(t)},focusedItemIndex:e,isTargetListItem:!!i&&i.hasAttribute("mwc-list-item"),sortedIndexByFirstChar:this.sortedIndexByFirstChar,isItemAtIndexDisabled:t=>this.items[t].disabled};!function(t,e){var i=t.event,o=t.isTargetListItem,n=t.focusedItemIndex,r=t.focusItemAtIndex,a=t.sortedIndexByFirstChar,s=t.isItemAtIndexDisabled,l="ArrowLeft"===Dn(i),c="ArrowUp"===Dn(i),d="ArrowRight"===Dn(i),u="ArrowDown"===Dn(i),h="Home"===Dn(i),m="End"===Dn(i),p="Enter"===Dn(i),f="Spacebar"===Dn(i);i.altKey||i.ctrlKey||i.metaKey||l||c||d||u||h||m||p||(f||1!==i.key.length?f&&(o&&Wn(i),o&&qn(e)&&Kn({focusItemAtIndex:r,focusedItemIndex:n,nextChar:" ",sortedIndexByFirstChar:a,skipFocus:!1,isItemAtIndexDisabled:s},e)):(Wn(i),Kn({focusItemAtIndex:r,focusedItemIndex:n,nextChar:i.key.toLowerCase(),sortedIndexByFirstChar:a,skipFocus:!1,isItemAtIndexDisabled:s},e)))}
+ */null===(qm=window.HTMLSlotElement)||void 0===qm||qm.prototype.assignedElements;
/**
* @license
- * Copyright 2018 Google LLC
- * SPDX-License-Identifier: Apache-2.0
- */(o,this.typeaheadState)}async onSelected(t){this.mdcFoundation||await this.updateComplete,this.mdcFoundation.handleMenuItemAction(t.detail.index);const e=this.items[t.detail.index];e&&(this.value=e.value)}onOpened(){this.mdcFoundation&&(this.menuOpen=!0,this.mdcFoundation.handleMenuOpened())}onClosed(){this.mdcFoundation&&(this.menuOpen=!1,this.mdcFoundation.handleMenuClosed())}setFormData(t){this.name&&null!==this.selected&&t.append(this.name,this.value)}async layout(t=!0){this.mdcFoundation&&this.mdcFoundation.layout(),await this.updateComplete;const e=this.menuElement;e&&e.layout(t);const i=this.labelElement;if(!i)return void(this.outlineOpen=!1);const o=!!this.label&&!!this.value;if(i.floatingLabelFoundation.float(o),!this.outlined)return;this.outlineOpen=o,await this.updateComplete;const n=i.floatingLabelFoundation.getWidth();this.outlineOpen&&(this.outlineWidth=n)}async layoutOptions(){this.mdcFoundation&&this.mdcFoundation.layoutOptions()}}n([xt(".mdc-select")],ia.prototype,"mdcRoot",void 0),n([xt(".formElement")],ia.prototype,"formElement",void 0),n([xt("slot")],ia.prototype,"slotElement",void 0),n([xt("select")],ia.prototype,"nativeSelectElement",void 0),n([xt("input")],ia.prototype,"nativeInputElement",void 0),n([xt(".mdc-line-ripple")],ia.prototype,"lineRippleElement",void 0),n([xt(".mdc-floating-label")],ia.prototype,"labelElement",void 0),n([xt("mwc-notched-outline")],ia.prototype,"outlineElement",void 0),n([xt(".mdc-menu")],ia.prototype,"menuElement",void 0),n([xt(".mdc-select__anchor")],ia.prototype,"anchorElement",void 0),n([_t({type:Boolean,attribute:"disabled",reflect:!0}),nr((function(t){this.mdcFoundation&&this.mdcFoundation.setDisabled(t)}))],ia.prototype,"disabled",void 0),n([_t({type:Boolean}),nr((function(t,e){void 0!==e&&this.outlined!==e&&this.layout(!1)}))],ia.prototype,"outlined",void 0),n([_t({type:String}),nr((function(t,e){void 0!==e&&this.label!==e&&this.layout(!1)}))],ia.prototype,"label",void 0),n([vt()],ia.prototype,"outlineOpen",void 0),n([vt()],ia.prototype,"outlineWidth",void 0),n([_t({type:String}),nr((function(t){if(this.mdcFoundation){const e=null===this.selected&&!!t,i=this.selected&&this.selected.value!==t;(e||i)&&this.selectByValue(t),this.reportValidity()}}))],ia.prototype,"value",void 0),n([_t()],ia.prototype,"name",void 0),n([vt()],ia.prototype,"selectedText",void 0),n([_t({type:String})],ia.prototype,"icon",void 0),n([vt()],ia.prototype,"menuOpen",void 0),n([_t({type:String})],ia.prototype,"helper",void 0),n([_t({type:Boolean})],ia.prototype,"validateOnInitialRender",void 0),n([_t({type:String})],ia.prototype,"validationMessage",void 0),n([_t({type:Boolean})],ia.prototype,"required",void 0),n([_t({type:Boolean})],ia.prototype,"naturalMenuWidth",void 0),n([vt()],ia.prototype,"isUiValid",void 0),n([_t({type:Boolean})],ia.prototype,"fixedMenuPosition",void 0),n([yt({capture:!0})],ia.prototype,"handleTypeahead",null);
+ * Copyright 2017 Google LLC
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+var Jm=1,Qm=function(){return Mr((function t(e){zr(this,t)}),[{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AT",value:function(t,e,n){this._$Ct=t,this._$AM=e,this._$Ci=n}},{key:"_$AS",value:function(t,e){return this.update(t,e)}},{key:"update",value:function(t,e){return this.render.apply(this,hr(e))}}])}(),tf=function(t){return function(){for(var e=arguments.length,n=new Array(e),i=0;i2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");return n}return wr(e,Qm),Mr(e,[{key:"render",value:function(t){return" "+Object.keys(t).filter((function(e){return t[e]})).join(" ")+" "}},{key:"update",value:function(t,e){var n,i,o=this,r=mr(e,1)[0];if(void 0===this.it){for(var a in this.it=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((function(t){return""!==t})))),r)r[a]&&!(null===(n=this.nt)||void 0===n?void 0:n.has(a))&&this.it.add(a);return this.render(r)}var l=t.element.classList;for(var s in this.it.forEach((function(t){t in r||(l.remove(t),o.it.delete(t))})),r){var c=!!r[s];c===this.it.has(s)||(null===(i=this.nt)||void 0===i?void 0:i.has(s))||(c?(l.add(s),this.it.add(s)):(l.remove(s),this.it.delete(s)))}return Em}}])}()),ef=function(t){return null!=t?t:Am},nf=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e={};for(var n in t)e[n]=t[n];return Object.assign({badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:!0,valueMissing:!1},e)},of=function(t){function e(){var t;return zr(this,e),(t=br(this,e,arguments)).mdcFoundationClass=Fp,t.disabled=!1,t.outlined=!1,t.label="",t.outlineOpen=!1,t.outlineWidth=0,t.value="",t.name="",t.selectedText="",t.icon="",t.menuOpen=!1,t.helper="",t.validateOnInitialRender=!1,t.validationMessage="",t.required=!1,t.naturalMenuWidth=!1,t.isUiValid=!0,t.fixedMenuPosition=!1,t.typeaheadState={bufferClearTimeout:0,currentFirstChar:"",sortedIndexCursor:0,typeaheadBuffer:""},t.sortedIndexByFirstChar=new Map,t.menuElement_=null,t.listeners=[],t.onBodyClickBound=function(){},t._menuUpdateComplete=null,t.valueSetDirectly=!1,t.validityTransform=null,t._validity=nf(),t}return wr(e,Uh),Mr(e,[{key:"items",get:function(){return this.menuElement_||(this.menuElement_=this.menuElement),this.menuElement_?this.menuElement_.items:[]}},{key:"selected",get:function(){var t=this.menuElement;return t?t.selected:null}},{key:"index",get:function(){var t=this.menuElement;return t?t.index:-1}},{key:"shouldRenderHelperText",get:function(){return!!this.helper||!!this.validationMessage}},{key:"validity",get:function(){return this._checkValidity(this.value),this._validity}},{key:"render",value:function(){var t={"mdc-select--disabled":this.disabled,"mdc-select--no-label":!this.label,"mdc-select--filled":!this.outlined,"mdc-select--outlined":this.outlined,"mdc-select--with-leading-icon":!!this.icon,"mdc-select--required":this.required,"mdc-select--invalid":!this.isUiValid},e=this.label?"label":void 0,n=this.shouldRenderHelperText?"helper-text":void 0;return Cm(l||(l=or(['\n \n
\n \x3c!-- @ts-ignore --\x3e\n
\n
','\n \n
\n \n \n ',"\n
\n ","\n
\n ",""])),tf(t),this.name,this.value,this.disabled,this.required,this.menuOpen,!this.isUiValid,ef(e),this.required,ef(n),this.onClick,this.onFocus,this.onBlur,this.onKeydown,this.renderRipple(),this.outlined?this.renderOutline():this.renderLabel(),this.renderLeadingIcon(),this.selectedText,this.renderLineRipple(),this.renderMenu(),this.renderHelperText())}},{key:"renderMenu",value:function(){var t=this.getMenuClasses();return Cm(s||(s=or(['\n \n '])))}},{key:"renderOutline",value:function(){return this.outlined?Cm(u||(u=or(["\n \n ',"\n "])),this.outlineWidth,this.outlineOpen,this.renderLabel()):Am}},{key:"renderLabel",value:function(){return this.label?Cm(h||(h=or(["\n ',"\n "])),Xh(this.label),this.label):Am}},{key:"renderLeadingIcon",value:function(){return this.icon?Cm(p||(p=or(['',"
"])),this.icon):Am}},{key:"renderLineRipple",value:function(){return this.outlined?Am:Cm(m||(m=or(["\n \n "])),ep())}},{key:"renderHelperText",value:function(){if(!this.shouldRenderHelperText)return Am;var t=this.validationMessage&&!this.isUiValid,e={"mdc-select-helper-text--validation-msg":t};return Cm(f||(f=or(['\n ',"
"])),tf(e),t?this.validationMessage:this.helper)}},{key:"createAdapter",value:function(){var t,e=this;return Object.assign(Object.assign({},Mh(this.mdcRoot)),{activateBottomLine:function(){e.lineRippleElement&&e.lineRippleElement.lineRippleFoundation.activate()},deactivateBottomLine:function(){e.lineRippleElement&&e.lineRippleElement.lineRippleFoundation.deactivate()},hasLabel:function(){return!!e.label},floatLabel:function(t){e.labelElement&&e.labelElement.floatingLabelFoundation.float(t)},getLabelWidth:function(){return e.labelElement?e.labelElement.floatingLabelFoundation.getWidth():0},setLabelRequired:function(t){e.labelElement&&e.labelElement.floatingLabelFoundation.setRequired(t)},hasOutline:function(){return e.outlined},notchOutline:function(t){e.outlineElement&&!e.outlineOpen&&(e.outlineWidth=t,e.outlineOpen=!0)},closeOutline:function(){e.outlineElement&&(e.outlineOpen=!1)},setRippleCenter:function(t){e.lineRippleElement&&e.lineRippleElement.lineRippleFoundation.setRippleCenter(t)},notifyChange:(t=yr(gr().mark((function t(n){var i;return gr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.valueSetDirectly||n!==e.value){t.next=2;break}return t.abrupt("return");case 2:return e.valueSetDirectly=!1,e.value=n,t.next=6,e.updateComplete;case 6:i=new Event("change",{bubbles:!0}),e.dispatchEvent(i);case 8:case"end":return t.stop()}}),t)}))),function(e){return t.apply(this,arguments)}),setSelectedText:function(t){return e.selectedText=t},isSelectAnchorFocused:function(){var t=e.anchorElement;return!!t&&t.getRootNode().activeElement===t},getSelectAnchorAttr:function(t){var n=e.anchorElement;return n?n.getAttribute(t):null},setSelectAnchorAttr:function(t,n){var i=e.anchorElement;i&&i.setAttribute(t,n)},removeSelectAnchorAttr:function(t){var n=e.anchorElement;n&&n.removeAttribute(t)},openMenu:function(){e.menuOpen=!0},closeMenu:function(){e.menuOpen=!1},addMenuClass:function(){},removeMenuClass:function(){},getAnchorElement:function(){return e.anchorElement},setMenuAnchorElement:function(){},setMenuAnchorCorner:function(){var t=e.menuElement;t&&(t.corner="BOTTOM_START")},setMenuWrapFocus:function(t){var n=e.menuElement;n&&(n.wrapFocus=t)},focusMenuItemAtIndex:function(t){var n=e.menuElement;if(n){var i=n.items[t];i&&i.focus()}},getMenuItemCount:function(){var t=e.menuElement;return t?t.items.length:0},getMenuItemValues:function(){var t=e.menuElement;return t?t.items.map((function(t){return t.value})):[]},getMenuItemTextAtIndex:function(t){var n=e.menuElement;if(!n)return"";var i=n.items[t];return i?i.text:""},getSelectedIndex:function(){return e.index},setSelectedIndex:function(){},isTypeaheadInProgress:function(){return Tu(e.typeaheadState)},typeaheadMatchItem:function(t,n){if(!e.menuElement)return-1;var i={focusItemAtIndex:function(t){e.menuElement.focusItemAtIndex(t)},focusedItemIndex:n||e.menuElement.getFocusedItemIndex(),nextChar:t,sortedIndexByFirstChar:e.sortedIndexByFirstChar,skipFocus:!1,isItemAtIndexDisabled:function(t){return e.items[t].disabled}},o=Ou(i,e.typeaheadState);return-1!==o&&e.select(o),o}})}},{key:"checkValidity",value:function(){var t=this._checkValidity(this.value);if(!t){var e=new Event("invalid",{bubbles:!1,cancelable:!0});this.dispatchEvent(e)}return t}},{key:"reportValidity",value:function(){var t=this.checkValidity();return this.isUiValid=t,t}},{key:"_checkValidity",value:function(t){var e=this.formElement.validity,n=nf(e);if(this.validityTransform){var i=this.validityTransform(t,n);n=Object.assign(Object.assign({},n),i)}return this._validity=n,this._validity.valid}},{key:"setCustomValidity",value:function(t){this.validationMessage=t,this.formElement.setCustomValidity(t)}},{key:"getUpdateComplete",value:(a=yr(gr().mark((function t(){var n;return gr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._menuUpdateComplete;case 2:return t.next=4,dr(e,"getUpdateComplete",this,3)([]);case 4:return n=t.sent,t.abrupt("return",n);case 6:case"end":return t.stop()}}),t,this)}))),function(){return a.apply(this,arguments)})},{key:"firstUpdated",value:(r=yr(gr().mark((function t(){var n,i,o=this;return gr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(n=this.menuElement)){t.next=5;break}return this._menuUpdateComplete=n.updateComplete,t.next=5,this._menuUpdateComplete;case 5:if(dr(e,"firstUpdated",this,3)([]),this.mdcFoundation.isValid=function(){return!0},this.mdcFoundation.setValid=function(){},this.mdcFoundation.setDisabled(this.disabled),this.validateOnInitialRender&&this.reportValidity(),this.selected){t.next=21;break}if(this.items.length||!this.slotElement||!this.slotElement.assignedNodes({flatten:!0}).length){t.next=16;break}return t.next=14,new Promise((function(t){return requestAnimationFrame(t)}));case 14:return t.next=16,this.layout();case 16:if(i=this.items.length&&""===this.items[0].value,this.value||!i){t.next=20;break}return this.select(0),t.abrupt("return");case 20:this.selectByValue(this.value);case 21:this.sortedIndexByFirstChar=Su(this.items.length,(function(t){return o.items[t].text}));case 22:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"onItemsUpdated",value:function(){var t=this;this.sortedIndexByFirstChar=Su(this.items.length,(function(e){return t.items[e].text}))}},{key:"select",value:function(t){var e=this.menuElement;e&&e.select(t)}},{key:"selectByValue",value:function(t){for(var e=-1,n=0;n0,o=n&&this.index0&&void 0!==a[0])||a[0],this.mdcFoundation&&this.mdcFoundation.layout(),t.next=4,this.updateComplete;case 4:if((n=this.menuElement)&&n.layout(e),i=this.labelElement){t.next=10;break}return this.outlineOpen=!1,t.abrupt("return");case 10:if(o=!!this.label&&!!this.value,i.floatingLabelFoundation.float(o),this.outlined){t.next=14;break}return t.abrupt("return");case 14:return this.outlineOpen=o,t.next=17,this.updateComplete;case 17:r=i.floatingLabelFoundation.getWidth(),this.outlineOpen&&(this.outlineWidth=r);case 19:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"layoutOptions",value:(n=yr(gr().mark((function t(){return gr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.mdcFoundation){t.next=2;break}return t.abrupt("return");case 2:this.mdcFoundation.layoutOptions();case 3:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})}]);var n,i,o,r,a}();Ur([Zm(".mdc-select")],of.prototype,"mdcRoot",void 0),Ur([Zm(".formElement")],of.prototype,"formElement",void 0),Ur([Zm("slot")],of.prototype,"slotElement",void 0),Ur([Zm("select")],of.prototype,"nativeSelectElement",void 0),Ur([Zm("input")],of.prototype,"nativeInputElement",void 0),Ur([Zm(".mdc-line-ripple")],of.prototype,"lineRippleElement",void 0),Ur([Zm(".mdc-floating-label")],of.prototype,"labelElement",void 0),Ur([Zm("mwc-notched-outline")],of.prototype,"outlineElement",void 0),Ur([Zm(".mdc-menu")],of.prototype,"menuElement",void 0),Ur([Zm(".mdc-select__anchor")],of.prototype,"anchorElement",void 0),Ur([Km({type:Boolean,attribute:"disabled",reflect:!0}),Vh((function(t){this.mdcFoundation&&this.mdcFoundation.setDisabled(t)}))],of.prototype,"disabled",void 0),Ur([Km({type:Boolean}),Vh((function(t,e){void 0!==e&&this.outlined!==e&&this.layout(!1)}))],of.prototype,"outlined",void 0),Ur([Km({type:String}),Vh((function(t,e){void 0!==e&&this.label!==e&&this.layout(!1)}))],of.prototype,"label",void 0),Ur([Xm()],of.prototype,"outlineOpen",void 0),Ur([Xm()],of.prototype,"outlineWidth",void 0),Ur([Km({type:String}),Vh((function(t){if(this.mdcFoundation){var e=null===this.selected&&!!t,n=this.selected&&this.selected.value!==t;(e||n)&&this.selectByValue(t),this.reportValidity()}}))],of.prototype,"value",void 0),Ur([Km()],of.prototype,"name",void 0),Ur([Xm()],of.prototype,"selectedText",void 0),Ur([Km({type:String})],of.prototype,"icon",void 0),Ur([Xm()],of.prototype,"menuOpen",void 0),Ur([Km({type:String})],of.prototype,"helper",void 0),Ur([Km({type:Boolean})],of.prototype,"validateOnInitialRender",void 0),Ur([Km({type:String})],of.prototype,"validationMessage",void 0),Ur([Km({type:Boolean})],of.prototype,"required",void 0),Ur([Km({type:Boolean})],of.prototype,"naturalMenuWidth",void 0),Ur([Xm()],of.prototype,"isUiValid",void 0),Ur([Km({type:Boolean})],of.prototype,"fixedMenuPosition",void 0),Ur([function(t){return Gm({finisher:function(e,n){Object.assign(e.prototype[n],t)}})}({capture:!0})],of.prototype,"handleTypeahead",null);
/**
* @license
* Copyright 2021 Google LLC
* SPDX-LIcense-Identifier: Apache-2.0
*/
-const oa=h`.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);position:absolute;left:0;-webkit-transform-origin:left top;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform;transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1)}[dir=rtl] .mdc-floating-label,.mdc-floating-label[dir=rtl]{right:0;left:auto;-webkit-transform-origin:right top;transform-origin:right top;text-align:right}.mdc-floating-label--float-above{cursor:auto}.mdc-floating-label--required::after{margin-left:1px;margin-right:0px;content:"*"}[dir=rtl] .mdc-floating-label--required::after,.mdc-floating-label--required[dir=rtl]::after{margin-left:0;margin-right:1px}.mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-standard 250ms 1}@keyframes mdc-floating-label-shake-float-above-standard{0%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-106%) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-106%) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-line-ripple::before,.mdc-line-ripple::after{position:absolute;bottom:0;left:0;width:100%;border-bottom-style:solid;content:""}.mdc-line-ripple::before{border-bottom-width:1px}.mdc-line-ripple::before{z-index:1}.mdc-line-ripple::after{transform:scaleX(0);border-bottom-width:2px;opacity:0;z-index:2}.mdc-line-ripple::after{transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-line-ripple--active::after{transform:scaleX(1);opacity:1}.mdc-line-ripple--deactivating::after{opacity:0}.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline,.mdc-notched-outline[dir=rtl]{text-align:right}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{box-sizing:border-box;height:100%;border-top:1px solid;border-bottom:1px solid;pointer-events:none}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}[dir=rtl] .mdc-notched-outline__leading,.mdc-notched-outline__leading[dir=rtl]{border-left:none;border-right:1px solid}.mdc-notched-outline__trailing{border-left:none;border-right:1px solid;flex-grow:1}[dir=rtl] .mdc-notched-outline__trailing,.mdc-notched-outline__trailing[dir=rtl]{border-left:1px solid;border-right:none}.mdc-notched-outline__notch{flex:0 0 auto;width:auto;max-width:calc(100% - 12px * 2)}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(100% / 0.75)}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch,.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl]{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}.mdc-select{display:inline-flex;position:relative}.mdc-select:not(.mdc-select--disabled) .mdc-select__selected-text{color:rgba(0, 0, 0, 0.87)}.mdc-select.mdc-select--disabled .mdc-select__selected-text{color:rgba(0, 0, 0, 0.38)}.mdc-select:not(.mdc-select--disabled) .mdc-floating-label{color:rgba(0, 0, 0, 0.6)}.mdc-select:not(.mdc-select--disabled).mdc-select--focused .mdc-floating-label{color:rgba(98, 0, 238, 0.87)}.mdc-select.mdc-select--disabled .mdc-floating-label{color:rgba(0, 0, 0, 0.38)}.mdc-select:not(.mdc-select--disabled) .mdc-select__dropdown-icon{fill:rgba(0, 0, 0, 0.54)}.mdc-select:not(.mdc-select--disabled).mdc-select--focused .mdc-select__dropdown-icon{fill:#6200ee;fill:var(--mdc-theme-primary, #6200ee)}.mdc-select.mdc-select--disabled .mdc-select__dropdown-icon{fill:rgba(0, 0, 0, 0.38)}.mdc-select:not(.mdc-select--disabled)+.mdc-select-helper-text{color:rgba(0, 0, 0, 0.6)}.mdc-select.mdc-select--disabled+.mdc-select-helper-text{color:rgba(0, 0, 0, 0.38)}.mdc-select:not(.mdc-select--disabled) .mdc-select__icon{color:rgba(0, 0, 0, 0.54)}.mdc-select.mdc-select--disabled .mdc-select__icon{color:rgba(0, 0, 0, 0.38)}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-select.mdc-select--disabled .mdc-select__selected-text{color:GrayText}.mdc-select.mdc-select--disabled .mdc-select__dropdown-icon{fill:red}.mdc-select.mdc-select--disabled .mdc-floating-label{color:GrayText}.mdc-select.mdc-select--disabled .mdc-line-ripple::before{border-bottom-color:GrayText}.mdc-select.mdc-select--disabled .mdc-notched-outline__leading,.mdc-select.mdc-select--disabled .mdc-notched-outline__notch,.mdc-select.mdc-select--disabled .mdc-notched-outline__trailing{border-color:GrayText}.mdc-select.mdc-select--disabled .mdc-select__icon{color:GrayText}.mdc-select.mdc-select--disabled+.mdc-select-helper-text{color:GrayText}}.mdc-select .mdc-floating-label{top:50%;transform:translateY(-50%);pointer-events:none}.mdc-select .mdc-select__anchor{padding-left:16px;padding-right:0}[dir=rtl] .mdc-select .mdc-select__anchor,.mdc-select .mdc-select__anchor[dir=rtl]{padding-left:0;padding-right:16px}.mdc-select.mdc-select--with-leading-icon .mdc-select__anchor{padding-left:0;padding-right:0}[dir=rtl] .mdc-select.mdc-select--with-leading-icon .mdc-select__anchor,.mdc-select.mdc-select--with-leading-icon .mdc-select__anchor[dir=rtl]{padding-left:0;padding-right:0}.mdc-select .mdc-select__icon{width:24px;height:24px;font-size:24px}.mdc-select .mdc-select__dropdown-icon{width:24px;height:24px}.mdc-select .mdc-select__menu .mdc-deprecated-list-item{padding-left:16px;padding-right:16px}[dir=rtl] .mdc-select .mdc-select__menu .mdc-deprecated-list-item,.mdc-select .mdc-select__menu .mdc-deprecated-list-item[dir=rtl]{padding-left:16px;padding-right:16px}.mdc-select .mdc-select__menu .mdc-deprecated-list-item__graphic{margin-left:0;margin-right:12px}[dir=rtl] .mdc-select .mdc-select__menu .mdc-deprecated-list-item__graphic,.mdc-select .mdc-select__menu .mdc-deprecated-list-item__graphic[dir=rtl]{margin-left:12px;margin-right:0}.mdc-select__dropdown-icon{margin-left:12px;margin-right:12px;display:inline-flex;position:relative;align-self:center;align-items:center;justify-content:center;flex-shrink:0;pointer-events:none}.mdc-select__dropdown-icon .mdc-select__dropdown-icon-active,.mdc-select__dropdown-icon .mdc-select__dropdown-icon-inactive{position:absolute;top:0;left:0}.mdc-select__dropdown-icon .mdc-select__dropdown-icon-graphic{width:41.6666666667%;height:20.8333333333%}.mdc-select__dropdown-icon .mdc-select__dropdown-icon-inactive{opacity:1;transition:opacity 75ms linear 75ms}.mdc-select__dropdown-icon .mdc-select__dropdown-icon-active{opacity:0;transition:opacity 75ms linear}[dir=rtl] .mdc-select__dropdown-icon,.mdc-select__dropdown-icon[dir=rtl]{margin-left:12px;margin-right:12px}.mdc-select--activated .mdc-select__dropdown-icon .mdc-select__dropdown-icon-inactive{opacity:0;transition:opacity 49.5ms linear}.mdc-select--activated .mdc-select__dropdown-icon .mdc-select__dropdown-icon-active{opacity:1;transition:opacity 100.5ms linear 49.5ms}.mdc-select__anchor{width:200px;min-width:0;flex:1 1 auto;position:relative;box-sizing:border-box;overflow:hidden;outline:none;cursor:pointer}.mdc-select__anchor .mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-select__selected-text-container{display:flex;appearance:none;pointer-events:none;box-sizing:border-box;width:auto;min-width:0;flex-grow:1;height:28px;border:none;outline:none;padding:0;background-color:transparent;color:inherit}.mdc-select__selected-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);line-height:1.75rem;line-height:var(--mdc-typography-subtitle1-line-height, 1.75rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;width:100%;text-align:left}[dir=rtl] .mdc-select__selected-text,.mdc-select__selected-text[dir=rtl]{text-align:right}.mdc-select--invalid:not(.mdc-select--disabled) .mdc-floating-label{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-floating-label{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--invalid+.mdc-select-helper-text--validation-msg{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled) .mdc-select__dropdown-icon{fill:#b00020;fill:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-select__dropdown-icon{fill:#b00020;fill:var(--mdc-theme-error, #b00020)}.mdc-select--disabled{cursor:default;pointer-events:none}.mdc-select--with-leading-icon .mdc-select__menu .mdc-deprecated-list-item{padding-left:12px;padding-right:12px}[dir=rtl] .mdc-select--with-leading-icon .mdc-select__menu .mdc-deprecated-list-item,.mdc-select--with-leading-icon .mdc-select__menu .mdc-deprecated-list-item[dir=rtl]{padding-left:12px;padding-right:12px}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-select__menu::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid transparent;border-radius:inherit;content:"";pointer-events:none}}@media screen and (forced-colors: active)and (forced-colors: active),screen and (-ms-high-contrast: active)and (forced-colors: active){.mdc-select__menu::before{border-color:CanvasText}}.mdc-select__menu .mdc-deprecated-list .mdc-select__icon,.mdc-select__menu .mdc-list .mdc-select__icon{margin-left:0;margin-right:0}[dir=rtl] .mdc-select__menu .mdc-deprecated-list .mdc-select__icon,[dir=rtl] .mdc-select__menu .mdc-list .mdc-select__icon,.mdc-select__menu .mdc-deprecated-list .mdc-select__icon[dir=rtl],.mdc-select__menu .mdc-list .mdc-select__icon[dir=rtl]{margin-left:0;margin-right:0}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--activated,.mdc-select__menu .mdc-list .mdc-deprecated-list-item--selected,.mdc-select__menu .mdc-list .mdc-deprecated-list-item--activated{color:#000;color:var(--mdc-theme-on-surface, #000)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-deprecated-list-item__graphic,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--activated .mdc-deprecated-list-item__graphic,.mdc-select__menu .mdc-list .mdc-deprecated-list-item--selected .mdc-deprecated-list-item__graphic,.mdc-select__menu .mdc-list .mdc-deprecated-list-item--activated .mdc-deprecated-list-item__graphic{color:#000;color:var(--mdc-theme-on-surface, #000)}.mdc-select__menu .mdc-list-item__start{display:inline-flex;align-items:center}.mdc-select__option{padding-left:16px;padding-right:16px}[dir=rtl] .mdc-select__option,.mdc-select__option[dir=rtl]{padding-left:16px;padding-right:16px}.mdc-select__one-line-option.mdc-list-item--with-one-line{height:48px}.mdc-select__two-line-option.mdc-list-item--with-two-lines{height:64px}.mdc-select__two-line-option.mdc-list-item--with-two-lines .mdc-list-item__start{margin-top:20px}.mdc-select__two-line-option.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-select__two-line-option.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-select__two-line-option.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-select__two-line-option.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-select__two-line-option.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:36px;content:"";vertical-align:0}.mdc-select__option-with-leading-content{padding-left:0;padding-right:12px}.mdc-select__option-with-leading-content.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-select__option-with-leading-content.mdc-list-item,.mdc-select__option-with-leading-content.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-select__option-with-leading-content .mdc-list-item__start{margin-left:12px;margin-right:0}[dir=rtl] .mdc-select__option-with-leading-content .mdc-list-item__start,.mdc-select__option-with-leading-content .mdc-list-item__start[dir=rtl]{margin-left:0;margin-right:12px}.mdc-select__option-with-leading-content .mdc-list-item__start{width:36px;height:24px}[dir=rtl] .mdc-select__option-with-leading-content,.mdc-select__option-with-leading-content[dir=rtl]{padding-left:12px;padding-right:0}.mdc-select__option-with-meta.mdc-list-item{padding-left:auto;padding-right:0}[dir=rtl] .mdc-select__option-with-meta.mdc-list-item,.mdc-select__option-with-meta.mdc-list-item[dir=rtl]{padding-left:0;padding-right:auto}.mdc-select__option-with-meta .mdc-list-item__end{margin-left:12px;margin-right:12px}[dir=rtl] .mdc-select__option-with-meta .mdc-list-item__end,.mdc-select__option-with-meta .mdc-list-item__end[dir=rtl]{margin-left:12px;margin-right:12px}.mdc-select--filled .mdc-select__anchor{height:56px;display:flex;align-items:baseline}.mdc-select--filled .mdc-select__anchor::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}.mdc-select--filled.mdc-select--no-label .mdc-select__anchor .mdc-select__selected-text::before{content:""}.mdc-select--filled.mdc-select--no-label .mdc-select__anchor .mdc-select__selected-text-container{height:100%;display:inline-flex;align-items:center}.mdc-select--filled.mdc-select--no-label .mdc-select__anchor::before{display:none}.mdc-select--filled .mdc-select__anchor{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:0;border-bottom-left-radius:0}.mdc-select--filled:not(.mdc-select--disabled) .mdc-select__anchor{background-color:whitesmoke}.mdc-select--filled.mdc-select--disabled .mdc-select__anchor{background-color:#fafafa}.mdc-select--filled:not(.mdc-select--disabled) .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.42)}.mdc-select--filled:not(.mdc-select--disabled):hover .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.87)}.mdc-select--filled:not(.mdc-select--disabled) .mdc-line-ripple::after{border-bottom-color:#6200ee;border-bottom-color:var(--mdc-theme-primary, #6200ee)}.mdc-select--filled.mdc-select--disabled .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.06)}.mdc-select--filled .mdc-floating-label{max-width:calc(100% - 64px)}.mdc-select--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 64px / 0.75)}.mdc-select--filled .mdc-menu-surface--is-open-below{border-top-left-radius:0px;border-top-right-radius:0px}.mdc-select--filled.mdc-select--focused.mdc-line-ripple::after{transform:scale(1, 2);opacity:1}.mdc-select--filled .mdc-floating-label{left:16px;right:initial}[dir=rtl] .mdc-select--filled .mdc-floating-label,.mdc-select--filled .mdc-floating-label[dir=rtl]{left:initial;right:16px}.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label{left:48px;right:initial}[dir=rtl] .mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label,.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label[dir=rtl]{left:initial;right:48px}.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label{max-width:calc(100% - 96px)}.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 96px / 0.75)}.mdc-select--invalid:not(.mdc-select--disabled) .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled):hover .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled) .mdc-line-ripple::after{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-select--outlined{border:none}.mdc-select--outlined .mdc-select__anchor{height:56px}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1)}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--float-above{font-size:.75rem}.mdc-select--outlined .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-select--outlined .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-select-outlined-56px 250ms 1}@keyframes mdc-floating-label-shake-float-above-select-outlined-56px{0%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}}.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}[dir=rtl] .mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__leading[dir=rtl]{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}@supports(top: max(0%)){.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px, var(--mdc-shape-small, 4px)) * 2)}}.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}[dir=rtl] .mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__trailing,.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl]{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}@supports(top: max(0%)){.mdc-select--outlined .mdc-select__anchor{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}[dir=rtl] .mdc-select--outlined .mdc-select__anchor,.mdc-select--outlined .mdc-select__anchor[dir=rtl]{padding-left:0}@supports(top: max(0%)){[dir=rtl] .mdc-select--outlined .mdc-select__anchor,.mdc-select--outlined .mdc-select__anchor[dir=rtl]{padding-right:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-select--outlined+.mdc-select-helper-text{margin-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}[dir=rtl] .mdc-select--outlined+.mdc-select-helper-text,.mdc-select--outlined+.mdc-select-helper-text[dir=rtl]{margin-left:0}@supports(top: max(0%)){[dir=rtl] .mdc-select--outlined+.mdc-select-helper-text,.mdc-select--outlined+.mdc-select-helper-text[dir=rtl]{margin-right:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}.mdc-select--outlined:not(.mdc-select--disabled) .mdc-select__anchor{background-color:transparent}.mdc-select--outlined.mdc-select--disabled .mdc-select__anchor{background-color:transparent}.mdc-select--outlined:not(.mdc-select--disabled) .mdc-notched-outline__leading,.mdc-select--outlined:not(.mdc-select--disabled) .mdc-notched-outline__notch,.mdc-select--outlined:not(.mdc-select--disabled) .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.38)}.mdc-select--outlined:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.87)}.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__trailing{border-width:2px}.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#6200ee;border-color:var(--mdc-theme-primary, #6200ee)}.mdc-select--outlined.mdc-select--disabled .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--disabled .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--disabled .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.06)}.mdc-select--outlined .mdc-select__anchor :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-select--outlined .mdc-select__anchor{display:flex;align-items:baseline;overflow:visible}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-select-outlined 250ms 1}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1)}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--float-above{font-size:.75rem}.mdc-select--outlined .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-select--outlined .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-select--outlined .mdc-select__anchor .mdc-select__selected-text::before{content:""}.mdc-select--outlined .mdc-select__anchor .mdc-select__selected-text-container{height:100%;display:inline-flex;align-items:center}.mdc-select--outlined .mdc-select__anchor::before{display:none}.mdc-select--outlined .mdc-select__selected-text-container{display:flex;border:none;z-index:1;background-color:transparent}.mdc-select--outlined .mdc-select__icon{z-index:2}.mdc-select--outlined .mdc-floating-label{line-height:1.15rem;left:4px;right:initial}[dir=rtl] .mdc-select--outlined .mdc-floating-label,.mdc-select--outlined .mdc-floating-label[dir=rtl]{left:initial;right:4px}.mdc-select--outlined.mdc-select--focused .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled) .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled) .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled) .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__trailing{border-width:2px}.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label{left:36px;right:initial}[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label,.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label[dir=rtl]{left:initial;right:36px}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--float-above{transform:translateY(-37.25px) translateX(-32px) scale(1)}[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--float-above,.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-37.25px) translateX(32px) scale(1)}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--float-above{font-size:.75rem}.mdc-select--outlined.mdc-select--with-leading-icon.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined.mdc-select--with-leading-icon .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) translateX(-32px) scale(0.75)}[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon.mdc-notched-outline--upgraded .mdc-floating-label--float-above,[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined.mdc-select--with-leading-icon.mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl],.mdc-select--outlined.mdc-select--with-leading-icon .mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-34.75px) translateX(32px) scale(0.75)}.mdc-select--outlined.mdc-select--with-leading-icon.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined.mdc-select--with-leading-icon .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-select-outlined-leading-icon-56px 250ms 1}@keyframes mdc-floating-label-shake-float-above-select-outlined-leading-icon-56px{0%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}}[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--shake,.mdc-select--outlined.mdc-select--with-leading-icon[dir=rtl] .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-select-outlined-leading-icon-56px 250ms 1}@keyframes mdc-floating-label-shake-float-above-select-outlined-leading-icon-56px-rtl{0%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - -32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - -32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-select__anchor :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 96px)}.mdc-select--outlined .mdc-menu-surface{margin-bottom:8px}.mdc-select--outlined.mdc-select--no-label .mdc-menu-surface,.mdc-select--outlined .mdc-menu-surface--is-open-below{margin-bottom:0}.mdc-select__anchor{--mdc-ripple-fg-size: 0;--mdc-ripple-left: 0;--mdc-ripple-top: 0;--mdc-ripple-fg-scale: 1;--mdc-ripple-fg-translate-end: 0;--mdc-ripple-fg-translate-start: 0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity}.mdc-select__anchor .mdc-select__ripple::before,.mdc-select__anchor .mdc-select__ripple::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-select__anchor .mdc-select__ripple::before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-select__anchor .mdc-select__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-select__anchor.mdc-ripple-upgraded .mdc-select__ripple::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-select__anchor.mdc-ripple-upgraded .mdc-select__ripple::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-select__anchor.mdc-ripple-upgraded--unbounded .mdc-select__ripple::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-select__anchor.mdc-ripple-upgraded--foreground-activation .mdc-select__ripple::after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-select__anchor.mdc-ripple-upgraded--foreground-deactivation .mdc-select__ripple::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-select__anchor .mdc-select__ripple::before,.mdc-select__anchor .mdc-select__ripple::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-select__anchor.mdc-ripple-upgraded .mdc-select__ripple::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-select__anchor .mdc-select__ripple::before,.mdc-select__anchor .mdc-select__ripple::after{background-color:rgba(0, 0, 0, 0.87);background-color:var(--mdc-ripple-color, rgba(0, 0, 0, 0.87))}.mdc-select__anchor:hover .mdc-select__ripple::before,.mdc-select__anchor.mdc-ripple-surface--hover .mdc-select__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-select__anchor.mdc-ripple-upgraded--background-focused .mdc-select__ripple::before,.mdc-select__anchor:not(.mdc-ripple-upgraded):focus .mdc-select__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-select__anchor .mdc-select__ripple{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-deprecated-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-deprecated-list-item__ripple::after{background-color:#000;background-color:var(--mdc-ripple-color, var(--mdc-theme-on-surface, #000))}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:hover .mdc-deprecated-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-surface--hover .mdc-deprecated-list-item__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-upgraded--background-focused .mdc-deprecated-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):focus .mdc-deprecated-list-item__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded) .mdc-deprecated-list-item__ripple::after{transition:opacity 150ms linear}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):active .mdc-deprecated-list-item__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-list-item__ripple::after{background-color:#000;background-color:var(--mdc-ripple-color, var(--mdc-theme-on-surface, #000))}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:hover .mdc-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-surface--hover .mdc-list-item__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-upgraded--background-focused .mdc-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):focus .mdc-list-item__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded) .mdc-list-item__ripple::after{transition:opacity 150ms linear}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):active .mdc-list-item__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-select-helper-text{margin:0;margin-left:16px;margin-right:16px;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.75rem;font-size:var(--mdc-typography-caption-font-size, 0.75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight, 400);letter-spacing:0.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, 0.0333333333em);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform, inherit);display:block;margin-top:0;line-height:normal}[dir=rtl] .mdc-select-helper-text,.mdc-select-helper-text[dir=rtl]{margin-left:16px;margin-right:16px}.mdc-select-helper-text::before{display:inline-block;width:0;height:16px;content:"";vertical-align:0}.mdc-select-helper-text--validation-msg{opacity:0;transition:opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-select--invalid+.mdc-select-helper-text--validation-msg,.mdc-select-helper-text--validation-msg-persistent{opacity:1}.mdc-select--with-leading-icon .mdc-select__icon{display:inline-block;box-sizing:border-box;border:none;text-decoration:none;cursor:pointer;user-select:none;flex-shrink:0;align-self:center;background-color:transparent;fill:currentColor}.mdc-select--with-leading-icon .mdc-select__icon{margin-left:12px;margin-right:12px}[dir=rtl] .mdc-select--with-leading-icon .mdc-select__icon,.mdc-select--with-leading-icon .mdc-select__icon[dir=rtl]{margin-left:12px;margin-right:12px}.mdc-select__icon:not([tabindex]),.mdc-select__icon[tabindex="-1"]{cursor:default;pointer-events:none}.material-icons{font-family:var(--mdc-icon-font, "Material Icons");font-weight:normal;font-style:normal;font-size:var(--mdc-icon-size, 24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga"}:host{display:inline-block;vertical-align:top;outline:none}.mdc-select{width:100%}[hidden]{display:none}.mdc-select__icon{z-index:2}.mdc-select--with-leading-icon{--mdc-list-item-graphic-margin: calc( 48px - var(--mdc-list-item-graphic-size, 24px) - var(--mdc-list-side-padding, 16px) )}.mdc-select .mdc-select__anchor .mdc-select__selected-text{overflow:hidden}.mdc-select .mdc-select__anchor *{display:inline-flex}.mdc-select .mdc-select__anchor .mdc-floating-label{display:inline-block}mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-select-outlined-idle-border-color, rgba(0, 0, 0, 0.38) );--mdc-notched-outline-notch-offset: 1px}:host(:not([disabled]):hover) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-select-outlined-hover-border-color, rgba(0, 0, 0, 0.87) )}:host(:not([disabled])) .mdc-select:not(.mdc-select--disabled) .mdc-select__selected-text{color:rgba(0, 0, 0, 0.87);color:var(--mdc-select-ink-color, rgba(0, 0, 0, 0.87))}:host(:not([disabled])) .mdc-select:not(.mdc-select--disabled) .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.42);border-bottom-color:var(--mdc-select-idle-line-color, rgba(0, 0, 0, 0.42))}:host(:not([disabled])) .mdc-select:not(.mdc-select--disabled):hover .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.87);border-bottom-color:var(--mdc-select-hover-line-color, rgba(0, 0, 0, 0.87))}:host(:not([disabled])) .mdc-select:not(.mdc-select--outlined):not(.mdc-select--disabled) .mdc-select__anchor{background-color:whitesmoke;background-color:var(--mdc-select-fill-color, whitesmoke)}:host(:not([disabled])) .mdc-select.mdc-select--invalid .mdc-select__dropdown-icon{fill:var(--mdc-select-error-dropdown-icon-color, var(--mdc-select-error-color, var(--mdc-theme-error, #b00020)))}:host(:not([disabled])) .mdc-select.mdc-select--invalid .mdc-floating-label,:host(:not([disabled])) .mdc-select.mdc-select--invalid .mdc-floating-label::after{color:var(--mdc-select-error-color, var(--mdc-theme-error, #b00020))}:host(:not([disabled])) .mdc-select.mdc-select--invalid mwc-notched-outline{--mdc-notched-outline-border-color: var(--mdc-select-error-color, var(--mdc-theme-error, #b00020))}.mdc-select__menu--invalid{--mdc-theme-primary: var(--mdc-select-error-color, var(--mdc-theme-error, #b00020))}:host(:not([disabled])) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-floating-label,:host(:not([disabled])) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-floating-label::after{color:rgba(0, 0, 0, 0.6);color:var(--mdc-select-label-ink-color, rgba(0, 0, 0, 0.6))}:host(:not([disabled])) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-select__dropdown-icon{fill:rgba(0, 0, 0, 0.54);fill:var(--mdc-select-dropdown-icon-color, rgba(0, 0, 0, 0.54))}:host(:not([disabled])) .mdc-select.mdc-select--focused mwc-notched-outline{--mdc-notched-outline-stroke-width: 2px;--mdc-notched-outline-notch-offset: 2px}:host(:not([disabled])) .mdc-select.mdc-select--focused:not(.mdc-select--invalid) mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-select-focused-label-color, var(--mdc-theme-primary, rgba(98, 0, 238, 0.87)) )}:host(:not([disabled])) .mdc-select.mdc-select--focused:not(.mdc-select--invalid) .mdc-select__dropdown-icon{fill:rgba(98,0,238,.87);fill:var(--mdc-select-focused-dropdown-icon-color, var(--mdc-theme-primary, rgba(98, 0, 238, 0.87)))}:host(:not([disabled])) .mdc-select.mdc-select--focused:not(.mdc-select--invalid) .mdc-floating-label{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}:host(:not([disabled])) .mdc-select.mdc-select--focused:not(.mdc-select--invalid) .mdc-floating-label::after{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}:host(:not([disabled])) .mdc-select-helper-text:not(.mdc-select-helper-text--validation-msg){color:var(--mdc-select-label-ink-color, rgba(0, 0, 0, 0.6))}:host([disabled]){pointer-events:none}:host([disabled]) .mdc-select:not(.mdc-select--outlined).mdc-select--disabled .mdc-select__anchor{background-color:#fafafa;background-color:var(--mdc-select-disabled-fill-color, #fafafa)}:host([disabled]) .mdc-select.mdc-select--outlined mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-select-outlined-disabled-border-color, rgba(0, 0, 0, 0.06) )}:host([disabled]) .mdc-select .mdc-select__dropdown-icon{fill:rgba(0, 0, 0, 0.38);fill:var(--mdc-select-disabled-dropdown-icon-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-floating-label,:host([disabled]) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-floating-label::after{color:rgba(0, 0, 0, 0.38);color:var(--mdc-select-disabled-ink-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-select-helper-text{color:rgba(0, 0, 0, 0.38);color:var(--mdc-select-disabled-ink-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-select__selected-text{color:rgba(0, 0, 0, 0.38);color:var(--mdc-select-disabled-ink-color, rgba(0, 0, 0, 0.38))}`;let na=class extends ia{constructor(){super(...arguments),this._translationsUpdated=Te((async()=>{await Oe(),this.layoutOptions()}),500)}renderLeadingIcon(){return this.icon?Y``:K}connectedCallback(){super.connectedCallback(),window.addEventListener("translations-updated",this._translationsUpdated)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("translations-updated",this._translationsUpdated)}};na.styles=[oa,h`
- .mdc-select__anchor {
- height: var(--select-height, 56px) !important;
- }
- `],n([_t({type:Boolean})],na.prototype,"icon",void 0),na=n([pt("mushroom-select")],na);const ra=["default","start","center","end","justify"],aa={default:"mdi:format-align-left",start:"mdi:format-align-left",center:"mdi:format-align-center",end:"mdi:format-align-right",justify:"mdi:format-align-justify"};let sa=class extends ht{constructor(){super(...arguments),this.label="",this.configValue=""}_selectChanged(t){const e=t.target.value;e&&this.dispatchEvent(new CustomEvent("value-changed",{detail:{value:"default"!==e?e:""}}))}render(){const t=jo(this.hass),e=this.value||"default";return Y`
- t.stopPropagation()}
- .value=${this.value||"default"}
- fixedMenuPosition
- naturalMenuWidth
- >
-
- ${ra.map((e=>Y`
-
- ${t(`editor.form.alignment_picker.values.${e}`)}
-
-
- `))}
-
- `}static get styles(){return h`
- mushroom-select {
- width: 100%;
- }
- `}};n([_t()],sa.prototype,"label",void 0),n([_t()],sa.prototype,"value",void 0),n([_t()],sa.prototype,"configValue",void 0),n([_t()],sa.prototype,"hass",void 0),sa=n([pt("mushroom-alignment-picker")],sa);let la=class extends ht{render(){return Y`
-
- `}_valueChanged(t){Lt(this,"value-changed",{value:t.detail.value||void 0})}};n([_t()],la.prototype,"hass",void 0),n([_t()],la.prototype,"selector",void 0),n([_t()],la.prototype,"value",void 0),n([_t()],la.prototype,"label",void 0),la=n([pt("ha-selector-mush_alignment")],la);
+var rf=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i']))):ja}},{key:"connectedCallback",value:function(){dr(e,"connectedCallback",this,3)([]),window.addEventListener("translations-updated",this._translationsUpdated)}},{key:"disconnectedCallback",value:function(){dr(e,"disconnectedCallback",this,3)([]),window.removeEventListener("translations-updated",this._translationsUpdated)}}])}();af.styles=[rf,Xr(_||(_=or(["\n .mdc-select__anchor {\n height: var(--select-height, 56px) !important;\n }\n "])))],Ur([Qa({type:Boolean})],af.prototype,"icon",void 0),af=Ur([Ga("mushroom-select")],af);var lf=["default","start","center","end","justify"],sf={default:"mdi:format-align-left",start:"mdi:format-align-left",center:"mdi:format-align-center",end:"mdi:format-align-right",justify:"mdi:format-align-justify"},cf=function(t){function e(){var t;return zr(this,e),(t=br(this,e,arguments)).label="",t.configValue="",t}return wr(e,Xa),Mr(e,[{key:"_selectChanged",value:function(t){var e=t.target.value;e&&this.dispatchEvent(new CustomEvent("value-changed",{detail:{value:"default"!==e?e:""}}))}},{key:"render",value:function(){var t=fd(this.hass),e=this.value||"default";return za(y||(y=or(["\n \n ','\n 0?new Wa(e,t):new Wa([...(i=Ba[this.model][t].raw(this.color),Array.isArray(i)?i:[i]),this.valpha],t);var i},Wa[t]=function(...i){let o=i[0];return"number"==typeof o&&(o=Ga(i,e)),new Wa(o,t)}}function Xa(t){return function(e){return function(t,e){return Number(t.toFixed(e))}(e,t)}}function Ka(t,e,i){t=Array.isArray(t)?t:[t];for(const o of t)(Ya[o]||(Ya[o]=[]))[e]=i;return t=t[0],function(o){let n;return void 0!==o?(i&&(o=i(o)),n=this[t](),n.color[e]=o,n):(n=this[t]().color[e],i&&(n=i(n)),n)}}function qa(t){return function(e){return Math.max(0,Math.min(t,e))}}function Ga(t,e){for(let i=0;it.stopPropagation()}
- .value=${this.value||"default"}
- fixedMenuPosition
- naturalMenuWidth
- >
- ${this.renderColorCircle(this.value||"grey")}
-
- ${t("editor.form.color_picker.values.default")}
-
- ${Ja.map((t=>Y`
-
- ${function(t){return t.split("-").map((t=>function(t){return t.charAt(0).toUpperCase()+t.slice(1)}(t))).join(" ")}(t)}
- ${this.renderColorCircle(t)}
-
- `))}
-
- `}renderColorCircle(t){return Y`
-
- `}static get styles(){return h`
- mushroom-select {
- width: 100%;
- }
- .circle-color {
- display: block;
- background-color: rgb(var(--main-color));
- border-radius: 10px;
- width: 20px;
- height: 20px;
- }
- `}};n([_t()],is.prototype,"label",void 0),n([_t()],is.prototype,"value",void 0),n([_t()],is.prototype,"configValue",void 0),n([_t()],is.prototype,"hass",void 0),is=n([pt("mushroom-color-picker")],is);let os=class extends ht{render(){return Y`
-
- `}_valueChanged(t){Lt(this,"value-changed",{value:t.detail.value||void 0})}};n([_t()],os.prototype,"hass",void 0),n([_t()],os.prototype,"selector",void 0),n([_t()],os.prototype,"value",void 0),n([_t()],os.prototype,"label",void 0),os=n([pt("ha-selector-mush_color")],os);const ns=["button","input_button","scene"],rs=["name","state","last-changed","last-updated","none"],as=["icon","entity-picture","none"];function ss(t,e,i,o,n){switch(t){case"name":return e;case"state":const t=o.entity_id.split(".")[0];return"timestamp"!==o.attributes.device_class&&!ns.includes(t)||!Ut(o)||function(t){return t.state===Rt}(o)?i:Y`
-
- `;case"last-changed":return Y`
-
- `;case"last-updated":return Y`
-
- `;case"none":return}}function ls(t,e){return"entity-picture"===e?Yt(t):void 0}let cs=class extends ht{constructor(){super(...arguments),this.label="",this.configValue=""}_selectChanged(t){const e=t.target.value;e&&this.dispatchEvent(new CustomEvent("value-changed",{detail:{value:"default"!==e?e:""}}))}render(){const t=jo(this.hass);return Y`
- t.stopPropagation()}
- .value=${this.value||"default"}
- fixedMenuPosition
- naturalMenuWidth
- >
-
- ${t("editor.form.icon_type_picker.values.default")}
-
- ${as.map((e=>Y`
-
- ${t(`editor.form.icon_type_picker.values.${e}`)||function(t){return t.charAt(0).toUpperCase()+t.slice(1)}(e)}
-
- `))}
-
- `}static get styles(){return h`
- mushroom-select {
- width: 100%;
- }
- `}};n([_t()],cs.prototype,"label",void 0),n([_t()],cs.prototype,"value",void 0),n([_t()],cs.prototype,"configValue",void 0),n([_t()],cs.prototype,"hass",void 0),cs=n([pt("mushroom-icon-type-picker")],cs);let ds=class extends ht{render(){return Y`
-
- `}_valueChanged(t){Lt(this,"value-changed",{value:t.detail.value||void 0})}};n([_t()],ds.prototype,"hass",void 0),n([_t()],ds.prototype,"selector",void 0),n([_t()],ds.prototype,"value",void 0),n([_t()],ds.prototype,"label",void 0),ds=n([pt("ha-selector-mush_icon_type")],ds);let us=class extends ht{constructor(){super(...arguments),this.label="",this.configValue=""}_selectChanged(t){const e=t.target.value;e&&this.dispatchEvent(new CustomEvent("value-changed",{detail:{value:"default"!==e?e:""}}))}render(){var t;const e=jo(this.hass);return Y`
- t.stopPropagation()}
- .value=${this.value||"default"}
- fixedMenuPosition
- naturalMenuWidth
- >
-
- ${e("editor.form.info_picker.values.default")}
-
- ${(null!==(t=this.infos)&&void 0!==t?t:rs).map((t=>Y`
-
- ${e(`editor.form.info_picker.values.${t}`)||function(t){return t.charAt(0).toUpperCase()+t.slice(1)}(t)}
-
- `))}
-
- `}static get styles(){return h`
- mushroom-select {
- width: 100%;
- }
- `}};n([_t()],us.prototype,"label",void 0),n([_t()],us.prototype,"value",void 0),n([_t()],us.prototype,"configValue",void 0),n([_t()],us.prototype,"infos",void 0),n([_t()],us.prototype,"hass",void 0),us=n([pt("mushroom-info-picker")],us);let hs=class extends ht{render(){return Y`
-
- `}_valueChanged(t){Lt(this,"value-changed",{value:t.detail.value||void 0})}};n([_t()],hs.prototype,"hass",void 0),n([_t()],hs.prototype,"selector",void 0),n([_t()],hs.prototype,"value",void 0),n([_t()],hs.prototype,"label",void 0),hs=n([pt("ha-selector-mush_info")],hs);const ms=["default","horizontal","vertical"],ps={default:"mdi:card-text-outline",vertical:"mdi:focus-field-vertical",horizontal:"mdi:focus-field-horizontal"};let fs=class extends ht{constructor(){super(...arguments),this.label="",this.configValue=""}_selectChanged(t){const e=t.target.value;e&&this.dispatchEvent(new CustomEvent("value-changed",{detail:{value:"default"!==e?e:""}}))}render(){const t=jo(this.hass),e=this.value||"default";return Y`
- t.stopPropagation()}
- .value=${e}
- fixedMenuPosition
- naturalMenuWidth
- >
-
- ${ms.map((e=>Y`
-
- ${t(`editor.form.layout_picker.values.${e}`)}
-
-
- `))}
-
- `}static get styles(){return h`
- mushroom-select {
- width: 100%;
- }
- `}};n([_t()],fs.prototype,"label",void 0),n([_t()],fs.prototype,"value",void 0),n([_t()],fs.prototype,"configValue",void 0),n([_t()],fs.prototype,"hass",void 0),fs=n([pt("mushroom-layout-picker")],fs);let gs=class extends ht{render(){return Y`
-
- `}_valueChanged(t){Lt(this,"value-changed",{value:t.detail.value||void 0})}};n([_t()],gs.prototype,"hass",void 0),n([_t()],gs.prototype,"selector",void 0),n([_t()],gs.prototype,"value",void 0),n([_t()],gs.prototype,"label",void 0),gs=n([pt("ha-selector-mush_layout")],gs);Tt((t=>{const e={};for(const i of t)e[i.entity_id]=i;return e})),Tt((t=>{const e={};for(const i of t)e[i.id]=i;return e}));const _s={armed_home:{feature:1,service:"alarm_arm_home",icon:"mdi:home"},armed_away:{feature:2,service:"alarm_arm_away",icon:"mdi:lock"},armed_night:{feature:4,service:"alarm_arm_night",icon:"mdi:moon-waning-crescent"},armed_vacation:{feature:32,service:"alarm_arm_vacation",icon:"mdi:airplane"},armed_custom_bypass:{feature:16,service:"alarm_arm_custom_bypass",icon:"mdi:shield"},disarmed:{service:"alarm_disarm",icon:"mdi:shield-off"}};let vs=class extends ht{constructor(){super(...arguments),this.icon=""}render(){return Y`
-
-
-
- `}static get styles(){return h`
- :host {
- --main-color: rgb(var(--rgb-grey));
- --icon-color: rgb(var(--rgb-white));
- }
- .badge {
- display: flex;
- align-items: center;
- justify-content: center;
- line-height: 0;
- width: var(--badge-size);
- height: var(--badge-size);
- font-size: var(--badge-size);
- border-radius: var(--badge-border-radius);
- background-color: var(--main-color);
- transition: background-color 280ms ease-in-out;
- }
- .badge ha-icon {
- --mdc-icon-size: var(--badge-icon-size);
- color: var(--icon-color);
- }
- `}};n([_t()],vs.prototype,"icon",void 0),vs=n([pt("mushroom-badge-icon")],vs);let bs=class extends ht{constructor(){super(...arguments),this.title="",this.disabled=!1}render(){return Y`
-
- `}static get styles(){return h`
- :host {
- --icon-color: var(--primary-text-color);
- --icon-color-disabled: rgb(var(--rgb-disabled));
- --bg-color: rgba(var(--rgb-primary-text-color), 0.05);
- --bg-color-disabled: rgba(var(--rgb-disabled), 0.2);
- height: var(--control-height);
- width: calc(var(--control-height) * var(--control-button-ratio));
- flex: none;
- }
- .button {
- cursor: pointer;
- display: flex;
- align-items: center;
- justify-content: center;
- width: 100%;
- height: 100%;
- border-radius: var(--control-border-radius);
- border: none;
- background-color: var(--bg-color);
- transition: background-color 280ms ease-in-out;
- font-size: var(--control-height);
- margin: 0;
- padding: 0;
- box-sizing: border-box;
- line-height: 0;
- }
- .button:disabled {
- cursor: not-allowed;
- background-color: var(--bg-color-disabled);
- }
- .button ::slotted(*) {
- --mdc-icon-size: var(--control-icon-size);
- color: var(--icon-color);
- pointer-events: none;
- }
- .button:disabled ::slotted(*) {
- color: var(--icon-color-disabled);
- }
- `}};n([_t()],bs.prototype,"title",void 0),n([_t({type:Boolean})],bs.prototype,"disabled",void 0),bs=n([pt("mushroom-button")],bs);let ys=class extends ht{constructor(){super(...arguments),this.fill=!1,this.rtl=!1}render(){return Y`
-
-
-
- `}static get styles(){return h`
- :host {
- display: flex;
- flex-direction: row;
- width: 100%;
- }
- .container {
- width: 100%;
- display: flex;
- flex-direction: row;
- justify-content: flex-end;
- }
- .container ::slotted(*:not(:last-child)) {
- margin-right: var(--spacing);
- }
- :host([rtl]) .container ::slotted(*:not(:last-child)) {
- margin-right: initial;
- margin-left: var(--spacing);
- }
- .container > ::slotted(mushroom-button) {
- width: 0;
- flex-grow: 0;
- flex-shrink: 1;
- flex-basis: calc(var(--control-height) * var(--control-button-ratio));
- }
- .container > ::slotted(mushroom-input-number) {
- width: 0;
- flex-grow: 0;
- flex-shrink: 1;
- flex-basis: calc(
- var(--control-height) * var(--control-button-ratio) * 3
- );
- }
- .container.fill > ::slotted(mushroom-button),
- .container.fill > ::slotted(mushroom-input-number) {
- flex-grow: 1;
- }
- `}};n([_t()],ys.prototype,"fill",void 0),n([_t()],ys.prototype,"rtl",void 0),ys=n([pt("mushroom-button-group")],ys);let xs=class extends ht{render(){var t,e,i,o,n,r;return Y`
-
-
-
- `}static get styles(){return h`
- :host {
- flex: 1;
- display: flex;
- flex-direction: column;
- margin: calc(-1 * var(--ha-card-border-width, 1px));
- }
- .container {
- display: flex;
- flex-direction: column;
- flex-shrink: 0;
- flex-grow: 0;
- box-sizing: border-box;
- justify-content: space-between;
- height: 100%;
- }
- .container.horizontal {
- flex-direction: row;
- }
- .container.horizontal > ::slotted(*) {
- flex: 1;
- min-width: 0;
- }
- .container.horizontal > ::slotted(*.actions) {
- padding-top: 0 !important;
- padding-bottom: 0 !important;
- padding-left: 0 !important;
- --control-spacing: var(--spacing);
- --control-height: var(--icon-size);
- }
- .container > ::slotted(mushroom-state-item) {
- flex: 1;
- }
- .container.horizontal.no-info > ::slotted(mushroom-state-item) {
- flex: none;
- }
- .container.no-content > ::slotted(mushroom-state-item) {
- display: none;
- }
- .container.no-content > ::slotted(.actions) {
- --control-spacing: var(--spacing);
- --control-height: var(--icon-size);
- padding: var(--control-spacing) !important;
- }
- `}};n([_t()],xs.prototype,"appearance",void 0),xs=n([pt("mushroom-card")],xs);const ws={pulse:"@keyframes pulse {\n 0% {\n opacity: 1;\n }\n 50% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }",spin:"@keyframes spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n }",cleaning:"@keyframes cleaning {\n 0% {\n transform: rotate(0) translate(0);\n }\n 5% {\n transform: rotate(0) translate(0, -3px);\n }\n 10% {\n transform: rotate(0) translate(0, 1px);\n }\n 15% {\n transform: rotate(0) translate(0);\n }\n\n 20% {\n transform: rotate(30deg) translate(0);\n }\n 25% {\n transform: rotate(30deg) translate(0, -3px);\n }\n 30% {\n transform: rotate(30deg) translate(0, 1px);\n }\n 35% {\n transform: rotate(30deg) translate(0);\n }\n 40% {\n transform: rotate(0) translate(0);\n }\n\n 45% {\n transform: rotate(-30deg) translate(0);\n }\n 50% {\n transform: rotate(-30deg) translate(0, -3px);\n }\n 55% {\n transform: rotate(-30deg) translate(0, 1px);\n }\n 60% {\n transform: rotate(-30deg) translate(0);\n }\n 70% {\n transform: rotate(0deg) translate(0);\n }\n 100% {\n transform: rotate(0deg);\n }\n }",returning:"@keyframes returning {\n 0% {\n transform: rotate(0);\n }\n 25% {\n transform: rotate(20deg);\n }\n 50% {\n transform: rotate(0);\n }\n 75% {\n transform: rotate(-20deg);\n }\n 100% {\n transform: rotate(0);\n }\n }"},ks=h`
- ${u(ws.pulse)}
- `,Cs=(h`
- ${u(ws.spin)}
- `,h`
- ${u(ws.cleaning)}
- `,h`
- ${u(ws.returning)}
- `,h`
- ${u(Object.values(ws).join("\n"))}
-`);let $s=class extends ht{render(){return Y`
-
-
-
- `}static get styles(){return[Cs,h`
- :host {
- --icon-color: var(--primary-text-color);
- --icon-color-disabled: rgb(var(--rgb-disabled));
- --shape-color: rgba(var(--rgb-primary-text-color), 0.05);
- --shape-color-disabled: rgba(var(--rgb-disabled), 0.2);
- --shape-animation: none;
- --shape-outline-color: transparent;
- flex: none;
- }
- .shape {
- position: relative;
- width: var(--icon-size);
- height: var(--icon-size);
- font-size: var(--icon-size);
- border-radius: var(--icon-border-radius);
- display: flex;
- align-items: center;
- justify-content: center;
- background-color: var(--shape-color);
- transition-property: background-color, box-shadow;
- transition-duration: 280ms;
- transition-timing-function: ease-out;
- animation: var(--shape-animation);
- box-shadow: 0 0 0 1px var(--shape-outline-color);
- }
-
- .shape ::slotted(*) {
- display: flex;
- color: var(--icon-color);
- transition: color 280ms ease-in-out;
- }
- ::slotted(ha-icon),
- ::slotted(ha-state-icon) {
- display: flex;
- line-height: 0;
- --mdc-icon-size: var(--icon-symbol-size);
- }
- .shape.disabled {
- background-color: var(--shape-color-disabled);
- }
- .shape.disabled ::slotted(*) {
- color: var(--icon-color-disabled);
- }
- `]}};n([_t({type:Boolean})],$s.prototype,"disabled",void 0),$s=n([pt("mushroom-shape-icon")],$s);let Es=class extends ht{constructor(){super(...arguments),this.multiline_secondary=!1}render(){var t;return Y`
-
- ${null!==(t=this.primary)&&void 0!==t?t:""}
- ${this.secondary?Y`${this.secondary}`:K}
-
- `}static get styles(){return h`
- .container {
- min-width: 0;
- flex: 1;
- display: flex;
- flex-direction: column;
- }
- .primary {
- font-weight: var(--card-primary-font-weight);
- font-size: var(--card-primary-font-size);
- line-height: var(--card-primary-line-height);
- color: var(--card-primary-color);
- letter-spacing: var(--card-primary-letter-spacing);
- text-overflow: ellipsis;
- overflow: hidden;
- white-space: nowrap;
- }
- .secondary {
- font-weight: var(--card-secondary-font-weight);
- font-size: var(--card-secondary-font-size);
- line-height: var(--card-secondary-line-height);
- color: var(--card-secondary-color);
- letter-spacing: var(--card-secondary-letter-spacing);
- text-overflow: ellipsis;
- overflow: hidden;
- white-space: nowrap;
- }
- .multiline_secondary {
- white-space: pre-wrap;
- }
- `}};n([_t({attribute:!1})],Es.prototype,"primary",void 0),n([_t({attribute:!1})],Es.prototype,"secondary",void 0),n([_t({type:Boolean})],Es.prototype,"multiline_secondary",void 0),Es=n([pt("mushroom-state-info")],Es);let As=class extends ht{render(){var t,e,i,o;return Y`
-
- ${"none"!==(null===(e=this.appearance)||void 0===e?void 0:e.icon_type)?Y`
-
-
-
-
- `:K}
- ${"none"!==(null===(i=this.appearance)||void 0===i?void 0:i.primary_info)||"none"!==(null===(o=this.appearance)||void 0===o?void 0:o.secondary_info)?Y`
-
-
-
- `:K}
-
- `}static get styles(){return h`
- :host {
- display: block;
- height: 100%;
- }
- .container {
- height: 100%;
- display: flex;
- flex-direction: row;
- align-items: center;
- justify-content: center;
- box-sizing: border-box;
- padding: var(--spacing);
- gap: var(--spacing);
- }
- .icon {
- position: relative;
- }
- .icon ::slotted(*[slot="badge"]) {
- position: absolute;
- top: -3px;
- right: -3px;
- }
- :host([rtl]) .icon ::slotted(*[slot="badge"]) {
- right: initial;
- left: -3px;
- }
- .info {
- min-width: 0;
- width: 100%;
- display: flex;
- flex-direction: column;
- }
- .container.vertical {
- flex-direction: column;
- }
- .container.vertical .info {
- text-align: center;
- }
- `}};function Ss(t){var e,i,o,n,r;return{layout:null!==(e=t.layout)&&void 0!==e?e:Is(t),fill_container:null!==(i=t.fill_container)&&void 0!==i&&i,primary_info:null!==(o=t.primary_info)&&void 0!==o?o:zs(t),secondary_info:null!==(n=t.secondary_info)&&void 0!==n?n:Os(t),icon_type:null!==(r=t.icon_type)&&void 0!==r?r:Ts(t)}}function Is(t){return t.vertical?"vertical":"default"}function Ts(t){return t.hide_icon?"none":t.use_entity_picture||t.use_media_artwork?"entity-picture":"icon"}function zs(t){return t.hide_name?"none":"name"}function Os(t){return t.hide_state?"none":"state"}n([_t()],As.prototype,"appearance",void 0),As=n([pt("mushroom-state-item")],As);let Ms=class extends ht{constructor(){super(...arguments),this.picture_url=""}render(){return Y`
-
-
-
- `}static get styles(){return h`
- :host {
- --main-color: var(--primary-text-color);
- --icon-color-disabled: rgb(var(--rgb-disabled));
- --shape-color: rgba(var(--rgb-primary-text-color), 0.05);
- --shape-color-disabled: rgba(var(--rgb-disabled), 0.2);
- flex: none;
- }
- .container {
- position: relative;
- width: var(--icon-size);
- height: var(--icon-size);
- flex: none;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- .picture {
- width: 100%;
- height: 100%;
- border-radius: var(--icon-border-radius);
- }
- `}};n([_t()],Ms.prototype,"picture_url",void 0),Ms=n([pt("mushroom-shape-avatar")],Ms);const js=h`
- --spacing: var(--mush-spacing, 10px);
-
- /* Title */
- --title-padding: var(--mush-title-padding, 24px 12px 8px);
- --title-spacing: var(--mush-title-spacing, 8px);
- --title-font-size: var(--mush-title-font-size, 24px);
- --title-font-weight: var(--mush-title-font-weight, normal);
- --title-line-height: var(--mush-title-line-height, 32px);
- --title-color: var(--mush-title-color, var(--primary-text-color));
- --title-letter-spacing: var(--mush-title-letter-spacing, -0.288px);
- --subtitle-font-size: var(--mush-subtitle-font-size, 16px);
- --subtitle-font-weight: var(--mush-subtitle-font-weight, normal);
- --subtitle-line-height: var(--mush-subtitle-line-height, 24px);
- --subtitle-color: var(--mush-subtitle-color, var(--secondary-text-color));
- --subtitle-letter-spacing: var(--mush-subtitle-letter-spacing, 0px);
-
- /* Card */
- --card-primary-font-size: var(--mush-card-primary-font-size, 14px);
- --card-secondary-font-size: var(--mush-card-secondary-font-size, 12px);
- --card-primary-font-weight: var(--mush-card-primary-font-weight, 500);
- --card-secondary-font-weight: var(--mush-card-secondary-font-weight, 400);
- --card-primary-line-height: var(--mush-card-primary-line-height, 20px);
- --card-secondary-line-height: var(--mush-card-secondary-line-height, 16px);
- --card-primary-color: var(
- --mush-card-primary-color,
- var(--primary-text-color)
- );
- --card-secondary-color: var(
- --mush-card-secondary-color,
- var(--primary-text-color)
- );
- --card-primary-letter-spacing: var(--mush-card-primary-letter-spacing, 0.1px);
- --card-secondary-letter-spacing: var(
- --mush-card-secondary-letter-spacing,
- 0.4px
- );
-
- /* Chips */
- --chip-spacing: var(--mush-chip-spacing, 8px);
- --chip-padding: var(--mush-chip-padding, 0 0.25em);
- --chip-height: var(--mush-chip-height, 36px);
- --chip-border-radius: var(--mush-chip-border-radius, 19px);
- --chip-border-width: var(
- --mush-chip-border-width,
- var(--ha-card-border-width, 1px)
- );
- --chip-border-color: var(
- --mush-chip-border-color,
- var(--ha-card-border-color, var(--divider-color))
- );
- --chip-box-shadow: var(
- --mush-chip-box-shadow,
- var(--ha-card-box-shadow, "none")
- );
- --chip-font-size: var(--mush-chip-font-size, 0.3em);
- --chip-font-weight: var(--mush-chip-font-weight, bold);
- --chip-icon-size: var(--mush-chip-icon-size, 0.5em);
- --chip-avatar-padding: var(--mush-chip-avatar-padding, 0.1em);
- --chip-avatar-border-radius: var(--mush-chip-avatar-border-radius, 50%);
- --chip-background: var(
- --mush-chip-background,
- var(--ha-card-background, var(--card-background-color, white))
- );
- /* Controls */
- --control-border-radius: var(--mush-control-border-radius, 12px);
- --control-height: var(--mush-control-height, 42px);
- --control-button-ratio: var(--mush-control-button-ratio, 1);
- --control-icon-size: var(--mush-control-icon-size, 0.5em);
- --control-spacing: var(--mush-control-spacing, 12px);
-
- /* Slider */
- --slider-threshold: var(--mush-slider-threshold);
-
- /* Input Number */
- --input-number-debounce: var(--mush-input-number-debounce);
-
- /* Layout */
- --layout-align: var(--mush-layout-align, center);
-
- /* Badge */
- --badge-size: var(--mush-badge-size, 16px);
- --badge-icon-size: var(--mush-badge-icon-size, 0.75em);
- --badge-border-radius: var(--mush-badge-border-radius, 50%);
-
- /* Icon */
- --icon-border-radius: var(--mush-icon-border-radius, 50%);
- --icon-size: var(--mush-icon-size, 36px);
- --icon-symbol-size: var(--mush-icon-symbol-size, 0.6em);
-`,Ds=h`
- /* RGB */
- /* Standard colors */
- --rgb-red: var(--mush-rgb-red, var(--default-red));
- --rgb-pink: var(--mush-rgb-pink, var(--default-pink));
- --rgb-purple: var(--mush-rgb-purple, var(--default-purple));
- --rgb-deep-purple: var(--mush-rgb-deep-purple, var(--default-deep-purple));
- --rgb-indigo: var(--mush-rgb-indigo, var(--default-indigo));
- --rgb-blue: var(--mush-rgb-blue, var(--default-blue));
- --rgb-light-blue: var(--mush-rgb-light-blue, var(--default-light-blue));
- --rgb-cyan: var(--mush-rgb-cyan, var(--default-cyan));
- --rgb-teal: var(--mush-rgb-teal, var(--default-teal));
- --rgb-green: var(--mush-rgb-green, var(--default-green));
- --rgb-light-green: var(--mush-rgb-light-green, var(--default-light-green));
- --rgb-lime: var(--mush-rgb-lime, var(--default-lime));
- --rgb-yellow: var(--mush-rgb-yellow, var(--default-yellow));
- --rgb-amber: var(--mush-rgb-amber, var(--default-amber));
- --rgb-orange: var(--mush-rgb-orange, var(--default-orange));
- --rgb-deep-orange: var(--mush-rgb-deep-orange, var(--default-deep-orange));
- --rgb-brown: var(--mush-rgb-brown, var(--default-brown));
- --rgb-light-grey: var(--mush-rgb-light-grey, var(--default-light-grey));
- --rgb-grey: var(--mush-rgb-grey, var(--default-grey));
- --rgb-dark-grey: var(--mush-rgb-dark-grey, var(--default-dark-grey));
- --rgb-blue-grey: var(--mush-rgb-blue-grey, var(--default-blue-grey));
- --rgb-black: var(--mush-rgb-black, var(--default-black));
- --rgb-white: var(--mush-rgb-white, var(--default-white));
- --rgb-disabled: var(--mush-rgb-disabled, var(--default-disabled));
-
- /* Action colors */
- --rgb-info: var(--mush-rgb-info, var(--rgb-blue));
- --rgb-success: var(--mush-rgb-success, var(--rgb-green));
- --rgb-warning: var(--mush-rgb-warning, var(--rgb-orange));
- --rgb-danger: var(--mush-rgb-danger, var(--rgb-red));
-
- /* State colors */
- --rgb-state-vacuum: var(--mush-rgb-state-vacuum, var(--rgb-teal));
- --rgb-state-fan: var(--mush-rgb-state-fan, var(--rgb-green));
- --rgb-state-light: var(--mush-rgb-state-light, var(--rgb-orange));
- --rgb-state-entity: var(--mush-rgb-state-entity, var(--rgb-blue));
- --rgb-state-media-player: var(
- --mush-rgb-state-media-player,
- var(--rgb-indigo)
- );
- --rgb-state-lock: var(--mush-rgb-state-lock, var(--rgb-blue));
- --rgb-state-number: var(--mush-rgb-state-number, var(--rgb-blue));
- --rgb-state-humidifier: var(--mush-rgb-state-humidifier, var(--rgb-purple));
-
- /* State alarm colors */
- --rgb-state-alarm-disarmed: var(
- --mush-rgb-state-alarm-disarmed,
- var(--rgb-info)
- );
- --rgb-state-alarm-armed: var(
- --mush-rgb-state-alarm-armed,
- var(--rgb-success)
- );
- --rgb-state-alarm-triggered: var(
- --mush-rgb-state-alarm-triggered,
- var(--rgb-danger)
- );
-
- /* State person colors */
- --rgb-state-person-home: var(
- --mush-rgb-state-person-home,
- var(--rgb-success)
- );
- --rgb-state-person-not-home: var(
- --mush-rgb-state-person-not-home,
- var(--rgb-danger)
- );
- --rgb-state-person-zone: var(--mush-rgb-state-person-zone, var(--rgb-info));
- --rgb-state-person-unknown: var(
- --mush-rgb-state-person-unknown,
- var(--rgb-grey)
- );
-
- /* State update colors */
- --rgb-state-update-on: var(--mush-rgb-state-update-on, var(--rgb-orange));
- --rgb-state-update-off: var(--mush-rgb-update-off, var(--rgb-green));
- --rgb-state-update-installing: var(
- --mush-rgb-update-installing,
- var(--rgb-blue)
- );
-
- /* State lock colors */
- --rgb-state-lock-locked: var(--mush-rgb-state-lock-locked, var(--rgb-green));
- --rgb-state-lock-unlocked: var(
- --mush-rgb-state-lock-unlocked,
- var(--rgb-red)
- );
- --rgb-state-lock-pending: var(
- --mush-rgb-state-lock-pending,
- var(--rgb-orange)
- );
-
- /* State cover colors */
- --rgb-state-cover-open: var(--mush-rgb-state-cover-open, var(--rgb-blue));
- --rgb-state-cover-closed: var(
- --mush-rgb-state-cover-closed,
- var(--rgb-disabled)
- );
-
- /* State climate colors */
- --rgb-state-climate-auto: var(
- --mush-rgb-state-climate-auto,
- var(--rgb-green)
- );
- --rgb-state-climate-cool: var(--mush-rgb-state-climate-cool, var(--rgb-blue));
- --rgb-state-climate-dry: var(--mush-rgb-state-climate-dry, var(--rgb-orange));
- --rgb-state-climate-fan-only: var(
- --mush-rgb-state-climate-fan-only,
- var(--rgb-teal)
- );
- --rgb-state-climate-heat: var(
- --mush-rgb-state-climate-heat,
- var(--rgb-deep-orange)
- );
- --rgb-state-climate-heat-cool: var(
- --mush-rgb-state-climate-heat-cool,
- var(--rgb-green)
- );
- --rgb-state-climate-idle: var(
- --mush-rgb-state-climate-idle,
- var(--rgb-disabled)
- );
- --rgb-state-climate-off: var(
- --mush-rgb-state-climate-off,
- var(--rgb-disabled)
- );
-`;function Ls(t){return!!t&&t.themes.darkMode}class Ps extends ht{firstUpdated(t){this.toggleAttribute("pre-2024-8",!ai(this.hass.config.version,2024,8))}updated(t){if(super.updated(t),t.has("hass")&&this.hass){const e=Ls(t.get("hass")),i=Ls(this.hass);e!==i&&this.toggleAttribute("dark-mode",i)}}static get styles(){return[Cs,h`
- :host {
- ${ts}
- }
- :host([dark-mode]) {
- ${es}
- }
- :host {
- ${Ds}
- ${js}
- }
- :host([pre-2024-8]) {
- --spacing: var(--mush-spacing, 12px);
- --control-height: var(--mush-control-height, 40px);
- --control-spacing: var(--mush-spacing, 12px);
- --icon-size: var(--mush-icon-size, 40px);
- }
- `]}}n([_t({attribute:!1})],Ps.prototype,"hass",void 0);class Ns extends Ps{get _stateObj(){if(!this._config||!this.hass||!this._config.entity)return;const t=this._config.entity;return this.hass.states[t]}get hasControls(){return!1}setConfig(t){this._config=Object.assign({tap_action:{action:"more-info"},hold_action:{action:"more-info"}},t)}getCardSize(){var t;let e=1;if(!this._config)return e;const i=Ss(this._config);return"vertical"===i.layout&&(e+=1),"horizontal"===(null==i?void 0:i.layout)||!this.hasControls||"collapsible_controls"in this._config&&(null===(t=this._config)||void 0===t?void 0:t.collapsible_controls)||(e+=1),e}getLayoutOptions(){if(!this._config)return{grid_columns:2,grid_rows:1};const t={grid_columns:2,grid_rows:0},e=Ss(this._config),i="collapsible_controls"in this._config&&Boolean(this._config.collapsible_controls),o="none"!==e.primary_info||"none"!==e.secondary_info,n="none"!==e.icon_type,r=this._stateObj&&Bt(this._stateObj),a=this.hasControls&&(!i||r);return"vertical"===e.layout&&(n&&(t.grid_rows+=1),o&&(t.grid_rows+=1),a&&(t.grid_rows+=1)),"horizontal"===e.layout&&(t.grid_rows=1,t.grid_columns=4),"default"===e.layout&&((o||n)&&(t.grid_rows+=1),a&&(t.grid_rows+=1)),a||o||(t.grid_columns=1,t.grid_rows=1),t.grid_rows=Math.max(t.grid_rows,1),t}renderPicture(t){return Y`
-
- `}renderNotFound(t){const e=Ss(t),i=Ie(this.hass),o=jo(this.hass);return Y`
-
-
-
-
-
-
-
-
-
-
-
- `}renderIcon(t,e){const i=Bt(t);return Y`
-
-
- `}renderBadge(t){return!Ut(t)?Y`
-
- `:K}renderStateInfo(t,e,i,o){const n=this.hass.formatEntityState?this.hass.formatEntityState(t):ne(this.hass.localize,t,this.hass.locale,this.hass.config,this.hass.entities),r=null!=o?o:n,a=ss(e.primary_info,i,r,t,this.hass),s=ss(e.secondary_info,i,r,t,this.hass);return Y`
-
- `}}n([vt()],Ns.prototype,"_config",void 0),n([_t({reflect:!0,type:String})],Ns.prototype,"layout",void 0);const Rs=h`
- ha-card {
- box-sizing: border-box;
- display: flex;
- flex-direction: column;
- justify-content: var(--layout-align);
- height: auto;
- display: flex;
- flex-direction: column;
- }
- ha-card.fill-container {
- height: 100%;
- }
- :host([layout="grid"]) ha-card {
- height: 100%;
- }
- .actions {
- display: flex;
- flex-direction: row;
- align-items: center;
- justify-content: flex-start;
- overflow-x: auto;
- overflow-y: hidden;
- scrollbar-width: none; /* Firefox */
- -ms-overflow-style: none; /* IE 10+ */
- padding: var(--control-spacing);
- padding-top: 0;
- box-sizing: border-box;
- gap: var(--control-spacing);
- }
- .actions::-webkit-scrollbar {
- background: transparent; /* Chrome/Safari/Webkit */
- height: 0px;
- }
- .unavailable {
- --main-color: rgb(var(--rgb-warning));
- }
- .not-found {
- --main-color: rgb(var(--rgb-danger));
- }
- mushroom-state-item[disabled] {
- cursor: initial;
- }
-`;function Fs(e){const i=window;i.customCards=i.customCards||[];const o=e.type.replace("-card","").replace("mushroom-","");i.customCards.push(Object.assign(Object.assign({},e),{preview:!0,documentationURL:`${t}/blob/main/docs/cards/${o}.md`}))}const Vs="mushroom",Bs=`${Vs}-alarm-control-panel-card`,Us=`${Bs}-editor`,Hs=["alarm_control_panel"],Ys={disarmed:"var(--rgb-state-alarm-disarmed)",armed:"var(--rgb-state-alarm-armed)",triggered:"var(--rgb-state-alarm-triggered)",unavailable:"var(--rgb-warning)"};function Ws(t){var e;return null!==(e=Ys[t.split("_")[0]])&&void 0!==e?e:"var(--rgb-grey)"}function Xs(t){return["arming","triggered","pending",Nt].indexOf(t)>=0}Fs({type:Bs,name:"Mushroom Alarm Control Panel Card",description:"Card for alarm control panel"});let Ks=class extends Ns{static async getConfigElement(){return await Promise.resolve().then((function(){return tu})),document.createElement(Us)}static async getStubConfig(t){const e=Object.keys(t.states).filter((t=>Hs.includes(t.split(".")[0])));return{type:`custom:${Bs}`,entity:e[0],states:["armed_home","armed_away"]}}get hasControls(){var t,e;return Boolean(null===(e=null===(t=this._config)||void 0===t?void 0:t.states)||void 0===e?void 0:e.length)}_onTap(t,e){t.stopPropagation(),(async(t,e,i,o)=>{var n,r;const{service:a}=_s[o];let s;if("disarmed"!==o&&i.attributes.code_arm_required||"disarmed"===o&&i.attributes.code_format){const a=await((t,e)=>t.callWS({type:"config/entity_registry/get",entity_id:e}))(e,i.entity_id).catch((()=>{}));if(!(null===(r=null===(n=null==a?void 0:a.options)||void 0===n?void 0:n.alarm_control_panel)||void 0===r?void 0:r.default_code)){const n="disarmed"===o,r=await window.loadCardHelpers(),a=await r.showEnterCodeDialog(t,{codeFormat:i.attributes.code_format,title:e.localize("ui.card.alarm_control_panel."+(n?"disarm":"arm")),submitText:e.localize("ui.card.alarm_control_panel."+(n?"disarm":"arm"))});if(null==a)throw new Error("Code dialog closed");s=a}}await e.callService("alarm_control_panel",a,{entity_id:i.entity_id,code:s})})(this,this.hass,this._stateObj,e)}_handleAction(t){Ke(this,this.hass,this._config,t.detail.action)}render(){if(!this.hass||!this._config||!this._config.entity)return K;const t=this._stateObj;if(!t)return this.renderNotFound(this._config);const e=this._config.name||t.attributes.friendly_name||"",i=this._config.icon,o=Ss(this._config),n=ls(t,o.icon_type),r=this._config.states&&this._config.states.length>0?function(t){return"disarmed"===t.state}(t)?this._config.states.map((t=>({mode:t}))):[{mode:"disarmed"}]:[],a=function(t){return Nt!==t.state}(t),s=Ie(this.hass);return Y`
-
-
-
- ${n?this.renderPicture(n):this.renderIcon(t,i)}
- ${this.renderBadge(t)}
- ${this.renderStateInfo(t,o,e)};
-
- ${r.length>0?Y`
-
-
- ${r.map((t=>Y`
- this._onTap(e,t.mode)}
- .disabled=${!a}
- >
-
-
-
- `))}
-
-
- `:K}
-
-
- `}renderIcon(t,e){const i=Ws(t.state),o=Xs(t.state);return Y`
-
-
-
- `}static get styles(){return[super.styles,Rs,h`
- mushroom-state-item {
- cursor: pointer;
- }
- mushroom-shape-icon.pulse {
- --shape-animation: 1s ease 0s infinite normal none running pulse;
- }
- `]}};Ks=n([pt(Bs)],Ks);let qs=class extends ht{constructor(){super(...arguments),this.icon="",this.label="",this.avatar="",this.avatarOnly=!1}render(){return Y`
-
- ${this.avatar?Y` `:K}
- ${this.avatarOnly?K:Y`
-
-
-
- `}
-
- `}static get styles(){return[Cs,h`
- :host {
- --icon-color: var(--primary-text-color);
- --text-color: var(--primary-text-color);
- }
- ha-card {
- box-sizing: border-box;
- height: var(--chip-height);
- min-width: var(--chip-height);
- font-size: var(--chip-height);
- width: auto;
- border-radius: var(--chip-border-radius);
- display: flex;
- flex-direction: row;
- align-items: center;
- background: var(--chip-background);
- border-width: var(--chip-border-width);
- border-color: var(--chip-border-color);
- box-shadow: var(--chip-box-shadow);
- box-sizing: content-box;
- }
- .avatar {
- --avatar-size: calc(
- var(--chip-height) - 2 * var(--chip-avatar-padding)
- );
- border-radius: var(--chip-avatar-border-radius);
- height: var(--avatar-size);
- width: var(--avatar-size);
- margin-left: var(--chip-avatar-padding);
- box-sizing: border-box;
- object-fit: cover;
- }
- :host([rtl]) .avatar {
- margin-left: initial;
- margin-right: var(--chip-avatar-padding);
- }
- .content {
- display: flex;
- flex-direction: row;
- align-items: center;
- justify-content: center;
- height: 100%;
- padding: var(--chip-padding);
- line-height: 0;
- }
- ::slotted(ha-icon),
- ::slotted(ha-state-icon) {
- display: flex;
- line-height: 0;
- --mdc-icon-size: var(--chip-icon-size);
- color: var(--icon-color);
- }
- ::slotted(svg) {
- width: var(--chip-icon-size);
- height: var(--chip-icon-size);
- display: flex;
- }
- ::slotted(span) {
- font-weight: var(--chip-font-weight);
- font-size: var(--chip-font-size);
- line-height: 1;
- color: var(--text-color);
- }
- ::slotted(*:not(:last-child)) {
- margin-right: 0.15em;
- }
- :host([rtl]) ::slotted(*:not(:last-child)) {
- margin-right: initial;
- margin-left: 0.15em;
- }
- `]}};n([_t()],qs.prototype,"icon",void 0),n([_t()],qs.prototype,"label",void 0),n([_t()],qs.prototype,"avatar",void 0),n([_t()],qs.prototype,"avatarOnly",void 0),qs=n([pt("mushroom-chip")],qs);const Gs=t=>{try{const e=Zs(t.type);if(customElements.get(e)){const i=document.createElement(e,t);return i.setConfig(t),i}const i=document.createElement(e);return customElements.whenDefined(e).then((()=>{try{customElements.upgrade(i),i.setConfig(t)}catch(t){}})),i}catch(t){return void console.error(t)}};function Zs(t){return`${Vs}-${t}-chip`}function Js(t){return`${Vs}-${t}-chip-editor`}let Qs=class extends ht{static async getConfigElement(){return await Promise.resolve().then((function(){return ou})),document.createElement(Js("entity"))}static async getStubConfig(t){return{type:"entity",entity:Object.keys(t.states)[0]}}setConfig(t){this._config=t}_handleAction(t){Ke(this,this.hass,this._config,t.detail.action)}render(){var t;if(!this.hass||!this._config||!this._config.entity)return K;const e=this._config.entity,i=this.hass.states[e];if(!i)return K;const o=this._config.name||i.attributes.friendly_name||"",n=this._config.icon,r=this._config.icon_color,a=this._config.use_entity_picture?Yt(i):void 0,s=this.hass.formatEntityState?this.hass.formatEntityState(i):ne(this.hass.localize,i,this.hass.locale,this.hass.config,this.hass.entities),l=Bt(i),c=ss(null!==(t=this._config.content_info)&&void 0!==t?t:"state",o,s,i,this.hass),d=Ie(this.hass);return Y`
-
- ${a?K:this.renderIcon(i,n,r,l)}
- ${c?Y`${c}`:K}
-
- `}renderIcon(t,e,i,o){const n={};if(i){const t=Qa(i);n["--color"]=`rgb(${t})`}return Y`
-
- `}static get styles(){return h`
- mushroom-chip {
- cursor: pointer;
- }
- ha-state-icon.active {
- color: var(--color);
- }
- `}};n([_t({attribute:!1})],Qs.prototype,"hass",void 0),n([vt()],Qs.prototype,"_config",void 0),Qs=n([pt(Zs("entity"))],Qs);const tl=new Set(["partlycloudy","cloudy","fog","windy","windy-variant","hail","rainy","snowy","snowy-rainy","pouring","lightning","lightning-rainy"]),el=new Set(["hail","rainy","pouring"]),il=new Set(["windy","windy-variant"]),ol=new Set(["snowy","snowy-rainy"]),nl=new Set(["lightning","lightning-rainy"]),rl=h`
- .rain {
- fill: var(--weather-icon-rain-color, #30b3ff);
- }
- .sun {
- fill: var(--weather-icon-sun-color, #fdd93c);
- }
- .moon {
- fill: var(--weather-icon-moon-color, #fcf497);
- }
- .cloud-back {
- fill: var(--weather-icon-cloud-back-color, #d4d4d4);
- }
- .cloud-front {
- fill: var(--weather-icon-cloud-front-color, #f9f9f9);
- }
-`,al=(t,e)=>W`
- `;let sl=class extends ht{static async getConfigElement(){return await Promise.resolve().then((function(){return cu})),document.createElement(Js("weather"))}static async getStubConfig(t){const e=Object.keys(t.states).filter((t=>"weather"===t.split(".")[0]));return{type:"weather",entity:e[0]}}setConfig(t){this._config=t}_handleAction(t){Ke(this,this.hass,this._config,t.detail.action)}render(){if(!this.hass||!this._config||!this._config.entity)return K;const t=this._config.entity,e=this.hass.states[t];if(!e)return K;const i=al(e.state,!0),o=[];if(this._config.show_conditions){const t=this.hass.formatEntityState?this.hass.formatEntityState(e):ne(this.hass.localize,e,this.hass.locale,this.hass.config,this.hass.entities);o.push(t)}if(this._config.show_temperature){const t=`${te(e.attributes.temperature,this.hass.locale)} ${this.hass.config.unit_system.temperature}`;o.push(t)}const n=Ie(this.hass);return Y`
-
- ${i}
- ${o.length>0?Y`${o.join(" / ")}`:K}
-
- `}static get styles(){return[rl,h`
- mushroom-chip {
- cursor: pointer;
- }
- `]}};n([_t({attribute:!1})],sl.prototype,"hass",void 0),n([vt()],sl.prototype,"_config",void 0),sl=n([pt(Zs("weather"))],sl);const ll="mdi:arrow-left";let cl=class extends ht{static async getConfigElement(){return await Promise.resolve().then((function(){return hu})),document.createElement(Js("back"))}static async getStubConfig(t){return{type:"back"}}setConfig(t){this._config=t}_handleAction(){window.history.back()}render(){if(!this.hass||!this._config)return K;const t=this._config.icon||ll,e=Ie(this.hass);return Y`
-
-
-
- `}static get styles(){return h`
- mushroom-chip {
- cursor: pointer;
- }
- `}};n([_t({attribute:!1})],cl.prototype,"hass",void 0),n([vt()],cl.prototype,"_config",void 0),cl=n([pt(Zs("back"))],cl);const dl="mdi:flash";let ul=class extends ht{static async getConfigElement(){return await Promise.resolve().then((function(){return gu})),document.createElement(Js("action"))}static async getStubConfig(t){return{type:"action"}}setConfig(t){this._config=t}_handleAction(t){Ke(this,this.hass,this._config,t.detail.action)}render(){if(!this.hass||!this._config)return K;const t=this._config.icon||dl,e=this._config.icon_color,i={};if(e){const t=Qa(e);i["--color"]=`rgb(${t})`}const o=Ie(this.hass);return Y`
-
-
-
- `}static get styles(){return h`
- mushroom-chip {
- cursor: pointer;
- }
- ha-state-icon {
- color: var(--color);
- }
- `}};n([_t({attribute:!1})],ul.prototype,"hass",void 0),n([vt()],ul.prototype,"_config",void 0),ul=n([pt(Zs("action"))],ul);const hl="mdi:menu";let ml=class extends ht{static async getConfigElement(){return await Promise.resolve().then((function(){return bu})),document.createElement(Js("menu"))}static async getStubConfig(t){return{type:"menu"}}setConfig(t){this._config=t}_handleAction(){Lt(this,"hass-toggle-menu")}render(){if(!this.hass||!this._config)return K;const t=this._config.icon||hl,e=Ie(this.hass);return Y`
-
-
-
- `}static get styles(){return h`
- mushroom-chip {
- cursor: pointer;
- }
- `}};n([_t({attribute:!1})],ml.prototype,"hass",void 0),n([vt()],ml.prototype,"_config",void 0),ml=n([pt(Zs("menu"))],ml);const pl=new Set(["clear-night","cloudy","fog","lightning","lightning-rainy","partlycloudy","pouring","rainy","hail","snowy","snowy-rainy","sunny","windy","windy-variant"]),fl=t=>{if(!t||!t.startsWith("weather-"))return;const e=t.replace("weather-","");return pl.has(e)?al(e,!0):void 0},gl=["content","icon","icon_color","picture"];let _l=class extends ht{constructor(){super(...arguments),this._templateResults={},this._unsubRenderTemplates=new Map}static async getConfigElement(){return await Promise.resolve().then((function(){return Au})),document.createElement(Js("template"))}static async getStubConfig(t){return{type:"template"}}setConfig(t){gl.forEach((e=>{var i,o;(null===(i=this._config)||void 0===i?void 0:i[e])===t[e]&&(null===(o=this._config)||void 0===o?void 0:o.entity)==t.entity||this._tryDisconnectKey(e)})),this._config=Object.assign({tap_action:{action:"toggle"},hold_action:{action:"more-info"}},t)}connectedCallback(){super.connectedCallback(),this._tryConnect()}disconnectedCallback(){this._tryDisconnect()}_handleAction(t){Ke(this,this.hass,this._config,t.detail.action)}isTemplate(t){var e;const i=null===(e=this._config)||void 0===e?void 0:e[t];return null==i?void 0:i.includes("{")}getValue(t){var e,i,o;return this.isTemplate(t)?null===(i=null===(e=this._templateResults[t])||void 0===e?void 0:e.result)||void 0===i?void 0:i.toString():null===(o=this._config)||void 0===o?void 0:o[t]}render(){if(!this.hass||!this._config)return K;const t=this.getValue("icon"),e=this.getValue("icon_color"),i=this.getValue("content"),o=this.getValue("picture"),n=Ie(this.hass),r=fl(t);return Y`
-
- ${o?K:r||(t?this.renderIcon(t,e):K)}
- ${i?this.renderContent(i):K}
-
- `}renderIcon(t,e){const i={};if(e){const t=Qa(e);i["--color"]=`rgb(${t})`}return Y``}renderContent(t){return Y`${t}`}updated(t){super.updated(t),this._config&&this.hass&&this._tryConnect()}async _tryConnect(){gl.forEach((t=>{this._tryConnectKey(t)}))}async _tryConnectKey(t){var e,i;if(void 0===this._unsubRenderTemplates.get(t)&&this.hass&&this._config&&this.isTemplate(t))try{const i=Fe(this.hass.connection,(e=>{this._templateResults=Object.assign(Object.assign({},this._templateResults),{[t]:e})}),{template:null!==(e=this._config[t])&&void 0!==e?e:"",entity_ids:this._config.entity_id,variables:{config:this._config,user:this.hass.user.name,entity:this._config.entity},strict:!0});this._unsubRenderTemplates.set(t,i),await i}catch(e){const o={result:null!==(i=this._config[t])&&void 0!==i?i:"",listeners:{all:!1,domains:[],entities:[],time:!1}};this._templateResults=Object.assign(Object.assign({},this._templateResults),{[t]:o}),this._unsubRenderTemplates.delete(t)}}async _tryDisconnect(){gl.forEach((t=>{this._tryDisconnectKey(t)}))}async _tryDisconnectKey(t){const e=this._unsubRenderTemplates.get(t);if(e)try{(await e)(),this._unsubRenderTemplates.delete(t)}catch(t){if("not_found"!==t.code&&"template_error"!==t.code)throw t}}static get styles(){return h`
- mushroom-chip {
- cursor: pointer;
- }
- ha-state-icon {
- color: var(--color);
- }
- ${rl}
- `}};n([_t({attribute:!1})],_l.prototype,"hass",void 0),n([vt()],_l.prototype,"_config",void 0),n([vt()],_l.prototype,"_templateResults",void 0),n([vt()],_l.prototype,"_unsubRenderTemplates",void 0),_l=n([pt(Zs("template"))],_l);const vl=()=>{var t,e,i;customElements.get("ha-form")||null===(t=customElements.get("hui-button-card"))||void 0===t||t.getConfigElement(),customElements.get("ha-entity-picker")||null===(e=customElements.get("hui-entities-card"))||void 0===e||e.getConfigElement(),customElements.get("ha-card-conditions-editor")||null===(i=customElements.get("hui-conditional-card"))||void 0===i||i.getConfigElement()},bl=Zs("conditional"),yl=async()=>{if(customElements.get(bl))return;if(!customElements.get("hui-conditional-base")){(await window.loadCardHelpers()).createCardElement({type:"conditional",card:{type:"button"},conditions:[]})}const t=await(async t=>{let e=customElements.get(t);return e||(await customElements.whenDefined(t),customElements.get(t))})("hui-conditional-base");class e extends t{static async getConfigElement(){return await Promise.resolve().then((function(){return jp})),document.createElement(Js("conditional"))}static async getStubConfig(){return{type:"conditional",conditions:[]}}setConfig(t){if(this.validateConfig(t),!t.chip)throw new Error("No chip configured");this._element=Gs(t.chip)}}customElements.get(bl)||customElements.define(bl,e)};function xl(t){return null!=t.attributes.brightness?Math.max(Math.round(100*t.attributes.brightness/255),1):void 0}function wl(t){return null!=t.attributes.rgb_color?t.attributes.rgb_color:void 0}function kl(t){return Za.rgb(t).l()>96}function Cl(t){return Za.rgb(t).l()>97}function $l(t){return(t=>{var e;return(null===(e=t.attributes.supported_color_modes)||void 0===e?void 0:e.some((t=>De.includes(t))))||!1})(t)}function El(t){return(t=>{var e;return(null===(e=t.attributes.supported_color_modes)||void 0===e?void 0:e.some((t=>Le.includes(t))))||!1})(t)}let Al=class extends ht{static async getConfigElement(){return await Promise.resolve().then((function(){return Bp})),document.createElement(Js("light"))}static async getStubConfig(t){const e=Object.keys(t.states).filter((t=>"light"===t.split(".")[0]));return{type:"light",entity:e[0]}}setConfig(t){this._config=Object.assign({tap_action:{action:"toggle"},hold_action:{action:"more-info"}},t)}_handleAction(t){Ke(this,this.hass,this._config,t.detail.action)}render(){var t,e;if(!this.hass||!this._config||!this._config.entity)return K;const i=this._config.entity,o=this.hass.states[i];if(!o)return K;const n=this._config.name||o.attributes.friendly_name||"",r=this._config.icon,a=this.hass.formatEntityState?this.hass.formatEntityState(o):ne(this.hass.localize,o,this.hass.locale,this.hass.config,this.hass.entities),s=Bt(o),l=wl(o),c={};if(l&&(null===(t=this._config)||void 0===t?void 0:t.use_light_color)){const t=l.join(",");c["--color"]=`rgb(${t})`,Cl(l)&&(c["--color"]="rgba(var(--rgb-primary-text-color), 0.2)")}const d=ss(null!==(e=this._config.content_info)&&void 0!==e?e:"state",n,a,o,this.hass),u=Ie(this.hass);return Y`
-
-
- ${d?Y`${d}`:K}
-
- `}static get styles(){return h`
- :host {
- --color: rgb(var(--rgb-state-light));
- }
- mushroom-chip {
- cursor: pointer;
- }
- ha-state-icon.active {
- color: var(--color);
- }
- `}};n([_t({attribute:!1})],Al.prototype,"hass",void 0),n([vt()],Al.prototype,"_config",void 0),Al=n([pt(Zs("light"))],Al);let Sl=class extends ht{static async getConfigElement(){return await Promise.resolve().then((function(){return Wp})),document.createElement(Js("alarm-control-panel"))}static async getStubConfig(t){const e=Object.keys(t.states).filter((t=>Hs.includes(t.split(".")[0])));return{type:"alarm-control-panel",entity:e[0]}}setConfig(t){this._config=t}_handleAction(t){Ke(this,this.hass,this._config,t.detail.action)}render(){var t;if(!this.hass||!this._config||!this._config.entity)return K;const e=this._config.entity,i=this.hass.states[e];if(!i)return K;const o=this._config.name||i.attributes.friendly_name||"",n=this._config.icon,r=Ws(i.state),a=Xs(i.state),s=this.hass.formatEntityState?this.hass.formatEntityState(i):ne(this.hass.localize,i,this.hass.locale,this.hass.config,this.hass.entities),l={};if(r){const t=Qa(r);l["--color"]=`rgb(${t})`}const c=ss(null!==(t=this._config.content_info)&&void 0!==t?t:"state",o,s,i,this.hass),d=Ie(this.hass);return Y`
-
-
- ${c?Y`${c}`:K}
-
- `}static get styles(){return h`
- mushroom-chip {
- cursor: pointer;
- }
- ha-state-icon {
- color: var(--color);
- }
- ha-state-icon.pulse {
- animation: 1s ease 0s infinite normal none running pulse;
- }
- ${ks}
- `}};n([_t({attribute:!1})],Sl.prototype,"hass",void 0),n([vt()],Sl.prototype,"_config",void 0),Sl=n([pt(Zs("alarm-control-panel"))],Sl);let Il=class extends ht{setConfig(){}static get styles(){return h`
- :host {
- flex-grow: 1;
- }
- `}};Il=n([pt(Zs("spacer"))],Il);const Tl=`${Vs}-chips-card`,zl=`${Tl}-editor`;Fs({type:Tl,name:"Mushroom Chips Card",description:"Card with chips to display informations"});let Ol=class extends ht{static async getConfigElement(){return await Promise.resolve().then((function(){return hf})),document.createElement(zl)}static async getStubConfig(t){const e=await Promise.all([Qs.getStubConfig(t)]);return{type:`custom:${Tl}`,chips:e}}set hass(t){var e;const i=Ls(this._hass),o=Ls(t);i!==o&&this.toggleAttribute("dark-mode",o),this._hass=t,null===(e=this.shadowRoot)||void 0===e||e.querySelectorAll("div > *").forEach((e=>{e.hass=t}))}getCardSize(){return 1}setConfig(t){this._config=t}render(){if(!this._config||!this._hass)return K;let t="";this._config.alignment&&(t=`align-${this._config.alignment}`);const e=Ie(this._hass);return Y`
-
-
- ${this._config.chips.map((t=>this.renderChip(t)))}
-
-
- `}renderChip(t){"conditional"===t.type&&yl();const e=Gs(t);return e?(this._hass&&(e.hass=this._hass),e.editMode=this.editMode||this.preview,e.preview=this.preview||this.editMode,Y`${e}`):K}static get styles(){return[Ps.styles,h`
- ha-card {
- background: none;
- box-shadow: none;
- border-radius: 0;
- border: none;
- }
- .chip-container {
- display: flex;
- flex-direction: row;
- align-items: flex-start;
- justify-content: flex-start;
- flex-wrap: wrap;
- gap: var(--chip-spacing);
- }
- .chip-container.align-end {
- justify-content: flex-end;
- }
- .chip-container.align-center {
- justify-content: center;
- }
- .chip-container.align-justify {
- justify-content: space-between;
- }
- `]}};n([_t()],Ol.prototype,"preview",void 0),n([_t()],Ol.prototype,"editMode",void 0),n([vt()],Ol.prototype,"_config",void 0),Ol=n([pt(Tl)],Ol);const Ml=`${Vs}-climate-card`,jl=`${Ml}-editor`,Dl=["climate"],Ll={auto:"var(--rgb-state-climate-auto)",cool:"var(--rgb-state-climate-cool)",dry:"var(--rgb-state-climate-dry)",fan_only:"var(--rgb-state-climate-fan-only)",heat:"var(--rgb-state-climate-heat)",heat_cool:"var(--rgb-state-climate-heat-cool)",off:"var(--rgb-state-climate-off)"},Pl={cooling:"var(--rgb-state-climate-cool)",drying:"var(--rgb-state-climate-dry)",heating:"var(--rgb-state-climate-heat)",idle:"var(--rgb-state-climate-idle)",off:"var(--rgb-state-climate-off)"},Nl={auto:"mdi:calendar-sync",cool:"mdi:snowflake",dry:"mdi:water-percent",fan_only:"mdi:fan",heat:"mdi:fire",heat_cool:"mdi:autorenew",off:"mdi:power"},Rl={cooling:"mdi:snowflake",drying:"mdi:water-percent",heating:"mdi:fire",idle:"mdi:clock-outline",off:"mdi:power"};function Fl(t){var e;return null!==(e=Ll[t])&&void 0!==e?e:Ll.off}let Vl=class extends ht{constructor(){super(...arguments),this.fill=!1}callService(t){t.stopPropagation();const e=t.target.mode;this.hass.callService("climate","set_hvac_mode",{entity_id:this.entity.entity_id,hvac_mode:e})}render(){const t=Ie(this.hass),e=this.entity.attributes.hvac_modes.filter((t=>{var e;return(null!==(e=this.modes)&&void 0!==e?e:[]).includes(t)})).sort(je);return Y`
-
- ${e.map((t=>this.renderModeButton(t)))}
-
- `}renderModeButton(t){const e={},i="off"===t?"var(--rgb-grey)":Fl(t);return t===this.entity.state&&(e["--icon-color"]=`rgb(${i})`,e["--bg-color"]=`rgba(${i}, 0.2)`),Y`
-
-
-
- `}};n([_t({attribute:!1})],Vl.prototype,"hass",void 0),n([_t({attribute:!1})],Vl.prototype,"entity",void 0),n([_t({attribute:!1})],Vl.prototype,"modes",void 0),n([_t()],Vl.prototype,"fill",void 0),Vl=n([pt("mushroom-climate-hvac-modes-control")],Vl);let Bl=class extends ht{constructor(){super(...arguments),this.disabled=!1,this.formatOptions={},this.pending=!1,this.dispatchValue=t=>{this.pending=!1,this.dispatchEvent(new CustomEvent("change",{detail:{value:t}}))},this.debounceDispatchValue=this.dispatchValue}get _precision(){return Math.ceil(Math.log10(1/this._step))}get _step(){var t;return null!==(t=this.step)&&void 0!==t?t:1}_incrementValue(t){if(t.stopPropagation(),null==this.value)return;const e=Qt(this.value+this._step,this._precision);this._processNewValue(e)}_decrementValue(t){if(t.stopPropagation(),null==this.value)return;const e=Qt(this.value-this._step,this._precision);this._processNewValue(e)}firstUpdated(t){super.firstUpdated(t);const e=(t=>{const e=window.getComputedStyle(t).getPropertyValue("--input-number-debounce"),i=parseFloat(e);return isNaN(i)?2e3:i})(this.container);e&&(this.debounceDispatchValue=Te(this.dispatchValue,e))}_processNewValue(t){const e=((t,e,i)=>{let o;return o=e?Math.max(t,e):t,o=i?Math.min(o,i):o,o})(t,this.min,this.max);this.value!==e&&(this.value=e,this.pending=!0),this.debounceDispatchValue(e)}render(){const t=null!=this.value?te(this.value,this.locale,this.formatOptions):"-";return Y`
-
-
-
- ${t}
-
-
-
- `}static get styles(){return h`
- :host {
- --text-color: var(--primary-text-color);
- --text-color-disabled: rgb(var(--rgb-disabled));
- --icon-color: var(--primary-text-color);
- --icon-color-disabled: rgb(var(--rgb-disabled));
- --bg-color: rgba(var(--rgb-primary-text-color), 0.05);
- --bg-color-disabled: rgba(var(--rgb-disabled), 0.2);
- height: var(--control-height);
- width: calc(var(--control-height) * var(--control-button-ratio) * 3);
- flex: none;
- }
- .container {
- box-sizing: border-box;
- width: 100%;
- height: 100%;
- padding: 6px;
- display: flex;
- flex-direction: row;
- align-items: center;
- justify-content: center;
- border-radius: var(--control-border-radius);
- border: none;
- background-color: var(--bg-color);
- transition: background-color 280ms ease-in-out;
- height: var(--control-height);
- overflow: hidden;
- }
- .button {
- display: flex;
- flex-direction: row;
- align-items: center;
- justify-content: center;
- padding: 4px;
- border: none;
- background: none;
- cursor: pointer;
- border-radius: var(--control-border-radius);
- line-height: 0;
- height: 100%;
- }
- .minus {
- padding-right: 0;
- }
- .plus {
- padding-left: 0;
- }
- .button:disabled {
- cursor: not-allowed;
- }
- .button ha-icon {
- font-size: var(--control-height);
- --mdc-icon-size: var(--control-icon-size);
- color: var(--icon-color);
- pointer-events: none;
- }
- .button:disabled ha-icon {
- color: var(--icon-color-disabled);
- }
- .value {
- text-align: center;
- flex-grow: 1;
- flex-shrink: 0;
- flex-basis: 20px;
- font-weight: bold;
- color: var(--text-color);
- }
- .value.disabled {
- color: var(--text-color-disabled);
- }
- .value.pending {
- opacity: 0.5;
- }
- `}};n([_t({attribute:!1})],Bl.prototype,"locale",void 0),n([_t({type:Boolean})],Bl.prototype,"disabled",void 0),n([_t({attribute:!1,type:Number,reflect:!0})],Bl.prototype,"value",void 0),n([_t({type:Number})],Bl.prototype,"step",void 0),n([_t({type:Number})],Bl.prototype,"min",void 0),n([_t({type:Number})],Bl.prototype,"max",void 0),n([_t({attribute:"false"})],Bl.prototype,"formatOptions",void 0),n([vt()],Bl.prototype,"pending",void 0),n([xt("#container")],Bl.prototype,"container",void 0),Bl=n([pt("mushroom-input-number")],Bl);let Ul=class extends ht{constructor(){super(...arguments),this.fill=!1}get _stepSize(){return this.entity.attributes.target_temp_step?this.entity.attributes.target_temp_step:"°F"===this.hass.config.unit_system.temperature?1:.5}onValueChange(t){const e=t.detail.value;this.hass.callService("climate","set_temperature",{entity_id:this.entity.entity_id,temperature:e})}onLowValueChange(t){const e=t.detail.value;this.hass.callService("climate","set_temperature",{entity_id:this.entity.entity_id,target_temp_low:e,target_temp_high:this.entity.attributes.target_temp_high})}onHighValueChange(t){const e=t.detail.value;this.hass.callService("climate","set_temperature",{entity_id:this.entity.entity_id,target_temp_low:this.entity.attributes.target_temp_low,target_temp_high:e})}render(){const t=Ie(this.hass),e=Ut(this.entity),i=1===this._stepSize?{maximumFractionDigits:0}:{minimumFractionDigits:1,maximumFractionDigits:1},o=t=>({"--bg-color":`rgba(var(--rgb-state-climate-${t}), 0.05)`,"--icon-color":`rgb(var(--rgb-state-climate-${t}))`,"--text-color":`rgb(var(--rgb-state-climate-${t}))`});return Y`
-
- ${null!=this.entity.attributes.temperature?Y`
-
- `:K}
- ${null!=this.entity.attributes.target_temp_low&&null!=this.entity.attributes.target_temp_high?Y`
-
- `:K}
-
- `}};n([_t({attribute:!1})],Ul.prototype,"hass",void 0),n([_t({attribute:!1})],Ul.prototype,"entity",void 0),n([_t()],Ul.prototype,"fill",void 0),Ul=n([pt("mushroom-climate-temperature-control")],Ul);const Hl={temperature_control:"mdi:thermometer",hvac_mode_control:"mdi:thermostat"};Fs({type:Ml,name:"Mushroom Climate Card",description:"Card for climate entity"});let Yl=class extends Ns{static async getConfigElement(){return await Promise.resolve().then((function(){return vf})),document.createElement(jl)}static async getStubConfig(t){const e=Object.keys(t.states).filter((t=>Dl.includes(t.split(".")[0])));return{type:`custom:${Ml}`,entity:e[0]}}get _controls(){if(!this._config||!this._stateObj)return[];const t=this._stateObj,e=[];var i;return(null!=(i=t).attributes.temperature||null!=i.attributes.target_temp_low&&null!=i.attributes.target_temp_high)&&this._config.show_temperature_control&&e.push("temperature_control"),((t,e)=>(t.attributes.hvac_modes||[]).some((t=>(null!=e?e:[]).includes(t))))(t,this._config.hvac_modes)&&e.push("hvac_mode_control"),e}get hasControls(){return this._controls.length>0}_onControlTap(t,e){e.stopPropagation(),this._activeControl=t}setConfig(t){super.setConfig(Object.assign({tap_action:{action:"toggle"},hold_action:{action:"more-info"}},t)),this.updateActiveControl()}updated(t){super.updated(t),this.hass&&t.has("hass")&&this.updateActiveControl()}updateActiveControl(){const t=!!this._activeControl&&this._controls.includes(this._activeControl);this._activeControl=t?this._activeControl:this._controls[0]}_handleAction(t){Ke(this,this.hass,this._config,t.detail.action)}render(){if(!this.hass||!this._config||!this._config.entity)return K;const t=this._stateObj;if(!t)return this.renderNotFound(this._config);const e=this._config.name||t.attributes.friendly_name||"",i=this._config.icon,o=Ss(this._config),n=ls(t,o.icon_type);let r=this.hass.formatEntityState?this.hass.formatEntityState(t):ne(this.hass.localize,t,this.hass.locale,this.hass.config,this.hass.entities);if(null!==t.attributes.current_temperature){r+=` - ${te(t.attributes.current_temperature,this.hass.locale)} ${this.hass.config.unit_system.temperature}`}const a=Ie(this.hass),s=(!this._config.collapsible_controls||Bt(t))&&this._controls.length;return Y`
-
-
-
- ${n?this.renderPicture(n):this.renderIcon(t,i)}
- ${this.renderBadge(t)}
- ${this.renderStateInfo(t,o,e,r)};
-
- ${s?Y`
-
- ${this.renderActiveControl(t)}
- ${this.renderOtherControls()}
-
- `:K}
-
-
- `}renderIcon(t,e){const i=Ut(t),o=Fl(t.state),n={};return n["--icon-color"]=`rgb(${o})`,n["--shape-color"]=`rgba(${o}, 0.2)`,Y`
-
-
-
- `}renderBadge(t){return!Ut(t)?super.renderBadge(t):this.renderActionBadge(t)}renderActionBadge(t){const e=t.attributes.hvac_action;if(!e||"off"==e)return K;const i=function(t){var e;return null!==(e=Pl[t])&&void 0!==e?e:Pl.off}(e),o=function(t){var e;return null!==(e=Rl[t])&&void 0!==e?e:""}(e);return o?Y`
-
- `:K}renderOtherControls(){const t=this._controls.filter((t=>t!=this._activeControl));return Y`
- ${t.map((t=>Y`
- this._onControlTap(t,e)}>
-
-
- `))}
- `}renderActiveControl(t){var e;const i=null!==(e=this._config.hvac_modes)&&void 0!==e?e:[],o=Ss(this._config);switch(this._activeControl){case"temperature_control":return Y`
-
- `;case"hvac_mode_control":return Y`
-
- `;default:return K}}static get styles(){return[super.styles,Rs,h`
- mushroom-state-item {
- cursor: pointer;
- }
- mushroom-climate-temperature-control,
- mushroom-climate-hvac-modes-control {
- flex: 1;
- }
- `]}};n([vt()],Yl.prototype,"_activeControl",void 0),Yl=n([pt(Ml)],Yl);const Wl=`${Vs}-cover-card`,Xl=`${Wl}-editor`,Kl=["cover"];let ql=class extends ht{constructor(){super(...arguments),this.fill=!1}_onOpenTap(t){t.stopPropagation(),this.hass.callService("cover","open_cover",{entity_id:this.entity.entity_id})}_onCloseTap(t){t.stopPropagation(),this.hass.callService("cover","close_cover",{entity_id:this.entity.entity_id})}_onStopTap(t){t.stopPropagation(),this.hass.callService("cover","stop_cover",{entity_id:this.entity.entity_id})}get openDisabled(){const t=!0===this.entity.attributes.assumed_state;return((void 0!==(e=this.entity).attributes.current_position?100===e.attributes.current_position:"open"===e.state)||function(t){return"opening"===t.state}(this.entity))&&!t;var e}get closedDisabled(){const t=!0===this.entity.attributes.assumed_state;return((void 0!==(e=this.entity).attributes.current_position?0===e.attributes.current_position:"closed"===e.state)||function(t){return"closing"===t.state}(this.entity))&&!t;var e}render(){const t=Ie(this.hass);return Y`
-
- ${Wt(this.entity,1)?Y`
-
- {switch(t.attributes.device_class){case"awning":case"curtain":case"door":case"gate":return"mdi:arrow-expand-horizontal";default:return"mdi:arrow-up"}})(this.entity)}>
-
- `:void 0}
- ${Wt(this.entity,8)?Y`
-
-
-
- `:void 0}
- ${Wt(this.entity,2)?Y`
-
- {switch(t.attributes.device_class){case"awning":case"curtain":case"door":case"gate":return"mdi:arrow-collapse-horizontal";default:return"mdi:arrow-down"}})(this.entity)}>
-
- `:void 0}
-
- `}};n([_t({attribute:!1})],ql.prototype,"hass",void 0),n([_t({attribute:!1})],ql.prototype,"entity",void 0),n([_t()],ql.prototype,"fill",void 0),ql=n([pt("mushroom-cover-buttons-control")],ql);var Gl;
+var uf,hf,pf="important",mf=" !"+pf,ff=Cs(function(t){function e(t){var n,i;if(zr(this,e),i=br(this,e,[t]),t.type!==ws||"style"!==t.name||(null===(n=t.strings)||void 0===n?void 0:n.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.");return i}return wr(e,Es),Mr(e,[{key:"render",value:function(t){return Object.keys(t).reduce((function(e,n){var i=t[n];return null==i?e:e+"".concat(n=n.includes("-")?n:n.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase(),":").concat(i,";")}),"")}},{key:"update",value:function(t,e){var n=mr(e,1)[0],i=t.element.style;if(void 0===this.ft)return this.ft=new Set(Object.keys(n)),this.render(n);var o,r=Or(this.ft);try{for(r.s();!(o=r.n()).done;){var a=o.value;null==n[a]&&(this.ft.delete(a),a.includes("-")?i.removeProperty(a):i[a]=null)}}catch(t){r.e(t)}finally{r.f()}for(var l in n){var s=n[l];if(null!=s){this.ft.add(l);var c="string"==typeof s&&s.endsWith(mf);l.includes("-")||c?i.setProperty(l,c?s.slice(0,-11):s,c?pf:""):i[l]=s}}return Ma}}])}()),vf={exports:{}};function gf(){return hf?uf:(hf=1,uf={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]})}var _f,yf,bf,kf,xf,wf,Cf,Ef,Af,Sf,Of,Tf,If={exports:{}};function zf(){return yf?_f:(yf=1,_f=function(t){return!(!t||"string"==typeof t)&&(t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&"String"!==t.constructor.name))})}function $f(){if(kf)return vf.exports;kf=1;var t=gf(),e=function(){if(bf)return If.exports;bf=1;var t=zf(),e=Array.prototype.concat,n=Array.prototype.slice,i=If.exports=function(i){for(var o=[],r=0,a=i.length;r=4&&1!==t[3]&&(n=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+n+")"},r.to.keyword=function(t){return i[t.slice(0,3)]},vf.exports}function Mf(){if(wf)return xf;wf=1;for(var t=gf(),e={},n=0,i=Object.keys(t);n1&&(o-=1)),[360*o,100*r,100*c]},r.rgb.hwb=function(t){var e=t[0],n=t[1],i=t[2];return[r.rgb.hsl(t)[0],100*(1/255*Math.min(e,Math.min(n,i))),100*(i=1-1/255*Math.max(e,Math.max(n,i)))]},r.rgb.cmyk=function(t){var e=t[0]/255,n=t[1]/255,i=t[2]/255,o=Math.min(1-e,1-n,1-i);return[100*((1-e-o)/(1-o)||0),100*((1-n-o)/(1-o)||0),100*((1-i-o)/(1-o)||0),100*o]},r.rgb.keyword=function(n){var i=e[n];if(i)return i;for(var o,r=1/0,a=0,l=Object.keys(t);a.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92)),100*(.2126*e+.7152*n+.0722*i),100*(.0193*e+.1192*n+.9505*i)]},r.rgb.lab=function(t){var e=r.rgb.xyz(t),n=e[0],i=e[1],o=e[2];return i/=100,o/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116)-16,500*(n-i),200*(i-(o=o>.008856?Math.pow(o,1/3):7.787*o+16/116))]},r.hsl.rgb=function(t){var e,n,i,o=t[0]/360,r=t[1]/100,a=t[2]/100;if(0===r)return[i=255*a,i,i];for(var l=2*a-(e=a<.5?a*(1+r):a+r-a*r),s=[0,0,0],c=0;c<3;c++)(n=o+1/3*-(c-1))<0&&n++,n>1&&n--,i=6*n<1?l+6*(e-l)*n:2*n<1?e:3*n<2?l+(e-l)*(2/3-n)*6:l,s[c]=255*i;return s},r.hsl.hsv=function(t){var e=t[0],n=t[1]/100,i=t[2]/100,o=n,r=Math.max(i,.01);return n*=(i*=2)<=1?i:2-i,o*=r<=1?r:2-r,[e,100*(0===i?2*o/(r+o):2*n/(i+n)),100*((i+n)/2)]},r.hsv.rgb=function(t){var e=t[0]/60,n=t[1]/100,i=t[2]/100,o=Math.floor(e)%6,r=e-Math.floor(e),a=255*i*(1-n),l=255*i*(1-n*r),s=255*i*(1-n*(1-r));switch(i*=255,o){case 0:return[i,s,a];case 1:return[l,i,a];case 2:return[a,i,s];case 3:return[a,l,i];case 4:return[s,a,i];case 5:return[i,a,l]}},r.hsv.hsl=function(t){var e,n,i=t[0],o=t[1]/100,r=t[2]/100,a=Math.max(r,.01);n=(2-o)*r;var l=(2-o)*a;return e=o*a,[i,100*(e=(e/=l<=1?l:2-l)||0),100*(n/=2)]},r.hwb.rgb=function(t){var e,n=t[0]/360,i=t[1]/100,o=t[2]/100,r=i+o;r>1&&(i/=r,o/=r);var a=Math.floor(6*n),l=1-o;e=6*n-a,0!=(1&a)&&(e=1-e);var s,c,d,u=i+e*(l-i);switch(a){default:case 6:case 0:s=l,c=u,d=i;break;case 1:s=u,c=l,d=i;break;case 2:s=i,c=l,d=u;break;case 3:s=i,c=u,d=l;break;case 4:s=u,c=i,d=l;break;case 5:s=l,c=i,d=u}return[255*s,255*c,255*d]},r.cmyk.rgb=function(t){var e=t[0]/100,n=t[1]/100,i=t[2]/100,o=t[3]/100;return[255*(1-Math.min(1,e*(1-o)+o)),255*(1-Math.min(1,n*(1-o)+o)),255*(1-Math.min(1,i*(1-o)+o))]},r.xyz.rgb=function(t){var e,n,i,o=t[0]/100,r=t[1]/100,a=t[2]/100;return n=-.9689*o+1.8758*r+.0415*a,i=.0557*o+-.204*r+1.057*a,e=(e=3.2406*o+-1.5372*r+-.4986*a)>.0031308?1.055*Math.pow(e,1/2.4)-.055:12.92*e,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:12.92*i,[255*(e=Math.min(Math.max(0,e),1)),255*(n=Math.min(Math.max(0,n),1)),255*(i=Math.min(Math.max(0,i),1))]},r.xyz.lab=function(t){var e=t[0],n=t[1],i=t[2];return n/=100,i/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(e-n),200*(n-(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116))]},r.lab.xyz=function(t){var e,n,i,o=t[0];e=t[1]/500+(n=(o+16)/116),i=n-t[2]/200;var r=Math.pow(n,3),a=Math.pow(e,3),l=Math.pow(i,3);return n=r>.008856?r:(n-16/116)/7.787,e=a>.008856?a:(e-16/116)/7.787,i=l>.008856?l:(i-16/116)/7.787,[e*=95.047,n*=100,i*=108.883]},r.lab.lch=function(t){var e,n=t[0],i=t[1],o=t[2];return(e=360*Math.atan2(o,i)/2/Math.PI)<0&&(e+=360),[n,Math.sqrt(i*i+o*o),e]},r.lch.lab=function(t){var e=t[0],n=t[1],i=t[2]/360*2*Math.PI;return[e,n*Math.cos(i),n*Math.sin(i)]},r.rgb.ansi16=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=mr(t,3),i=n[0],o=n[1],a=n[2],l=null===e?r.rgb.hsv(t)[2]:e;if(0===(l=Math.round(l/50)))return 30;var s=30+(Math.round(a/255)<<2|Math.round(o/255)<<1|Math.round(i/255));return 2===l&&(s+=60),s},r.hsv.ansi16=function(t){return r.rgb.ansi16(r.hsv.rgb(t),t[2])},r.rgb.ansi256=function(t){var e=t[0],n=t[1],i=t[2];return e===n&&n===i?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(i/255*5)},r.ansi16.rgb=function(t){var e=t%10;if(0===e||7===e)return t>50&&(e+=3.5),[e=e/10.5*255,e,e];var n=.5*(1+~~(t>50));return[(1&e)*n*255,(e>>1&1)*n*255,(e>>2&1)*n*255]},r.ansi256.rgb=function(t){if(t>=232){var e=10*(t-232)+8;return[e,e,e]}var n;return t-=16,[Math.floor(t/36)/5*255,Math.floor((n=t%36)/6)/5*255,n%6/5*255]},r.rgb.hex=function(t){var e=(((255&Math.round(t[0]))<<16)+((255&Math.round(t[1]))<<8)+(255&Math.round(t[2]))).toString(16).toUpperCase();return"000000".substring(e.length)+e},r.hex.rgb=function(t){var e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var n=e[0];3===e[0].length&&(n=n.split("").map((function(t){return t+t})).join(""));var i=parseInt(n,16);return[i>>16&255,i>>8&255,255&i]},r.rgb.hcg=function(t){var e,n=t[0]/255,i=t[1]/255,o=t[2]/255,r=Math.max(Math.max(n,i),o),a=Math.min(Math.min(n,i),o),l=r-a;return e=l<=0?0:r===n?(i-o)/l%6:r===i?2+(o-n)/l:4+(n-i)/l,e/=6,[360*(e%=1),100*l,100*(l<1?a/(1-l):0)]},r.hsl.hcg=function(t){var e=t[1]/100,n=t[2]/100,i=n<.5?2*e*n:2*e*(1-n),o=0;return i<1&&(o=(n-.5*i)/(1-i)),[t[0],100*i,100*o]},r.hsv.hcg=function(t){var e=t[1]/100,n=t[2]/100,i=e*n,o=0;return i<1&&(o=(n-i)/(1-i)),[t[0],100*i,100*o]},r.hcg.rgb=function(t){var e=t[0]/360,n=t[1]/100,i=t[2]/100;if(0===n)return[255*i,255*i,255*i];var o,r=[0,0,0],a=e%1*6,l=a%1,s=1-l;switch(Math.floor(a)){case 0:r[0]=1,r[1]=l,r[2]=0;break;case 1:r[0]=s,r[1]=1,r[2]=0;break;case 2:r[0]=0,r[1]=1,r[2]=l;break;case 3:r[0]=0,r[1]=s,r[2]=1;break;case 4:r[0]=l,r[1]=0,r[2]=1;break;default:r[0]=1,r[1]=0,r[2]=s}return o=(1-n)*i,[255*(n*r[0]+o),255*(n*r[1]+o),255*(n*r[2]+o)]},r.hcg.hsv=function(t){var e=t[1]/100,n=e+t[2]/100*(1-e),i=0;return n>0&&(i=e/n),[t[0],100*i,100*n]},r.hcg.hsl=function(t){var e=t[1]/100,n=t[2]/100*(1-e)+.5*e,i=0;return n>0&&n<.5?i=e/(2*n):n>=.5&&n<1&&(i=e/(2*(1-n))),[t[0],100*i,100*n]},r.hcg.hwb=function(t){var e=t[1]/100,n=e+t[2]/100*(1-e);return[t[0],100*(n-e),100*(1-n)]},r.hwb.hcg=function(t){var e=t[1]/100,n=1-t[2]/100,i=n-e,o=0;return i<1&&(o=(n-i)/(1-i)),[t[0],100*i,100*o]},r.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},r.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},r.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},r.gray.hsl=function(t){return[0,0,t[0]]},r.gray.hsv=r.gray.hsl,r.gray.hwb=function(t){return[0,100,t[0]]},r.gray.cmyk=function(t){return[0,0,0,t[0]]},r.gray.lab=function(t){return[t[0],0,0]},r.gray.hex=function(t){var e=255&Math.round(t[0]/100*255),n=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(n.length)+n},r.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]},xf}function jf(){if(Ef)return Cf;Ef=1;var t=Mf();function e(e){var n=function(){for(var e={},n=Object.keys(t),i=n.length,o=0;o1&&(n=o);var r=t(n);if("object"===Pr(r))for(var a=r.length,l=0;l1&&(n=o),t(n))};return"conversion"in t&&(e.conversion=t.conversion),e}(e)}))})),Af=n}function Lf(){if(Tf)return Of;Tf=1;for(var t=$f(),e=Pf(),n=["keyword","gray","hex"],i={},o=0,r=Object.keys(e);o0){this.model=r||"rgb",c=e[this.model].channels;var u=Array.prototype.slice.call(o,0,c);this.color=m(u,c),this.valpha="number"==typeof o[c]?o[c]:1}else if("number"==typeof o)this.model="rgb",this.color=[o>>16&255,o>>8&255,255&o],this.valpha=1;else{this.valpha=1;var h=Object.keys(o);"alpha"in o&&(h.splice(h.indexOf("alpha"),1),this.valpha="number"==typeof o.alpha?o.alpha:0);var p=h.sort().join("");if(!(p in i))throw new Error("Unable to parse color from object: "+JSON.stringify(o));this.model=i[p];var f=e[this.model].labels,v=[];for(a=0;an?(e+.05)/(n+.05):(n+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7?"AAA":e>=4.5?"AA":""},isDark:function(){var t=this.rgb().color;return(2126*t[0]+7152*t[1]+722*t[2])/1e4<128},isLight:function(){return!this.isDark()},negate:function(){for(var t=this.rgb(),e=0;e<3;e++)t.color[e]=255-t.color[e];return t},lighten:function(t){var e=this.hsl();return e.color[2]+=e.color[2]*t,e},darken:function(t){var e=this.hsl();return e.color[2]-=e.color[2]*t,e},saturate:function(t){var e=this.hsl();return e.color[1]+=e.color[1]*t,e},desaturate:function(t){var e=this.hsl();return e.color[1]-=e.color[1]*t,e},whiten:function(t){var e=this.hwb();return e.color[1]+=e.color[1]*t,e},blacken:function(t){var e=this.hwb();return e.color[2]+=e.color[2]*t,e},grayscale:function(){var t=this.rgb().color,e=.3*t[0]+.59*t[1]+.11*t[2];return s.rgb(e,e,e)},fade:function(t){return this.alpha(this.valpha-this.valpha*t)},opaquer:function(t){return this.alpha(this.valpha+this.valpha*t)},rotate:function(t){var e=this.hsl(),n=e.color[0];return n=(n=(n+t)%360)<0?360+n:n,e.color[0]=n,e},mix:function(t,e){if(!t||!t.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+Pr(t));var n=t.rgb(),i=this.rgb(),o=void 0===e?.5:e,r=2*o-1,a=n.alpha()-i.alpha(),l=((r*a==-1?r:(r+a)/(1+r*a))+1)/2,c=1-l;return s.rgb(l*n.red()+c*i.red(),l*n.green()+c*i.green(),l*n.blue()+c*i.blue(),n.alpha()*o+i.alpha()*(1-o))}};for(var c=function(){var t=u[d];if(n.includes(t))return 1;var i=e[t].channels;s.prototype[t]=function(){if(this.model===t)return new s(this);for(var n=arguments.length,i=new Array(n),o=0;o0?new s(i,t):new s([].concat(hr((r=e[this.model][t].raw(this.color),Array.isArray(r)?r:[r])),[this.valpha]),t);var r},s[t]=function(){for(var e=arguments.length,n=new Array(e),o=0;o','\n \n ',"\n \n ","\n \n "])),Boolean(this.value),this.label,this.configValue,this._selectChanged,(function(t){return t.stopPropagation()}),this.value||"default",this.renderColorCircle(this.value||"grey"),e("editor.form.color_picker.values.default"),Nf.map((function(e){return za(A||(A=or(["\n \n ','\n ',"\n \n "])),e,function(t){return t.split("-").map((function(t){return function(t){return t.charAt(0).toUpperCase()+t.slice(1)}(t)})).join(" ")}(e),t.renderColorCircle(e))})))}},{key:"renderColorCircle",value:function(t){return za(S||(S=or(['\n \n \n ',"\n \n ","\n \n "])),this.label,this.configValue,this._selectChanged,(function(t){return t.stopPropagation()}),this.value||"default",t("editor.form.icon_type_picker.values.default"),Yf.map((function(e){return za(j||(j=or(["\n \n ","\n \n "])),e,t("editor.form.icon_type_picker.values.".concat(e))||function(t){return t.charAt(0).toUpperCase()+t.slice(1)}(e))})))}}],[{key:"styles",get:function(){return Xr(P||(P=or(["\n mushroom-select {\n width: 100%;\n }\n "])))}}])}();Ur([Qa()],qf.prototype,"label",void 0),Ur([Qa()],qf.prototype,"value",void 0),Ur([Qa()],qf.prototype,"configValue",void 0),Ur([Qa()],qf.prototype,"hass",void 0),qf=Ur([Ga("mushroom-icon-type-picker")],qf);var Gf=function(t){function e(){return zr(this,e),br(this,e,arguments)}return wr(e,Xa),Mr(e,[{key:"render",value:function(){return za(L||(L=or(["\n \n "])),this.hass,this.label,this.value,this._valueChanged)}},{key:"_valueChanged",value:function(t){fl(this,"value-changed",{value:t.detail.value||void 0})}}])}();Ur([Qa()],Gf.prototype,"hass",void 0),Ur([Qa()],Gf.prototype,"selector",void 0),Ur([Qa()],Gf.prototype,"value",void 0),Ur([Qa()],Gf.prototype,"label",void 0),Gf=Ur([Ga("ha-selector-mush_icon_type")],Gf);var Zf=function(t){function e(){var t;return zr(this,e),(t=br(this,e,arguments)).label="",t.configValue="",t}return wr(e,Xa),Mr(e,[{key:"_selectChanged",value:function(t){var e=t.target.value;e&&this.dispatchEvent(new CustomEvent("value-changed",{detail:{value:"default"!==e?e:""}}))}},{key:"render",value:function(){var t,e=fd(this.hass);return za(D||(D=or(["\n \n ',"\n \n ","\n \n "])),this.label,this.configValue,this._selectChanged,(function(t){return t.stopPropagation()}),this.value||"default",e("editor.form.info_picker.values.default"),(null!==(t=this.infos)&&void 0!==t?t:Wf).map((function(t){return za(N||(N=or(["\n \n ","\n \n "])),t,e("editor.form.info_picker.values.".concat(t))||function(t){return t.charAt(0).toUpperCase()+t.slice(1)}(t))})))}}],[{key:"styles",get:function(){return Xr(R||(R=or(["\n mushroom-select {\n width: 100%;\n }\n "])))}}])}();Ur([Qa()],Zf.prototype,"label",void 0),Ur([Qa()],Zf.prototype,"value",void 0),Ur([Qa()],Zf.prototype,"configValue",void 0),Ur([Qa()],Zf.prototype,"infos",void 0),Ur([Qa()],Zf.prototype,"hass",void 0),Zf=Ur([Ga("mushroom-info-picker")],Zf);var Jf=function(t){function e(){return zr(this,e),br(this,e,arguments)}return wr(e,Xa),Mr(e,[{key:"render",value:function(){return za(U||(U=or(["\n \n "])),this.hass,this.selector.mush_info.infos,this.label,this.value,this._valueChanged)}},{key:"_valueChanged",value:function(t){fl(this,"value-changed",{value:t.detail.value||void 0})}}])}();Ur([Qa()],Jf.prototype,"hass",void 0),Ur([Qa()],Jf.prototype,"selector",void 0),Ur([Qa()],Jf.prototype,"value",void 0),Ur([Qa()],Jf.prototype,"label",void 0),Jf=Ur([Ga("ha-selector-mush_info")],Jf);var Qf=["default","horizontal","vertical"],tv={default:"mdi:card-text-outline",vertical:"mdi:focus-field-vertical",horizontal:"mdi:focus-field-horizontal"},ev=function(t){function e(){var t;return zr(this,e),(t=br(this,e,arguments)).label="",t.configValue="",t}return wr(e,Xa),Mr(e,[{key:"_selectChanged",value:function(t){var e=t.target.value;e&&this.dispatchEvent(new CustomEvent("value-changed",{detail:{value:"default"!==e?e:""}}))}},{key:"render",value:function(){var t=fd(this.hass),e=this.value||"default";return za(V||(V=or(["\n \n ','\n \n \n ',"\n ","\n \n "])),null!==(t=this.primary)&&void 0!==t?t:"",this.secondary?za(lt||(lt=or(['',""])),this.multiline_secondary?" multiline_secondary":"",this.secondary):ja)}}],[{key:"styles",get:function(){return Xr(st||(st=or(["\n .container {\n min-width: 0;\n flex: 1;\n display: flex;\n flex-direction: column;\n }\n .primary {\n font-weight: var(--card-primary-font-weight);\n font-size: var(--card-primary-font-size);\n line-height: var(--card-primary-line-height);\n color: var(--card-primary-color);\n letter-spacing: var(--card-primary-letter-spacing);\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n .secondary {\n font-weight: var(--card-secondary-font-weight);\n font-size: var(--card-secondary-font-size);\n line-height: var(--card-secondary-line-height);\n color: var(--card-secondary-color);\n letter-spacing: var(--card-secondary-letter-spacing);\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n .multiline_secondary {\n white-space: pre-wrap;\n }\n "])))}}])}();Ur([Qa({attribute:!1})],fv.prototype,"primary",void 0),Ur([Qa({attribute:!1})],fv.prototype,"secondary",void 0),Ur([Qa({type:Boolean})],fv.prototype,"multiline_secondary",void 0),fv=Ur([Ga("mushroom-state-info")],fv);var vv=function(t){function e(){return zr(this,e),br(this,e,arguments)}return wr(e,Xa),Mr(e,[{key:"render",value:function(){var t,e,n,i;return za(ct||(ct=or(["\n \n ","\n ","\n
\n "])),iv({container:!0,vertical:"vertical"===(null===(t=this.appearance)||void 0===t?void 0:t.layout)}),"none"!==(null===(e=this.appearance)||void 0===e?void 0:e.icon_type)?za(dt||(dt=or(['\n \n \n \n
\n ']))):ja,"none"!==(null===(n=this.appearance)||void 0===n?void 0:n.primary_info)||"none"!==(null===(i=this.appearance)||void 0===i?void 0:i.secondary_info)?za(ut||(ut=or(['\n \n \n
\n ']))):ja)}}],[{key:"styles",get:function(){return Xr(ht||(ht=or(['\n :host {\n display: block;\n height: 100%;\n }\n .container {\n height: 100%;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n padding: var(--spacing);\n gap: var(--spacing);\n }\n .icon {\n position: relative;\n }\n .icon ::slotted(*[slot="badge"]) {\n position: absolute;\n top: -3px;\n right: -3px;\n }\n :host([rtl]) .icon ::slotted(*[slot="badge"]) {\n right: initial;\n left: -3px;\n }\n .info {\n min-width: 0;\n width: 100%;\n display: flex;\n flex-direction: column;\n }\n .container.vertical {\n flex-direction: column;\n }\n .container.vertical .info {\n text-align: center;\n }\n '])))}}])}();function gv(t){var e,n,i,o,r;return{layout:null!==(e=t.layout)&&void 0!==e?e:_v(t),fill_container:null!==(n=t.fill_container)&&void 0!==n&&n,primary_info:null!==(i=t.primary_info)&&void 0!==i?i:bv(t),secondary_info:null!==(o=t.secondary_info)&&void 0!==o?o:kv(t),icon_type:null!==(r=t.icon_type)&&void 0!==r?r:yv(t)}}function _v(t){return t.vertical?"vertical":"default"}function yv(t){return t.hide_icon?"none":t.use_entity_picture||t.use_media_artwork?"entity-picture":"icon"}function bv(t){return t.hide_name?"none":"name"}function kv(t){return t.hide_state?"none":"state"}Ur([Qa()],vv.prototype,"appearance",void 0),vv=Ur([Ga("mushroom-state-item")],vv);var xv=function(t){function e(){var t;return zr(this,e),(t=br(this,e,arguments)).picture_url="",t}return wr(e,Xa),Mr(e,[{key:"render",value:function(){return za(pt||(pt=or(["\n \n
\n \n \n
\n
\n ']))):ja}},{key:"renderStateInfo",value:function(t,e,n,i){var o=this.hass.formatEntityState?this.hass.formatEntityState(t):Dl(this.hass.localize,t,this.hass.locale,this.hass.config,this.hass.entities),r=null!=i?i:o,a=Kf(e.primary_info,n,r,t,this.hass),l=Kf(e.secondary_info,n,r,t,this.hass);return za(xt||(xt=or(['\n =0}Tv({type:zv,name:"Mushroom Alarm Control Panel Card",description:"Card for alarm control panel"});var Dv=function(t){function e(){return zr(this,e),br(this,e,arguments)}return wr(e,Sv),Mr(e,[{key:"hasControls",get:function(){var t,e;return Boolean(null===(e=null===(t=this._config)||void 0===t?void 0:t.states)||void 0===e?void 0:e.length)}},{key:"_onTap",value:function(t,e){t.stopPropagation(),av(this,this.hass,this._stateObj,e)}},{key:"_handleAction",value:function(t){Os(this,this.hass,this._config,t.detail.action)}},{key:"render",value:function(){var t=this;if(!this.hass||!this._config||!this._config.entity)return ja;var e=this._stateObj;if(!e)return this.renderNotFound(this._config);var n=this._config.name||e.attributes.friendly_name||"",i=this._config.icon,o=gv(this._config),r=Xf(e,o.icon_type),a=this._config.states&&this._config.states.length>0?function(t){return"disarmed"===t.state}(e)?this._config.states.map((function(t){return{mode:t}})):[{mode:"disarmed"}]:[],l=function(t){return gl!==t.state}(e),s=us(this.hass);return za(Ct||(Ct=or(["\n \n \n \n ","\n ","\n ",";\n \n ","\n \n \n "])),iv({"fill-container":o.fill_container}),o,s,s,o,this._handleAction,Ss({hasHold:Ts(this._config.hold_action),hasDoubleClick:Ts(this._config.double_tap_action)}),r?this.renderPicture(r):this.renderIcon(e,i),this.renderBadge(e),this.renderStateInfo(e,o,n),a.length>0?za(Et||(Et=or(['\n \n \n ","\n \n
\n "])),"horizontal"!==o.layout,s,a.map((function(e){return za(At||(At=or(["\n \n \n \n \n "])),(function(n){return t._onTap(n,e.mode)}),!l,rv[e.mode].icon)}))):ja)}},{key:"renderIcon",value:function(t,e){var n=Pv(t.state),i=Lv(t.state),o={"--icon-color":"rgb(".concat(n,")"),"--shape-color":"rgba(".concat(n,", 0.2)")};return za(St||(St=or(['\n \n \n \n ']))))}}],[{key:"styles",get:function(){return[pv,Xr($t||($t=or(["\n :host {\n --icon-color: var(--primary-text-color);\n --text-color: var(--primary-text-color);\n }\n ha-card {\n box-sizing: border-box;\n height: var(--chip-height);\n min-width: var(--chip-height);\n font-size: var(--chip-height);\n width: auto;\n border-radius: var(--chip-border-radius);\n display: flex;\n flex-direction: row;\n align-items: center;\n background: var(--chip-background);\n border-width: var(--chip-border-width);\n border-color: var(--chip-border-color);\n box-shadow: var(--chip-box-shadow);\n box-sizing: content-box;\n }\n .avatar {\n --avatar-size: calc(\n var(--chip-height) - 2 * var(--chip-avatar-padding)\n );\n border-radius: var(--chip-avatar-border-radius);\n height: var(--avatar-size);\n width: var(--avatar-size);\n margin-left: var(--chip-avatar-padding);\n box-sizing: border-box;\n object-fit: cover;\n }\n :host([rtl]) .avatar {\n margin-left: initial;\n margin-right: var(--chip-avatar-padding);\n }\n .content {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n height: 100%;\n padding: var(--chip-padding);\n line-height: 0;\n }\n ::slotted(ha-icon),\n ::slotted(ha-state-icon) {\n display: flex;\n line-height: 0;\n --mdc-icon-size: var(--chip-icon-size);\n color: var(--icon-color);\n }\n ::slotted(svg) {\n width: var(--chip-icon-size);\n height: var(--chip-icon-size);\n display: flex;\n }\n ::slotted(span) {\n font-weight: var(--chip-font-weight);\n font-size: var(--chip-font-size);\n line-height: 1;\n color: var(--text-color);\n }\n ::slotted(*:not(:last-child)) {\n margin-right: 0.15em;\n }\n :host([rtl]) ::slotted(*:not(:last-child)) {\n margin-right: initial;\n margin-left: 0.15em;\n }\n "])))]}}])}();Ur([Qa()],Nv.prototype,"icon",void 0),Ur([Qa()],Nv.prototype,"label",void 0),Ur([Qa()],Nv.prototype,"avatar",void 0),Ur([Qa()],Nv.prototype,"avatarOnly",void 0),Nv=Ur([Ga("mushroom-chip")],Nv);var Rv=function(t){try{var e=Uv(t.type);if(customElements.get(e)){var n=document.createElement(e,t);return n.setConfig(t),n}var i=document.createElement(e);return customElements.whenDefined(e).then((function(){try{customElements.upgrade(i),i.setConfig(t)}catch(t){}})),i}catch(t){return void console.error(t)}};function Uv(t){return"".concat(Iv,"-").concat(t,"-chip")}function Vv(t){return"".concat(Iv,"-").concat(t,"-chip-editor")}var Bv=function(t){function e(){return zr(this,e),br(this,e,arguments)}return wr(e,Xa),Mr(e,[{key:"setConfig",value:function(t){this._config=t}},{key:"_handleAction",value:function(t){Os(this,this.hass,this._config,t.detail.action)}},{key:"render",value:function(){var t;if(!this.hass||!this._config||!this._config.entity)return ja;var e=this._config.entity,n=this.hass.states[e];if(!n)return ja;var i=this._config.name||n.attributes.friendly_name||"",o=this._config.icon,r=this._config.icon_color,a=this._config.use_entity_picture?Cl(n):void 0,l=this.hass.formatEntityState?this.hass.formatEntityState(n):Dl(this.hass.localize,n,this.hass.locale,this.hass.config,this.hass.entities),s=kl(n),c=Kf(null!==(t=this._config.content_info)&&void 0!==t?t:"state",i,l,n,this.hass),d=us(this.hass);return za(Mt||(Mt=or(["\n \n ","\n ","\n \n "])),d,this._handleAction,Ss({hasHold:Ts(this._config.hold_action),hasDoubleClick:Ts(this._config.double_tap_action)}),a?this.hass.hassUrl(a):void 0,a&&!c,a?ja:this.renderIcon(n,o,r,s),c?za(jt||(jt=or(["",""])),c):ja)}},{key:"renderIcon",value:function(t,e,n,i){var o={};if(n){var r=Rf(n);o["--color"]="rgb(".concat(r,")")}return za(Pt||(Pt=or(["\n \n "])),this.hass,t,e,ff(o),iv({active:i}))}}],[{key:"getConfigElement",value:(i=yr(gr().mark((function t(){return gr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.resolve().then((function(){return Gy}));case 2:return t.abrupt("return",document.createElement(Vv("entity")));case 3:case"end":return t.stop()}}),t)}))),function(){return i.apply(this,arguments)})},{key:"getStubConfig",value:(n=yr(gr().mark((function t(e){var n;return gr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=Object.keys(e.states),t.abrupt("return",{type:"entity",entity:n[0]});case 2:case"end":return t.stop()}}),t)}))),function(t){return n.apply(this,arguments)})},{key:"styles",get:function(){return Xr(Lt||(Lt=or(["\n mushroom-chip {\n cursor: pointer;\n }\n ha-state-icon.active {\n color: var(--color);\n }\n "])))}}]);var n,i}();Ur([Qa({attribute:!1})],Bv.prototype,"hass",void 0),Ur([tl()],Bv.prototype,"_config",void 0),Bv=Ur([Ga(Uv("entity"))],Bv);var Fv=new Set(["partlycloudy","cloudy","fog","windy","windy-variant","hail","rainy","snowy","snowy-rainy","pouring","lightning","lightning-rainy"]),Hv=new Set(["hail","rainy","pouring"]),Wv=new Set(["windy","windy-variant"]),Yv=new Set(["snowy","snowy-rainy"]),Kv=new Set(["lightning","lightning-rainy"]),Xv=Xr(Dt||(Dt=or(["\n .rain {\n fill: var(--weather-icon-rain-color, #30b3ff);\n }\n .sun {\n fill: var(--weather-icon-sun-color, #fdd93c);\n }\n .moon {\n fill: var(--weather-icon-moon-color, #fcf497);\n }\n .cloud-back {\n fill: var(--weather-icon-cloud-back-color, #d4d4d4);\n }\n .cloud-front {\n fill: var(--weather-icon-cloud-front-color, #f9f9f9);\n }\n"]))),qv=function(t,e){return $a(Nt||(Nt=or(['\n "])),"sunny"===t?$a(Rt||(Rt=or(['\n \n ']))):"","clear-night"===t?$a(Ut||(Ut=or(['\n \n ']))):"","partlycloudy"===t&&e?$a(Vt||(Vt=or(['\n \n ']))):"partlycloudy"===t?$a(Bt||(Bt=or(['\n \n ']))):"",Fv.has(t)?$a(Ft||(Ft=or(['\n \n \n ']))):"",Hv.has(t)?$a(Ht||(Ht=or(['\n \n \n \n \n ']))):"","pouring"===t?$a(Wt||(Wt=or(['\n \n \n ']))):"",Wv.has(t)?$a(Yt||(Yt=or(['\n \n \n ']))):"",Yv.has(t)?$a(Kt||(Kt=or(['\n \n \n \n ']))):"",Kv.has(t)?$a(Xt||(Xt=or(['\n \n ']))):"")},Gv=function(t){function e(){return zr(this,e),br(this,e,arguments)}return wr(e,Xa),Mr(e,[{key:"setConfig",value:function(t){this._config=t}},{key:"_handleAction",value:function(t){Os(this,this.hass,this._config,t.detail.action)}},{key:"render",value:function(){if(!this.hass||!this._config||!this._config.entity)return ja;var t=this._config.entity,e=this.hass.states[t];if(!e)return ja;var n=qv(e.state,!0),i=[];if(this._config.show_conditions){var o=this.hass.formatEntityState?this.hass.formatEntityState(e):Dl(this.hass.localize,e,this.hass.locale,this.hass.config,this.hass.entities);i.push(o)}if(this._config.show_temperature){var r="".concat(Ml(e.attributes.temperature,this.hass.locale)," ").concat(this.hass.config.unit_system.temperature);i.push(r)}var a=us(this.hass);return za(qt||(qt=or(["\n \n ","\n ","\n \n "])),a,this._handleAction,Ss({hasHold:Ts(this._config.hold_action),hasDoubleClick:Ts(this._config.double_tap_action)}),n,i.length>0?za(Gt||(Gt=or(["",""])),i.join(" / ")):ja)}}],[{key:"getConfigElement",value:(i=yr(gr().mark((function t(){return gr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.resolve().then((function(){return nb}));case 2:return t.abrupt("return",document.createElement(Vv("weather")));case 3:case"end":return t.stop()}}),t)}))),function(){return i.apply(this,arguments)})},{key:"getStubConfig",value:(n=yr(gr().mark((function t(e){var n,i;return gr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=Object.keys(e.states),i=n.filter((function(t){return"weather"===t.split(".")[0]})),t.abrupt("return",{type:"weather",entity:i[0]});case 3:case"end":return t.stop()}}),t)}))),function(t){return n.apply(this,arguments)})},{key:"styles",get:function(){return[Xv,Xr(Zt||(Zt=or(["\n mushroom-chip {\n cursor: pointer;\n }\n "])))]}}]);var n,i}();Ur([Qa({attribute:!1})],Gv.prototype,"hass",void 0),Ur([tl()],Gv.prototype,"_config",void 0),Gv=Ur([Ga(Uv("weather"))],Gv);var Zv="mdi:arrow-left",Jv=function(t){function e(){return zr(this,e),br(this,e,arguments)}return wr(e,Xa),Mr(e,[{key:"setConfig",value:function(t){this._config=t}},{key:"_handleAction",value:function(){window.history.back()}},{key:"render",value:function(){if(!this.hass||!this._config)return ja;var t=this._config.icon||Zv,e=us(this.hass);return za(Jt||(Jt=or(["\n \n \n \n "])),e,this._handleAction,Ss(),this.hass,t)}}],[{key:"getConfigElement",value:(i=yr(gr().mark((function t(){return gr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.resolve().then((function(){return rb}));case 2:return t.abrupt("return",document.createElement(Vv("back")));case 3:case"end":return t.stop()}}),t)}))),function(){return i.apply(this,arguments)})},{key:"getStubConfig",value:(n=yr(gr().mark((function t(e){return gr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",{type:"back"});case 1:case"end":return t.stop()}}),t)}))),function(t){return n.apply(this,arguments)})},{key:"styles",get:function(){return Xr(Qt||(Qt=or(["\n mushroom-chip {\n cursor: pointer;\n }\n "])))}}]);var n,i}();Ur([Qa({attribute:!1})],Jv.prototype,"hass",void 0),Ur([tl()],Jv.prototype,"_config",void 0),Jv=Ur([Ga(Uv("back"))],Jv);var Qv="mdi:flash",tg=function(t){function e(){return zr(this,e),br(this,e,arguments)}return wr(e,Xa),Mr(e,[{key:"setConfig",value:function(t){this._config=t}},{key:"_handleAction",value:function(t){Os(this,this.hass,this._config,t.detail.action)}},{key:"render",value:function(){if(!this.hass||!this._config)return ja;var t=this._config.icon||Qv,e=this._config.icon_color,n={};if(e){var i=Rf(e);n["--color"]="rgb(".concat(i,")")}var o=us(this.hass);return za(te||(te=or(["\n \n \n \n "])),o,this._handleAction,Ss({hasHold:Ts(this._config.hold_action),hasDoubleClick:Ts(this._config.double_tap_action)}),this.hass,t,ff(n))}}],[{key:"getConfigElement",value:(i=yr(gr().mark((function t(){return gr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.resolve().then((function(){return cb}));case 2:return t.abrupt("return",document.createElement(Vv("action")));case 3:case"end":return t.stop()}}),t)}))),function(){return i.apply(this,arguments)})},{key:"getStubConfig",value:(n=yr(gr().mark((function t(e){return gr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",{type:"action"});case 1:case"end":return t.stop()}}),t)}))),function(t){return n.apply(this,arguments)})},{key:"styles",get:function(){return Xr(ee||(ee=or(["\n mushroom-chip {\n cursor: pointer;\n }\n ha-state-icon {\n color: var(--color);\n }\n "])))}}]);var n,i}();Ur([Qa({attribute:!1})],tg.prototype,"hass",void 0),Ur([tl()],tg.prototype,"_config",void 0),tg=Ur([Ga(Uv("action"))],tg);var eg="mdi:menu",ng=function(t){function e(){return zr(this,e),br(this,e,arguments)}return wr(e,Xa),Mr(e,[{key:"setConfig",value:function(t){this._config=t}},{key:"_handleAction",value:function(){fl(this,"hass-toggle-menu")}},{key:"render",value:function(){if(!this.hass||!this._config)return ja;var t=this._config.icon||eg,e=us(this.hass);return za(ne||(ne=or(["\n \n \n \n "])),e,this._handleAction,Ss(),this.hass,t)}}],[{key:"getConfigElement",value:(i=yr(gr().mark((function t(){return gr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.resolve().then((function(){return hb}));case 2:return t.abrupt("return",document.createElement(Vv("menu")));case 3:case"end":return t.stop()}}),t)}))),function(){return i.apply(this,arguments)})},{key:"getStubConfig",value:(n=yr(gr().mark((function t(e){return gr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",{type:"menu"});case 1:case"end":return t.stop()}}),t)}))),function(t){return n.apply(this,arguments)})},{key:"styles",get:function(){return Xr(ie||(ie=or(["\n mushroom-chip {\n cursor: pointer;\n }\n "])))}}]);var n,i}();Ur([Qa({attribute:!1})],ng.prototype,"hass",void 0),Ur([tl()],ng.prototype,"_config",void 0),ng=Ur([Ga(Uv("menu"))],ng);var ig=new Set(["clear-night","cloudy","fog","lightning","lightning-rainy","partlycloudy","pouring","rainy","hail","snowy","snowy-rainy","sunny","windy","windy-variant"]),og=function(t){if(t&&t.startsWith("weather-")){var e=t.replace("weather-","");if(ig.has(e))return qv(e,!0)}},rg=["content","icon","icon_color","picture"],ag=function(t){function e(){var t;return zr(this,e),(t=br(this,e,arguments))._templateResults={},t._unsubRenderTemplates=new Map,t}return wr(e,Xa),Mr(e,[{key:"setConfig",value:function(t){var e=this;rg.forEach((function(n){var i,o;(null===(i=e._config)||void 0===i?void 0:i[n])===t[n]&&(null===(o=e._config)||void 0===o?void 0:o.entity)==t.entity||e._tryDisconnectKey(n)})),this._config=Object.assign({tap_action:{action:"toggle"},hold_action:{action:"more-info"}},t)}},{key:"connectedCallback",value:function(){dr(e,"connectedCallback",this,3)([]),this._tryConnect()}},{key:"disconnectedCallback",value:function(){this._tryDisconnect()}},{key:"_handleAction",value:function(t){Os(this,this.hass,this._config,t.detail.action)}},{key:"isTemplate",value:function(t){var e,n=null===(e=this._config)||void 0===e?void 0:e[t];return null==n?void 0:n.includes("{")}},{key:"getValue",value:function(t){var e,n,i;return this.isTemplate(t)?null===(n=null===(e=this._templateResults[t])||void 0===e?void 0:e.result)||void 0===n?void 0:n.toString():null===(i=this._config)||void 0===i?void 0:i[t]}},{key:"render",value:function(){if(!this.hass||!this._config)return ja;var t=this.getValue("icon"),e=this.getValue("icon_color"),n=this.getValue("content"),i=this.getValue("picture"),o=us(this.hass),r=og(t);return za(oe||(oe=or(["\n \n ","\n ","\n \n "])),o,this._handleAction,Ss({hasHold:Ts(this._config.hold_action),hasDoubleClick:Ts(this._config.double_tap_action)}),i?this.hass.hassUrl(i):void 0,i&&!n,i?ja:r||(t?this.renderIcon(t,e):ja),n?this.renderContent(n):ja)}},{key:"renderIcon",value:function(t,e){var n={};if(e){var i=Rf(e);n["--color"]="rgb(".concat(i,")")}return za(re||(re=or([""])),this.hass,t,ff(n))}},{key:"renderContent",value:function(t){return za(ae||(ae=or(["",""])),t)}},{key:"updated",value:function(t){dr(e,"updated",this,3)([t]),this._config&&this.hass&&this._tryConnect()}},{key:"_tryConnect",value:(l=yr(gr().mark((function t(){var e=this;return gr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:rg.forEach((function(t){e._tryConnectKey(t)}));case 1:case"end":return t.stop()}}),t)}))),function(){return l.apply(this,arguments)})},{key:"_tryConnectKey",value:(a=yr(gr().mark((function t(e){var n,i,o,r,a=this;return gr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(void 0===this._unsubRenderTemplates.get(e)&&this.hass&&this._config&&this.isTemplate(e)){t.next=2;break}return t.abrupt("return");case 2:return t.prev=2,o=xs(this.hass.connection,(function(t){a._templateResults=Object.assign(Object.assign({},a._templateResults),cr({},e,t))}),{template:null!==(n=this._config[e])&&void 0!==n?n:"",entity_ids:this._config.entity_id,variables:{config:this._config,user:this.hass.user.name,entity:this._config.entity},strict:!0}),this._unsubRenderTemplates.set(e,o),t.next=7,o;case 7:t.next=14;break;case 9:t.prev=9,t.t0=t.catch(2),r={result:null!==(i=this._config[e])&&void 0!==i?i:"",listeners:{all:!1,domains:[],entities:[],time:!1}},this._templateResults=Object.assign(Object.assign({},this._templateResults),cr({},e,r)),this._unsubRenderTemplates.delete(e);case 14:case"end":return t.stop()}}),t,this,[[2,9]])}))),function(t){return a.apply(this,arguments)})},{key:"_tryDisconnect",value:(r=yr(gr().mark((function t(){var e=this;return gr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:rg.forEach((function(t){e._tryDisconnectKey(t)}));case 1:case"end":return t.stop()}}),t)}))),function(){return r.apply(this,arguments)})},{key:"_tryDisconnectKey",value:(o=yr(gr().mark((function t(e){var n;return gr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=this._unsubRenderTemplates.get(e)){t.next=3;break}return t.abrupt("return");case 3:return t.prev=3,t.next=6,n;case 6:(0,t.sent)(),this._unsubRenderTemplates.delete(e),t.next=18;break;case 11:if(t.prev=11,t.t0=t.catch(3),"not_found"!==t.t0.code&&"template_error"!==t.t0.code){t.next=17;break}t.next=18;break;case 17:throw t.t0;case 18:case"end":return t.stop()}}),t,this,[[3,11]])}))),function(t){return o.apply(this,arguments)})}],[{key:"getConfigElement",value:(i=yr(gr().mark((function t(){return gr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.resolve().then((function(){return xb}));case 2:return t.abrupt("return",document.createElement(Vv("template")));case 3:case"end":return t.stop()}}),t)}))),function(){return i.apply(this,arguments)})},{key:"getStubConfig",value:(n=yr(gr().mark((function t(e){return gr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",{type:"template"});case 1:case"end":return t.stop()}}),t)}))),function(t){return n.apply(this,arguments)})},{key:"styles",get:function(){return Xr(le||(le=or(["\n mushroom-chip {\n cursor: pointer;\n }\n ha-state-icon {\n color: var(--color);\n }\n ","\n "])),Xv)}}]);var n,i,o,r,a,l}();Ur([Qa({attribute:!1})],ag.prototype,"hass",void 0),Ur([tl()],ag.prototype,"_config",void 0),Ur([tl()],ag.prototype,"_templateResults",void 0),Ur([tl()],ag.prototype,"_unsubRenderTemplates",void 0),ag=Ur([Ga(Uv("template"))],ag);var lg=function(){var t,e,n;customElements.get("ha-form")||null===(t=customElements.get("hui-button-card"))||void 0===t||t.getConfigElement(),customElements.get("ha-entity-picker")||null===(e=customElements.get("hui-entities-card"))||void 0===e||e.getConfigElement(),customElements.get("ha-card-conditions-editor")||null===(n=customElements.get("hui-conditional-card"))||void 0===n||n.getConfigElement()},sg=function(){var t=yr(gr().mark((function t(e){var n;return gr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(n=customElements.get(e))){t.next=3;break}return t.abrupt("return",n);case 3:return t.next=5,customElements.whenDefined(e);case 5:return t.abrupt("return",customElements.get(e));case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),cg=Uv("conditional"),dg=function(){var t=yr(gr().mark((function t(){var e,n;return gr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!customElements.get(cg)){t.next=2;break}return t.abrupt("return");case 2:if(customElements.get("hui-conditional-base")){t.next=7;break}return t.next=5,window.loadCardHelpers();case 5:t.sent.createCardElement({type:"conditional",card:{type:"button"},conditions:[]});case 7:return t.next=9,sg("hui-conditional-base");case 9:e=t.sent,n=function(t){function e(){return zr(this,e),br(this,e,arguments)}return wr(e,t),Mr(e,[{key:"setConfig",value:function(t){if(this.validateConfig(t),!t.chip)throw new Error("No chip configured");this._element=Rv(t.chip)}}],[{key:"getConfigElement",value:(i=yr(gr().mark((function t(){return gr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.resolve().then((function(){return WC}));case 2:return t.abrupt("return",document.createElement(Vv("conditional")));case 3:case"end":return t.stop()}}),t)}))),function(){return i.apply(this,arguments)})},{key:"getStubConfig",value:(n=yr(gr().mark((function t(){return gr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",{type:"conditional",conditions:[]});case 1:case"end":return t.stop()}}),t)}))),function(){return n.apply(this,arguments)})}]);var n,i}(e),customElements.get(cg)||customElements.define(cg,n);case 12:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();function ug(t){return null!=t.attributes.brightness?Math.max(Math.round(100*t.attributes.brightness/255),1):void 0}function hg(t){return null!=t.attributes.rgb_color?t.attributes.rgb_color:void 0}function pg(t){return Df.rgb(t).l()>96}function mg(t){return Df.rgb(t).l()>97}function fg(t){return function(t){var e;return(null===(e=t.attributes.supported_color_modes)||void 0===e?void 0:e.some((function(t){return gs.includes(t)})))||!1}(t)}function vg(t){return function(t){var e;return(null===(e=t.attributes.supported_color_modes)||void 0===e?void 0:e.some((function(t){return _s.includes(t)})))||!1}(t)}var gg=function(t){function e(){return zr(this,e),br(this,e,arguments)}return wr(e,Xa),Mr(e,[{key:"setConfig",value:function(t){this._config=Object.assign({tap_action:{action:"toggle"},hold_action:{action:"more-info"}},t)}},{key:"_handleAction",value:function(t){Os(this,this.hass,this._config,t.detail.action)}},{key:"render",value:function(){var t,e;if(!this.hass||!this._config||!this._config.entity)return ja;var n=this._config.entity,i=this.hass.states[n];if(!i)return ja;var o=this._config.name||i.attributes.friendly_name||"",r=this._config.icon,a=this.hass.formatEntityState?this.hass.formatEntityState(i):Dl(this.hass.localize,i,this.hass.locale,this.hass.config,this.hass.entities),l=kl(i),s=hg(i),c={};if(s&&(null===(t=this._config)||void 0===t?void 0:t.use_light_color)){var d=s.join(",");c["--color"]="rgb(".concat(d,")"),mg(s)&&(c["--color"]="rgba(var(--rgb-primary-text-color), 0.2)")}var u=Kf(null!==(e=this._config.content_info)&&void 0!==e?e:"state",o,a,i,this.hass),h=us(this.hass);return za(se||(se=or(["\n \n \n ","\n \n "])),h,this._handleAction,Ss({hasHold:Ts(this._config.hold_action),hasDoubleClick:Ts(this._config.double_tap_action)}),this.hass,i,r,ff(c),iv({active:l}),u?za(ce||(ce=or(["",""])),u):ja)}}],[{key:"getConfigElement",value:(i=yr(gr().mark((function t(){return gr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.resolve().then((function(){return QC}));case 2:return t.abrupt("return",document.createElement(Vv("light")));case 3:case"end":return t.stop()}}),t)}))),function(){return i.apply(this,arguments)})},{key:"getStubConfig",value:(n=yr(gr().mark((function t(e){var n,i;return gr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=Object.keys(e.states),i=n.filter((function(t){return"light"===t.split(".")[0]})),t.abrupt("return",{type:"light",entity:i[0]});case 3:case"end":return t.stop()}}),t)}))),function(t){return n.apply(this,arguments)})},{key:"styles",get:function(){return Xr(de||(de=or(["\n :host {\n --color: rgb(var(--rgb-state-light));\n }\n mushroom-chip {\n cursor: pointer;\n }\n ha-state-icon.active {\n color: var(--color);\n }\n "])))}}]);var n,i}();Ur([Qa({attribute:!1})],gg.prototype,"hass",void 0),Ur([tl()],gg.prototype,"_config",void 0),gg=Ur([Ga(Uv("light"))],gg);var _g=function(t){function e(){return zr(this,e),br(this,e,arguments)}return wr(e,Xa),Mr(e,[{key:"setConfig",value:function(t){this._config=t}},{key:"_handleAction",value:function(t){Os(this,this.hass,this._config,t.detail.action)}},{key:"render",value:function(){var t;if(!this.hass||!this._config||!this._config.entity)return ja;var e=this._config.entity,n=this.hass.states[e];if(!n)return ja;var i=this._config.name||n.attributes.friendly_name||"",o=this._config.icon,r=Pv(n.state),a=Lv(n.state),l=this.hass.formatEntityState?this.hass.formatEntityState(n):Dl(this.hass.localize,n,this.hass.locale,this.hass.config,this.hass.entities),s={};if(r){var c=Rf(r);s["--color"]="rgb(".concat(c,")")}var d=Kf(null!==(t=this._config.content_info)&&void 0!==t?t:"state",i,l,n,this.hass),u=us(this.hass);return za(ue||(ue=or(["\n \n \n ","\n \n "])),u,this._handleAction,Ss({hasHold:Ts(this._config.hold_action),hasDoubleClick:Ts(this._config.double_tap_action)}),this.hass,n,o,ff(s),iv({pulse:a}),d?za(he||(he=or(["",""])),d):ja)}}],[{key:"getConfigElement",value:(i=yr(gr().mark((function t(){return gr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.resolve().then((function(){return iE}));case 2:return t.abrupt("return",document.createElement(Vv("alarm-control-panel")));case 3:case"end":return t.stop()}}),t)}))),function(){return i.apply(this,arguments)})},{key:"getStubConfig",value:(n=yr(gr().mark((function t(e){var n,i;return gr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=Object.keys(e.states),i=n.filter((function(t){return Mv.includes(t.split(".")[0])})),t.abrupt("return",{type:"alarm-control-panel",entity:i[0]});case 3:case"end":return t.stop()}}),t)}))),function(t){return n.apply(this,arguments)})},{key:"styles",get:function(){return Xr(pe||(pe=or(["\n mushroom-chip {\n cursor: pointer;\n }\n ha-state-icon {\n color: var(--color);\n }\n ha-state-icon.pulse {\n animation: 1s ease 0s infinite normal none running pulse;\n }\n ","\n "])),hv.pulse)}}]);var n,i}();Ur([Qa({attribute:!1})],_g.prototype,"hass",void 0),Ur([tl()],_g.prototype,"_config",void 0),_g=Ur([Ga(Uv("alarm-control-panel"))],_g);var yg=function(t){function e(){return zr(this,e),br(this,e,arguments)}return wr(e,Xa),Mr(e,[{key:"setConfig",value:function(){}}],[{key:"styles",get:function(){return Xr(me||(me=or(["\n :host {\n flex-grow: 1;\n }\n "])))}}])}();yg=Ur([Ga(Uv("spacer"))],yg);var bg="".concat(Iv,"-chips-card"),kg="".concat(bg,"-editor");Tv({type:bg,name:"Mushroom Chips Card",description:"Card with chips to display informations"});var xg=function(t){function e(){return zr(this,e),br(this,e,arguments)}return wr(e,Xa),Mr(e,[{key:"hass",set:function(t){var e,n=Ev(this._hass),i=Ev(t);n!==i&&this.toggleAttribute("dark-mode",i),this._hass=t,null===(e=this.shadowRoot)||void 0===e||e.querySelectorAll("div > *").forEach((function(e){e.hass=t}))}},{key:"getCardSize",value:function(){return 1}},{key:"setConfig",value:function(t){this._config=t}},{key:"render",value:function(){var t=this;if(!this._config||!this._hass)return ja;var e="";this._config.alignment&&(e="align-".concat(this._config.alignment));var n=us(this._hass);return za(fe||(fe=or(['\n \n \n ","\n
\n \n "])),e,n,this._config.chips.map((function(e){return t.renderChip(e)})))}},{key:"renderChip",value:function(t){"conditional"===t.type&&dg();var e=Rv(t);return e?(this._hass&&(e.hass=this._hass),e.editMode=this.editMode||this.preview,e.preview=this.preview||this.editMode,za(ve||(ve=or(["",""])),e)):ja}}],[{key:"getConfigElement",value:(i=yr(gr().mark((function t(){return gr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.resolve().then((function(){return xE}));case 2:return t.abrupt("return",document.createElement(kg));case 3:case"end":return t.stop()}}),t)}))),function(){return i.apply(this,arguments)})},{key:"getStubConfig",value:(n=yr(gr().mark((function t(e){var n;return gr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.all([Bv.getStubConfig(e)]);case 2:return n=t.sent,t.abrupt("return",{type:"custom:".concat(bg),chips:n});case 4:case"end":return t.stop()}}),t)}))),function(t){return n.apply(this,arguments)})},{key:"styles",get:function(){return[Av.styles,Xr(ge||(ge=or(["\n ha-card {\n background: none;\n box-shadow: none;\n border-radius: 0;\n border: none;\n }\n .chip-container {\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n justify-content: flex-start;\n flex-wrap: wrap;\n gap: var(--chip-spacing);\n }\n .chip-container.align-end {\n justify-content: flex-end;\n }\n .chip-container.align-center {\n justify-content: center;\n }\n .chip-container.align-justify {\n justify-content: space-between;\n }\n "])))]}}]);var n,i}();Ur([Qa()],xg.prototype,"preview",void 0),Ur([Qa()],xg.prototype,"editMode",void 0),Ur([tl()],xg.prototype,"_config",void 0),xg=Ur([Ga(bg)],xg);var wg="".concat(Iv,"-climate-card"),Cg="".concat(wg,"-editor"),Eg=["climate"],Ag={auto:"var(--rgb-state-climate-auto)",cool:"var(--rgb-state-climate-cool)",dry:"var(--rgb-state-climate-dry)",fan_only:"var(--rgb-state-climate-fan-only)",heat:"var(--rgb-state-climate-heat)",heat_cool:"var(--rgb-state-climate-heat-cool)",off:"var(--rgb-state-climate-off)"},Sg={cooling:"var(--rgb-state-climate-cool)",drying:"var(--rgb-state-climate-dry)",heating:"var(--rgb-state-climate-heat)",idle:"var(--rgb-state-climate-idle)",off:"var(--rgb-state-climate-off)"},Og={auto:"mdi:calendar-sync",cool:"mdi:snowflake",dry:"mdi:water-percent",fan_only:"mdi:fan",heat:"mdi:fire",heat_cool:"mdi:autorenew",off:"mdi:power"},Tg={cooling:"mdi:snowflake",drying:"mdi:water-percent",heating:"mdi:fire",idle:"mdi:clock-outline",off:"mdi:power"};function Ig(t){var e;return null!==(e=Ag[t])&&void 0!==e?e:Ag.off}var zg=function(t){function e(){var t;return zr(this,e),(t=br(this,e,arguments)).fill=!1,t}return wr(e,Xa),Mr(e,[{key:"callService",value:function(t){t.stopPropagation();var e=t.target.mode;this.hass.callService("climate","set_hvac_mode",{entity_id:this.entity.entity_id,hvac_mode:e})}},{key:"render",value:function(){var t=this,e=us(this.hass),n=this.entity.attributes.hvac_modes.filter((function(e){var n;return(null!==(n=t.modes)&&void 0!==n?n:[]).includes(e)})).sort(vs);return za(_e||(_e=or(["\n \n ","\n \n "])),this.fill,e,n.map((function(e){return t.renderModeButton(e)})))}},{key:"renderModeButton",value:function(t){var e={},n="off"===t?"var(--rgb-grey)":Ig(t);return t===this.entity.state&&(e["--icon-color"]="rgb(".concat(n,")"),e["--bg-color"]="rgba(".concat(n,", 0.2)")),za(ye||(ye=or(["\n \n \n \n "])),ff(e),t,!xl(this.entity),this.callService,function(t){var e;return null!==(e=Og[t])&&void 0!==e?e:"mdi:thermostat"}(t))}}])}();Ur([Qa({attribute:!1})],zg.prototype,"hass",void 0),Ur([Qa({attribute:!1})],zg.prototype,"entity",void 0),Ur([Qa({attribute:!1})],zg.prototype,"modes",void 0),Ur([Qa()],zg.prototype,"fill",void 0),zg=Ur([Ga("mushroom-climate-hvac-modes-control")],zg);var $g=function(t){function e(){var t;return zr(this,e),(t=br(this,e,arguments)).disabled=!1,t.formatOptions={},t.pending=!1,t.dispatchValue=function(e){t.pending=!1,t.dispatchEvent(new CustomEvent("change",{detail:{value:e}}))},t.debounceDispatchValue=t.dispatchValue,t}return wr(e,Xa),Mr(e,[{key:"_precision",get:function(){return Math.ceil(Math.log10(1/this._step))}},{key:"_step",get:function(){var t;return null!==(t=this.step)&&void 0!==t?t:1}},{key:"_incrementValue",value:function(t){if(t.stopPropagation(),null!=this.value){var e=$l(this.value+this._step,this._precision);this._processNewValue(e)}}},{key:"_decrementValue",value:function(t){if(t.stopPropagation(),null!=this.value){var e=$l(this.value-this._step,this._precision);this._processNewValue(e)}}},{key:"firstUpdated",value:function(t){dr(e,"firstUpdated",this,3)([t]);var n=function(t){var e=window.getComputedStyle(t).getPropertyValue("--input-number-debounce"),n=parseFloat(e);return isNaN(n)?2e3:n}(this.container);n&&(this.debounceDispatchValue=hs(this.dispatchValue,n))}},{key:"_processNewValue",value:function(t){var e=function(t,e,n){var i;return i=e?Math.max(t,e):t,n?Math.min(i,n):i}(t,this.min,this.max);this.value!==e&&(this.value=e,this.pending=!0),this.debounceDispatchValue(e)}},{key:"render",value:function(){var t=null!=this.value?Ml(this.value,this.locale,this.formatOptions):"-";return za(be||(be=or(['\n \n \n \n \n
\n '])),this._decrementValue,this.disabled,iv({value:!0,pending:this.pending,disabled:this.disabled}),t,this._incrementValue,this.disabled)}}],[{key:"styles",get:function(){return Xr(ke||(ke=or(["\n :host {\n --text-color: var(--primary-text-color);\n --text-color-disabled: rgb(var(--rgb-disabled));\n --icon-color: var(--primary-text-color);\n --icon-color-disabled: rgb(var(--rgb-disabled));\n --bg-color: rgba(var(--rgb-primary-text-color), 0.05);\n --bg-color-disabled: rgba(var(--rgb-disabled), 0.2);\n height: var(--control-height);\n width: calc(var(--control-height) * var(--control-button-ratio) * 3);\n flex: none;\n }\n .container {\n box-sizing: border-box;\n width: 100%;\n height: 100%;\n padding: 6px;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n border-radius: var(--control-border-radius);\n border: none;\n background-color: var(--bg-color);\n transition: background-color 280ms ease-in-out;\n height: var(--control-height);\n overflow: hidden;\n }\n .button {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n padding: 4px;\n border: none;\n background: none;\n cursor: pointer;\n border-radius: var(--control-border-radius);\n line-height: 0;\n height: 100%;\n }\n .minus {\n padding-right: 0;\n }\n .plus {\n padding-left: 0;\n }\n .button:disabled {\n cursor: not-allowed;\n }\n .button ha-icon {\n font-size: var(--control-height);\n --mdc-icon-size: var(--control-icon-size);\n color: var(--icon-color);\n pointer-events: none;\n }\n .button:disabled ha-icon {\n color: var(--icon-color-disabled);\n }\n .value {\n text-align: center;\n flex-grow: 1;\n flex-shrink: 0;\n flex-basis: 20px;\n font-weight: bold;\n color: var(--text-color);\n }\n .value.disabled {\n color: var(--text-color-disabled);\n }\n .value.pending {\n opacity: 0.5;\n }\n "])))}}])}();Ur([Qa({attribute:!1})],$g.prototype,"locale",void 0),Ur([Qa({type:Boolean})],$g.prototype,"disabled",void 0),Ur([Qa({attribute:!1,type:Number,reflect:!0})],$g.prototype,"value",void 0),Ur([Qa({type:Number})],$g.prototype,"step",void 0),Ur([Qa({type:Number})],$g.prototype,"min",void 0),Ur([Qa({type:Number})],$g.prototype,"max",void 0),Ur([Qa({attribute:"false"})],$g.prototype,"formatOptions",void 0),Ur([tl()],$g.prototype,"pending",void 0),Ur([el("#container")],$g.prototype,"container",void 0),$g=Ur([Ga("mushroom-input-number")],$g);var Mg=function(t){function e(){var t;return zr(this,e),(t=br(this,e,arguments)).fill=!1,t}return wr(e,Xa),Mr(e,[{key:"_stepSize",get:function(){return this.entity.attributes.target_temp_step?this.entity.attributes.target_temp_step:"°F"===this.hass.config.unit_system.temperature?1:.5}},{key:"onValueChange",value:function(t){var e=t.detail.value;this.hass.callService("climate","set_temperature",{entity_id:this.entity.entity_id,temperature:e})}},{key:"onLowValueChange",value:function(t){var e=t.detail.value;this.hass.callService("climate","set_temperature",{entity_id:this.entity.entity_id,target_temp_low:e,target_temp_high:this.entity.attributes.target_temp_high})}},{key:"onHighValueChange",value:function(t){var e=t.detail.value;this.hass.callService("climate","set_temperature",{entity_id:this.entity.entity_id,target_temp_low:this.entity.attributes.target_temp_low,target_temp_high:e})}},{key:"render",value:function(){var t=us(this.hass),e=xl(this.entity),n=1===this._stepSize?{maximumFractionDigits:0}:{minimumFractionDigits:1,maximumFractionDigits:1},i=function(t){return{"--bg-color":"rgba(var(--rgb-state-climate-".concat(t,"), 0.05)"),"--icon-color":"rgb(var(--rgb-state-climate-".concat(t,"))"),"--text-color":"rgb(var(--rgb-state-climate-".concat(t,"))")}};return za(xe||(xe=or(["\n \n ","\n ","\n \n "])),this.fill,t,null!=this.entity.attributes.temperature?za(we||(we=or(["\n \n "])),this.hass.locale,this.entity.attributes.temperature,this._stepSize,this.entity.attributes.min_temp,this.entity.attributes.max_temp,!e,n,this.onValueChange):ja,null!=this.entity.attributes.target_temp_low&&null!=this.entity.attributes.target_temp_high?za(Ce||(Ce=or(["\n \n "])),ff(i("heat")),this.hass.locale,this.entity.attributes.target_temp_low,this._stepSize,this.entity.attributes.min_temp,this.entity.attributes.max_temp,!e,n,this.onLowValueChange,ff(i("cool")),this.hass.locale,this.entity.attributes.target_temp_high,this._stepSize,this.entity.attributes.min_temp,this.entity.attributes.max_temp,!e,n,this.onHighValueChange):ja)}}])}();Ur([Qa({attribute:!1})],Mg.prototype,"hass",void 0),Ur([Qa({attribute:!1})],Mg.prototype,"entity",void 0),Ur([Qa()],Mg.prototype,"fill",void 0),Mg=Ur([Ga("mushroom-climate-temperature-control")],Mg);var jg={temperature_control:"mdi:thermometer",hvac_mode_control:"mdi:thermostat"};Tv({type:wg,name:"Mushroom Climate Card",description:"Card for climate entity"});var Pg=function(t){function e(){return zr(this,e),br(this,e,arguments)}return wr(e,Sv),Mr(e,[{key:"_controls",get:function(){if(!this._config||!this._stateObj)return[];var t,e=this._stateObj,n=[];return(null!=(t=e).attributes.temperature||null!=t.attributes.target_temp_low&&null!=t.attributes.target_temp_high)&&this._config.show_temperature_control&&n.push("temperature_control"),function(t,e){return(t.attributes.hvac_modes||[]).some((function(t){return(null!=e?e:[]).includes(t)}))}(e,this._config.hvac_modes)&&n.push("hvac_mode_control"),n}},{key:"hasControls",get:function(){return this._controls.length>0}},{key:"_onControlTap",value:function(t,e){e.stopPropagation(),this._activeControl=t}},{key:"setConfig",value:function(t){dr(e,"setConfig",this,3)([Object.assign({tap_action:{action:"toggle"},hold_action:{action:"more-info"}},t)]),this.updateActiveControl()}},{key:"updated",value:function(t){dr(e,"updated",this,3)([t]),this.hass&&t.has("hass")&&this.updateActiveControl()}},{key:"updateActiveControl",value:function(){var t=!!this._activeControl&&this._controls.includes(this._activeControl);this._activeControl=t?this._activeControl:this._controls[0]}},{key:"_handleAction",value:function(t){Os(this,this.hass,this._config,t.detail.action)}},{key:"render",value:function(){if(!this.hass||!this._config||!this._config.entity)return ja;var t=this._stateObj;if(!t)return this.renderNotFound(this._config);var e=this._config.name||t.attributes.friendly_name||"",n=this._config.icon,i=gv(this._config),o=Xf(t,i.icon_type),r=this.hass.formatEntityState?this.hass.formatEntityState(t):Dl(this.hass.localize,t,this.hass.locale,this.hass.config,this.hass.entities);if(null!==t.attributes.current_temperature){var a=Ml(t.attributes.current_temperature,this.hass.locale),l=this.hass.config.unit_system.temperature;r+=" - ".concat(a," ").concat(l)}var s=us(this.hass),c=(!this._config.collapsible_controls||kl(t))&&this._controls.length;return za(Ee||(Ee=or(["\n \n \n \n ","\n ","\n ",";\n \n ","\n \n \n "])),iv({"fill-container":i.fill_container}),i,s,s,i,this._handleAction,Ss({hasHold:Ts(this._config.hold_action),hasDoubleClick:Ts(this._config.double_tap_action)}),o?this.renderPicture(o):this.renderIcon(t,n),this.renderBadge(t),this.renderStateInfo(t,i,e,r),c?za(Ae||(Ae=or(['\n \n ","\n ","\n
\n "])),s,this.renderActiveControl(t),this.renderOtherControls()):ja)}},{key:"renderIcon",value:function(t,e){var n=xl(t),i=Ig(t.state),o={};return o["--icon-color"]="rgb(".concat(i,")"),o["--shape-color"]="rgba(".concat(i,", 0.2)"),za(Se||(Se=or(['\n \n \n \n '])),!xl(this.entity),this._onStopTap):void 0,El(this.entity,2)?za(De||(De=or(["\n \n \n \n "])),!xl(this.entity)||this.closedDisabled,this._onCloseTap,function(t){switch(t.attributes.device_class){case"awning":case"curtain":case"door":case"gate":return"mdi:arrow-collapse-horizontal";default:return"mdi:arrow-down"}}(this.entity)):void 0)}}])}();Ur([Qa({attribute:!1})],Rg.prototype,"hass",void 0),Ur([Qa({attribute:!1})],Rg.prototype,"entity",void 0),Ur([Qa()],Rg.prototype,"fill",void 0),Rg=Ur([Ga("mushroom-cover-buttons-control")],Rg);var Ug,Vg,Bg={exports:{}};
/*! Hammer.JS - v2.0.7 - 2016-04-22
* http://hammerjs.github.io/
*
* Copyright (c) 2016 Jorik Tangelder;
- * Licensed under the MIT license */Gl={exports:{}},function(t,e,i,o){var n,r=["","webkit","Moz","MS","ms","o"],a=e.createElement("div"),s="function",l=Math.round,c=Math.abs,d=Date.now;function u(t,e,i){return setTimeout(v(t,i),e)}function h(t,e,i){return!!Array.isArray(t)&&(m(t,i[e],i),!0)}function m(t,e,i){var n;if(t)if(t.forEach)t.forEach(e,i);else if(t.length!==o)for(n=0;n\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",r=t.console&&(t.console.warn||t.console.log);return r&&r.call(t.console,n,o),e.apply(this,arguments)}}n="function"!=typeof Object.assign?function(t){if(t===o||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),i=1;i-1}function $(t){return t.trim().split(/\s+/g)}function E(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var o=0;oi[e]})),o}function I(t,e){for(var i,n,a=e[0].toUpperCase()+e.slice(1),s=0;s1&&!i.firstMultiple?i.firstMultiple=Q(e):1===r&&(i.firstMultiple=!1);var a=i.firstInput,s=i.firstMultiple,l=s?s.center:a.center,u=e.center=tt(n);e.timeStamp=d(),e.deltaTime=e.timeStamp-a.timeStamp,e.angle=nt(l,u),e.distance=ot(l,u),function(t,e){var i=e.center,o=t.offsetDelta||{},n=t.prevDelta||{},r=t.prevInput||{};e.eventType!==N&&r.eventType!==R||(n=t.prevDelta={x:r.deltaX||0,y:r.deltaY||0},o=t.offsetDelta={x:i.x,y:i.y}),e.deltaX=n.x+(i.x-o.x),e.deltaY=n.y+(i.y-o.y)}(i,e),e.offsetDirection=it(e.deltaX,e.deltaY);var h,m,p=et(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=p.x,e.overallVelocityY=p.y,e.overallVelocity=c(p.x)>c(p.y)?p.x:p.y,e.scale=s?(h=s.pointers,ot((m=n)[0],m[1],G)/ot(h[0],h[1],G)):1,e.rotation=s?function(t,e){return nt(e[1],e[0],G)+nt(t[1],t[0],G)}(s.pointers,n):0,e.maxPointers=i.prevInput?e.pointers.length>i.prevInput.maxPointers?e.pointers.length:i.prevInput.maxPointers:e.pointers.length,function(t,e){var i,n,r,a,s=t.lastInterval||e,l=e.timeStamp-s.timeStamp;if(e.eventType!=F&&(l>P||s.velocity===o)){var d=e.deltaX-s.deltaX,u=e.deltaY-s.deltaY,h=et(l,d,u);n=h.x,r=h.y,i=c(h.x)>c(h.y)?h.x:h.y,a=it(d,u),t.lastInterval=e}else i=s.velocity,n=s.velocityX,r=s.velocityY,a=s.direction;e.velocity=i,e.velocityX=n,e.velocityY=r,e.direction=a}(i,e);var f=t.element;k(e.srcEvent.target,f)&&(f=e.srcEvent.target),e.target=f}(t,i),t.emit("hammer.input",i),t.recognize(i),t.session.prevInput=i}function Q(t){for(var e=[],i=0;i=c(e)?t<0?B:U:e<0?H:Y}function ot(t,e,i){i||(i=q);var o=e[i[0]]-t[i[0]],n=e[i[1]]-t[i[1]];return Math.sqrt(o*o+n*n)}function nt(t,e,i){i||(i=q);var o=e[i[0]]-t[i[0]],n=e[i[1]]-t[i[1]];return 180*Math.atan2(n,o)/Math.PI}Z.prototype={handler:function(){},init:function(){this.evEl&&x(this.element,this.evEl,this.domHandler),this.evTarget&&x(this.target,this.evTarget,this.domHandler),this.evWin&&x(z(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&w(this.element,this.evEl,this.domHandler),this.evTarget&&w(this.target,this.evTarget,this.domHandler),this.evWin&&w(z(this.element),this.evWin,this.domHandler)}};var rt={mousedown:N,mousemove:2,mouseup:R},at="mousedown",st="mousemove mouseup";function lt(){this.evEl=at,this.evWin=st,this.pressed=!1,Z.apply(this,arguments)}_(lt,Z,{handler:function(t){var e=rt[t.type];e&N&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=R),this.pressed&&(e&R&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:L,srcEvent:t}))}});var ct={pointerdown:N,pointermove:2,pointerup:R,pointercancel:F,pointerout:F},dt={2:D,3:"pen",4:L,5:"kinect"},ut="pointerdown",ht="pointermove pointerup pointercancel";function mt(){this.evEl=ut,this.evWin=ht,Z.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}t.MSPointerEvent&&!t.PointerEvent&&(ut="MSPointerDown",ht="MSPointerMove MSPointerUp MSPointerCancel"),_(mt,Z,{handler:function(t){var e=this.store,i=!1,o=t.type.toLowerCase().replace("ms",""),n=ct[o],r=dt[t.pointerType]||t.pointerType,a=r==D,s=E(e,t.pointerId,"pointerId");n&N&&(0===t.button||a)?s<0&&(e.push(t),s=e.length-1):n&(R|F)&&(i=!0),s<0||(e[s]=t,this.callback(this.manager,n,{pointers:e,changedPointers:[t],pointerType:r,srcEvent:t}),i&&e.splice(s,1))}});var pt={touchstart:N,touchmove:2,touchend:R,touchcancel:F};function ft(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,Z.apply(this,arguments)}function gt(t,e){var i=A(t.touches),o=A(t.changedTouches);return e&(R|F)&&(i=S(i.concat(o),"identifier")),[i,o]}_(ft,Z,{handler:function(t){var e=pt[t.type];if(e===N&&(this.started=!0),this.started){var i=gt.call(this,t,e);e&(R|F)&&i[0].length-i[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:D,srcEvent:t})}}});var _t={touchstart:N,touchmove:2,touchend:R,touchcancel:F},vt="touchstart touchmove touchend touchcancel";function bt(){this.evTarget=vt,this.targetIds={},Z.apply(this,arguments)}function yt(t,e){var i=A(t.touches),o=this.targetIds;if(e&(2|N)&&1===i.length)return o[i[0].identifier]=!0,[i,i];var n,r,a=A(t.changedTouches),s=[],l=this.target;if(r=i.filter((function(t){return k(t.target,l)})),e===N)for(n=0;n-1&&o.splice(t,1)}),xt)}}function $t(t){for(var e=t.srcEvent.clientX,i=t.srcEvent.clientY,o=0;o-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){var e=this,i=this.state;function o(i){e.manager.emit(i,t)}i<8&&o(e.options.event+Rt(i)),o(e.options.event),t.additionalEvent&&o(t.additionalEvent),i>=8&&o(e.options.event+Rt(i))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=Pt},canEmit:function(){for(var t=0;te.threshold&&n&e.direction},attrTest:function(t){return Bt.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=Ft(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),_(Ht,Bt,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[zt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),_(Yt,Nt,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[It]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,o=t.distancee.time;if(this._input=t,!o||!i||t.eventType&(R|F)&&!n)this.reset();else if(t.eventType&N)this.reset(),this._timer=u((function(){this.state=8,this.tryEmit()}),e.time,this);else if(t.eventType&R)return 8;return Pt},reset:function(){clearTimeout(this._timer)},emit:function(t){8===this.state&&(t&&t.eventType&R?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=d(),this.manager.emit(this.options.event,this._input)))}}),_(Wt,Bt,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[zt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||2&this.state)}}),_(Xt,Bt,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:W|X,pointers:1},getTouchAction:function(){return Ut.prototype.getTouchAction.call(this)},attrTest:function(t){var e,i=this.options.direction;return i&(W|X)?e=t.overallVelocity:i&W?e=t.overallVelocityX:i&X&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&i&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&c(e)>this.options.velocity&&t.eventType&R},emit:function(t){var e=Ft(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),_(Kt,Nt,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[Tt]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,o=t.distance{const e=t.center.x,i=t.target.getBoundingClientRect().left,o=t.target.clientWidth;return Math.max(Math.min(1,(e-i)/o),0)};let Jl=class extends ht{constructor(){super(...arguments),this.disabled=!1,this.inactive=!1,this.step=1,this.min=0,this.max=100,this.controlled=!1}valueToPercentage(t){return(t-this.min)/(this.max-this.min)}percentageToValue(t){return(this.max-this.min)*t+this.min}firstUpdated(t){super.firstUpdated(t),this.setupListeners()}connectedCallback(){super.connectedCallback(),this.setupListeners()}disconnectedCallback(){super.disconnectedCallback(),this.destroyListeners()}setupListeners(){if(this.slider&&!this._mc){const t=(t=>{const e=window.getComputedStyle(t).getPropertyValue("--slider-threshold"),i=parseFloat(e);return isNaN(i)?10:i})(this.slider);let e;this._mc=new Hammer.Manager(this.slider,{touchAction:"pan-y"}),this._mc.add(new Hammer.Pan({threshold:t,direction:Hammer.DIRECTION_ALL,enable:!0})),this._mc.add(new Hammer.Tap({event:"singletap"})),this._mc.on("panstart",(()=>{this.disabled||(this.controlled=!0,e=this.value)})),this._mc.on("pancancel",(()=>{this.disabled||(this.controlled=!1,this.value=e)})),this._mc.on("panmove",(t=>{if(this.disabled)return;const e=Zl(t);this.value=this.percentageToValue(e),this.dispatchEvent(new CustomEvent("current-change",{detail:{value:Math.round(this.value/this.step)*this.step}}))})),this._mc.on("panend",(t=>{if(this.disabled)return;this.controlled=!1;const e=Zl(t);this.value=Math.round(this.percentageToValue(e)/this.step)*this.step,this.dispatchEvent(new CustomEvent("current-change",{detail:{value:void 0}})),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value}}))})),this._mc.on("singletap",(t=>{if(this.disabled)return;const e=Zl(t);this.value=Math.round(this.percentageToValue(e)/this.step)*this.step,this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value}}))}))}}destroyListeners(){this._mc&&(this._mc.destroy(),this._mc=void 0)}render(){var t;return Y`
-
-
-
- ${this.showActive?Y`
`:K}
- ${this.showIndicator?Y`
`:K}
-
-
- `}static get styles(){return h`
- :host {
- --main-color: rgba(var(--rgb-secondary-text-color), 1);
- --bg-gradient: none;
- --bg-color: rgba(var(--rgb-secondary-text-color), 0.2);
- --main-color-inactive: rgb(var(--rgb-disabled));
- --bg-color-inactive: rgba(var(--rgb-disabled), 0.2);
- }
- .container {
- display: flex;
- flex-direction: row;
- height: var(--control-height);
- }
- .slider {
- position: relative;
- height: 100%;
- width: 100%;
- border-radius: var(--control-border-radius);
- transform: translateZ(0);
- overflow: hidden;
- cursor: pointer;
- }
- .slider * {
- pointer-events: none;
- }
- .slider .slider-track-background {
- position: absolute;
- top: 0;
- left: 0;
- height: 100%;
- width: 100%;
- background-color: var(--bg-color);
- background-image: var(--gradient);
- }
- .slider .slider-track-active {
- position: absolute;
- top: 0;
- left: 0;
- height: 100%;
- width: 100%;
- transform: scale3d(var(--value, 0), 1, 1);
- transform-origin: left;
- background-color: var(--main-color);
- transition: transform 180ms ease-in-out;
- }
- .slider .slider-track-indicator {
- position: absolute;
- top: 0;
- bottom: 0;
- left: calc(var(--value, 0) * (100% - 10px));
- width: 10px;
- border-radius: 3px;
- background-color: white;
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
- transition: left 180ms ease-in-out;
- }
- .slider .slider-track-indicator:after {
- display: block;
- content: "";
- background-color: var(--main-color);
- position: absolute;
- top: 0;
- left: 0;
- bottom: 0;
- right: 0;
- margin: auto;
- height: 20px;
- width: 2px;
- border-radius: 1px;
- }
- .inactive .slider .slider-track-background {
- background-color: var(--bg-color-inactive);
- background-image: none;
- }
- .inactive .slider .slider-track-indicator:after {
- background-color: var(--main-color-inactive);
- }
- .inactive .slider .slider-track-active {
- background-color: var(--main-color-inactive);
- }
- .controlled .slider .slider-track-active {
- transition: none;
- }
- .controlled .slider .slider-track-indicator {
- transition: none;
- }
- `}};function Ql(t){return null!=t.attributes.current_position?Math.round(t.attributes.current_position):void 0}function tc(t){const e=t.state;return"open"===e||"opening"===e?"var(--rgb-state-cover-open)":"closed"===e||"closing"===e?"var(--rgb-state-cover-closed)":"var(--rgb-disabled)"}n([_t({type:Boolean})],Jl.prototype,"disabled",void 0),n([_t({type:Boolean})],Jl.prototype,"inactive",void 0),n([_t({type:Boolean,attribute:"show-active"})],Jl.prototype,"showActive",void 0),n([_t({type:Boolean,attribute:"show-indicator"})],Jl.prototype,"showIndicator",void 0),n([_t({attribute:!1,type:Number,reflect:!0})],Jl.prototype,"value",void 0),n([_t({type:Number})],Jl.prototype,"step",void 0),n([_t({type:Number})],Jl.prototype,"min",void 0),n([_t({type:Number})],Jl.prototype,"max",void 0),n([vt()],Jl.prototype,"controlled",void 0),n([xt("#slider")],Jl.prototype,"slider",void 0),Jl=n([pt("mushroom-slider")],Jl);let ec=class extends ht{onChange(t){const e=t.detail.value;this.hass.callService("cover","set_cover_position",{entity_id:this.entity.entity_id,position:e})}onCurrentChange(t){const e=t.detail.value;this.dispatchEvent(new CustomEvent("current-change",{detail:{value:e}}))}render(){const t=Ql(this.entity);return Y`
-
- `}static get styles(){return h`
- mushroom-slider {
- --main-color: var(--slider-color);
- --bg-color: var(--slider-bg-color);
- }
- `}};n([_t({attribute:!1})],ec.prototype,"hass",void 0),n([_t({attribute:!1})],ec.prototype,"entity",void 0),ec=n([pt("mushroom-cover-position-control")],ec);const ic=function(t=24,e=.2){const i=[];for(let o=0;o
- `}static get styles(){const t=ic.map((([t,e])=>`${e} ${100*t}%`)).join(", ");return h`
- mushroom-slider {
- --main-color: var(--slider-color);
- --bg-color: var(--slider-bg-color);
- --gradient: -webkit-linear-gradient(right, ${u(t)});
- }
- `}};n([_t({attribute:!1})],oc.prototype,"hass",void 0),n([_t({attribute:!1})],oc.prototype,"entity",void 0),oc=n([pt("mushroom-cover-tilt-position-control")],oc);const nc={buttons_control:"mdi:gesture-tap-button",position_control:"mdi:gesture-swipe-horizontal",tilt_position_control:"mdi:rotate-right"};Fs({type:Wl,name:"Mushroom Cover Card",description:"Card for cover entity"});let rc=class extends Ns{static async getConfigElement(){return await Promise.resolve().then((function(){return kf})),document.createElement(Xl)}static async getStubConfig(t){const e=Object.keys(t.states).filter((t=>Kl.includes(t.split(".")[0])));return{type:`custom:${Wl}`,entity:e[0]}}get hasControls(){return this._controls.length>0}get _nextControl(){var t;if(this._activeControl)return null!==(t=this._controls[this._controls.indexOf(this._activeControl)+1])&&void 0!==t?t:this._controls[0]}_onNextControlTap(t){t.stopPropagation(),this._activeControl=this._nextControl}getCardSize(){return 1}setConfig(t){super.setConfig(Object.assign({tap_action:{action:"toggle"},hold_action:{action:"more-info"}},t)),this.updateActiveControl(),this.updatePosition()}get _controls(){if(!this._config||!this._stateObj)return[];const t=[];return this._config.show_buttons_control&&t.push("buttons_control"),this._config.show_position_control&&t.push("position_control"),this._config.show_tilt_position_control&&t.push("tilt_position_control"),t}updateActiveControl(){const t=!!this._activeControl&&this._controls.includes(this._activeControl);this._activeControl=t?this._activeControl:this._controls[0]}updated(t){super.updated(t),this.hass&&t.has("hass")&&(this.updatePosition(),this.updateActiveControl())}updatePosition(){this.position=void 0;const t=this._stateObj;t&&(this.position=Ql(t))}onCurrentPositionChange(t){null!=t.detail.value&&(this.position=t.detail.value)}_handleAction(t){Ke(this,this.hass,this._config,t.detail.action)}render(){if(!this.hass||!this._config||!this._config.entity)return K;const t=this._stateObj;if(!t)return this.renderNotFound(this._config);const e=this._config.name||t.attributes.friendly_name||"",i=this._config.icon,o=Ss(this._config),n=ls(t,o.icon_type);let r=this.hass.formatEntityState?this.hass.formatEntityState(t):ne(this.hass.localize,t,this.hass.locale,this.hass.config,this.hass.entities);this.position&&(r+=` - ${this.position}${oe(this.hass.locale)}%`);const a=Ie(this.hass);return Y`
-
-
-
- ${n?this.renderPicture(n):this.renderIcon(t,i)}
- ${this.renderBadge(t)}
- ${this.renderStateInfo(t,o,e,r)};
-
- ${this._controls.length>0?Y`
-
- ${this.renderActiveControl(t,o.layout)}
- ${this.renderNextControlButton()}
-
- `:K}
-
-
- `}renderIcon(t,e){const i={},o=Ut(t),n=tc(t);return i["--icon-color"]=`rgb(${n})`,i["--shape-color"]=`rgba(${n}, 0.2)`,Y`
-
-
- `}renderNextControlButton(){return this._nextControl&&this._nextControl!=this._activeControl?Y`
-
-
-
- `:K}renderActiveControl(t,e){switch(this._activeControl){case"buttons_control":return Y`
-
- `;case"position_control":{const e=tc(t),i={};return i["--slider-color"]=`rgb(${e})`,i["--slider-bg-color"]=`rgba(${e}, 0.2)`,Y`
-
- `}case"tilt_position_control":{const e=tc(t),i={};return i["--slider-color"]=`rgb(${e})`,i["--slider-bg-color"]=`rgba(${e}, 0.2)`,Y`
-
- `}default:return K}}static get styles(){return[super.styles,Rs,h`
- mushroom-state-item {
- cursor: pointer;
- }
- mushroom-shape-icon {
- --icon-color: rgb(var(--rgb-state-cover));
- --shape-color: rgba(var(--rgb-state-cover), 0.2);
- }
- mushroom-cover-buttons-control,
- mushroom-cover-position-control {
- flex: 1;
- }
- mushroom-cover-tilt-position-control {
- flex: 1;
- }
- `]}};n([vt()],rc.prototype,"_activeControl",void 0),n([vt()],rc.prototype,"position",void 0),rc=n([pt(Wl)],rc);const ac=`${Vs}-entity-card`,sc=`${ac}-editor`;Fs({type:ac,name:"Mushroom Entity Card",description:"Card for all entities"});let lc=class extends Ns{static async getConfigElement(){return await Promise.resolve().then((function(){return Af})),document.createElement(sc)}static async getStubConfig(t){const e=Object.keys(t.states);return{type:`custom:${ac}`,entity:e[0]}}_handleAction(t){Ke(this,this.hass,this._config,t.detail.action)}render(){if(!this._config||!this.hass||!this._config.entity)return K;const t=this._stateObj;if(!t)return this.renderNotFound(this._config);const e=this._config.name||t.attributes.friendly_name||"",i=this._config.icon,o=Ss(this._config),n=ls(t,o.icon_type),r=Ie(this.hass);return Y`
-
-
-
- ${n?this.renderPicture(n):this.renderIcon(t,i)}
- ${this.renderBadge(t)}
- ${this.renderStateInfo(t,o,e)};
-
-
-
- `}renderIcon(t,e){var i;const o=Bt(t),n={},r=null===(i=this._config)||void 0===i?void 0:i.icon_color;if(r){const t=Qa(r);n["--icon-color"]=`rgb(${t})`,n["--shape-color"]=`rgba(${t}, 0.2)`}return Y`
-
-
-
- `}static get styles(){return[super.styles,Rs,h`
- mushroom-state-item {
- cursor: pointer;
- }
- mushroom-shape-icon {
- --icon-color: rgb(var(--rgb-state-entity));
- --shape-color: rgba(var(--rgb-state-entity), 0.2);
- }
- `]}};lc=n([pt(ac)],lc);const cc=`${Vs}-fan-card`,dc=`${cc}-editor`,uc=["fan"];function hc(t){return null!=t.attributes.percentage?Math.round(t.attributes.percentage):void 0}function mc(t){return null!=t.attributes.oscillating&&Boolean(t.attributes.oscillating)}let pc=class extends ht{_onTap(t){t.stopPropagation();const e=mc(this.entity);this.hass.callService("fan","oscillate",{entity_id:this.entity.entity_id,oscillating:!e})}render(){const t=mc(this.entity),e=Bt(this.entity);return Y`
-
-
-
- `}static get styles(){return h`
- :host {
- display: flex;
- }
- mushroom-button.active {
- --icon-color: rgb(var(--rgb-state-fan));
- --bg-color: rgba(var(--rgb-state-fan), 0.2);
- }
- `}};n([_t({attribute:!1})],pc.prototype,"hass",void 0),n([_t({attribute:!1})],pc.prototype,"entity",void 0),pc=n([pt("mushroom-fan-oscillate-control")],pc);let fc=class extends ht{onChange(t){const e=t.detail.value;this.hass.callService("fan","set_percentage",{entity_id:this.entity.entity_id,percentage:e})}onCurrentChange(t){const e=t.detail.value;this.dispatchEvent(new CustomEvent("current-change",{detail:{value:e}}))}render(){const t=hc(this.entity);return Y`
-
- `;var e}static get styles(){return h`
- mushroom-slider {
- --main-color: rgb(var(--rgb-state-fan));
- --bg-color: rgba(var(--rgb-state-fan), 0.2);
- }
- `}};n([_t({attribute:!1})],fc.prototype,"hass",void 0),n([_t({attribute:!1})],fc.prototype,"entity",void 0),fc=n([pt("mushroom-fan-percentage-control")],fc),Fs({type:cc,name:"Mushroom Fan Card",description:"Card for fan entity"});let gc=class extends Ns{static async getConfigElement(){return await Promise.resolve().then((function(){return Of})),document.createElement(dc)}static async getStubConfig(t){const e=Object.keys(t.states).filter((t=>uc.includes(t.split(".")[0])));return{type:`custom:${cc}`,entity:e[0]}}get hasControls(){var t,e;return Boolean(null===(t=this._config)||void 0===t?void 0:t.show_percentage_control)||Boolean(null===(e=this._config)||void 0===e?void 0:e.show_oscillate_control)}setConfig(t){super.setConfig(Object.assign({tap_action:{action:"toggle"},hold_action:{action:"more-info"}},t)),this.updatePercentage()}updated(t){super.updated(t),this.hass&&t.has("hass")&&this.updatePercentage()}updatePercentage(){this.percentage=void 0;const t=this._stateObj;this._config&&this.hass&&t&&(this.percentage=hc(t))}onCurrentPercentageChange(t){null!=t.detail.value&&(this.percentage=Math.round(t.detail.value))}_handleAction(t){Ke(this,this.hass,this._config,t.detail.action)}render(){if(!this._config||!this.hass||!this._config.entity)return K;const t=this._stateObj;if(!t)return this.renderNotFound(this._config);const e=this._config.name||t.attributes.friendly_name||"",i=this._config.icon,o=Ss(this._config),n=ls(t,o.icon_type);let r=this.hass.formatEntityState?this.hass.formatEntityState(t):ne(this.hass.localize,t,this.hass.locale,this.hass.config,this.hass.entities);null!=this.percentage&&"on"===t.state&&(r=`${this.percentage}${oe(this.hass.locale)}%`);const a=Ie(this.hass),s=(!this._config.collapsible_controls||Bt(t))&&(this._config.show_percentage_control||this._config.show_oscillate_control);return Y`
-
-
-
- ${n?this.renderPicture(n):this.renderIcon(t,i)}
- ${this.renderBadge(t)}
- ${this.renderStateInfo(t,o,e,r)};
-
- ${s?Y`
-
- ${this._config.show_percentage_control?Y`
-
- `:K}
- ${this._config.show_oscillate_control?Y`
-
- `:K}
-
- `:K}
-
-
- `}renderIcon(t,e){var i;let o={};const n=hc(t),r=Bt(t);if(r)if(n){const t=1.5*(n/100)**.5;o["--animation-duration"]=1/t+"s"}else o["--animation-duration"]="1s";return Y`
-
-
-
- `}static get styles(){return[super.styles,Rs,h`
- mushroom-state-item {
- cursor: pointer;
- }
- mushroom-shape-icon {
- --icon-color: rgb(var(--rgb-state-fan));
- --shape-color: rgba(var(--rgb-state-fan), 0.2);
- }
- .spin ha-state-icon {
- animation: var(--animation-duration) infinite linear spin;
- }
- mushroom-fan-percentage-control {
- flex: 1;
- }
- `]}};n([vt()],gc.prototype,"percentage",void 0),gc=n([pt(cc)],gc);const _c=`${Vs}-humidifier-card`,vc=`${_c}-editor`,bc=["humidifier"];let yc=class extends ht{onChange(t){const e=t.detail.value;this.hass.callService("humidifier","set_humidity",{entity_id:this.entity.entity_id,humidity:e})}onCurrentChange(t){const e=t.detail.value;this.dispatchEvent(new CustomEvent("current-change",{detail:{value:e}}))}render(){const t=this.entity.attributes.max_humidity||100,e=this.entity.attributes.min_humidity||0;return Y``}static get styles(){return h`
- mushroom-slider {
- --main-color: rgb(var(--rgb-state-humidifier));
- --bg-color: rgba(var(--rgb-state-humidifier), 0.2);
- }
- `}};n([_t({attribute:!1})],yc.prototype,"hass",void 0),n([_t({attribute:!1})],yc.prototype,"entity",void 0),n([_t({attribute:!1})],yc.prototype,"color",void 0),yc=n([pt("mushroom-humidifier-humidity-control")],yc),Fs({type:_c,name:"Mushroom Humidifier Card",description:"Card for humidifier entity"});let xc=class extends Ns{static async getConfigElement(){return await Promise.resolve().then((function(){return Pf})),document.createElement(vc)}static async getStubConfig(t){const e=Object.keys(t.states).filter((t=>bc.includes(t.split(".")[0])));return{type:`custom:${_c}`,entity:e[0]}}get hasControls(){var t;return Boolean(null===(t=this._config)||void 0===t?void 0:t.show_target_humidity_control)}setConfig(t){super.setConfig(Object.assign({tap_action:{action:"toggle"},hold_action:{action:"more-info"}},t))}_handleAction(t){Ke(this,this.hass,this._config,t.detail.action)}onCurrentHumidityChange(t){null!=t.detail.value&&(this.humidity=t.detail.value)}render(){if(!this._config||!this.hass||!this._config.entity)return K;const t=this._stateObj;if(!t)return this.renderNotFound(this._config);const e=this._config.name||t.attributes.friendly_name||"",i=this._config.icon,o=Ss(this._config),n=ls(t,o.icon_type);let r=this.hass.formatEntityState?this.hass.formatEntityState(t):ne(this.hass.localize,t,this.hass.locale,this.hass.config,this.hass.entities);this.humidity&&(r=`${this.humidity}${oe(this.hass.locale)}%`);const a=Ie(this.hass),s=(!this._config.collapsible_controls||Bt(t))&&this._config.show_target_humidity_control;return Y`
-
-
-
- ${n?this.renderPicture(n):this.renderIcon(t,i)}
- ${this.renderBadge(t)}
- ${this.renderStateInfo(t,o,e,r)};
-
- ${s?Y`
-
-
-
- `:K}
-
-
- `}static get styles(){return[super.styles,Rs,h`
- mushroom-state-item {
- cursor: pointer;
- }
- mushroom-shape-icon {
- --icon-color: rgb(var(--rgb-state-humidifier));
- --shape-color: rgba(var(--rgb-state-humidifier), 0.2);
- }
- mushroom-humidifier-humidity-control {
- flex: 1;
- }
- `]}};n([vt()],xc.prototype,"humidity",void 0),xc=n([pt(_c)],xc);const wc=`${Vs}-number-card`,kc=`${wc}-editor`,Cc=["number","input_number"];let $c=class extends ht{onChange(t){const e=t.detail.value,i=this.entity.entity_id.split(".")[0];this.hass.callService(i,"set_value",{entity_id:this.entity.entity_id,value:e})}onCurrentChange(t){const e=t.detail.value;this.dispatchEvent(new CustomEvent("current-change",{detail:{value:e}}))}render(){var t;const e=Number(this.entity.state),i=null!==(t=ee(this.entity,this.hass.entities[this.entity.entity_id]))&&void 0!==t?t:ie(this.entity.state);return"buttons"===this.displayMode?Y`
-
- `:Y`
-
- `}static get styles(){return h`
- :host {
- --slider-color: rgb(var(--rgb-state-number));
- --slider-outline-color: transparent;
- --slider-bg-color: rgba(var(--rgb-state-number), 0.2);
- }
- mushroom-slider {
- --main-color: var(--slider-color);
- --bg-color: var(--slider-bg-color);
- --main-outline-color: var(--slider-outline-color);
- }
- `}};n([_t({attribute:!1})],$c.prototype,"hass",void 0),n([_t({attribute:!1})],$c.prototype,"entity",void 0),n([_t({attribute:!1})],$c.prototype,"displayMode",void 0),$c=n([pt("mushroom-number-value-control")],$c),Fs({type:wc,name:"Mushroom Number Card",description:"Card for number and input number entity"});let Ec=class extends Ns{static async getConfigElement(){return await Promise.resolve().then((function(){return Uf})),document.createElement(kc)}static async getStubConfig(t){const e=Object.keys(t.states).filter((t=>Cc.includes(t.split(".")[0])));return{type:`custom:${wc}`,entity:e[0]}}get hasControls(){return!0}_handleAction(t){Ke(this,this.hass,this._config,t.detail.action)}onCurrentValueChange(t){null!=t.detail.value&&(this.value=t.detail.value)}updated(t){super.updated(t),this.hass&&t.has("hass")&&this.updateValue()}updateValue(){this.value=void 0;const t=this._stateObj;t&&!Number.isNaN(t.state)&&(this.value=Number(t.state))}render(){var t,e,i;if(!this._config||!this.hass||!this._config.entity)return K;const o=this._stateObj;if(!o)return this.renderNotFound(this._config);const n=this._config.name||o.attributes.friendly_name||"",r=this._config.icon,a=Ss(this._config),s=ls(o,a.icon_type);let l=this.hass.formatEntityState?this.hass.formatEntityState(o):ne(this.hass.localize,o,this.hass.locale,this.hass.config,this.hass.entities);if(void 0!==this.value){l=`${te(this.value,this.hass.locale,null!==(t=ee(o,this.hass.entities[o.entity_id]))&&void 0!==t?t:ie(o.state))} ${null!==(e=o.attributes.unit_of_measurement)&&void 0!==e?e:""}`}const c=Ie(this.hass),d={},u=null===(i=this._config)||void 0===i?void 0:i.icon_color;if(u){const t=Qa(u);d["--slider-color"]=`rgb(${t})`,d["--slider-bg-color"]=`rgba(${t}, 0.2)`}return Y`
-
-
-
- ${s?this.renderPicture(s):this.renderIcon(o,r)}
- ${this.renderBadge(o)}
- ${this.renderStateInfo(o,a,n,l)};
-
-
-
-
-
-
- `}renderIcon(t,e){var i;const o=Bt(t),n={},r=null===(i=this._config)||void 0===i?void 0:i.icon_color;if(r){const t=Qa(r);n["--icon-color"]=`rgb(${t})`,n["--shape-color"]=`rgba(${t}, 0.2)`}return Y`
-
-
-
- `}static get styles(){return[super.styles,Rs,h`
- mushroom-state-item {
- cursor: pointer;
- }
- mushroom-shape-icon {
- --icon-color: rgb(var(--rgb-state-number));
- --shape-color: rgba(var(--rgb-state-number), 0.2);
- }
- mushroom-number-value-control {
- flex: 1;
- }
- `]}};n([vt()],Ec.prototype,"value",void 0),Ec=n([pt(wc)],Ec);const Ac=`${Vs}-light-card`,Sc=`${Ac}-editor`,Ic=["light"];let Tc=class extends ht{onChange(t){const e=t.detail.value;this.hass.callService("light","turn_on",{entity_id:this.entity.entity_id,brightness_pct:e})}onCurrentChange(t){const e=t.detail.value;this.dispatchEvent(new CustomEvent("current-change",{detail:{value:e}}))}render(){const t=xl(this.entity);return Y`
-
- `}static get styles(){return h`
- :host {
- --slider-color: rgb(var(--rgb-state-light));
- --slider-outline-color: transparent;
- --slider-bg-color: rgba(var(--rgb-state-light), 0.2);
- }
- mushroom-slider {
- --main-color: var(--slider-color);
- --bg-color: var(--slider-bg-color);
- --main-outline-color: var(--slider-outline-color);
- }
- `}};n([_t({attribute:!1})],Tc.prototype,"hass",void 0),n([_t({attribute:!1})],Tc.prototype,"entity",void 0),Tc=n([pt("mushroom-light-brightness-control")],Tc);const zc=[[0,"#f00"],[.17,"#ff0"],[.33,"#0f0"],[.5,"#0ff"],[.66,"#00f"],[.83,"#f0f"],[1,"#f00"]];let Oc=class extends ht{constructor(){super(...arguments),this._percent=0}_percentToRGB(t){return Za.hsv(360*t,100,100).rgb().array()}_rgbToPercent(t){return Za.rgb(t).hsv().hue()/360}onChange(t){const e=t.detail.value;this._percent=e;const i=this._percentToRGB(e/100);3===i.length&&this.hass.callService("light","turn_on",{entity_id:this.entity.entity_id,rgb_color:i})}render(){const t=this._percent||100*this._rgbToPercent(this.entity.attributes.rgb_color);return Y`
-
- `}static get styles(){const t=zc.map((([t,e])=>`${e} ${100*t}%`)).join(", ");return h`
- mushroom-slider {
- --gradient: -webkit-linear-gradient(left, ${u(t)});
- }
- `}};n([_t({attribute:!1})],Oc.prototype,"hass",void 0),n([_t({attribute:!1})],Oc.prototype,"entity",void 0),Oc=n([pt("mushroom-light-color-control")],Oc);let Mc=class extends ht{onChange(t){const e=t.detail.value;this.hass.callService("light","turn_on",{entity_id:this.entity.entity_id,color_temp:e})}render(){var t,e;const i=null!=(o=this.entity).attributes.color_temp?Math.round(o.attributes.color_temp):void 0;var o;return Y`
-
- `}static get styles(){return h`
- mushroom-slider {
- --gradient: -webkit-linear-gradient(
- right,
- rgb(255, 160, 0) 0%,
- white 100%
- );
- }
- `}};n([_t({attribute:!1})],Mc.prototype,"hass",void 0),n([_t({attribute:!1})],Mc.prototype,"entity",void 0),Mc=n([pt("mushroom-light-color-temp-control")],Mc);const jc={brightness_control:"mdi:brightness-4",color_temp_control:"mdi:thermometer",color_control:"mdi:palette"};Fs({type:Ac,name:"Mushroom Light Card",description:"Card for light entity"});let Dc=class extends Ns{static async getConfigElement(){return await Promise.resolve().then((function(){return Rp})),document.createElement(Sc)}static async getStubConfig(t){const e=Object.keys(t.states).filter((t=>Ic.includes(t.split(".")[0])));return{type:`custom:${Ac}`,entity:e[0]}}get _controls(){if(!this._config||!this._stateObj)return[];const t=this._stateObj,e=[];return this._config.show_brightness_control&&El(t)&&e.push("brightness_control"),this._config.show_color_temp_control&&function(t){var e,i;return null!==(i=null===(e=t.attributes.supported_color_modes)||void 0===e?void 0:e.some((t=>["color_temp"].includes(t))))&&void 0!==i&&i}(t)&&e.push("color_temp_control"),this._config.show_color_control&&$l(t)&&e.push("color_control"),e}get hasControls(){return this._controls.length>0}setConfig(t){super.setConfig(Object.assign({tap_action:{action:"toggle"},hold_action:{action:"more-info"}},t)),this.updateActiveControl(),this.updateBrightness()}_onControlTap(t,e){e.stopPropagation(),this._activeControl=t}updated(t){super.updated(t),this.hass&&t.has("hass")&&(this.updateActiveControl(),this.updateBrightness())}updateBrightness(){this.brightness=void 0;const t=this._stateObj;t&&(this.brightness=xl(t))}onCurrentBrightnessChange(t){null!=t.detail.value&&(this.brightness=t.detail.value)}updateActiveControl(){const t=!!this._activeControl&&this._controls.includes(this._activeControl);this._activeControl=t?this._activeControl:this._controls[0]}_handleAction(t){Ke(this,this.hass,this._config,t.detail.action)}render(){if(!this._config||!this.hass||!this._config.entity)return K;const t=this._stateObj;if(!t)return this.renderNotFound(this._config);const e=this._config.name||t.attributes.friendly_name||"",i=this._config.icon,o=Ss(this._config),n=ls(t,o.icon_type);let r=this.hass.formatEntityState?this.hass.formatEntityState(t):ne(this.hass.localize,t,this.hass.locale,this.hass.config,this.hass.entities);null!=this.brightness&&(r=`${this.brightness}${oe(this.hass.locale)}%`);const a=Ie(this.hass),s=(!this._config.collapsible_controls||Bt(t))&&this._controls.length;return Y`
-
-
-
- ${n?this.renderPicture(n):this.renderIcon(t,i)}
- ${this.renderBadge(t)}
- ${this.renderStateInfo(t,o,e,r)};
-
- ${s?Y`
-
- ${this.renderActiveControl(t)}
- ${this.renderOtherControls()}
-
- `:K}
-
-
- `}renderIcon(t,e){var i,o;const n=wl(t),r=Bt(t),a={},s=null===(i=this._config)||void 0===i?void 0:i.icon_color;if(n&&(null===(o=this._config)||void 0===o?void 0:o.use_light_color)){const t=n.join(",");a["--icon-color"]=`rgb(${t})`,a["--shape-color"]=`rgba(${t}, 0.25)`,kl(n)&&!this.hass.themes.darkMode&&(a["--shape-outline-color"]="rgba(var(--rgb-primary-text-color), 0.05)",Cl(n)&&(a["--icon-color"]="rgba(var(--rgb-primary-text-color), 0.2)"))}else if(s){const t=Qa(s);a["--icon-color"]=`rgb(${t})`,a["--shape-color"]=`rgba(${t}, 0.2)`}return Y`
-
-
-
- `}renderOtherControls(){const t=this._controls.filter((t=>t!=this._activeControl));return Y`
- ${t.map((t=>Y`
- this._onControlTap(t,e)}>
-
-
- `))}
- `}renderActiveControl(t){var e,i;switch(this._activeControl){case"brightness_control":const o=wl(t),n={},r=null===(e=this._config)||void 0===e?void 0:e.icon_color;if(o&&(null===(i=this._config)||void 0===i?void 0:i.use_light_color)){const t=o.join(",");n["--slider-color"]=`rgb(${t})`,n["--slider-bg-color"]=`rgba(${t}, 0.2)`,kl(o)&&!this.hass.themes.darkMode&&(n["--slider-bg-color"]="rgba(var(--rgb-primary-text-color), 0.05)",n["--slider-color"]="rgba(var(--rgb-primary-text-color), 0.15)")}else if(r){const t=Qa(r);n["--slider-color"]=`rgb(${t})`,n["--slider-bg-color"]=`rgba(${t}, 0.2)`}return Y`
-
- `;case"color_temp_control":return Y`
-
- `;case"color_control":return Y`
-
- `;default:return K}}static get styles(){return[super.styles,Rs,h`
- mushroom-state-item {
- cursor: pointer;
- }
- mushroom-shape-icon {
- --icon-color: rgb(var(--rgb-state-light));
- --shape-color: rgba(var(--rgb-state-light), 0.2);
- }
- mushroom-light-brightness-control,
- mushroom-light-color-temp-control,
- mushroom-light-color-control {
- flex: 1;
- }
- `]}};n([vt()],Dc.prototype,"_activeControl",void 0),n([vt()],Dc.prototype,"brightness",void 0),Dc=n([pt(Ac)],Dc);const Lc=`${Vs}-lock-card`,Pc=`${Lc}-editor`,Nc=["lock"];function Rc(t){return"unlocked"===t.state}function Fc(t){return"locked"===t.state}function Vc(t){switch(t.state){case"locking":case"unlocking":return!0;default:return!1}}const Bc=[{icon:"mdi:lock",title:"lock",serviceName:"lock",isVisible:t=>Rc(t),isDisabled:()=>!1},{icon:"mdi:lock-open",title:"unlock",serviceName:"unlock",isVisible:t=>Fc(t),isDisabled:()=>!1},{icon:"mdi:lock-clock",isVisible:t=>Vc(t),isDisabled:()=>!0},{icon:"mdi:door-open",title:"open",serviceName:"open",isVisible:t=>Wt(t,1)&&Rc(t),isDisabled:t=>Vc(t)}];let Uc=class extends ht{constructor(){super(...arguments),this.fill=!1}callService(t){t.stopPropagation();const e=t.target.entry;this.hass.callService("lock",e.serviceName,{entity_id:this.entity.entity_id})}render(){const t=Ie(this.hass),e=jo(this.hass);return Y`
- ${Bc.filter((t=>t.isVisible(this.entity))).map((t=>Y`
-
-
-
- `))}
- `}};n([_t({attribute:!1})],Uc.prototype,"hass",void 0),n([_t({attribute:!1})],Uc.prototype,"entity",void 0),n([_t({type:Boolean})],Uc.prototype,"fill",void 0),Uc=n([pt("mushroom-lock-buttons-control")],Uc),Fs({type:Lc,name:"Mushroom Lock Card",description:"Card for all lock entities"});let Hc=class extends Ns{static async getConfigElement(){return await Promise.resolve().then((function(){return Xf})),document.createElement(Pc)}static async getStubConfig(t){const e=Object.keys(t.states).filter((t=>Nc.includes(t.split(".")[0])));return{type:`custom:${Lc}`,entity:e[0]}}get hasControls(){return!0}_handleAction(t){Ke(this,this.hass,this._config,t.detail.action)}render(){if(!this._config||!this.hass||!this._config.entity)return K;const t=this._stateObj;if(!t)return this.renderNotFound(this._config);const e=this._config.name||t.attributes.friendly_name||"",i=this._config.icon,o=Ss(this._config),n=ls(t,o.icon_type),r=Ie(this.hass);return Y`
-
-
-
- ${n?this.renderPicture(n):this.renderIcon(t,i)}
- ${this.renderBadge(t)}
- ${this.renderStateInfo(t,o,e)};
-
-
-
-
-
-
-
- `}renderIcon(t,e){const i=Ut(t),o={"--icon-color":"rgb(var(--rgb-state-lock))","--shape-color":"rgba(var(--rgb-state-lock), 0.2)"};return Fc(t)?(o["--icon-color"]="rgb(var(--rgb-state-lock-locked))",o["--shape-color"]="rgba(var(--rgb-state-lock-locked), 0.2)"):Rc(t)?(o["--icon-color"]="rgb(var(--rgb-state-lock-unlocked))",o["--shape-color"]="rgba(var(--rgb-state-lock-unlocked), 0.2)"):Vc(t)&&(o["--icon-color"]="rgb(var(--rgb-state-lock-pending))",o["--shape-color"]="rgba(var(--rgb-state-lock-pending), 0.2)"),Y`
-
-
-
- `}static get styles(){return[super.styles,Rs,h`
- mushroom-state-item {
- cursor: pointer;
- }
- mushroom-lock-buttons-control {
- flex: 1;
- }
- `]}};Hc=n([pt(Lc)],Hc);const Yc=`${Vs}-media-player-card`,Wc=`${Yc}-editor`,Xc=["media_player"];function Kc(t){return null!=t.attributes.volume_level?100*t.attributes.volume_level:void 0}const qc=(t,e)=>{if(!t)return[];const i=t.state;if("off"===i)return Wt(t,128)&&e.includes("on_off")?[{icon:"mdi:power",action:"turn_on"}]:[];const o=[];Wt(t,256)&&e.includes("on_off")&&o.push({icon:"mdi:power",action:"turn_off"});const n=!0===t.attributes.assumed_state,r=t.attributes;return("playing"===i||"paused"===i||n)&&Wt(t,32768)&&e.includes("shuffle")&&o.push({icon:!0===r.shuffle?"mdi:shuffle":"mdi:shuffle-disabled",action:"shuffle_set"}),("playing"===i||"paused"===i||n)&&Wt(t,16)&&e.includes("previous")&&o.push({icon:"mdi:skip-previous",action:"media_previous_track"}),!n&&("playing"===i&&(Wt(t,1)||Wt(t,4096))||("paused"===i||"idle"===i)&&Wt(t,Pe)||"on"===i&&(Wt(t,Pe)||Wt(t,1)))&&e.includes("play_pause_stop")&&o.push({icon:"on"===i?"mdi:play-pause":"playing"!==i?"mdi:play":Wt(t,1)?"mdi:pause":"mdi:stop",action:"playing"!==i?"media_play":Wt(t,1)?"media_pause":"media_stop"}),n&&Wt(t,Pe)&&e.includes("play_pause_stop")&&o.push({icon:"mdi:play",action:"media_play"}),n&&Wt(t,1)&&e.includes("play_pause_stop")&&o.push({icon:"mdi:pause",action:"media_pause"}),n&&Wt(t,4096)&&e.includes("play_pause_stop")&&o.push({icon:"mdi:stop",action:"media_stop"}),("playing"===i||"paused"===i||n)&&Wt(t,32)&&e.includes("next")&&o.push({icon:"mdi:skip-next",action:"media_next_track"}),("playing"===i||"paused"===i||n)&&Wt(t,262144)&&e.includes("repeat")&&o.push({icon:"all"===r.repeat?"mdi:repeat":"one"===r.repeat?"mdi:repeat-once":"mdi:repeat-off",action:"repeat_set"}),o.length>0?o:[]},Gc=(t,e,i)=>{let o={};"shuffle_set"===i?o={shuffle:!e.attributes.shuffle}:"repeat_set"===i?o={repeat:"all"===e.attributes.repeat?"one":"off"===e.attributes.repeat?"all":"off"}:"volume_mute"===i&&(o={is_volume_muted:!e.attributes.is_volume_muted}),t.callService("media_player",i,Object.assign({entity_id:e.entity_id},o))};let Zc=class extends ht{constructor(){super(...arguments),this.fill=!1}_handleClick(t){t.stopPropagation();const e=t.target.action;Gc(this.hass,this.entity,e)}render(){const t=Ie(this.hass),e=qc(this.entity,this.controls);return Y`
-
- ${e.map((t=>Y`
-
-
-
- `))}
-
- `}};n([_t({attribute:!1})],Zc.prototype,"hass",void 0),n([_t({attribute:!1})],Zc.prototype,"entity",void 0),n([_t({attribute:!1})],Zc.prototype,"controls",void 0),n([_t({type:Boolean})],Zc.prototype,"fill",void 0),Zc=n([pt("mushroom-media-player-media-control")],Zc);let Jc=class extends ht{constructor(){super(...arguments),this.fill=!1}handleSliderChange(t){const e=t.detail.value;this.hass.callService("media_player","volume_set",{entity_id:this.entity.entity_id,volume_level:e/100})}handleSliderCurrentChange(t){let e=t.detail.value;this.dispatchEvent(new CustomEvent("current-change",{detail:{value:e}}))}handleClick(t){t.stopPropagation();const e=t.target.action;Gc(this.hass,this.entity,e)}render(){var t,e,i;if(!this.entity)return K;const o=Kc(this.entity),n=Ie(this.hass),r=(null===(t=this.controls)||void 0===t?void 0:t.includes("volume_set"))&&Wt(this.entity,4),a=(null===(e=this.controls)||void 0===e?void 0:e.includes("volume_mute"))&&Wt(this.entity,8),s=(null===(i=this.controls)||void 0===i?void 0:i.includes("volume_buttons"))&&Wt(this.entity,1024);return Y`
-
- ${r?Y` `:K}
- ${a?Y`
-
-
-
- `:void 0}
- ${s?Y`
-
-
- `:void 0}
- ${s?Y`
-
-
- `:void 0}
-
- `}static get styles(){return h`
- mushroom-slider {
- flex: 1;
- --main-color: rgb(var(--rgb-state-media-player));
- --bg-color: rgba(var(--rgb-state-media-player), 0.2);
- }
- `}};n([_t({attribute:!1})],Jc.prototype,"hass",void 0),n([_t({attribute:!1})],Jc.prototype,"entity",void 0),n([_t({type:Boolean})],Jc.prototype,"fill",void 0),n([_t({attribute:!1})],Jc.prototype,"controls",void 0),Jc=n([pt("mushroom-media-player-volume-control")],Jc);const Qc={media_control:"mdi:play-pause",volume_control:"mdi:volume-high"};Fs({type:Yc,name:"Mushroom Media Card",description:"Card for media player entity"});let td=class extends Ns{static async getConfigElement(){return await Promise.resolve().then((function(){return tg})),document.createElement(Wc)}static async getStubConfig(t){const e=Object.keys(t.states).filter((t=>Xc.includes(t.split(".")[0])));return{type:`custom:${Yc}`,entity:e[0]}}get hasControls(){var t,e,i,o;return Boolean(null===(e=null===(t=this._config)||void 0===t?void 0:t.media_controls)||void 0===e?void 0:e.length)||Boolean(null===(o=null===(i=this._config)||void 0===i?void 0:i.volume_controls)||void 0===o?void 0:o.length)}get _controls(){if(!this._config||!this._stateObj)return[];const t=this._stateObj,e=[];return((t,e)=>qc(t,null!=e?e:[]).length>0)(t,this._config.media_controls)&&e.push("media_control"),((t,e)=>(null==e?void 0:e.includes("volume_buttons"))&&Wt(t,1024)||(null==e?void 0:e.includes("volume_mute"))&&Wt(t,8)||(null==e?void 0:e.includes("volume_set"))&&Wt(t,4))(t,this._config.volume_controls)&&e.push("volume_control"),e}_onControlTap(t,e){e.stopPropagation(),this._activeControl=t}setConfig(t){super.setConfig(t),this.updateActiveControl(),this.updateVolume()}updated(t){super.updated(t),this.hass&&t.has("hass")&&(this.updateActiveControl(),this.updateVolume())}updateVolume(){this.volume=void 0;const t=this._stateObj;if(!t)return;const e=Kc(t);this.volume=null!=e?Math.round(e):e}onCurrentVolumeChange(t){null!=t.detail.value&&(this.volume=t.detail.value)}updateActiveControl(){const t=!!this._activeControl&&this._controls.includes(this._activeControl);this._activeControl=t?this._activeControl:this._controls[0]}_handleAction(t){Ke(this,this.hass,this._config,t.detail.action)}render(){if(!this._config||!this.hass||!this._config.entity)return K;const t=this._stateObj;if(!t)return this.renderNotFound(this._config);const e=function(t,e){var i,o=t.icon;if(![Nt,Rt,Ft].includes(e.state)&&t.use_media_info)switch(null===(i=e.attributes.app_name)||void 0===i?void 0:i.toLowerCase()){case"spotify":return"mdi:spotify";case"google podcasts":return"mdi:google-podcast";case"plex":return"mdi:plex";case"soundcloud":return"mdi:soundcloud";case"youtube":return"mdi:youtube";case"oto music":return"mdi:music-circle";case"netflix":return"mdi:netflix";default:return}return o}(this._config,t),i=function(t,e){let i=t.name||e.attributes.friendly_name||"";return![Nt,Rt,Ft].includes(e.state)&&t.use_media_info&&e.attributes.media_title&&(i=e.attributes.media_title),i}(this._config,t),o=function(t,e,i){let o=i.formatEntityState?i.formatEntityState(e):ne(i.localize,e,i.locale,i.config,i.entities);return![Nt,Rt,Ft].includes(e.state)&&t.use_media_info&&(t=>{let e;switch(t.attributes.media_content_type){case"music":case"image":e=t.attributes.media_artist;break;case"playlist":e=t.attributes.media_playlist;break;case"tvshow":e=t.attributes.media_series_title,t.attributes.media_season&&(e+=" S"+t.attributes.media_season,t.attributes.media_episode&&(e+="E"+t.attributes.media_episode));break;default:e=t.attributes.app_name||""}return e})(e)||o}(this._config,t,this.hass),n=Ss(this._config),r=ls(t,n.icon_type),a=null!=this.volume&&this._config.show_volume_level?`${o} - ${this.volume}${oe(this.hass.locale)}%`:o,s=Ie(this.hass),l=(!this._config.collapsible_controls||Bt(t))&&this._controls.length;return Y`
-
-
-
- ${r?this.renderPicture(r):this.renderIcon(t,e)}
- ${this.renderBadge(t)}
- ${this.renderStateInfo(t,n,i,a)};
-
- ${l?Y`
-
- ${this.renderActiveControl(t,n.layout)}
- ${this.renderOtherControls()}
-
- `:K}
-
-
- `}renderOtherControls(){const t=this._controls.filter((t=>t!=this._activeControl));return Y`
- ${t.map((t=>Y`
- this._onControlTap(t,e)}>
-
-
- `))}
- `}renderActiveControl(t,e){var i,o,n,r;const a=null!==(o=null===(i=this._config)||void 0===i?void 0:i.media_controls)&&void 0!==o?o:[],s=null!==(r=null===(n=this._config)||void 0===n?void 0:n.volume_controls)&&void 0!==r?r:[];switch(this._activeControl){case"media_control":return Y`
-
-
- `;case"volume_control":return Y`
-
- `;default:return K}}static get styles(){return[super.styles,Rs,h`
- mushroom-state-item {
- cursor: pointer;
- }
- mushroom-shape-icon {
- --icon-color: rgb(var(--rgb-state-media-player));
- --shape-color: rgba(var(--rgb-state-media-player), 0.2);
- }
- mushroom-media-player-media-control,
- mushroom-media-player-volume-control {
- flex: 1;
- }
- `]}};n([vt()],td.prototype,"_activeControl",void 0),n([vt()],td.prototype,"volume",void 0),td=n([pt(Yc)],td);const ed=`${Vs}-person-card`,id=`${ed}-editor`,od=["person","device_tracker"];Fs({type:ed,name:"Mushroom Person Card",description:"Card for person entity"});let nd=class extends Ns{static async getConfigElement(){return await Promise.resolve().then((function(){return rg})),document.createElement(id)}static async getStubConfig(t){const e=Object.keys(t.states).filter((t=>od.includes(t.split(".")[0])));return{type:`custom:${ed}`,entity:e[0]}}_handleAction(t){Ke(this,this.hass,this._config,t.detail.action)}render(){if(!this._config||!this.hass||!this._config.entity)return K;const t=this._stateObj;if(!t)return this.renderNotFound(this._config);const e=this._config.name||t.attributes.friendly_name||"",i=this._config.icon,o=Ss(this._config),n=ls(t,o.icon_type),r=Ie(this.hass);return Y`
-
-
-
- ${n?this.renderPicture(n):this.renderIcon(t,i)}
- ${this.renderBadge(t)}
- ${this.renderStateInfo(t,o,e)};
-
-
-
- `}renderStateBadge(t){const e=Object.values(this.hass.states).filter((t=>t.entity_id.startsWith("zone."))),i=function(t,e){const i=t.state;if(i===Rt)return"mdi:help";if("not_home"===i)return"mdi:home-export-outline";if("home"===i)return"mdi:home";const o=e.find((t=>i===t.attributes.friendly_name));return o&&o.attributes.icon?o.attributes.icon:"mdi:home"}(t,e),o=function(t,e){const i=t.state;if(i===Rt)return"var(--rgb-state-person-unknown)";if("not_home"===i)return"var(--rgb-state-person-not-home)";if("home"===i)return"var(--rgb-state-person-home)";const o=e.some((t=>i===t.attributes.friendly_name));return o?"var(--rgb-state-person-zone)":"var(--rgb-state-person-home)"}(t,e);return Y`
-
- `}renderBadge(t){return!Ut(t)?super.renderBadge(t):this.renderStateBadge(t)}static get styles(){return[super.styles,Rs,h`
- mushroom-state-item {
- cursor: pointer;
- }
- `]}};nd=n([pt(ed)],nd);const rd=`${Vs}-select-card`,ad=`${rd}-editor`,sd=["input_select","select"];function ld(t){return null!=t.state?t.state:void 0}let cd=class extends ht{_selectChanged(t){const e=t.target.value,i=ld(this.entity);e&&e!==i&&this._setValue(e)}_setValue(t){const e=this.entity.entity_id.split(".")[0];this.hass.callService(e,"select_option",{entity_id:this.entity.entity_id,option:t})}render(){const t=ld(this.entity),e=this.entity.attributes.options;return Y`
- t.stopPropagation()}
- .value=${null!=t?t:""}
- naturalMenuWidth
- fixedMenuPosition
- >
- ${e.map((t=>Y`
-
- ${this.hass.formatEntityState?this.hass.formatEntityState(this.entity,t):ne(this.hass.localize,this.entity,this.hass.locale,this.hass.config,this.hass.entities,t)}
-
- `))}
-
- `}static get styles(){return h`
- :host {
- display: flex;
- height: 100%;
- align-items: center;
- }
- mushroom-select {
- --select-height: var(--control-height);
- width: 100%;
- }
- `}};n([_t()],cd.prototype,"hass",void 0),n([_t({attribute:!1})],cd.prototype,"entity",void 0),cd=n([pt("mushroom-select-option-control")],cd),Fs({type:rd,name:"Mushroom Select Card",description:"Card for select and input_select entities"});let dd=class extends Ns{static async getConfigElement(){return await Promise.resolve().then((function(){return dg})),document.createElement(ad)}static async getStubConfig(t){const e=Object.keys(t.states).filter((t=>sd.includes(t.split(".")[0])));return{type:`custom:${rd}`,entity:e[0]}}get hasControls(){return!0}_handleAction(t){Ke(this,this.hass,this._config,t.detail.action)}render(){var t;if(!this._config||!this.hass||!this._config.entity)return K;const e=this._stateObj;if(!e)return this.renderNotFound(this._config);const i=this._config.name||e.attributes.friendly_name||"",o=this._config.icon,n=Ss(this._config),r=ls(e,n.icon_type),a=Ie(this.hass),s=null===(t=this._config)||void 0===t?void 0:t.icon_color,l={};if(s){const t=Qa(s);l["--mdc-theme-primary"]=`rgb(${t})`}return Y`
-
-
-
- ${r?this.renderPicture(r):this.renderIcon(e,o)}
- ${this.renderBadge(e)}
- ${this.renderStateInfo(e,n,i)};
-
-
-
-
-
-
- `}renderIcon(t,e){var i;const o=Bt(t),n={},r=null===(i=this._config)||void 0===i?void 0:i.icon_color;if(r){const t=Qa(r);n["--icon-color"]=`rgb(${t})`,n["--shape-color"]=`rgba(${t}, 0.2)`}return Y`
-
-
-
- `}static get styles(){return[super.styles,Rs,h`
- .actions {
- overflow: visible;
- display: block;
- }
- mushroom-state-item {
- cursor: pointer;
- }
- mushroom-shape-icon {
- --icon-color: rgb(var(--rgb-state-entity));
- --shape-color: rgba(var(--rgb-state-entity), 0.2);
- }
- mushroom-select-option-control {
- flex: 1;
- --mdc-theme-primary: rgb(var(--rgb-state-entity));
- }
- `]}};dd=n([pt(rd)],dd);const ud=`${Vs}-template-card`,hd=`${ud}-editor`;Fs({type:ud,name:"Mushroom Template",description:"Build your own mushroom card using templates"});const md=["icon","icon_color","badge_color","badge_icon","primary","secondary","picture"];let pd=class extends Ps{constructor(){super(...arguments),this._templateResults={},this._unsubRenderTemplates=new Map}static async getConfigElement(){return await Promise.resolve().then((function(){return Cu})),document.createElement(hd)}static async getStubConfig(t){return{type:`custom:${ud}`,primary:"Hello, {{user}}",secondary:"How are you?",icon:"mdi:home"}}getCardSize(){let t=1;if(!this._config)return t;return"vertical"===Ss(this._config).layout&&(t+=1),t}getLayoutOptions(){var t;const e={grid_columns:2,grid_rows:1};if(!this._config)return e;const i=Ss(this._config);return"vertical"===i.layout&&(e.grid_rows+=1),"horizontal"===i.layout&&(e.grid_columns=4),(null===(t=this._config)||void 0===t?void 0:t.multiline_secondary)&&(e.grid_rows=void 0),e}setConfig(t){md.forEach((e=>{var i,o;(null===(i=this._config)||void 0===i?void 0:i[e])===t[e]&&(null===(o=this._config)||void 0===o?void 0:o.entity)==t.entity||this._tryDisconnectKey(e)})),this._config=Object.assign({tap_action:{action:"toggle"},hold_action:{action:"more-info"}},t)}connectedCallback(){super.connectedCallback(),this._tryConnect()}disconnectedCallback(){this._tryDisconnect()}_handleAction(t){Ke(this,this.hass,this._config,t.detail.action)}isTemplate(t){var e;const i=null===(e=this._config)||void 0===e?void 0:e[t];return null==i?void 0:i.includes("{")}getValue(t){var e,i,o;return this.isTemplate(t)?null===(i=null===(e=this._templateResults[t])||void 0===e?void 0:e.result)||void 0===i?void 0:i.toString():null===(o=this._config)||void 0===o?void 0:o[t]}render(){if(!this._config||!this.hass)return K;const t=this.getValue("icon"),e=this.getValue("icon_color"),i=this.getValue("badge_icon"),o=this.getValue("badge_color"),n=this.getValue("primary"),r=this.getValue("secondary"),a=this.getValue("picture"),s=this._config.multiline_secondary,l=Ie(this.hass),c=Ss({fill_container:this._config.fill_container,layout:this._config.layout,icon_type:Boolean(a)?"entity-picture":Boolean(t)?"icon":"none",primary_info:Boolean(n)?"name":"none",secondary_info:Boolean(r)?"state":"none"}),d=fl(t);return Y`
-
-
-
- ${a?this.renderPicture(a):d?Y`${d}
`:t?this.renderIcon(t,e):K}
- ${(t||a)&&i?this.renderBadgeIcon(i,o):void 0}
-
-
-
-
- `}renderPicture(t){return Y`
-
- `}renderIcon(t,e){const i={};if(e){const t=Qa(e);i["--icon-color"]=`rgb(${t})`,i["--shape-color"]=`rgba(${t}, 0.2)`}return Y`
-
-
-
- `}renderBadgeIcon(t,e){const i={};if(e){const t=Qa(e);i["--main-color"]=`rgba(${t})`}return Y`
-
- `}updated(t){super.updated(t),this._config&&this.hass&&this._tryConnect()}async _tryConnect(){md.forEach((t=>{this._tryConnectKey(t)}))}async _tryConnectKey(t){var e,i;if(void 0===this._unsubRenderTemplates.get(t)&&this.hass&&this._config&&this.isTemplate(t))try{const i=Fe(this.hass.connection,(e=>{this._templateResults=Object.assign(Object.assign({},this._templateResults),{[t]:e})}),{template:null!==(e=this._config[t])&&void 0!==e?e:"",entity_ids:this._config.entity_id,variables:{config:this._config,user:this.hass.user.name,entity:this._config.entity},strict:!0});this._unsubRenderTemplates.set(t,i),await i}catch(e){const o={result:null!==(i=this._config[t])&&void 0!==i?i:"",listeners:{all:!1,domains:[],entities:[],time:!1}};this._templateResults=Object.assign(Object.assign({},this._templateResults),{[t]:o}),this._unsubRenderTemplates.delete(t)}}async _tryDisconnect(){md.forEach((t=>{this._tryDisconnectKey(t)}))}async _tryDisconnectKey(t){const e=this._unsubRenderTemplates.get(t);if(e)try{(await e)(),this._unsubRenderTemplates.delete(t)}catch(t){if("not_found"!==t.code&&"template_error"!==t.code)throw t}}static get styles(){return[super.styles,Rs,h`
- mushroom-state-item {
- cursor: pointer;
- }
- mushroom-shape-icon {
- --icon-color: rgb(var(--rgb-disabled));
- --shape-color: rgba(var(--rgb-disabled), 0.2);
- }
- svg {
- width: var(--icon-size);
- height: var(--icon-size);
- display: flex;
- }
- ${rl}
- `]}};n([vt()],pd.prototype,"_config",void 0),n([vt()],pd.prototype,"_templateResults",void 0),n([vt()],pd.prototype,"_unsubRenderTemplates",void 0),n([_t({reflect:!0,type:String})],pd.prototype,"layout",void 0),pd=n([pt(ud)],pd);const fd=`${Vs}-title-card`,gd=`${fd}-editor`;Fs({type:fd,name:"Mushroom Title Card",description:"Title and subtitle to separate sections"});const _d=["title","subtitle"];let vd=class extends Ps{constructor(){super(...arguments),this._templateResults={},this._unsubRenderTemplates=new Map}static async getConfigElement(){return await Promise.resolve().then((function(){return gg})),document.createElement(gd)}static async getStubConfig(t){return{type:`custom:${fd}`,title:"Hello, {{ user }} !"}}getCardSize(){return 1}setConfig(t){_d.forEach((e=>{var i;(null===(i=this._config)||void 0===i?void 0:i[e])!==t[e]&&this._tryDisconnectKey(e)})),this._config=Object.assign({title_tap_action:{action:"none"},subtitle_tap_action:{action:"none"}},t)}connectedCallback(){super.connectedCallback(),this._tryConnect()}disconnectedCallback(){this._tryDisconnect()}isTemplate(t){var e;const i=null===(e=this._config)||void 0===e?void 0:e[t];return null==i?void 0:i.includes("{")}getValue(t){var e,i,o;return this.isTemplate(t)?null===(i=null===(e=this._templateResults[t])||void 0===e?void 0:e.result)||void 0===i?void 0:i.toString():null===(o=this._config)||void 0===o?void 0:o[t]}_handleTitleAction(t){const e={tap_action:this._config.title_tap_action};Ke(this,this.hass,e,t.detail.action)}_handleSubtitleAction(t){const e={tap_action:this._config.subtitle_tap_action};Ke(this,this.hass,e,t.detail.action)}render(){if(!this._config||!this.hass)return K;const t=this.getValue("title"),e=this.getValue("subtitle");let i="";this._config.alignment&&(i=`align-${this._config.alignment}`);const o=Boolean(this._config.title_tap_action&&"none"!==this._config.title_tap_action.action),n=Boolean(this._config.subtitle_tap_action&&"none"!==this._config.subtitle_tap_action.action),r=Ie(this.hass);return Y`
-
- `}renderArrow(){const t=Ie(this.hass);return Y` `}updated(t){super.updated(t),this._config&&this.hass&&this._tryConnect()}async _tryConnect(){_d.forEach((t=>{this._tryConnectKey(t)}))}async _tryConnectKey(t){var e,i;if(void 0===this._unsubRenderTemplates.get(t)&&this.hass&&this._config&&this.isTemplate(t))try{const i=Fe(this.hass.connection,(e=>{this._templateResults=Object.assign(Object.assign({},this._templateResults),{[t]:e})}),{template:null!==(e=this._config[t])&&void 0!==e?e:"",entity_ids:this._config.entity_id,variables:{config:this._config,user:this.hass.user.name},strict:!0});this._unsubRenderTemplates.set(t,i),await i}catch(e){const o={result:null!==(i=this._config[t])&&void 0!==i?i:"",listeners:{all:!1,domains:[],entities:[],time:!1}};this._templateResults=Object.assign(Object.assign({},this._templateResults),{[t]:o}),this._unsubRenderTemplates.delete(t)}}async _tryDisconnect(){_d.forEach((t=>{this._tryDisconnectKey(t)}))}async _tryDisconnectKey(t){const e=this._unsubRenderTemplates.get(t);if(e)try{(await e)(),this._unsubRenderTemplates.delete(t)}catch(t){if("not_found"!==t.code&&"template_error"!==t.code)throw t}}static get styles(){return[super.styles,Rs,h`
- .header {
- display: block;
- padding: var(--title-padding);
- background: none;
- border: none;
- box-shadow: none;
- }
- .header div * {
- margin: 0;
- white-space: pre-wrap;
- }
- .header div:not(:last-of-type) {
- margin-bottom: var(--title-spacing);
- }
- .actionable {
- cursor: pointer;
- }
- .header ha-icon {
- display: none;
- }
- .actionable ha-icon {
- display: inline-block;
- margin-left: 4px;
- transition: transform 180ms ease-in-out;
- }
- .actionable:hover ha-icon {
- transform: translateX(4px);
- }
- [rtl] .actionable ha-icon {
- margin-left: initial;
- margin-right: 4px;
- }
- [rtl] .actionable:hover ha-icon {
- transform: translateX(-4px);
- }
- .title {
- color: var(--title-color);
- font-size: var(--title-font-size);
- font-weight: var(--title-font-weight);
- line-height: var(--title-line-height);
- letter-spacing: var(--title-letter-spacing);
- --mdc-icon-size: var(--title-font-size);
- }
- .subtitle {
- color: var(--subtitle-color);
- font-size: var(--subtitle-font-size);
- font-weight: var(--subtitle-font-weight);
- line-height: var(--subtitle-line-height);
- letter-spacing: var(--subtitle-letter-spacing);
- --mdc-icon-size: var(--subtitle-font-size);
- }
- .align-start {
- text-align: start;
- }
- .align-end {
- text-align: end;
- }
- .align-center {
- text-align: center;
- }
- .align-justify {
- text-align: justify;
- }
- `]}};n([vt()],vd.prototype,"_config",void 0),n([vt()],vd.prototype,"_templateResults",void 0),n([vt()],vd.prototype,"_unsubRenderTemplates",void 0),vd=n([pt(fd)],vd);const bd=`${Vs}-update-card`,yd=`${bd}-editor`,xd=["update"],wd={on:"var(--rgb-state-update-on)",off:"var(--rgb-state-update-off)",installing:"var(--rgb-state-update-installing)"};let kd=class extends ht{constructor(){super(...arguments),this.fill=!1}_handleInstall(){this.hass.callService("update","install",{entity_id:this.entity.entity_id})}_handleSkip(t){t.stopPropagation(),this.hass.callService("update","skip",{entity_id:this.entity.entity_id})}get installDisabled(){if(!Ut(this.entity))return!0;const t=this.entity.attributes.latest_version&&this.entity.attributes.skipped_version===this.entity.attributes.latest_version;return!Bt(this.entity)&&!t||qt(this.entity)}get skipDisabled(){if(!Ut(this.entity))return!0;return this.entity.attributes.latest_version&&this.entity.attributes.skipped_version===this.entity.attributes.latest_version||!Bt(this.entity)||qt(this.entity)}render(){const t=Ie(this.hass);return Y`
-
-
-
-
-
-
-
-
- `}};n([_t({attribute:!1})],kd.prototype,"hass",void 0),n([_t({attribute:!1})],kd.prototype,"entity",void 0),n([_t({type:Boolean})],kd.prototype,"fill",void 0),kd=n([pt("mushroom-update-buttons-control")],kd),Fs({type:bd,name:"Mushroom Update Card",description:"Card for update entity"});let Cd=class extends Ns{static async getConfigElement(){return await Promise.resolve().then((function(){return wg})),document.createElement(yd)}static async getStubConfig(t){const e=Object.keys(t.states).filter((t=>xd.includes(t.split(".")[0])));return{type:`custom:${bd}`,entity:e[0]}}get hasControls(){return!(!this._stateObj||!this._config)&&(Boolean(this._config.show_buttons_control)&&Wt(this._stateObj,1))}_handleAction(t){Ke(this,this.hass,this._config,t.detail.action)}render(){if(!this._config||!this.hass||!this._config.entity)return K;const t=this._stateObj;if(!t)return this.renderNotFound(this._config);const e=this._config.name||t.attributes.friendly_name||"",i=this._config.icon,o=Ss(this._config),n=ls(t,o.icon_type),r=Ie(this.hass),a=(!this._config.collapsible_controls||Bt(t))&&this._config.show_buttons_control&&Wt(t,1);return Y`
-
-
-
- ${n?this.renderPicture(n):this.renderIcon(t,i)}
- ${this.renderBadge(t)}
- ${this.renderStateInfo(t,o,e)};
-
- ${a?Y`
-
-
-
- `:K}
-
-
- `}renderIcon(t,e){const i=qt(t),o=function(t,e){return e?wd.installing:wd[t]||"var(--rgb-grey)"}(t.state,i),n={"--icon-color":`rgb(${o})`,"--shape-color":`rgba(${o}, 0.2)`};return Y`
-
-
-
- `}static get styles(){return[super.styles,Rs,h`
- mushroom-state-item {
- cursor: pointer;
- }
- mushroom-shape-icon {
- --icon-color: rgb(var(--rgb-state-entity));
- --shape-color: rgba(var(--rgb-state-entity), 0.2);
- }
- mushroom-shape-icon.pulse {
- --shape-animation: 1s ease 0s infinite normal none running pulse;
- }
- mushroom-update-buttons-control {
- flex: 1;
- }
- `]}};Cd=n([pt(bd)],Cd);const $d=`${Vs}-vacuum-card`,Ed=`${$d}-editor`,Ad=["vacuum"];function Sd(t){switch(t.state){case"cleaning":case"on":return!0;default:return!1}}function Id(t){return t.state===Ne}const Td=(t,e,i)=>zd(t,e,i)&&(!e.isVisible||e.isVisible(t)),zd=(t,e,i)=>e.isSupported(t)&&i.includes(e.command),Od=[{icon:"mdi:power",serviceName:"turn_on",command:"on_off",isSupported:t=>Wt(t,1),isVisible:t=>!Bt(t),isDisabled:()=>!1},{icon:"mdi:power",serviceName:"turn_off",command:"on_off",isSupported:t=>Wt(t,2),isVisible:t=>Bt(t),isDisabled:()=>!1},{icon:"mdi:play",serviceName:"start",command:"start_pause",isSupported:t=>Wt(t,Re),isVisible:t=>!Sd(t),isDisabled:()=>!1},{icon:"mdi:pause",serviceName:"pause",command:"start_pause",isSupported:t=>Wt(t,Re)&&Wt(t,4),isVisible:t=>Sd(t),isDisabled:()=>!1},{icon:"mdi:play-pause",serviceName:"start_pause",command:"start_pause",isSupported:t=>!Wt(t,Re)&&Wt(t,4),isDisabled:()=>!1},{icon:"mdi:stop",serviceName:"stop",command:"stop",isSupported:t=>Wt(t,8),isDisabled:t=>function(t){switch(t.state){case"docked":case"off":case"idle":case Ne:return!0;default:return!1}}(t)},{icon:"mdi:target-variant",serviceName:"clean_spot",command:"clean_spot",isSupported:t=>Wt(t,1024),isDisabled:()=>!1},{icon:"mdi:map-marker",serviceName:"locate",command:"locate",isSupported:t=>Wt(t,512),isDisabled:t=>Id(t)},{icon:"mdi:home-map-marker",serviceName:"return_to_base",command:"return_home",isSupported:t=>Wt(t,16),isDisabled:()=>!1}];let Md=class extends ht{constructor(){super(...arguments),this.fill=!1}callService(t){t.stopPropagation();const e=t.target.entry;this.hass.callService("vacuum",e.serviceName,{entity_id:this.entity.entity_id})}render(){const t=Ie(this.hass);return Y`
-
- ${Od.filter((t=>Td(this.entity,t,this.commands))).map((t=>Y`
-
-
-
- `))}
-
- `}};n([_t({attribute:!1})],Md.prototype,"hass",void 0),n([_t({attribute:!1})],Md.prototype,"entity",void 0),n([_t({attribute:!1})],Md.prototype,"commands",void 0),n([_t({type:Boolean})],Md.prototype,"fill",void 0),Md=n([pt("mushroom-vacuum-commands-control")],Md),Fs({type:$d,name:"Mushroom Vacuum Card",description:"Card for vacuum entity"});let jd=class extends Ns{static async getConfigElement(){return await Promise.resolve().then((function(){return Sg})),document.createElement(Ed)}static async getStubConfig(t){const e=Object.keys(t.states).filter((t=>Ad.includes(t.split(".")[0])));return{type:`custom:${$d}`,entity:e[0]}}get hasControls(){var t,e,i;return!(!this._stateObj||!this._config)&&(e=this._stateObj,i=null!==(t=this._config.commands)&&void 0!==t?t:[],Od.some((t=>zd(e,t,i))))}_handleAction(t){Ke(this,this.hass,this._config,t.detail.action)}render(){var t,e;if(!this._config||!this.hass||!this._config.entity)return K;const i=this._stateObj;if(!i)return this.renderNotFound(this._config);const o=this._config.name||i.attributes.friendly_name||"",n=this._config.icon,r=Ss(this._config),a=ls(i,r.icon_type),s=Ie(this.hass),l=null!==(e=null===(t=this._config)||void 0===t?void 0:t.commands)&&void 0!==e?e:[];return Y`
-
-
-
- ${a?this.renderPicture(a):this.renderIcon(i,n)}
- ${this.renderBadge(i)}
- ${this.renderStateInfo(i,r,o)};
-
- ${((t,e)=>Od.some((i=>Td(t,i,e))))(i,l)?Y`
-
-
-
-
- `:K}
-
-
- `}renderIcon(t,e){var i,o;return Y`
-
-
- `}static get styles(){return[super.styles,Rs,h`
- mushroom-state-item {
- cursor: pointer;
- }
- mushroom-shape-icon {
- --icon-color: rgb(var(--rgb-state-vacuum));
- --shape-color: rgba(var(--rgb-state-vacuum), 0.2);
- }
- .cleaning ha-state-icon {
- animation: 5s infinite linear cleaning;
- }
- .cleaning ha-state-icon {
- animation: 2s infinite linear returning;
- }
- mushroom-vacuum-commands-control {
- flex: 1;
- }
- `]}};jd=n([pt($d)],jd);const Dd=new Set(["primary","accent","disabled","red","pink","purple","deep-purple","indigo","blue","light-blue","cyan","teal","green","light-green","lime","yellow","amber","orange","deep-orange","brown","light-grey","grey","dark-grey","blue-grey","black","white"]);const Ld=`${Vs}-template-badge`,Pd=`${Ld}-editor`;!function(e){const i=window;i.customBadges=i.customBadges||[];const o=e.type.replace("-badge","").replace("mushroom-","");i.customBadges.push(Object.assign(Object.assign({},e),{preview:!0,documentationURL:`${t}/blob/main/docs/badges/${o}.md`}))}({type:Ld,name:"Mushroom Template",description:"Build your own badge using templates"});const Nd=["icon","color","label","content","picture"];let Rd=class extends ht{constructor(){super(...arguments),this._templateResults={},this._unsubRenderTemplates=new Map}static async getConfigElement(){return await Promise.resolve().then((function(){return Mg})),document.createElement(Pd)}static async getStubConfig(t){return{type:`custom:${Ld}`,content:"Hello",icon:"mdi:mushroom",color:"red"}}connectedCallback(){super.connectedCallback(),this._tryConnect()}disconnectedCallback(){this._tryDisconnect()}updated(t){super.updated(t),this._config&&this.hass&&this._tryConnect()}async _tryConnect(){Nd.forEach((t=>{this._tryConnectKey(t)}))}async _tryConnectKey(t){var e,i;if(void 0===this._unsubRenderTemplates.get(t)&&this.hass&&this._config&&this.isTemplate(t))try{const i=Fe(this.hass.connection,(e=>{this._templateResults=Object.assign(Object.assign({},this._templateResults),{[t]:e})}),{template:null!==(e=this._config[t])&&void 0!==e?e:"",entity_ids:this._config.entity_id,variables:{config:this._config,user:this.hass.user.name,entity:this._config.entity},strict:!0});this._unsubRenderTemplates.set(t,i),await i}catch(e){const o={result:null!==(i=this._config[t])&&void 0!==i?i:"",listeners:{all:!1,domains:[],entities:[],time:!1}};this._templateResults=Object.assign(Object.assign({},this._templateResults),{[t]:o}),this._unsubRenderTemplates.delete(t)}}async _tryDisconnect(){Nd.forEach((t=>{this._tryDisconnectKey(t)}))}async _tryDisconnectKey(t){const e=this._unsubRenderTemplates.get(t);if(e)try{(await e)(),this._unsubRenderTemplates.delete(t)}catch(t){if("not_found"!==t.code&&"template_error"!==t.code)throw t}}setConfig(t){Nd.forEach((e=>{var i,o;(null===(i=this._config)||void 0===i?void 0:i[e])===t[e]&&(null===(o=this._config)||void 0===o?void 0:o.entity)==t.entity||this._tryDisconnectKey(e)})),this._config=Object.assign({tap_action:{action:"none"}},t)}get hasAction(){var t,e,i,o;return!(null===(t=this._config)||void 0===t?void 0:t.tap_action)||qe(null===(e=this._config)||void 0===e?void 0:e.tap_action)||qe(null===(i=this._config)||void 0===i?void 0:i.hold_action)||qe(null===(o=this._config)||void 0===o?void 0:o.double_tap_action)}render(){if(!this._config||!this.hass)return K;const t=this.getValue("icon"),e=this.getValue("color"),i=this.getValue("content"),o=this.getValue("label"),n=this.getValue("picture"),r=!!i,a=!!t||!!n,s={};e&&(s["--badge-color"]=function(t){return Dd.has(t)?`var(--${t}-color)`:t}(e));const l=fl(t);return Y`
-
-
- ${n?Y`
`:l||(t?Y`
-
- `:K)}
- ${i?Y`
-
- ${o?Y`${o}`:K}
- ${i}
-
- `:K}
-
- `}_handleAction(t){Ke(this,this.hass,this._config,t.detail.action)}isTemplate(t){var e;const i=null===(e=this._config)||void 0===e?void 0:e[t];return null==i?void 0:i.includes("{")}getValue(t){var e,i,o;return this.isTemplate(t)?null===(i=null===(e=this._templateResults[t])||void 0===e?void 0:e.result)||void 0===i?void 0:i.toString():null===(o=this._config)||void 0===o?void 0:o[t]}static get styles(){return h`
- :host {
- -webkit-tap-highlight-color: transparent;
- }
- .badge {
- position: relative;
- --ha-ripple-color: var(--badge-color);
- --ha-ripple-hover-opacity: 0.04;
- --ha-ripple-pressed-opacity: 0.12;
- transition:
- box-shadow 180ms ease-in-out,
- border-color 180ms ease-in-out;
- display: flex;
- flex-direction: row;
- align-items: center;
- justify-content: center;
- gap: 8px;
- height: var(--ha-badge-size, 36px);
- min-width: var(--ha-badge-size, 36px);
- padding: 0px 8px;
- box-sizing: border-box;
- width: auto;
- border-radius: var(
- --ha-badge-border-radius,
- calc(var(--ha-badge-size, 36px) / 2)
- );
- background: var(
- --ha-card-background,
- var(--card-background-color, white)
- );
- -webkit-backdrop-filter: var(--ha-card-backdrop-filter, none);
- backdrop-filter: var(--ha-card-backdrop-filter, none);
- border-width: var(--ha-card-border-width, 1px);
- box-shadow: var(--ha-card-box-shadow, none);
- border-style: solid;
- border-color: var(
- --ha-card-border-color,
- var(--divider-color, #e0e0e0)
- );
- --mdc-icon-size: 18px;
- text-align: center;
- font-family: Roboto;
- }
- .badge:focus-visible {
- --shadow-default: var(--ha-card-box-shadow, 0 0 0 0 transparent);
- --shadow-focus: 0 0 0 1px var(--badge-color);
- border-color: var(--badge-color);
- box-shadow: var(--shadow-default), var(--shadow-focus);
- }
- button,
- [role="button"] {
- cursor: pointer;
- }
- button:focus,
- [role="button"]:focus {
- outline: none;
- }
- .info {
- display: flex;
- flex-direction: column;
- align-items: flex-start;
- padding-right: 4px;
- padding-inline-end: 4px;
- padding-inline-start: initial;
- }
- .label {
- font-size: 10px;
- font-style: normal;
- font-weight: 500;
- line-height: 10px;
- letter-spacing: 0.1px;
- color: var(--secondary-text-color);
- }
- .content {
- font-size: 12px;
- font-style: normal;
- font-weight: 500;
- line-height: 16px;
- letter-spacing: 0.1px;
- color: var(--primary-text-color);
- }
- svg {
- width: var(--mdc-icon-size);
- height: var(--mdc-icon-size);
- display: flex;
- }
- ha-state-icon {
- color: var(--badge-color);
- line-height: 0;
- }
- img {
- width: 30px;
- height: 30px;
- border-radius: 50%;
- object-fit: cover;
- overflow: hidden;
- }
- .badge.no-info {
- padding: 0;
- }
- .badge:not(.no-icon):not(.no-info) img {
- margin-left: -6px;
- margin-inline-start: -6px;
- margin-inline-end: initial;
- }
- .badge.no-icon .info {
- padding-right: 4px;
- padding-left: 4px;
- padding-inline-end: 4px;
- padding-inline-start: 4px;
- }
- ${rl}
- `}};n([_t({attribute:!1})],Rd.prototype,"hass",void 0),n([vt()],Rd.prototype,"_config",void 0),n([vt()],Rd.prototype,"_templateResults",void 0),n([vt()],Rd.prototype,"_unsubRenderTemplates",void 0),Rd=n([pt(Ld)],Rd),console.info("%c🍄 Mushroom 🍄 - 4.0.7","color: #ef5350; font-weight: 700;");const Fd=Ce({tap_action:$e(ni),hold_action:$e(ni),double_tap_action:$e(ni)}),Vd=(t,e)=>(e&&t&&(t=t.map((t=>"perform-action"===t?"call-service":t))),[{name:"tap_action",selector:{"ui-action":{actions:t}}},{name:"hold_action",selector:{"ui-action":{actions:t}}},{name:"double_tap_action",selector:{"ui-action":{actions:t}}}]),Bd=Ce({layout:$e(Se([we("horizontal"),we("vertical"),we("default")])),fill_container:$e(ye()),primary_info:$e(xe(rs)),secondary_info:$e(xe(rs)),icon_type:$e(xe(as))}),Ud=[{type:"grid",name:"",schema:[{name:"layout",selector:{mush_layout:{}}},{name:"fill_container",selector:{boolean:{}}}]},{type:"grid",name:"",schema:[{name:"primary_info",selector:{mush_info:{}}},{name:"secondary_info",selector:{mush_info:{}}},{name:"icon_type",selector:{mush_icon_type:{}}}]}],Hd=["color","icon_color","layout","fill_container","primary_info","secondary_info","icon_type","content_info","use_entity_picture","collapsible_controls","icon_animation"],Yd=Ce({entity:$e(Ee()),name:$e(Ee()),icon:$e(Ee())}),Wd=Ce({index:$e(ke()),view_index:$e(ke()),view_layout:ve(),type:Ee(),layout_options:ve(),visibility:ve()}),Xd=fe(Wd,fe(Yd,Bd,Fd),Ce({states:$e(be()),show_keypad:(Kd=$e(ye()),qd=(t,e)=>{console.warn(`🍄 "${e.path}" option is deprecated and no longer available. Remove it from your YAML configuration or use the built-in Home Assistant alarm panel card if you want keypad.`)},new he({...Kd,refiner:(t,e)=>void 0===t||Kd.refiner(t,e),validator:(t,e)=>void 0===t||(qd(t,e),Kd.validator(t,e))}))}));var Kd,qd;const Gd=["more-info","navigate","url","perform-action","assist","none"],Zd=["armed_home","armed_away","armed_night","armed_vacation","armed_custom_bypass"],Jd=Tt(((t,e)=>[{name:"entity",selector:{entity:{domain:Hs}}},{name:"name",selector:{text:{}}},{name:"icon",selector:{icon:{}},context:{icon_entity:"entity"}},...Ud,{type:"multi_select",name:"states",options:Zd.map((e=>[e,t(`ui.card.alarm_control_panel.${e.replace("armed","arm")}`)]))},...Vd(Gd,e)]));let Qd=class extends Ps{constructor(){super(...arguments),this._computeLabel=t=>{const e=jo(this.hass);return Hd.includes(t.name)?e(`editor.card.generic.${t.name}`):"states"===t.name?this.hass.localize("ui.panel.lovelace.editor.card.alarm-panel.available_states"):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),vl()}setConfig(t){me(t,Xd),this._config=t}render(){if(!this.hass||!this._config)return K;const t=!ai(this.hass.config.version,2024,8),e=Jd(this.hass.localize,t);return Y`
-
- `}_valueChanged(t){Lt(this,"config-changed",{config:t.detail.value})}};n([vt()],Qd.prototype,"_config",void 0),Qd=n([pt(Us)],Qd);var tu=Object.freeze({__proto__:null,get SwitchCardEditor(){return Qd}});const eu=[{name:"entity",selector:{entity:{}}},{type:"grid",name:"",schema:[{name:"name",selector:{text:{}}},{name:"content_info",selector:{mush_info:{}}}]},{type:"grid",name:"",schema:[{name:"icon",selector:{icon:{}},context:{icon_entity:"entity"}},{name:"icon_color",selector:{mush_color:{}}}]},{name:"use_entity_picture",selector:{boolean:{}}},...Vd()];let iu=class extends ht{constructor(){super(...arguments),this._computeLabel=t=>{const e=jo(this.hass);return Hd.includes(t.name)?e(`editor.card.generic.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}setConfig(t){this._config=t}render(){return this.hass&&this._config?Y`
-
- `:K}_valueChanged(t){Lt(this,"config-changed",{config:t.detail.value})}};n([_t({attribute:!1})],iu.prototype,"hass",void 0),n([vt()],iu.prototype,"_config",void 0),iu=n([pt(Js("entity"))],iu);var ou=Object.freeze({__proto__:null,get EntityChipEditor(){return iu}});const nu=["weather"],ru=["show_conditions","show_temperature"],au=["more-info","navigate","url","perform-action","assist","none"],su=Tt((t=>[{name:"entity",selector:{entity:{domain:nu}}},{type:"grid",name:"",schema:[{name:"show_conditions",selector:{boolean:{}}},{name:"show_temperature",selector:{boolean:{}}}]},...Vd(au,t)]));let lu=class extends ht{constructor(){super(...arguments),this._computeLabel=t=>{const e=jo(this.hass);return Hd.includes(t.name)?e(`editor.card.generic.${t.name}`):ru.includes(t.name)?e(`editor.card.weather.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}setConfig(t){this._config=t}render(){if(!this.hass||!this._config)return K;const t=!ai(this.hass.config.version,2024,8),e=su(t);return Y`
-
- `}_valueChanged(t){Lt(this,"config-changed",{config:t.detail.value})}};n([_t({attribute:!1})],lu.prototype,"hass",void 0),n([vt()],lu.prototype,"_config",void 0),lu=n([pt(Js("weather"))],lu);var cu=Object.freeze({__proto__:null,get WeatherChipEditor(){return lu}});const du=[{name:"icon",selector:{icon:{placeholder:ll}}}];let uu=class extends ht{constructor(){super(...arguments),this._computeLabel=t=>this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}setConfig(t){this._config=t}render(){return this.hass&&this._config?Y`
-
- `:K}_valueChanged(t){Lt(this,"config-changed",{config:t.detail.value})}};n([_t({attribute:!1})],uu.prototype,"hass",void 0),n([vt()],uu.prototype,"_config",void 0),uu=n([pt(Js("back"))],uu);var hu=Object.freeze({__proto__:null,get BackChipEditor(){return uu}});const mu=["navigate","url","perform-action","assist","none"],pu=Tt((t=>[{type:"grid",name:"",schema:[{name:"icon",selector:{icon:{placeholder:dl}}},{name:"icon_color",selector:{mush_color:{}}}]},...Vd(mu,t)]));let fu=class extends ht{constructor(){super(...arguments),this._computeLabel=t=>{const e=jo(this.hass);return Hd.includes(t.name)?e(`editor.card.generic.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}setConfig(t){this._config=t}render(){if(!this.hass||!this._config)return K;const t=!ai(this.hass.config.version,2024,8),e=pu(t);return Y`
-
- `}_valueChanged(t){Lt(this,"config-changed",{config:t.detail.value})}};n([_t({attribute:!1})],fu.prototype,"hass",void 0),n([vt()],fu.prototype,"_config",void 0),fu=n([pt(Js("action"))],fu);var gu=Object.freeze({__proto__:null,get EntityChipEditor(){return fu}});const _u=[{name:"icon",selector:{icon:{placeholder:hl}}}];let vu=class extends ht{constructor(){super(...arguments),this._computeLabel=t=>this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}setConfig(t){this._config=t}render(){return this.hass&&this._config?Y`
-
- `:K}_valueChanged(t){Lt(this,"config-changed",{config:t.detail.value})}};n([_t({attribute:!1})],vu.prototype,"hass",void 0),n([vt()],vu.prototype,"_config",void 0),vu=n([pt(Js("menu"))],vu);var bu=Object.freeze({__proto__:null,get MenuChipEditor(){return vu}});const yu=fe(Wd,fe(Bd,Fd),Ce({entity:$e(Ee()),icon:$e(Ee()),icon_color:$e(Ee()),primary:$e(Ee()),secondary:$e(Ee()),badge_icon:$e(Ee()),badge_color:$e(Ee()),picture:$e(Ee()),multiline_secondary:$e(ye()),entity_id:$e(Se([Ee(),be(Ee())]))})),xu=["badge_icon","badge_color","content","primary","secondary","multiline_secondary","picture"],wu=[{name:"entity",selector:{entity:{}}},{name:"icon",selector:{template:{}}},{name:"icon_color",selector:{template:{}}},{name:"primary",selector:{template:{}}},{name:"secondary",selector:{template:{}}},{name:"badge_icon",selector:{template:{}}},{name:"badge_color",selector:{template:{}}},{name:"picture",selector:{template:{}}},{type:"grid",name:"",schema:[{name:"layout",selector:{mush_layout:{}}},{name:"fill_container",selector:{boolean:{}}},{name:"multiline_secondary",selector:{boolean:{}}}]},...Vd()];let ku=class extends Ps{constructor(){super(...arguments),this._computeLabel=t=>{const e=jo(this.hass);return"entity"===t.name?`${this.hass.localize("ui.panel.lovelace.editor.card.generic.entity")} (${e("editor.card.template.entity_extra")})`:Hd.includes(t.name)?e(`editor.card.generic.${t.name}`):xu.includes(t.name)?e(`editor.card.template.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),vl()}setConfig(t){me(t,yu),this._config=t}render(){return this.hass&&this._config?Y`
-
- `:K}_valueChanged(t){Lt(this,"config-changed",{config:t.detail.value})}};n([vt()],ku.prototype,"_config",void 0),ku=n([pt(hd)],ku);var Cu=Object.freeze({__proto__:null,TEMPLATE_LABELS:xu,get TemplateCardEditor(){return ku}});const $u=[{name:"entity",selector:{entity:{}}},{name:"icon",selector:{template:{}}},{name:"icon_color",selector:{template:{}}},{name:"picture",selector:{template:{}}},{name:"content",selector:{template:{}}},...Vd()];let Eu=class extends ht{constructor(){super(...arguments),this._computeLabel=t=>{const e=jo(this.hass);return"entity"===t.name?`${this.hass.localize("ui.panel.lovelace.editor.card.generic.entity")} (${e("editor.card.template.entity_extra")})`:Hd.includes(t.name)?e(`editor.card.generic.${t.name}`):xu.includes(t.name)?e(`editor.card.template.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}setConfig(t){this._config=t}render(){return this.hass&&this._config?Y`
-
- `:K}_valueChanged(t){Lt(this,"config-changed",{config:t.detail.value})}};n([_t({attribute:!1})],Eu.prototype,"hass",void 0),n([vt()],Eu.prototype,"_config",void 0),Eu=n([pt(Js("template"))],Eu);var Au=Object.freeze({__proto__:null,get EntityChipEditor(){return Eu}});
+ * Licensed under the MIT license */Ug||(Ug=1,Vg=Bg,function(t,e,n,i){var o,r=["","webkit","Moz","MS","ms","o"],a=e.createElement("div"),l="function",s=Math.round,c=Math.abs,d=Date.now;function u(t,e,n){return setTimeout(_(t,n),e)}function h(t,e,n){return!!Array.isArray(t)&&(p(t,n[e],n),!0)}function p(t,e,n){var o;if(t)if(t.forEach)t.forEach(e,n);else if(t.length!==i)for(o=0;o\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",r=t.console&&(t.console.warn||t.console.log);return r&&r.call(t.console,o,i),e.apply(this,arguments)}}o="function"!=typeof Object.assign?function(t){if(t===i||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n-1}function E(t){return t.trim().split(/\s+/g)}function A(t,e,n){if(t.indexOf&&!n)return t.indexOf(e);for(var i=0;in[e]})),i}function T(t,e){for(var n,o,a=e[0].toUpperCase()+e.slice(1),l=0;l1&&!n.firstMultiple?n.firstMultiple=Q(e):1===r&&(n.firstMultiple=!1);var a=n.firstInput,l=n.firstMultiple,s=l?l.center:a.center,u=e.center=tt(o);e.timeStamp=d(),e.deltaTime=e.timeStamp-a.timeStamp,e.angle=ot(s,u),e.distance=it(s,u),function(t,e){var n=e.center,i=t.offsetDelta||{},o=t.prevDelta||{},r=t.prevInput||{};e.eventType!==N&&r.eventType!==R||(o=t.prevDelta={x:r.deltaX||0,y:r.deltaY||0},i=t.offsetDelta={x:n.x,y:n.y}),e.deltaX=o.x+(n.x-i.x),e.deltaY=o.y+(n.y-i.y)}(n,e),e.offsetDirection=nt(e.deltaX,e.deltaY);var h,p,m=et(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=m.x,e.overallVelocityY=m.y,e.overallVelocity=c(m.x)>c(m.y)?m.x:m.y,e.scale=l?(h=l.pointers,it((p=o)[0],p[1],G)/it(h[0],h[1],G)):1,e.rotation=l?function(t,e){return ot(e[1],e[0],G)+ot(t[1],t[0],G)}(l.pointers,o):0,e.maxPointers=n.prevInput?e.pointers.length>n.prevInput.maxPointers?e.pointers.length:n.prevInput.maxPointers:e.pointers.length,function(t,e){var n,o,r,a,l=t.lastInterval||e,s=e.timeStamp-l.timeStamp;if(e.eventType!=U&&(s>D||l.velocity===i)){var d=e.deltaX-l.deltaX,u=e.deltaY-l.deltaY,h=et(s,d,u);o=h.x,r=h.y,n=c(h.x)>c(h.y)?h.x:h.y,a=nt(d,u),t.lastInterval=e}else n=l.velocity,o=l.velocityX,r=l.velocityY,a=l.direction;e.velocity=n,e.velocityX=o,e.velocityY=r,e.direction=a}(n,e);var f=t.element;w(e.srcEvent.target,f)&&(f=e.srcEvent.target),e.target=f}(t,n),t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function Q(t){for(var e=[],n=0;n=c(e)?t<0?B:F:e<0?H:W}function it(t,e,n){n||(n=q);var i=e[n[0]]-t[n[0]],o=e[n[1]]-t[n[1]];return Math.sqrt(i*i+o*o)}function ot(t,e,n){n||(n=q);var i=e[n[0]]-t[n[0]],o=e[n[1]]-t[n[1]];return 180*Math.atan2(o,i)/Math.PI}Z.prototype={handler:function(){},init:function(){this.evEl&&k(this.element,this.evEl,this.domHandler),this.evTarget&&k(this.target,this.evTarget,this.domHandler),this.evWin&&k(z(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&x(this.element,this.evEl,this.domHandler),this.evTarget&&x(this.target,this.evTarget,this.domHandler),this.evWin&&x(z(this.element),this.evWin,this.domHandler)}};var rt={mousedown:N,mousemove:2,mouseup:R},at="mousedown",lt="mousemove mouseup";function st(){this.evEl=at,this.evWin=lt,this.pressed=!1,Z.apply(this,arguments)}g(st,Z,{handler:function(t){var e=rt[t.type];e&N&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=R),this.pressed&&(e&R&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:L,srcEvent:t}))}});var ct={pointerdown:N,pointermove:2,pointerup:R,pointercancel:U,pointerout:U},dt={2:P,3:"pen",4:L,5:"kinect"},ut="pointerdown",ht="pointermove pointerup pointercancel";function pt(){this.evEl=ut,this.evWin=ht,Z.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}t.MSPointerEvent&&!t.PointerEvent&&(ut="MSPointerDown",ht="MSPointerMove MSPointerUp MSPointerCancel"),g(pt,Z,{handler:function(t){var e=this.store,n=!1,i=t.type.toLowerCase().replace("ms",""),o=ct[i],r=dt[t.pointerType]||t.pointerType,a=r==P,l=A(e,t.pointerId,"pointerId");o&N&&(0===t.button||a)?l<0&&(e.push(t),l=e.length-1):o&(R|U)&&(n=!0),l<0||(e[l]=t,this.callback(this.manager,o,{pointers:e,changedPointers:[t],pointerType:r,srcEvent:t}),n&&e.splice(l,1))}});var mt={touchstart:N,touchmove:2,touchend:R,touchcancel:U};function ft(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,Z.apply(this,arguments)}function vt(t,e){var n=S(t.touches),i=S(t.changedTouches);return e&(R|U)&&(n=O(n.concat(i),"identifier")),[n,i]}g(ft,Z,{handler:function(t){var e=mt[t.type];if(e===N&&(this.started=!0),this.started){var n=vt.call(this,t,e);e&(R|U)&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:P,srcEvent:t})}}});var gt={touchstart:N,touchmove:2,touchend:R,touchcancel:U},_t="touchstart touchmove touchend touchcancel";function yt(){this.evTarget=_t,this.targetIds={},Z.apply(this,arguments)}function bt(t,e){var n=S(t.touches),i=this.targetIds;if(e&(2|N)&&1===n.length)return i[n[0].identifier]=!0,[n,n];var o,r,a=S(t.changedTouches),l=[],s=this.target;if(r=n.filter((function(t){return w(t.target,s)})),e===N)for(o=0;o-1&&i.splice(t,1)}),kt)}}function Et(t){for(var e=t.srcEvent.clientX,n=t.srcEvent.clientY,i=0;i-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){var e=this,n=this.state;function i(n){e.manager.emit(n,t)}n<8&&i(e.options.event+Rt(n)),i(e.options.event),t.additionalEvent&&i(t.additionalEvent),n>=8&&i(e.options.event+Rt(n))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=Dt},canEmit:function(){for(var t=0;te.threshold&&o&e.direction},attrTest:function(t){return Bt.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=Ut(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),g(Ht,Bt,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[zt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),g(Wt,Nt,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Tt]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,i=t.distancee.time;if(this._input=t,!i||!n||t.eventType&(R|U)&&!o)this.reset();else if(t.eventType&N)this.reset(),this._timer=u((function(){this.state=8,this.tryEmit()}),e.time,this);else if(t.eventType&R)return 8;return Dt},reset:function(){clearTimeout(this._timer)},emit:function(t){8===this.state&&(t&&t.eventType&R?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=d(),this.manager.emit(this.options.event,this._input)))}}),g(Yt,Bt,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[zt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||2&this.state)}}),g(Kt,Bt,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Y|K,pointers:1},getTouchAction:function(){return Ft.prototype.getTouchAction.call(this)},attrTest:function(t){var e,n=this.options.direction;return n&(Y|K)?e=t.overallVelocity:n&Y?e=t.overallVelocityX:n&K&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&c(e)>this.options.velocity&&t.eventType&R},emit:function(t){var e=Ut(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),g(Xt,Nt,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[It]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,i=t.distance\n \n ',"\n ","\n \n \n "])),iv({container:!0,inactive:this.inactive||this.disabled,controlled:this.controlled}),ff({"--value":"".concat(this.valueToPercentage(null!==(t=this.value)&&void 0!==t?t:0))}),this.showActive?za(Re||(Re=or(['']))):ja,this.showIndicator?za(Ue||(Ue=or(['']))):ja)}}],[{key:"styles",get:function(){return Xr(Ve||(Ve=or(['\n :host {\n --main-color: rgba(var(--rgb-secondary-text-color), 1);\n --bg-gradient: none;\n --bg-color: rgba(var(--rgb-secondary-text-color), 0.2);\n --main-color-inactive: rgb(var(--rgb-disabled));\n --bg-color-inactive: rgba(var(--rgb-disabled), 0.2);\n }\n .container {\n display: flex;\n flex-direction: row;\n height: var(--control-height);\n }\n .slider {\n position: relative;\n height: 100%;\n width: 100%;\n border-radius: var(--control-border-radius);\n transform: translateZ(0);\n overflow: hidden;\n cursor: pointer;\n }\n .slider * {\n pointer-events: none;\n }\n .slider .slider-track-background {\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n background-color: var(--bg-color);\n background-image: var(--gradient);\n }\n .slider .slider-track-active {\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n transform: scale3d(var(--value, 0), 1, 1);\n transform-origin: left;\n background-color: var(--main-color);\n transition: transform 180ms ease-in-out;\n }\n .slider .slider-track-indicator {\n position: absolute;\n top: 0;\n bottom: 0;\n left: calc(var(--value, 0) * (100% - 10px));\n width: 10px;\n border-radius: 3px;\n background-color: white;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);\n transition: left 180ms ease-in-out;\n }\n .slider .slider-track-indicator:after {\n display: block;\n content: "";\n background-color: var(--main-color);\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n margin: auto;\n height: 20px;\n width: 2px;\n border-radius: 1px;\n }\n .inactive .slider .slider-track-background {\n background-color: var(--bg-color-inactive);\n background-image: none;\n }\n .inactive .slider .slider-track-indicator:after {\n background-color: var(--main-color-inactive);\n }\n .inactive .slider .slider-track-active {\n background-color: var(--main-color-inactive);\n }\n .controlled .slider .slider-track-active {\n transition: none;\n }\n .controlled .slider .slider-track-indicator {\n transition: none;\n }\n '])))}}])}();function Wg(t){return null!=t.attributes.current_position?Math.round(t.attributes.current_position):void 0}function Yg(t){var e=t.state;return"open"===e||"opening"===e?"var(--rgb-state-cover-open)":"closed"===e||"closing"===e?"var(--rgb-state-cover-closed)":"var(--rgb-disabled)"}Ur([Qa({type:Boolean})],Hg.prototype,"disabled",void 0),Ur([Qa({type:Boolean})],Hg.prototype,"inactive",void 0),Ur([Qa({type:Boolean,attribute:"show-active"})],Hg.prototype,"showActive",void 0),Ur([Qa({type:Boolean,attribute:"show-indicator"})],Hg.prototype,"showIndicator",void 0),Ur([Qa({attribute:!1,type:Number,reflect:!0})],Hg.prototype,"value",void 0),Ur([Qa({type:Number})],Hg.prototype,"step",void 0),Ur([Qa({type:Number})],Hg.prototype,"min",void 0),Ur([Qa({type:Number})],Hg.prototype,"max",void 0),Ur([tl()],Hg.prototype,"controlled",void 0),Ur([el("#slider")],Hg.prototype,"slider",void 0),Hg=Ur([Ga("mushroom-slider")],Hg);var Kg=function(t){function e(){return zr(this,e),br(this,e,arguments)}return wr(e,Xa),Mr(e,[{key:"onChange",value:function(t){var e=t.detail.value;this.hass.callService("cover","set_cover_position",{entity_id:this.entity.entity_id,position:e})}},{key:"onCurrentChange",value:function(t){var e=t.detail.value;this.dispatchEvent(new CustomEvent("current-change",{detail:{value:e}}))}},{key:"render",value:function(){var t=Wg(this.entity);return za(Be||(Be=or(["\n \n "])),t,!xl(this.entity),!0,this.onChange,this.onCurrentChange)}}],[{key:"styles",get:function(){return Xr(Fe||(Fe=or(["\n mushroom-slider {\n --main-color: var(--slider-color);\n --bg-color: var(--slider-bg-color);\n }\n "])))}}])}();Ur([Qa({attribute:!1})],Kg.prototype,"hass",void 0),Ur([Qa({attribute:!1})],Kg.prototype,"entity",void 0),Kg=Ur([Ga("mushroom-cover-position-control")],Kg);var Xg=function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:24,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.2,n=[],i=0;i\n "])),e,!xl(this.entity),!0,this.onChange,this.onCurrentChange)}}],[{key:"styles",get:function(){var t=Xg.map((function(t){var e=mr(t,2),n=e[0],i=e[1];return"".concat(i," ").concat(100*n,"%")})).join(", ");return Xr(We||(We=or(["\n mushroom-slider {\n --main-color: var(--slider-color);\n --bg-color: var(--slider-bg-color);\n --gradient: -webkit-linear-gradient(right, ",");\n }\n "])),Kr(t))}}])}();Ur([Qa({attribute:!1})],qg.prototype,"hass",void 0),Ur([Qa({attribute:!1})],qg.prototype,"entity",void 0),qg=Ur([Ga("mushroom-cover-tilt-position-control")],qg);var Gg={buttons_control:"mdi:gesture-tap-button",position_control:"mdi:gesture-swipe-horizontal",tilt_position_control:"mdi:rotate-right"};Tv({type:Lg,name:"Mushroom Cover Card",description:"Card for cover entity"});var Zg=function(t){function e(){return zr(this,e),br(this,e,arguments)}return wr(e,Sv),Mr(e,[{key:"hasControls",get:function(){return this._controls.length>0}},{key:"_nextControl",get:function(){var t;if(this._activeControl)return null!==(t=this._controls[this._controls.indexOf(this._activeControl)+1])&&void 0!==t?t:this._controls[0]}},{key:"_onNextControlTap",value:function(t){t.stopPropagation(),this._activeControl=this._nextControl}},{key:"getCardSize",value:function(){return 1}},{key:"setConfig",value:function(t){dr(e,"setConfig",this,3)([Object.assign({tap_action:{action:"toggle"},hold_action:{action:"more-info"}},t)]),this.updateActiveControl(),this.updatePosition()}},{key:"_controls",get:function(){if(!this._config||!this._stateObj)return[];var t=[];return this._config.show_buttons_control&&t.push("buttons_control"),this._config.show_position_control&&t.push("position_control"),this._config.show_tilt_position_control&&t.push("tilt_position_control"),t}},{key:"updateActiveControl",value:function(){var t=!!this._activeControl&&this._controls.includes(this._activeControl);this._activeControl=t?this._activeControl:this._controls[0]}},{key:"updated",value:function(t){dr(e,"updated",this,3)([t]),this.hass&&t.has("hass")&&(this.updatePosition(),this.updateActiveControl())}},{key:"updatePosition",value:function(){this.position=void 0;var t=this._stateObj;t&&(this.position=Wg(t))}},{key:"onCurrentPositionChange",value:function(t){null!=t.detail.value&&(this.position=t.detail.value)}},{key:"_handleAction",value:function(t){Os(this,this.hass,this._config,t.detail.action)}},{key:"render",value:function(){if(!this.hass||!this._config||!this._config.entity)return ja;var t=this._stateObj;if(!t)return this.renderNotFound(this._config);var e=this._config.name||t.attributes.friendly_name||"",n=this._config.icon,i=gv(this._config),o=Xf(t,i.icon_type),r=this.hass.formatEntityState?this.hass.formatEntityState(t):Dl(this.hass.localize,t,this.hass.locale,this.hass.config,this.hass.entities);this.position&&(r+=" - ".concat(this.position).concat(Ll(this.hass.locale),"%"));var a=us(this.hass);return za(Ye||(Ye=or(["\n \n \n \n ","\n ","\n ",";\n \n ","\n \n \n "])),iv({"fill-container":i.fill_container}),i,a,a,i,this._handleAction,Ss({hasHold:Ts(this._config.hold_action),hasDoubleClick:Ts(this._config.double_tap_action)}),o?this.renderPicture(o):this.renderIcon(t,n),this.renderBadge(t),this.renderStateInfo(t,i,e,r),this._controls.length>0?za(Ke||(Ke=or(['\n \n ","\n ","\n
\n "])),a,this.renderActiveControl(t,i.layout),this.renderNextControlButton()):ja)}},{key:"renderIcon",value:function(t,e){var n={},i=xl(t),o=Yg(t);return n["--icon-color"]="rgb(".concat(o,")"),n["--shape-color"]="rgba(".concat(o,", 0.2)"),za(Xe||(Xe=or(['\n \n ","\n ","\n \n "])),a,this._config.show_percentage_control?za(dn||(dn=or(["\n \n "])),this.hass,t,this.onCurrentPercentageChange):ja,this._config.show_oscillate_control?za(un||(un=or(["\n \n "])),this.hass,t):ja):ja)}},{key:"renderIcon",value:function(t,e){var n,i={},o=o_(t),r=kl(t);if(r)if(o){var a=1.5*Math.pow(o/100,.5);i["--animation-duration"]="".concat(1/a,"s")}else i["--animation-duration"]="1s";return za(hn||(hn=or(['\n \n \n \n "])),a,this.hass,t,this.onCurrentHumidityChange):ja)}}],[{key:"getConfigElement",value:(i=yr(gr().mark((function t(){return gr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.resolve().then((function(){return KE}));case 2:return t.abrupt("return",document.createElement(d_));case 3:case"end":return t.stop()}}),t)}))),function(){return i.apply(this,arguments)})},{key:"getStubConfig",value:(n=yr(gr().mark((function t(e){var n,i;return gr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=Object.keys(e.states),i=n.filter((function(t){return u_.includes(t.split(".")[0])})),t.abrupt("return",{type:"custom:".concat(c_),entity:i[0]});case 3:case"end":return t.stop()}}),t)}))),function(t){return n.apply(this,arguments)})},{key:"styles",get:function(){return[dr(e,"styles",this),Ov,Xr(_n||(_n=or(["\n mushroom-state-item {\n cursor: pointer;\n }\n mushroom-shape-icon {\n --icon-color: rgb(var(--rgb-state-humidifier));\n --shape-color: rgba(var(--rgb-state-humidifier), 0.2);\n }\n mushroom-humidifier-humidity-control {\n flex: 1;\n }\n "])))]}}]);var n,i}();Ur([tl()],p_.prototype,"humidity",void 0),p_=Ur([Ga(c_)],p_);var m_="".concat(Iv,"-number-card"),f_="".concat(m_,"-editor"),v_=["number","input_number"],g_=function(t){function e(){return zr(this,e),br(this,e,arguments)}return wr(e,Xa),Mr(e,[{key:"onChange",value:function(t){var e=t.detail.value,n=this.entity.entity_id.split(".")[0];this.hass.callService(n,"set_value",{entity_id:this.entity.entity_id,value:e})}},{key:"onCurrentChange",value:function(t){var e=t.detail.value;this.dispatchEvent(new CustomEvent("current-change",{detail:{value:e}}))}},{key:"render",value:function(){var t,e=Number(this.entity.state),n=null!==(t=jl(this.entity,this.hass.entities[this.entity.entity_id]))&&void 0!==t?t:Pl(this.entity.state);return"buttons"===this.displayMode?za(yn||(yn=or(["\n \n "])),this.hass.locale,isNaN(e)?void 0:e,this.entity.attributes.min,this.entity.attributes.max,this.entity.attributes.step,!xl(this.entity),n,this.onChange):za(bn||(bn=or(["\n \n "])),isNaN(e)?void 0:e,!xl(this.entity),!kl(this.entity),!0,this.entity.attributes.min,this.entity.attributes.max,this.entity.attributes.step,this.onChange,this.onCurrentChange)}}],[{key:"styles",get:function(){return Xr(kn||(kn=or(["\n :host {\n --slider-color: rgb(var(--rgb-state-number));\n --slider-outline-color: transparent;\n --slider-bg-color: rgba(var(--rgb-state-number), 0.2);\n }\n mushroom-slider {\n --main-color: var(--slider-color);\n --bg-color: var(--slider-bg-color);\n --main-outline-color: var(--slider-outline-color);\n }\n "])))}}])}();Ur([Qa({attribute:!1})],g_.prototype,"hass",void 0),Ur([Qa({attribute:!1})],g_.prototype,"entity",void 0),Ur([Qa({attribute:!1})],g_.prototype,"displayMode",void 0),g_=Ur([Ga("mushroom-number-value-control")],g_),Tv({type:m_,name:"Mushroom Number Card",description:"Card for number and input number entity"});var __=function(t){function e(){return zr(this,e),br(this,e,arguments)}return wr(e,Sv),Mr(e,[{key:"hasControls",get:function(){return!0}},{key:"_handleAction",value:function(t){Os(this,this.hass,this._config,t.detail.action)}},{key:"onCurrentValueChange",value:function(t){null!=t.detail.value&&(this.value=t.detail.value)}},{key:"updated",value:function(t){dr(e,"updated",this,3)([t]),this.hass&&t.has("hass")&&this.updateValue()}},{key:"updateValue",value:function(){this.value=void 0;var t=this._stateObj;t&&!Number.isNaN(t.state)&&(this.value=Number(t.state))}},{key:"render",value:function(){var t,e,n;if(!this._config||!this.hass||!this._config.entity)return ja;var i=this._stateObj;if(!i)return this.renderNotFound(this._config);var o=this._config.name||i.attributes.friendly_name||"",r=this._config.icon,a=gv(this._config),l=Xf(i,a.icon_type),s=this.hass.formatEntityState?this.hass.formatEntityState(i):Dl(this.hass.localize,i,this.hass.locale,this.hass.config,this.hass.entities);if(void 0!==this.value){var c=Ml(this.value,this.hass.locale,null!==(t=jl(i,this.hass.entities[i.entity_id]))&&void 0!==t?t:Pl(i.state));s="".concat(c," ").concat(null!==(e=i.attributes.unit_of_measurement)&&void 0!==e?e:"")}var d=us(this.hass),u={},h=null===(n=this._config)||void 0===n?void 0:n.icon_color;if(h){var p=Rf(h);u["--slider-color"]="rgb(".concat(p,")"),u["--slider-bg-color"]="rgba(".concat(p,", 0.2)")}return za(xn||(xn=or(["\n \n \n \n ","\n ","\n ",';\n \n \n \n
\n \n \n "])),iv({"fill-container":a.fill_container}),a,d,d,a,this._handleAction,Ss({hasHold:Ts(this._config.hold_action),hasDoubleClick:Ts(this._config.double_tap_action)}),l?this.renderPicture(l):this.renderIcon(i,r),this.renderBadge(i),this.renderStateInfo(i,a,o,s),d,this.hass,i,this._config.display_mode,ff(u),this.onCurrentValueChange)}},{key:"renderIcon",value:function(t,e){var n,i=kl(t),o={},r=null===(n=this._config)||void 0===n?void 0:n.icon_color;if(r){var a=Rf(r);o["--icon-color"]="rgb(".concat(a,")"),o["--shape-color"]="rgba(".concat(a,", 0.2)")}return za(wn||(wn=or(['\n \n ","\n ","\n \n "])),a,this.renderActiveControl(t),this.renderOtherControls()):ja)}},{key:"renderIcon",value:function(t,e){var n,i,o=hg(t),r=kl(t),a={},l=null===(n=this._config)||void 0===n?void 0:n.icon_color;if(o&&(null===(i=this._config)||void 0===i?void 0:i.use_light_color)){var s=o.join(",");a["--icon-color"]="rgb(".concat(s,")"),a["--shape-color"]="rgba(".concat(s,", 0.25)"),pg(o)&&!this.hass.themes.darkMode&&(a["--shape-outline-color"]="rgba(var(--rgb-primary-text-color), 0.05)",mg(o)&&(a["--icon-color"]="rgba(var(--rgb-primary-text-color), 0.2)"))}else if(l){var c=Rf(l);a["--icon-color"]="rgb(".concat(c,")"),a["--shape-color"]="rgba(".concat(c,", 0.2)")}return za(Mn||(Mn=or(['\n \n \n \n \n
\n \n \n "])),iv({"fill-container":i.fill_container}),i,r,r,i,this._handleAction,Ss({hasHold:Ts(this._config.hold_action),hasDoubleClick:Ts(this._config.double_tap_action)}),o?this.renderPicture(o):this.renderIcon(t,n),this.renderBadge(t),this.renderStateInfo(t,i,e),r,this.hass,t,"horizontal"!==i.layout)}},{key:"renderIcon",value:function(t,e){var n=xl(t),i={"--icon-color":"rgb(var(--rgb-state-lock))","--shape-color":"rgba(var(--rgb-state-lock), 0.2)"};return $_(t)?(i["--icon-color"]="rgb(var(--rgb-state-lock-locked))",i["--shape-color"]="rgba(var(--rgb-state-lock-locked), 0.2)"):z_(t)?(i["--icon-color"]="rgb(var(--rgb-state-lock-unlocked))",i["--shape-color"]="rgba(var(--rgb-state-lock-unlocked), 0.2)"):M_(t)&&(i["--icon-color"]="rgb(var(--rgb-state-lock-pending))",i["--shape-color"]="rgba(var(--rgb-state-lock-pending), 0.2)"),za(Fn||(Fn=or(['\n \n \n '])),"volume_down",!xl(this.entity)||wl(this.entity),this.handleClick):void 0,l?za(Zn||(Zn=or(["\n \n \n '])),"volume_up",!xl(this.entity)||wl(this.entity),this.handleClick):void 0)}}],[{key:"styles",get:function(){return Xr(Jn||(Jn=or(["\n mushroom-slider {\n flex: 1;\n --main-color: rgb(var(--rgb-state-media-player));\n --bg-color: rgba(var(--rgb-state-media-player), 0.2);\n }\n "])))}}])}();Ur([Qa({attribute:!1})],H_.prototype,"hass",void 0),Ur([Qa({attribute:!1})],H_.prototype,"entity",void 0),Ur([Qa({type:Boolean})],H_.prototype,"fill",void 0),Ur([Qa({attribute:!1})],H_.prototype,"controls",void 0),H_=Ur([Ga("mushroom-media-player-volume-control")],H_);var W_={media_control:"mdi:play-pause",volume_control:"mdi:volume-high"};Tv({type:D_,name:"Mushroom Media Card",description:"Card for media player entity"});var Y_=function(t){function e(){return zr(this,e),br(this,e,arguments)}return wr(e,Sv),Mr(e,[{key:"hasControls",get:function(){var t,e,n,i;return Boolean(null===(e=null===(t=this._config)||void 0===t?void 0:t.media_controls)||void 0===e?void 0:e.length)||Boolean(null===(i=null===(n=this._config)||void 0===n?void 0:n.volume_controls)||void 0===i?void 0:i.length)}},{key:"_controls",get:function(){if(!this._config||!this._stateObj)return[];var t=this._stateObj,e=[];return function(t,e){return V_(t,null!=e?e:[]).length>0}(t,this._config.media_controls)&&e.push("media_control"),function(t,e){return(null==e?void 0:e.includes("volume_buttons"))&&El(t,1024)||(null==e?void 0:e.includes("volume_mute"))&&El(t,8)||(null==e?void 0:e.includes("volume_set"))&&El(t,4)}(t,this._config.volume_controls)&&e.push("volume_control"),e}},{key:"_onControlTap",value:function(t,e){e.stopPropagation(),this._activeControl=t}},{key:"setConfig",value:function(t){dr(e,"setConfig",this,3)([t]),this.updateActiveControl(),this.updateVolume()}},{key:"updated",value:function(t){dr(e,"updated",this,3)([t]),this.hass&&t.has("hass")&&(this.updateActiveControl(),this.updateVolume())}},{key:"updateVolume",value:function(){this.volume=void 0;var t=this._stateObj;if(t){var e=U_(t);this.volume=null!=e?Math.round(e):e}}},{key:"onCurrentVolumeChange",value:function(t){null!=t.detail.value&&(this.volume=t.detail.value)}},{key:"updateActiveControl",value:function(){var t=!!this._activeControl&&this._controls.includes(this._activeControl);this._activeControl=t?this._activeControl:this._controls[0]}},{key:"_handleAction",value:function(t){Os(this,this.hass,this._config,t.detail.action)}},{key:"render",value:function(){if(!this._config||!this.hass||!this._config.entity)return ja;var t=this._stateObj;if(!t)return this.renderNotFound(this._config);var e,n,i,o=function(t,e){var n,i=t.icon;if(![gl,_l,yl].includes(e.state)&&t.use_media_info)switch(null===(n=e.attributes.app_name)||void 0===n?void 0:n.toLowerCase()){case"spotify":return"mdi:spotify";case"google podcasts":return"mdi:google-podcast";case"plex":return"mdi:plex";case"soundcloud":return"mdi:soundcloud";case"youtube":return"mdi:youtube";case"oto music":return"mdi:music-circle";case"netflix":return"mdi:netflix";default:return}return i}(this._config,t),r=(e=this._config,n=t,i=e.name||n.attributes.friendly_name||"",![gl,_l,yl].includes(n.state)&&e.use_media_info&&n.attributes.media_title&&(i=n.attributes.media_title),i),a=function(t,e,n){var i=n.formatEntityState?n.formatEntityState(e):Dl(n.localize,e,n.locale,n.config,n.entities);return![gl,_l,yl].includes(e.state)&&t.use_media_info&&function(t){var e;switch(t.attributes.media_content_type){case"music":case"image":e=t.attributes.media_artist;break;case"playlist":e=t.attributes.media_playlist;break;case"tvshow":e=t.attributes.media_series_title,t.attributes.media_season&&(e+=" S"+t.attributes.media_season,t.attributes.media_episode&&(e+="E"+t.attributes.media_episode));break;default:e=t.attributes.app_name||""}return e}(e)||i}(this._config,t,this.hass),l=gv(this._config),s=Xf(t,l.icon_type),c=null!=this.volume&&this._config.show_volume_level?"".concat(a," - ").concat(this.volume).concat(Ll(this.hass.locale),"%"):a,d=us(this.hass),u=(!this._config.collapsible_controls||kl(t))&&this._controls.length;return za(Qn||(Qn=or(["\n \n \n \n ","\n ","\n ",";\n \n ","\n \n \n "])),iv({"fill-container":l.fill_container}),l,d,d,l,this._handleAction,Ss({hasHold:Ts(this._config.hold_action),hasDoubleClick:Ts(this._config.double_tap_action)}),s?this.renderPicture(s):this.renderIcon(t,o),this.renderBadge(t),this.renderStateInfo(t,l,r,c),u?za(ti||(ti=or(['\n \n ","\n ","\n
\n "])),d,this.renderActiveControl(t,l.layout),this.renderOtherControls()):ja)}},{key:"renderOtherControls",value:function(){var t=this,e=this._controls.filter((function(e){return e!=t._activeControl}));return za(ei||(ei=or(["\n ","\n "])),e.map((function(e){return za(ni||(ni=or(["\n \n \n \n "])),(function(n){return t._onControlTap(e,n)}),W_[e])})))}},{key:"renderActiveControl",value:function(t,e){var n,i,o,r,a=null!==(i=null===(n=this._config)||void 0===n?void 0:n.media_controls)&&void 0!==i?i:[],l=null!==(r=null===(o=this._config)||void 0===o?void 0:o.volume_controls)&&void 0!==r?r:[];switch(this._activeControl){case"media_control":return za(ii||(ii=or(["\n \n \n "])),this.hass,t,a,"horizontal"!==e);case"volume_control":return za(oi||(oi=or(["\n \n "])),this.hass,t,l,"horizontal"!==e,this.onCurrentVolumeChange);default:return ja}}}],[{key:"getConfigElement",value:(i=yr(gr().mark((function t(){return gr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.resolve().then((function(){return dA}));case 2:return t.abrupt("return",document.createElement(N_));case 3:case"end":return t.stop()}}),t)}))),function(){return i.apply(this,arguments)})},{key:"getStubConfig",value:(n=yr(gr().mark((function t(e){var n,i;return gr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=Object.keys(e.states),i=n.filter((function(t){return R_.includes(t.split(".")[0])})),t.abrupt("return",{type:"custom:".concat(D_),entity:i[0]});case 3:case"end":return t.stop()}}),t)}))),function(t){return n.apply(this,arguments)})},{key:"styles",get:function(){return[dr(e,"styles",this),Ov,Xr(ri||(ri=or(["\n mushroom-state-item {\n cursor: pointer;\n }\n mushroom-shape-icon {\n --icon-color: rgb(var(--rgb-state-media-player));\n --shape-color: rgba(var(--rgb-state-media-player), 0.2);\n }\n mushroom-media-player-media-control,\n mushroom-media-player-volume-control {\n flex: 1;\n }\n "])))]}}]);var n,i}();Ur([tl()],Y_.prototype,"_activeControl",void 0),Ur([tl()],Y_.prototype,"volume",void 0),Y_=Ur([Ga(D_)],Y_);var K_="".concat(Iv,"-person-card"),X_="".concat(K_,"-editor"),q_=["person","device_tracker"];Tv({type:K_,name:"Mushroom Person Card",description:"Card for person entity"});var G_=function(t){function e(){return zr(this,e),br(this,e,arguments)}return wr(e,Sv),Mr(e,[{key:"_handleAction",value:function(t){Os(this,this.hass,this._config,t.detail.action)}},{key:"render",value:function(){if(!this._config||!this.hass||!this._config.entity)return ja;var t=this._stateObj;if(!t)return this.renderNotFound(this._config);var e=this._config.name||t.attributes.friendly_name||"",n=this._config.icon,i=gv(this._config),o=Xf(t,i.icon_type),r=us(this.hass);return za(ai||(ai=or(["\n \n \n \n ","\n ","\n ",";\n \n \n \n "])),iv({"fill-container":i.fill_container}),i,r,r,i,this._handleAction,Ss({hasHold:Ts(this._config.hold_action),hasDoubleClick:Ts(this._config.double_tap_action)}),o?this.renderPicture(o):this.renderIcon(t,n),this.renderBadge(t),this.renderStateInfo(t,i,e))}},{key:"renderStateBadge",value:function(t){var e=Object.values(this.hass.states).filter((function(t){return t.entity_id.startsWith("zone.")})),n=function(t,e){var n=t.state;if(n===_l)return"mdi:help";if("not_home"===n)return"mdi:home-export-outline";if("home"===n)return"mdi:home";var i=e.find((function(t){return n===t.attributes.friendly_name}));return i&&i.attributes.icon?i.attributes.icon:"mdi:home"}(t,e),i=function(t,e){var n=t.state;if(n===_l)return"var(--rgb-state-person-unknown)";if("not_home"===n)return"var(--rgb-state-person-not-home)";if("home"===n)return"var(--rgb-state-person-home)";var i=e.some((function(t){return n===t.attributes.friendly_name}));return i?"var(--rgb-state-person-zone)":"var(--rgb-state-person-home)"}(t,e);return za(li||(li=or(['\n \n \n \n
\n \n \n "])),iv({"fill-container":o.fill_container}),o,a,a,o,this._handleAction,Ss({hasHold:Ts(this._config.hold_action),hasDoubleClick:Ts(this._config.double_tap_action)}),r?this.renderPicture(r):this.renderIcon(e,i),this.renderBadge(e),this.renderStateInfo(e,o,n),a,ff(s),this.hass,e)}},{key:"renderIcon",value:function(t,e){var n,i=kl(t),o={},r=null===(n=this._config)||void 0===n?void 0:n.icon_color;if(r){var a=Rf(r);o["--icon-color"]="rgb(".concat(a,")"),o["--shape-color"]="rgba(".concat(a,", 0.2)")}return za(pi||(pi=or(['\n ',""])),d):t?this.renderIcon(t,e):ja,(t||a)&&n?this.renderBadgeIcon(n,i):void 0,o,r,l)}},{key:"renderPicture",value:function(t){return za(gi||(gi=or(['\n \n