diff --git a/custom_components/alarmo/const.py b/custom_components/alarmo/const.py index 5841c12..403d028 100755 --- a/custom_components/alarmo/const.py +++ b/custom_components/alarmo/const.py @@ -29,7 +29,7 @@ from homeassistant.helpers import config_validation as cv -VERSION = "1.8.5" +VERSION = "1.8.6" NAME = "Alarmo" MANUFACTURER = "@nielsfaber" diff --git a/custom_components/alarmo/frontend/dist/alarm-panel.js b/custom_components/alarmo/frontend/dist/alarm-panel.js index b4e8297..474950c 100644 --- a/custom_components/alarmo/frontend/dist/alarm-panel.js +++ b/custom_components/alarmo/frontend/dist/alarm-panel.js @@ -61,7 +61,7 @@ const ne=e=>t=>"function"==typeof t?((e,t)=>(window.customElements.define(e,t),t * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -function de(e,t){return(({finisher:e,descriptor:t})=>(a,i)=>{var s;if(void 0===i){const i=null!==(s=a.originalKey)&&void 0!==s?s:a.key,n=null!=t?{kind:"method",placement:"prototype",key:i,descriptor:t(a.key)}:{...a,key:i};return null!=e&&(n.finisher=function(t){e(t,i)}),n}{const s=a.constructor;void 0!==t&&Object.defineProperty(a,i,t(i)),null==e||e(s,i)}})({descriptor:a=>{const i={get(){var t;return null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(e)},enumerable:!0,configurable:!0};if(t){const t="symbol"==typeof a?Symbol():"__"+a;i.get=function(){var a;return void 0===this[t]&&(this[t]=null===(a=this.renderRoot)||void 0===a?void 0:a.querySelector(e)),this[t]}}return i}})}var ce=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,he="[^\\s]+",ue=/\[([^]*?)\]/gm;function me(e,t){for(var a=[],i=0,s=e.length;i-1?i:null}};function ge(e){for(var t=[],a=1;a3?0:(e-e%10!=10?1:0)*e%10]}},ye=ge({},be),we=function(e,t){for(void 0===t&&(t=2),e=String(e);e.length0?"-":"+")+we(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4)},Z:function(e){var t=e.getTimezoneOffset();return(t>0?"-":"+")+we(Math.floor(Math.abs(t)/60),2)+":"+we(Math.abs(t)%60,2)}},$e=function(e){return+e-1},Ae=[null,"[1-9]\\d?"],xe=[null,he],Ee=["isPm",he,function(e,t){var a=e.toLowerCase();return a===t.amPm[0]?0:a===t.amPm[1]?1:null}],Oe=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(e){var t=(e+"").match(/([+-]|\d\d)/gi);if(t){var a=60*+t[1]+parseInt(t[2],10);return"+"===t[0]?a:-a}return 0}],Te=(pe("monthNamesShort"),pe("monthNames"),{default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"});var je=function(e,t,a){if(void 0===t&&(t=Te.default),void 0===a&&(a={}),"number"==typeof e&&(e=new Date(e)),"[object Date]"!==Object.prototype.toString.call(e)||isNaN(e.getTime()))throw new Error("Invalid Date pass to format");var i=[];t=(t=Te[t]||t).replace(ue,(function(e,t){return i.push(t),"@@@"}));var s=ge(ge({},ye),a);return(t=t.replace(ce,(function(t){return ke[t](e,s)}))).replace(/@@@/g,(function(){return i.shift()}))};(function(){try{(new Date).toLocaleDateString("i")}catch(e){return"RangeError"===e.name}})(),function(){try{(new Date).toLocaleString("i")}catch(e){return"RangeError"===e.name}}(),function(){try{(new Date).toLocaleTimeString("i")}catch(e){return"RangeError"===e.name}}();function Se(e){return e.substr(0,e.indexOf("."))}function Ce(e){return e.substr(e.indexOf(".")+1)}var Me="hass:bookmark",Ne=function(e,t,a,i){i=i||{},a=null==a?{}:a;var s=new Event(t,{bubbles:void 0===i.bubbles||i.bubbles,cancelable:Boolean(i.cancelable),composed:void 0===i.composed||i.composed});return s.detail=a,e.dispatchEvent(s),s},De={alert:"hass:alert",automation:"hass:playlist-play",calendar:"hass:calendar",camera:"hass:video",climate:"hass:thermostat",configurator:"hass:settings",conversation:"hass:text-to-speech",device_tracker:"hass:account",fan:"hass:fan",group:"hass:google-circles-communities",history_graph:"hass:chart-line",homeassistant:"hass:home-assistant",homekit:"hass:home-automation",image_processing:"hass:image-filter-frames",input_boolean:"hass:drawing",input_datetime:"hass:calendar-clock",input_number:"hass:ray-vertex",input_select:"hass:format-list-bulleted",input_text:"hass:textbox",light:"hass:lightbulb",mailbox:"hass:mailbox",notify:"hass:comment-alert",person:"hass:account",plant:"hass:flower",proximity:"hass:apple-safari",remote:"hass:remote",scene:"hass:google-pages",script:"hass:file-document",sensor:"hass:eye",simple_alarm:"hass:bell",sun:"hass:white-balance-sunny",switch:"hass:flash",timer:"hass:timer",updater:"hass:cloud-upload",vacuum:"hass:robot-vacuum",water_heater:"hass:thermometer",weblink:"hass:open-in-new"};function Le(e,t){if(e in De)return De[e];switch(e){case"alarm_control_panel":switch(t){case"armed_home":return"hass:bell-plus";case"armed_night":return"hass:bell-sleep";case"disarmed":return"hass:bell-outline";case"triggered":return"hass:bell-ring";default:return"hass:bell"}case"binary_sensor":return t&&"off"===t?"hass:radiobox-blank":"hass:checkbox-marked-circle";case"cover":return"closed"===t?"hass:window-closed":"hass:window-open";case"lock":return t&&"unlocked"===t?"hass:lock-open":"hass:lock";case"media_player":return t&&"off"!==t&&"idle"!==t?"hass:cast-connected":"hass:cast";case"zwave":switch(t){case"dead":return"hass:emoticon-dead";case"sleeping":return"hass:sleep";case"initializing":return"hass:timer-sand";default:return"hass:z-wave"}default:return console.warn("Unable to find icon for domain "+e+" ("+t+")"),Me}}var Pe=function(e,t,a){void 0===a&&(a=!1),a?history.replaceState(null,"",t):history.pushState(null,"",t),Ne(window,"location-changed",{replace:a})},ze={humidity:"hass:water-percent",illuminance:"hass:brightness-5",temperature:"hass:thermometer",pressure:"hass:gauge",power:"hass:flash",signal_strength:"hass:wifi"},qe={binary_sensor:function(e){var t=e.state&&"off"===e.state;switch(e.attributes.device_class){case"battery":return t?"hass:battery":"hass:battery-outline";case"cold":return t?"hass:thermometer":"hass:snowflake";case"connectivity":return t?"hass:server-network-off":"hass:server-network";case"door":return t?"hass:door-closed":"hass:door-open";case"garage_door":return t?"hass:garage":"hass:garage-open";case"gas":case"power":case"problem":case"safety":case"smoke":return t?"hass:shield-check":"hass:alert";case"heat":return t?"hass:thermometer":"hass:fire";case"light":return t?"hass:brightness-5":"hass:brightness-7";case"lock":return t?"hass:lock":"hass:lock-open";case"moisture":return t?"hass:water-off":"hass:water";case"motion":return t?"hass:walk":"hass:run";case"occupancy":return t?"hass:home-outline":"hass:home";case"opening":return t?"hass:square":"hass:square-outline";case"plug":return t?"hass:power-plug-off":"hass:power-plug";case"presence":return t?"hass:home-outline":"hass:home";case"sound":return t?"hass:music-note-off":"hass:music-note";case"vibration":return t?"hass:crop-portrait":"hass:vibrate";case"window":return t?"hass:window-closed":"hass:window-open";default:return t?"hass:radiobox-blank":"hass:checkbox-marked-circle"}},cover:function(e){var t="closed"!==e.state;switch(e.attributes.device_class){case"garage":return t?"hass:garage-open":"hass:garage";case"door":return t?"hass:door-open":"hass:door-closed";case"shutter":return t?"hass:window-shutter-open":"hass:window-shutter";case"blind":return t?"hass:blinds-open":"hass:blinds";case"window":return t?"hass:window-open":"hass:window-closed";default:return Le("cover",e.state)}},sensor:function(e){var t=e.attributes.device_class;if(t&&t in ze)return ze[t];if("battery"===t){var a=Number(e.state);if(isNaN(a))return"hass:battery-unknown";var i=10*Math.round(a/10);return i>=100?"hass:battery":i<=0?"hass:battery-alert":"hass:battery-"+i}var s=e.attributes.unit_of_measurement;return"°C"===s||"°F"===s?"hass:thermometer":Le("sensor")},input_datetime:function(e){return e.attributes.has_date?e.attributes.has_time?Le("input_datetime"):"hass:calendar":"hass:clock"}};const Re=async()=>{if(customElements.get("ha-checkbox")&&customElements.get("ha-slider"))return;await customElements.whenDefined("partial-panel-resolver");const e=document.createElement("partial-panel-resolver");e.hass={panels:[{url_path:"tmp",component_name:"config"}]},e._updateRoutes(),await e.routerOptions.routes.tmp.load(),await customElements.whenDefined("ha-panel-config");const t=document.createElement("ha-panel-config");await t.routerOptions.routes.automation.load(),e.hass={panels:[{url_path:"tmp",component_name:"developer-tools"}]},e._updateRoutes(),await e.routerOptions.routes.tmp.load(),await customElements.whenDefined("ha-app-layout")},Ie=e=>e.callWS({type:"alarmo/config"}),Ue=e=>e.callWS({type:"alarmo/sensors"}),Ge=e=>e.callWS({type:"alarmo/users"}),Fe=e=>e.callWS({type:"alarmo/automations"}),Ve=e=>e.callWS({type:"alarmo/sensor_groups"}),He=(e,t)=>e.callApi("POST","alarmo/config",t),Ye=(e,t)=>e.callApi("POST","alarmo/sensors",t),Be=(e,t)=>e.callApi("POST","alarmo/users",t),Ke=(e,t)=>e.callApi("POST","alarmo/automations",t),Qe=(e,t)=>e.callApi("POST","alarmo/automations",{automation_id:t,remove:!0}),We=e=>e.callWS({type:"alarmo/areas"}),Xe=(e,t)=>e.callApi("POST","alarmo/area",t),Ze=e=>{class a extends e{connectedCallback(){super.connectedCallback(),this.__checkSubscribed()}disconnectedCallback(){if(super.disconnectedCallback(),this.__unsubs){for(;this.__unsubs.length;){const e=this.__unsubs.pop();e instanceof Promise?e.then(e=>e()):e()}this.__unsubs=void 0}}updated(e){super.updated(e),e.has("hass")&&this.__checkSubscribed()}hassSubscribe(){return[]}__checkSubscribed(){void 0===this.__unsubs&&this.isConnected&&void 0!==this.hass&&(this.__unsubs=this.hassSubscribe())}}return t([oe({attribute:!1})],a.prototype,"hass",void 0),a};var Je={modes_short:{armed_away:"Fora",armed_home:"Casa",armed_night:"Nit",armed_custom_bypass:"Personalitzat",armed_vacation:"Vacation"},enabled:"Activat",disabled:"Desactivat"},et={time_slider:{seconds:"seg",minutes:"min",infinite:"infinit",none:"cap"},editor:{ui_mode:"Canvia a UI",yaml_mode:"Canvia a YAML",edit_in_yaml:"Edit in YAML"},table:{filter:{label:"Filter items",item:"Filter by {name}",hidden_items:"{number} {number, plural,\n one {item is}\n other {items are}\n} hidden"}}},tt={general:{title:"General",cards:{general:{description:"Aquest tauler defineix alguns paràmetres globals de l'alarma.",fields:{disarm_after_trigger:{heading:"Desactivar després del disparador",description:"Quan hagi transcorregut el temps d’activació, desactiveu l’alarma en lloc de tornar a l’estat armat."},enable_mqtt:{heading:"Activa MQTT",description:"Permet controlar el tauler d'alarma mitjançant MQTT."},enable_master:{heading:"Activa l'alarma mestra",description:"Crea una entitat per controlar totes les àrees simultàniament."}},actions:{setup_mqtt:"Configuració MQTT",setup_master:"Configuració mestra"}},modes:{title:"Modes",description:"Aquest tauler es pot utilitzar per configurar els modes d'activació de l'alarma.",modes:{armed_away:"El mode fora de casa s'utilitzarà quan totes les persones surtin de casa. Es controlen totes les portes i finestres que permeten l'accés a la casa, així com els sensors de moviment dins de la casa.",armed_home:"El mode a casa (també conegut com mode casa) s'utilitzarà quan configureu l'alarma mentre hi hagi persones a la casa. Es controlen totes les portes i finestres que permetin l'accés a la casa, però no els sensors de moviment a l'interior de la casa.",armed_night:"El mode nit s'utilitzarà quan configureu l'alarma abans d'anar a dormir. Es controlaran totes les portes i finestres que permetin l'accés a la casa i es seleccionaran els sensors de moviment (per exemple, a la planta baixa) de la casa.",armed_vacation:"Armed vacation can be used as an extension to the armed away mode in case of absence for longer duration. The delay times and trigger responses can be adapted (as desired) to being distant from home.",armed_custom_bypass:"Un mode addicional per definir el vostre propi perímetre de seguretat."},number_sensors_active:"{number} {number, plural,\n one {sensor}\n other {sensors}\n} activa",fields:{status:{heading:"Status",description:"Controls whether the alarm can be armed in this mode."},exit_delay:{heading:"Retard de sortida",description:"Quan activeu l'alarma, en aquest període de temps els sensors encara no activaran l'alarma."},entry_delay:{heading:"Retard d'entrada",description:"Temps de retard fins que s'activi l'alarma després que s'activi un dels sensors."},trigger_time:{heading:"Temps d'activació",description:"Temps durant el qual sonarà la sirena"}}},mqtt:{title:"Configuració MQTT",description:"Aquest tauler es pot utilitzar per configurar la interfície MQTT.",fields:{state_topic:{heading:"Tema d'estat",description:"Tema sobre el qual es publiquen les actualitzacions d'estat"},event_topic:{heading:"Tema d'esdeveniment",description:"Tema sobre el qual es publiquen els esdeveniments d'alarma"},command_topic:{heading:"Tama d'ordre",description:"Tema sobre el qual s'envien les ordres d'activació/desactivació."},require_code:{heading:"Requereix codi",description:"Requereix l'enviament d'un codi amb l'ordre."},state_payload:{heading:"Configura la càrrega útil per estat",item:"Definiu una càrrega útil per a l'estat ''{state}''"},command_payload:{heading:"Configura la càrrega útil per ordre",item:"Definiu una càrrega útil per a l'ordre ''{command}''"}}},areas:{title:"Àrees",description:"Les àrees es poden utilitzar per dividir el sistema d'alarma en diversos compartiments.",no_items:"Encara no hi ha àrees definides.",table:{remarks:"Observacions",summary:"Aquesta àrea conté {summary_sensors} i {summary_automations}.",summary_sensors:"{number} {number, plural,\n one {sensor}\n other {sensors}\n}",summary_automations:"{number} {number, plural,\n one {automatisme}\n other {automatismes}\n}"},actions:{add:"Afegeix"}}},dialogs:{create_area:{title:"Àrea nova",fields:{copy_from:"Copia la configuració de"}},edit_area:{title:"Edita l'àrea ''{area}''",name_warning:"Nota: si canvieu el nom, es canviarà l'identificador d'entitat"},remove_area:{title:"Voleu eliminar l'àrea?",description:"Confirmeu que voleu eliminar aquesta àrea? Aquesta àrea conté {sensors} sensors i {automatismes} automatismes, que també s'eliminaran."},edit_master:{title:"Configuració mestra"},disable_master:{title:"Voleu desactivar l'alarma mestra?",description:"Confirmeu que voleu eliminar l'alarma mestra? Aquesta àrea conté automatismes {automatismes}, que s'eliminaran amb aquesta acció."}}},sensors:{title:"Sensors",cards:{sensors:{description:"Sensors configurats actualment. Feu clic a una entitat per fer canvis.",table:{no_items:"No hi ha cap sensor per mostrar",arm_modes:"Modes d'armat",always_on:"(Sempre)",no_area_warning:"Sensor is not assigned to any area."}},add_sensors:{title:"Afegeix sensors",description:"Afegiu més sensors. Assegureu-vos que els vostres sensors tinguin un friendly_name perquè pugueu identificar-los.",no_items:"No hi ha entitats HA disponibles que es puguin configurar per a l'alarma. Assegureu-vos d'incloure entitats del tipus binary_sensor.",table:{type:"Detected type"},actions:{add_to_alarm:"afegeix a l'alarma",show_all:"Mostra-ho tot"}},editor:{title:"Edita el sensor",description:"Edita la configuració del sensor de ''{entity}''.",fields:{area:{heading:"Àrea",description:"Seleccioneu una àrea que contingui aquest sensor."},group:{heading:"Group",description:"Group with other sensors for combined triggering."},device_type:{heading:"Tipus de dispositiu",description:"Trieu un tipus de dispositiu per aplicar automàticament la configuració adequada.",choose:{door:{name:"Porta",description:"Porta, porta de garatge o altra entrada que s'utilitzi per entrar/sortir de casa."},window:{name:"Finestra",description:"Finestra o una porta que no s'utilitza per entrar a la casa, com ara un balcó."},motion:{name:"Moviment",description:"Sensor de presència o dispositiu similar que té un retard entre les activacions."},tamper:{name:"Antisabotatge",description:"Detector de retirada de la coberta del sensor, sensor de trencament de vidre, etc."},environmental:{name:"Ambiental",description:"Sensor de fum o gas, detector de fuites, etc. (no relacionat amb la protecció antirobatori)."},other:{name:"Genèric"}}},always_on:{heading:"Sempre activat",description:"El sensor sempre ha de disparar l'alarma."},modes:{heading:"Modes habilitats",description:"Modes d'alarma en què aquest sensor està actiu."},arm_on_close:{heading:"Arma després de tancar",description:"Després de la desactivació d'aquest sensor, s'omet automàticament el temps de retard de sortida restant."},use_exit_delay:{heading:"Use exit delay",description:"Sensor is allowed to be active when the exit delay starts."},use_entry_delay:{heading:"Use entry delay",description:"Sensor activation triggers the alarm after the entry delay rather than directly."},allow_open:{heading:"Permet obrir mentre s'arma l'alarma",description:"Permeteu que aquest sensor estigui actiu poc després de configurar-lo de manera que no bloquegi l'activació de l'alarma."},auto_bypass:{heading:"Omet automàticament",description:"Excloeu aquest sensor de l'alarma si està obert mentre s'arma l'alarma.",modes:"Modes in which sensor may be bypassed"},trigger_unavailable:{heading:"Activador quan no estigui disponible",description:"Quan l'estat del sensor no estigui disponible, això activarà el sensor."}},actions:{toggle_advanced:"Configuració avançada",remove:"Elimina",setup_groups:"Setup groups"},errors:{description:"Corregiu els errors següents:",no_area:"No s'ha seleccionat cap àrea",no_modes:"No s'han seleccionat modes per als quals el sensor hauria d'estar actiu",no_auto_bypass_modes:"No modes are selected for the sensor may be automatically bypassed"}}},dialogs:{manage_groups:{title:"Manage sensor groups",description:"In a sensor group multiple sensors must be activated within a time period before the alarm is triggered.",no_items:"No groups yet",actions:{new_group:"New group"}},create_group:{title:"New sensor group",fields:{name:{heading:"Name",description:"Name for sensor group"},timeout:{heading:"Time-out",description:"Time period during which consecutive sensor activations triggers the alarm."},sensors:{heading:"Sensors",description:"Select the sensors which are contained by this group."}},errors:{invalid_name:"Invalid name provided.",insufficient_sensors:"At least 2 sensors need to be selected."}},edit_group:{title:"Edit sensor group ''{name}''"}}},codes:{title:"Codis",cards:{codes:{description:"Canvieu la configuració del codi.",fields:{code_arm_required:{heading:"Utilitzeu un codi d'activació",description:"Requereix un codi per activar l'alarma"},code_disarm_required:{heading:"Utilitzeu un codi de desactivació",description:"Requereix un codi per desactivar l'alarma"},code_format:{heading:"Format del codi",description:"Estableix el tipus de codi per a la targeta d'alarma Lovelace.",code_format_number:"codi PIN",code_format_text:"contrasenya"}}},user_management:{title:"Gestió d'usuaris",description:"Cada usuari té el seu propi codi per activar/desactivar l'alarma.",no_items:"Encara no hi ha usuaris",actions:{new_user:"usuari nou"}},new_user:{title:"Crea un usuari nou",description:"Es poden crear usuaris per proporcionar accés al funcionament de l'alarma.",fields:{name:{heading:"Nom",description:"Nom de l'usuari."},code:{heading:"Codi",description:"Codi d'aquest usuari."},confirm_code:{heading:"Confirmeu el codi",description:"Repetiu el codi."},can_arm:{heading:"Permetre que el codi active l'alarma",description:"Entering this code activates the alarm"},can_disarm:{heading:"Permetre que el codi desactive l'alarma",description:"Entering this code deactivates the alarm"},is_override_code:{heading:"És un codi de sobreescriptura",description:"Si introduïu aquest codi, es forçarà l'estat d'activació de l'alarma"},area_limit:{heading:"Restricted areas",description:"Limit user to control only the selected areas"}},errors:{no_name:"No s'ha proporcionat cap nom.",no_code:"El codi ha de tenir 4 caràcters o números com a mínim.",code_mismatch:"Els codis no coincideixen."}},edit_user:{title:"Edita l'usuari",description:"Canvia la configuració de l'usuari ''{name}''.",fields:{old_code:{heading:"Codi actual",description:"Codi actual, deixeu-lo en blanc per deixar-lo sense canvis."}}}}},actions:{title:"Accions",cards:{notifications:{title:"Notificacions",description:"Utilitzant aquest tauler, podeu gestionar les notificacions que s'envien quan es produeix un determinat esdeveniment d'alarma.",table:{no_items:"Encara no s'han creat notificacions.",no_area_warning:"Action is not assigned to any area."},actions:{new_notification:"nova notificació"}},actions:{description:"Aquest tauler es pot utilitzar per canviar un dispositiu quan l'estat d'alarma canvia.",table:{no_items:"Encara no s'han creat accions."},actions:{new_action:"nova acció"}},new_notification:{title:"Crea una notificació",description:"Crea una nova notificació.",trigger:"Condition",action:"Task",options:"Options",fields:{event:{heading:"Esdeveniment",description:"Quan s'ha d'enviar la notificació",choose:{armed:{name:"L'alarma està activada",description:"L'alarma s'ha activat correctament"},disarmed:{name:"L'alarma està desactivada",description:"L'alarma està desactivada"},triggered:{name:"L'alarma s'activat per esdeveniment",description:"L'alarma s'activat per esdeveniment"},arm_failure:{name:"No s'ha pogut activar l'alarma",description:"L'activació de l'alarma ha fallat a causa d'un o més sensors estan oberts"},arming:{name:"S'ha iniciat el retard de sortida",description:"S'ha iniciat el retard de sortida, a punt per sortir de casa."},pending:{name:"S'ha iniciat el retard d'entrada",description:"El retard d'entrada s'ha iniciat, l'alarma s'activarà aviat."}}},mode:{heading:"Mode",description:"Limita l'acció a modes específics d'activació (opcional)"},title:{heading:"Títol",description:"Títol del missatge de notificació"},message:{heading:"Missatge",description:"Contingut del missatge de notificació",insert_wildcard:"Insert wildcard",placeholders:{armed:"The alarm is set to {{arm_mode}}",disarmed:"The alarm is now OFF",triggered:"The alarm is triggered! Cause: {{open_sensors}}.",arm_failure:"The alarm could not be armed right now, due to: {{open_sensors}}.",arming:"The alarm will be armed soon, please leave the house.",pending:"The alarm is about to trigger, disarm it quickly!"}},open_sensors_format:{heading:"Format for open_sensors wildcard",description:"Choose which sensor information in inserted in the message",options:{default:"Names and states",short:"Names only"}},arm_mode_format:{heading:"Translation for arm_mode wildcard",description:"Choose in which language the arm mode is inserted in the message"},target:{heading:"Destinatari",description:"Dispositiu al qual enviar el missatge"},name:{heading:"Nom",description:"Descripció d'aquesta notificació",placeholders:{armed:"Notify {target} upon arming",disarmed:"Notify {target} upon disarming",triggered:"Notify {target} when triggered",arm_failure:"Notify {target} on failure",arming:"Notify {target} when leaving",pending:"Notify {target} when arriving"}},delete:{heading:"Delete automation",description:"Permanently remove this automation"}},actions:{test:"Prova-ho"}},new_action:{title:"Crea una acció",description:"Aquest tauler es pot utilitzar per canviar un dispositiu quan l'estat d'alarma canvia.",fields:{event:{heading:"Esdeveniment",description:"Quan s'ha d'executar l'acció"},area:{heading:"Àrea",description:"Àrea per a la qual s'aplica l'esdeveniment, deixeu-la en blanc per seleccionar l'alarma global."},mode:{heading:"Mode",description:"Limita l'acció a modes específics d'activació (opcional)"},entity:{heading:"Entitat",description:"Entitat en què es realitzarà l'acció"},action:{heading:"Acció",description:"Acció a realitzar a l'entitat",no_common_actions:"Actions can only be assigned in YAML mode for the selected entities."},name:{heading:"Nom",description:"Descripció d'aquesta acció",placeholders:{armed:"Set {entity} to {state} upon arming",disarmed:"Set {entity} to {state} upon disarming",triggered:"Set {entity} to {state} when triggered",arm_failure:"Set {entity} to {state} on failure",arming:"Set {entity} to {state} when leaving",pending:"Set {entity} to {state} when arriving"}}}}}}},at={common:Je,components:et,title:"Tauler alarma",panels:tt},it=Object.freeze({__proto__:null,common:Je,components:et,title:"Tauler alarma",panels:tt,default:at}),st={modes_short:{armed_away:"Away",armed_home:"Home",armed_night:"Night",armed_custom_bypass:"Custom",armed_vacation:"Vacation"},enabled:"Enabled",disabled:"Disabled"},nt={time_slider:{seconds:"sec",minutes:"min",infinite:"infinite",none:"none"},editor:{ui_mode:"To UI",yaml_mode:"To YAML",edit_in_yaml:"Edit in YAML"},table:{filter:{label:"Filter items",item:"Filter by {name}",hidden_items:"{number} {number, plural,\n one {item is}\n other {items are}\n} hidden"}}},rt={general:{title:"General",cards:{general:{description:"This panel defines some global settings for the alarm.",fields:{disarm_after_trigger:{heading:"Disarm after trigger",description:"After trigger time has expired, disarm the alarm instead of returning to armed state."},enable_mqtt:{heading:"Enable MQTT",description:"Allow the alarm panel to be controlled through MQTT."},enable_master:{heading:"Enable alarm master",description:"Creates an entity for controlling all areas simultaneously."}},actions:{setup_mqtt:"MQTT Configuration",setup_master:"Master Configuration"}},modes:{title:"Modes",description:"This panel can be used to set up the arm modes of the alarm.",modes:{armed_away:"Armed away will be used when all people left the house. All doors and windows allowing access to the house will be guarded, as well as motion sensors inside the house.",armed_home:"Armed home (also known as armed stay) will be used when setting the alarm while people are in the house. All doors and windows allowing access to the house will be guarded, but not motion sensors inside the house.",armed_night:"Armed night will be used when setting the alarm before going to sleep. All doors and windows allowing access to the house will be guarded, and selected motion sensors (downstairs) in the house.",armed_vacation:"Armed vacation can be used as an extension to the armed away mode in case of absence for longer duration. The delay times and trigger responses can be adapted (as desired) to being distant from home.",armed_custom_bypass:"An extra mode for defining your own security perimeter."},number_sensors_active:"{number} {number, plural,\n one {sensor}\n other {sensors}\n} active",fields:{status:{heading:"Status",description:"Controls whether the alarm can be armed in this mode."},exit_delay:{heading:"Exit delay",description:"When arming the alarm, within this time period the sensors will not trigger the alarm yet."},entry_delay:{heading:"Entry delay",description:"Delay time until the alarm is triggered after one of the sensors is activated."},trigger_time:{heading:"Trigger time",description:"Time during which the alarm will remain in the triggered state after activation."}}},mqtt:{title:"MQTT configuration",description:"This panel can be used for configuration of the MQTT interface.",fields:{state_topic:{heading:"State topic",description:"Topic on which state updates are published"},event_topic:{heading:"Event topic",description:"Topic on which alarm events are published"},command_topic:{heading:"Command topic",description:"Topic which Alarmo listens to for arm/disarm commands."},require_code:{heading:"Require code",description:"Require the code to be sent with the command."},state_payload:{heading:"Configure payload per state",item:"Define a payload for state ''{state}''"},command_payload:{heading:"Configure payload per command",item:"Define a payload for command ''{command}''"}}},areas:{title:"Areas",description:"Areas can be used for dividing your alarm system into multiple compartments.",no_items:"There are no areas defined yet.",table:{remarks:"Remarks",summary:"This area contains {summary_sensors} and {summary_automations}.",summary_sensors:"{number} {number, plural,\n one {sensor}\n other {sensors}\n}",summary_automations:"{number} {number, plural,\n one {automation}\n other {automations}\n}"},actions:{add:"Add"}}},dialogs:{create_area:{title:"New area",fields:{copy_from:"Copy settings from"}},edit_area:{title:"Editing area ''{area}''",name_warning:"Note: changing the name will change the entity ID"},remove_area:{title:"Remove area?",description:"Are you sure you want to remove this area? This area contains {sensors} sensors and {automations} automations, which will be removed as well."},edit_master:{title:"Master configuration"},disable_master:{title:"Disable master?",description:"Are you sure you want to remove the alarm master? This area contains {automations} automations, which will be removed with this action."}}},sensors:{title:"Sensors",cards:{sensors:{description:"Currently configured sensors. Click on an item to make changes.",table:{no_items:"There are no sensors to be displayed here.",no_area_warning:"Sensor is not assigned to any area.",arm_modes:"Arm Modes",always_on:"(Always)"}},add_sensors:{title:"Add Sensors",description:"Add more sensors. Make sure that your sensors have a suitable name, so you can identify them.",no_items:"There are no available HA entities that can be configured for the alarm. Make sure to include entities of the type binary_sensor.",table:{type:"Detected type"},actions:{add_to_alarm:"add to alarm",filter_supported:"Hide items with unknown type"}},editor:{title:"Edit Sensor",description:"Configuring the sensor settings of ''{entity}''.",fields:{area:{heading:"Area",description:"Select an area which contains this sensor."},group:{heading:"Group",description:"Group with other sensors for combined triggering."},device_type:{heading:"Device Type",description:"Choose a device type to automatically apply appropriate settings.",choose:{door:{name:"Door",description:"A door, gate or other entrance that is used for entering/leaving the home."},window:{name:"Window",description:"A window, or a door not used for entering the house such as balcony."},motion:{name:"Motion",description:"Presence sensor or similar device having a delay between activations."},tamper:{name:"Tamper",description:"Detector of sensor cover removal, glass break sensor, etc."},environmental:{name:"Environmental",description:"Smoke/gas sensor, leak detector, etc. (not related to burglar protection)."},other:{name:"Generic"}}},always_on:{heading:"Always on",description:"Sensor should always trigger the alarm."},modes:{heading:"Enabled modes",description:"Alarm modes in which this sensor is active."},arm_on_close:{heading:"Arm after closing",description:"After deactivation of this sensor, the remaining exit delay will automatically be skipped."},use_exit_delay:{heading:"Use exit delay",description:"Sensor is allowed to be active when the exit delay starts."},use_entry_delay:{heading:"Use entry delay",description:"Sensor activation triggers the alarm after the entry delay rather than directly."},allow_open:{heading:"Allow open after arming",description:"If the sensor is still active after the exit delay, this will not cause arming to fail."},auto_bypass:{heading:"Bypass automatically",description:"Exclude this sensor from the alarm if it is open while arming.",modes:"Modes in which sensor may be bypassed"},trigger_unavailable:{heading:"Trigger when unavailable",description:"When the sensor state becomes 'unavailable', this will activate the sensor."}},actions:{toggle_advanced:"Advanced settings",remove:"Remove",setup_groups:"Setup groups"},errors:{description:"Please correct the following errors:",no_area:"No area is selected",no_modes:"No modes are selected for which the sensor should be active",no_auto_bypass_modes:"No modes are selected for the sensor may be automatically bypassed"}}},dialogs:{manage_groups:{title:"Manage sensor groups",description:"In a sensor group multiple sensors must be activated within a time period before the alarm is triggered.",no_items:"No groups yet",actions:{new_group:"New group"}},create_group:{title:"New sensor group",fields:{name:{heading:"Name",description:"Name for sensor group"},timeout:{heading:"Time-out",description:"Time period during which consecutive sensor activations triggers the alarm."},sensors:{heading:"Sensors",description:"Select the sensors which are contained by this group."}},errors:{invalid_name:"Invalid name provided.",insufficient_sensors:"At least 2 sensors need to be selected."}},edit_group:{title:"Edit sensor group ''{name}''"}}},codes:{title:"Codes",cards:{codes:{description:"Change settings for the code.",fields:{code_arm_required:{heading:"Use arm code",description:"Require a code for arming the alarm"},code_disarm_required:{heading:"Use disarm code",description:"Require a code for disarming the alarm"},code_format:{heading:"Code format",description:"Sets the input type for Lovelace alarm card.",code_format_number:"pincode",code_format_text:"password"}}},user_management:{title:"User management",description:"Each user has its own code to arm/disarm the alarm.",no_items:"There are no users yet",actions:{new_user:"new user"}},new_user:{title:"Create new user",description:"Users can be created for providing access to operating the alarm.",fields:{name:{heading:"Name",description:"Name of the user."},code:{heading:"Code",description:"Code for this user."},confirm_code:{heading:"Confirm code",description:"Repeat the code."},can_arm:{heading:"Allow code for arming",description:"Entering this code activates the alarm"},can_disarm:{heading:"Allow code for disarming",description:"Entering this code deactivates the alarm"},is_override_code:{heading:"Is override code",description:"Entering this code will arm the alarm in force"},area_limit:{heading:"Restricted areas",description:"Limit user to control only the selected areas"}},errors:{no_name:"No name provided.",no_code:"Code should have 4 characters/numbers minimum.",code_mismatch:"The codes don't match."}},edit_user:{title:"Edit User",description:"Change configuration for user ''{name}''.",fields:{old_code:{heading:"Current code",description:"Current code, leave empty to leave unchanged."}}}}},actions:{title:"Actions",cards:{notifications:{title:"Notifications",description:"Using this panel, you can manage notifications to be sent when during a certain alarm event.",table:{no_items:"There are no notifications created yet.",no_area_warning:"Action is not assigned to any area."},actions:{new_notification:"new notification"}},actions:{description:"This panel can be used to switch a device when the alarm state changes.",table:{no_items:"There are no actions created yet."},actions:{new_action:"new action"}},new_notification:{title:"Configure notification",description:"Receive a notification when arming/disarming the alarm, on activation, etc.",trigger:"Condition",action:"Task",options:"Options",fields:{event:{heading:"Event",description:"When should the notification be sent",choose:{armed:{name:"Alarm is armed",description:"The alarm is succesfully armed"},disarmed:{name:"Alarm is disarmed",description:"The alarm is disarmed"},triggered:{name:"Alarm is triggered",description:"The alarm is triggered"},arm_failure:{name:"Failed to arm",description:"The arming of the alarm failed due to one or more open sensors"},arming:{name:"Exit delay started",description:"Exit delay started, ready to leave the house."},pending:{name:"Entry delay started",description:"Entry delay started, the alarm will trigger soon."}}},mode:{heading:"Mode",description:"Limit the action to specific arm modes (optional)"},title:{heading:"Title",description:"Title for the notification message"},message:{heading:"Message",description:"Content of the notification message",insert_wildcard:"Insert wildcard",placeholders:{armed:"The alarm is set to {{arm_mode}}",disarmed:"The alarm is now OFF",triggered:"The alarm is triggered! Cause: {{open_sensors}}.",arm_failure:"The alarm could not be armed right now, due to: {{open_sensors}}.",arming:"The alarm will be armed soon, please leave the house.",pending:"The alarm is about to trigger, disarm it quickly!"}},open_sensors_format:{heading:"Format for open_sensors wildcard",description:"Choose which sensor information in inserted in the message",options:{default:"Names and states",short:"Names only"}},arm_mode_format:{heading:"Translation for arm_mode wildcard",description:"Choose in which language the arm mode is inserted in the message"},target:{heading:"Target",description:"Device to send the push message to"},name:{heading:"Name",description:"Description for this notification",placeholders:{armed:"Notify {target} upon arming",disarmed:"Notify {target} upon disarming",triggered:"Notify {target} when triggered",arm_failure:"Notify {target} on failure",arming:"Notify {target} when leaving",pending:"Notify {target} when arriving"}},delete:{heading:"Delete automation",description:"Permanently remove this automation"}},actions:{test:"Try it"}},new_action:{title:"Configure action",description:"Switch lights or devices (such as sirens) when arming/disarming the alarm, on activation, etc.",fields:{event:{heading:"Event",description:"When should the action be executed"},area:{heading:"Area",description:"Area for which the event applies, leave empty to select the global alarm."},mode:{heading:"Mode",description:"Limit the action to specific arm modes (optional)"},entity:{heading:"Entity",description:"Entity to perform action on"},action:{heading:"Action",description:"Action to perform on the entity",no_common_actions:"Actions can only be assigned in YAML mode for the selected entities."},name:{heading:"Name",description:"Description for this action",placeholders:{armed:"Set {entity} to {state} upon arming",disarmed:"Set {entity} to {state} upon disarming",triggered:"Set {entity} to {state} when triggered",arm_failure:"Set {entity} to {state} on failure",arming:"Set {entity} to {state} when leaving",pending:"Set {entity} to {state} when arriving"}}}}}}},ot={common:st,components:nt,title:"Alarm panel",panels:rt},lt=Object.freeze({__proto__:null,common:st,components:nt,title:"Alarm panel",panels:rt,default:ot}),dt={modes_short:{armed_away:"Ausente",armed_home:"En casa",armed_night:"Nocturno",armed_custom_bypass:"Personalizado",armed_vacation:"Vacaciones"},enabled:"Habilitar",disabled:"Deshabilitar"},ct={time_slider:{seconds:"seg",minutes:"min",infinite:"infinito",none:"ninguno"},editor:{ui_mode:"Editar en la UI",yaml_mode:"Editar en YAML",edit_in_yaml:"Editar en YAML"},table:{filter:{label:"Filtrar entidades",item:"Filtrar por {name}",hidden_items:"{number} {number, plural,\n one {entidas está}\n other {entidades están}\n} oculta"}}},ht={general:{title:"General",cards:{general:{description:"Este panel define algunos ajustes globales para la alarma.",fields:{disarm_after_trigger:{heading:"Desarmar después de disparar",description:"Una vez transcurrido el tiempo de activación, desactivar la alarma en lugar de volver al estado de armada."},enable_mqtt:{heading:"Habilitar MQTT",description:"Permitir que el panel de alarma se controle a través de MQTT."},enable_master:{heading:"Habilitar alarma maestra",description:"Crea una entidad para controlar todas las áreas simultáneamente."}},actions:{setup_mqtt:"Configuración MQTT",setup_master:"Configuración maestra"}},modes:{title:"Modos",description:"Este panel se puede utilizar para configurar los modos de armado de la alarma.",modes:{armed_away:"Armado ausente se utilizará cuando todas las personas salgan de la casa. Todas las puertas y ventanas que permitan el acceso a la casa estarán vigiladas, así como los sensores de movimiento dentro de la casa.",armed_home:"Armado en casa (también conocido como estancia armada) se utilizará cuando se active la alarma mientras haya personas en la casa. Todas las puertas y ventanas que permitan el acceso a la casa estarán protegidas, pero no los sensores de movimiento dentro de la casa.",armed_night:"Armado nocturno se usará al configurar la alarma antes de irse a dormir. Todas las puertas y ventanas que permitan el acceso a la casa estarán resguardadas y se seleccionarán sensores de movimiento en la casa.",armed_vacation:"Armado en vacaciones se puede usar como una extensión del modo armado ausente en caso de ausencia de mayor duración. Los tiempos de retardo y las respuestas de activación se pueden adaptar (como se desee) a estar lejos de casa.",armed_custom_bypass:"Un modo adicional para definir su propio perímetro de seguridad."},number_sensors_active:"{number} {number, plural,\n one {sensor}\n other {sensores}\n} activo",fields:{status:{heading:"Estado",description:"Controla si la alarma se puede armar en este modo."},exit_delay:{heading:"Retardo de salida",description:"Al armar la alarma, dentro de este período de tiempo, los sensores aún no dispararán la alarma."},entry_delay:{heading:"Retardo de entrada",description:"Tiempo de retardo hasta que se activa la alarma después de que se active alguno de los sensores."},trigger_time:{heading:"Tiempo de activación",description:"Tiempo durante el cual sonará la sirena."}}},mqtt:{title:"Configuración MQTT",description:"Este panel se puede utilizar para configurar la interfaz MQTT.",fields:{state_topic:{heading:"Tema del estado",description:"Tema sobre el que se publican las actualizaciones de estado."},event_topic:{heading:"Tema del evento",description:"Tema sobre el que se publican los eventos de alarma."},command_topic:{heading:"Tema del comando",description:"Tema sobre el que se envían los comandos de armado / desarmado."},require_code:{heading:"Requerir código",description:"Requiere que el código se envíe con el comando."},state_payload:{heading:"Configurar la carga útil por estado",item:"Defina una carga útil para el estado ''{'state}''"},command_payload:{heading:"Configurar la carga útil por comando",item:"Defina una carga útil para el comando ''{command}''"}}},areas:{title:"Áreas",description:"Las áreas se pueden utilizar para dividir su sistema de alarma en varios compartimentos.",no_items:"Aún no hay áreas definidas.",table:{remarks:"Comentarios",summary:"Esta área contiene {summary_sensors} y {summary_automations}.",summary_sensors:"{number} {number, plural,\n one {sensor}\n other {sensores}\n}",summary_automations:"{number} {number, plural,\n one {automatizacion}\n other {automatizaciones}\n}"},actions:{add:"Agregar"}}},dialogs:{create_area:{title:"Nueva área",fields:{copy_from:"Copiar la configuración de"}},edit_area:{title:"Editando área ''{'area}''",name_warning:"Nota: cambiar el nombre cambiará el ID de la entidad."},remove_area:{title:"¿Eliminar área?",description:"¿Está seguro de que desea eliminar esta área? Esta área contiene {sensors} sensores y {automations} automatizaciones que también se eliminarán."},edit_master:{title:"Configuración maestra"},disable_master:{title:"¿Deshabilitar maestro?",description:"¿Está seguro de que desea eliminar la alarma maestra? Esta área contiene {sensors} sensores y {automations} automatizaciones que también se eliminarán."}}},sensors:{title:"Sensores",cards:{sensors:{description:"Sensores configurados actualmente. Haga clic en una entidad para realizar cambios.",table:{no_items:"No hay sensores para mostrar aquí.",no_area_warning:"El sensor no está asignado a ningún área.",arm_modes:"Modos de armado",always_on:"(Siempre)"}},add_sensors:{title:"Agregar sensores",description:"Agrega más sensores. Asegúrate de que tus sensores tengan un nombre amigable, para que puedas identificarlos.",no_items:"No hay entidades HA disponibles que se puedan configurar para la alarma. Asegúrese de incluir entidades del tipo sensor binario.",table:{type:"Tipo detectado"},actions:{add_to_alarm:"agregar a la alarma",filter_supported:"Ocultar elementos con tipo desconocido"}},editor:{title:"Editar sensor",description:"Configurando los ajustes del sensor de ''{'entity}''.",fields:{area:{heading:"Área",description:"Seleccione un área que contenga este sensor."},group:{heading:"Grupo",description:"Agrupar con otros sensores para un disparado combinado."},device_type:{heading:"Tipo de dispositivo",description:"Elija un tipo de dispositivo para aplicar automáticamente la configuración adecuada.",choose:{door:{name:"Puerta",description:"Una puerta, portón u otra entrada que se utilice para entrar / salir de la casa."},window:{name:"Ventana",description:"Una ventana o una puerta que no se use para entrar a la casa, como un balcón."},motion:{name:"Movimiento",description:"Sensor de presencia o dispositivo similar que tiene un retardo entre activaciones."},tamper:{name:"Sabotaje",description:"Detector de extracción de la cubierta del sensor, sensor de rotura de vidrio, etc."},environmental:{name:"Medioambiental",description:"Sensor de humo / gas, detector de fugas, etc. (no relacionado con la protección antirrobo)."},other:{name:"Genérico"}}},always_on:{heading:"Siempre encendido",description:"El sensor siempre debe activar la alarma."},modes:{heading:"Modos habilitados",description:"Modos de alarma en los que este sensor está activo."},arm_on_close:{heading:"Armar después de cerrar",description:"Después de la desactivación de este sensor, se saltará automáticamente el retardo de salida restante."},use_exit_delay:{heading:"Usar retardo de salida",description:"Se permite que el sensor esté activo cuando comienza el retardo de salida."},use_entry_delay:{heading:"Usar retardo de entrada",description:"La activación del sensor activa la alarma después del retardo de entrada en lugar de directamente."},allow_open:{heading:"Permitir abrir mientras se arma",description:"Si el sensor aún está activo después del retardo de salida, esto no hará que falle el armado."},auto_bypass:{heading:"Omitir automáticamente",description:"Excluya este sensor de la alarma si está abierto mientras se arma.",modes:"Modos en los que se puede omitir el sensor"},trigger_unavailable:{heading:"Activar cuando no esté disponible",description:"Cuando el estado del sensor se vuelve 'no disponible', esto activará el sensor."}},actions:{toggle_advanced:"Configuración avanzada",remove:"Eliminar",setup_groups:"Configuraar grupos"},errors:{description:"Por favor, corrija los siguientes errores:",no_area:"No se ha seleccionado ninguna área",no_modes:"No se han seleccionados modos para los que el sensor deba estar activo",no_auto_bypass_modes:"No se han seleccionados modos para los que el sensor pueda ser omitido"}}},dialogs:{manage_groups:{title:"Administrar grupos de sensores",description:"En un grupo de sensores, se deben activar varios sensores dentro de un período de tiempo antes de que se dispare la alarma.",no_items:"Todavía no hay grupos",actions:{new_group:"Nuevo grupo"}},create_group:{title:"Nuevo grupo de sensores",fields:{name:{heading:"Nombre",description:"Nombre del grupo de sensores"},timeout:{heading:"Tiempo muerto",description:"Período de tiempo durante el cual las activaciones consecutivas del sensor activan la alarma."},sensors:{heading:"Sensores",description:"Seleccione los sensores que están contenidos en este grupo."}},errors:{invalid_name:"Nombre proporcionado no válido.",insufficient_sensors:"Se deben seleccionar al menos 2 sensores."}},edit_group:{title:"Editar grupo de sensores '{name}'"}}},codes:{title:"Códigos",cards:{codes:{description:"Cambiar la configuración del código.",fields:{code_arm_required:{heading:"Usar código de armado",description:"Requiere un código para armar la alarma."},code_disarm_required:{heading:"Usar código de desarmado",description:"Requiere un código para desarmar la alarma."},code_format:{heading:"Formato del código",description:"Establece el tipo de entrada para la tarjeta de la alarma.",code_format_number:"código PIN",code_format_text:"contraseña"}}},user_management:{title:"Gestión de usuarios",description:"Cada usuario tiene su propio código para armar / desarmar la alarma.",no_items:"Aún no hay usuarios",actions:{new_user:"nuevo usuario"}},new_user:{title:"Crear nuevo usuario",description:"Se pueden crear usuarios para proporcionar acceso a la operación de la alarma.",fields:{name:{heading:"Nombre",description:"Nombre del usuario."},code:{heading:"Código",description:"Código para este usuario."},confirm_code:{heading:"Confirmar código",description:"Repite el código."},can_arm:{heading:"Permitir código para armar",description:"Al ingresar este código se activa la alarma."},can_disarm:{heading:"Permitir código para desarmar",description:"Al ingresar este código se desactiva la alarma."},is_override_code:{heading:"Es un código de anulación",description:"Al ingresar este código se forzará el armado de la alarma."},area_limit:{heading:"Áreas restringidas",description:"Limitar al usuario a controlar solo las áreas seleccionadas"}},errors:{no_name:"No se proporcionó ningún nombre.",no_code:"El código debe tener 4 caracteres / números como mínimo.",code_mismatch:"Los códigos no coinciden."}},edit_user:{title:"Editar usuario",description:"Cambiar la configuración del usuario ''{'name}''.",fields:{old_code:{heading:"Código actual",description:"Código actual, déjelo en blanco para no modificarlo."}}}}},actions:{title:"Acciones",cards:{notifications:{title:"Notificaciones",description:"Usando este panel, puede administrar las notificaciones que se enviarán durante un evento de alarma determinado.",table:{no_items:"Aún no se han creado notificaciones.",no_area_warning:"La acción no está asignada a ningún área."},actions:{new_notification:"nueva notificación"}},actions:{description:"Este panel se puede utilizar para cambiar un dispositivo cuando cambia el estado de alarma.",table:{no_items:"Aún no se han creado acciones."},actions:{new_action:"nueva acción"}},new_notification:{title:"Crear notificación",description:"Crear una nueva notificación.",trigger:"Condición",action:"Tarea",options:"Opciones",fields:{event:{heading:"Evento",description:"Cuándo debe enviarse la notificación.",choose:{armed:{name:"La alarma está armada",description:"La alarma está correctamente armada."},disarmed:{name:"La alarma está desarmada",description:"La alarma está desarmada."},triggered:{name:"Se ha disparado la alarma",description:"La alarma se ha disparado."},arm_failure:{name:"No se pudo armar",description:"El armado de la alarma falló debido a uno o más sensores abiertos."},arming:{name:"Se ha iniciado el retardo de salida",description:"Se ha iniciado el retardo de salida, listo para salir de la casa."},pending:{name:"Se ha iniciado el retardo de entrada",description:"Se ha iniciado el retardo de entrada, la alarma se disparará pronto."}}},mode:{heading:"Modo",description:"Limita la acción a modos de armado específicos (opcional)."},title:{heading:"Título",description:"Título del mensaje de notificación."},message:{heading:"Mensaje",description:"Contenido del mensaje de notificación.",insert_wildcard:"Insertar comodín",placeholders:{armed:"La alarma está configurada en {{arm_mode}}",disarmed:"Ahora la alarma está APAGADA",triggered:"¡Se ha disparado la alarma! Causa: {{open_sensors}}.",arm_failure:"No se pudo armar la alarma en este momento debido a: {{open_sensors}}.",arming:"Se armará pronto la alarma, por favor, salga de la casa.",pending:"¡La alarma está a punto de dispararse, desarme rápidamente!"}},open_sensors_format:{heading:"Formato para el comodín open_sensors",description:"Elija qué información del sensor se inserta en el mensaje",options:{default:"Nombres y estados",short:"Solo nombres"}},arm_mode_format:{heading:"Traducción del comodín arm_mode",description:"Elija en qué idioma se inserta el modo de armado en el mensaje"},target:{heading:"Objetivo",description:"Dispositivo al que enviar el mensaje push."},name:{heading:"Nombre",description:"Descripción de esta notificación.",placeholders:{armed:"Notificar a {target} al armar",disarmed:"Notificar a {target} al desarmar",triggered:"Notificar a {target} cuando se dispare",arm_failure:"Notificar a {target} si falla",arming:"Notificar a {target} cuando se vaya",pending:"Notificar a {target} cuando llegue"}},delete:{heading:"Eliminar automatización",description:"Eliminar esta automatización de forma permanente"}},actions:{test:"Pruébelo"}},new_action:{title:"Crear acción",description:"Este panel se puede utilizar para cambiar un dispositivo cuando cambia el estado de la alarma.",fields:{event:{heading:"Evento",description:"¿Cuándo debe ejecutarse la acción?"},area:{heading:"Área",description:"Área para la que se aplica el evento, déjelo en blanco para seleccionar la alarma global."},mode:{heading:"Modo",description:"Limita la acción a modos de armado específicos (opcional)"},entity:{heading:"Entidad",description:"Entidad sobre la que realizar la acción."},action:{heading:"Acción",description:"Acción a realizar en la entidad.",no_common_actions:"Las acciones solo se pueden asignar en modo YAML para las entidades seleccionadas."},name:{heading:"Nombre",description:"Descripción de esta acción.",placeholders:{armed:"Establecer {entity} en {state} al armar",disarmed:"Establecer {entity} en {state} al desarmar",triggered:"Establecer {entity} en {state} cuando se dispare",arm_failure:"Establecer {entity} en {state} si falla",arming:"Establecer {entity} en {state} cuando se vaya",pending:"Establecer {entity} en {state} cuando llegue"}}}}}}},ut={common:dt,components:ct,title:"Panel de alarma",panels:ht},mt=Object.freeze({__proto__:null,common:dt,components:ct,title:"Panel de alarma",panels:ht,default:ut}),pt={modes_short:{armed_away:"Eemal",armed_home:"Kodus",armed_night:"Ööseks",armed_custom_bypass:"Valikuline",armed_vacation:"Vacation"},enabled:"Lubatud",disabled:"Keelatud"},gt={time_slider:{seconds:"sek",minutes:"min",infinite:"piiranguta",none:"puudub"},editor:{ui_mode:"Kasutajaliides",yaml_mode:"Koodiredaktor",edit_in_yaml:"Edit in YAML"},table:{filter:{label:"Filter items",item:"Filter by {name}",hidden_items:"{number} {number, plural,\n one {item is}\n other {items are}\n} hidden"}}},vt={general:{title:"Üldsätted",cards:{general:{description:"Need seaded kehtivad kõikides valve olekutes.",fields:{disarm_after_trigger:{heading:"Häire summutamine",description:"Peale häire lõppu võta valvest maha miite ära valvesta uuesti."},enable_mqtt:{heading:"Luba MQTT juhtimine",description:"Luba nupustiku juhtimist MQTT abil."},enable_master:{heading:"Luba põhivalvestus",description:"Loob olemi mis haldab kõiki valvestamise alasid korraga."}},actions:{setup_mqtt:"MQTT seadistamine",setup_master:"Põhivalvestuse sätted"}},modes:{title:"Režiimid",description:"Selles vaates seadistatakse valvestamise režiime.",modes:{armed_away:"Täielik valvestamine kui kedagi pole kodus. Kasutusel on kõik andurid.",armed_home:"Valvestatud kodus ei kasuta liikumisandureid kuid väisuksed ja aknad on valve all.",armed_night:"Valvestatud ööseks ei kasuta määratud liikumisandureid, välisperimeeter on valve all.",armed_vacation:"Armed vacation can be used as an extension to the armed away mode in case of absence for longer duration. The delay times and trigger responses can be adapted (as desired) to being distant from home.",armed_custom_bypass:"Valikulise valvestuse puhul saab määrata kasutatavad andurid."},number_sensors_active:"{number} {number, plural,\n one {andur}\n other {andurit}\n} aktiiv",fields:{status:{heading:"Status",description:"Controls whether the alarm can be armed in this mode."},exit_delay:{heading:"Ooteaeg valvestamisel",description:"Viivitus enne valvestamise rakendumist."},entry_delay:{heading:"Sisenemise viivitus",description:"Viivitus sisenemisel enne häire rakendumist."},trigger_time:{heading:"Häire kestus",description:"Sireeni jne. aktiveerimise kestus."}}},mqtt:{title:"MQTT sätted",description:"MQTT parameetrite seadistamine.",fields:{state_topic:{heading:"Oleku teema (topic)",description:"Teema milles avaldatakse oleku muutused."},event_topic:{heading:"Event topic",description:"Topic on which alarm events are published"},command_topic:{heading:"Käskude teema (topic)",description:"Teema milles avaldatakse valvestamise käsud."},require_code:{heading:"Nõua PIN koodi",description:"Käskude edastamiseks on vajalik PIN kood."},state_payload:{heading:"Määra olekute toimeandmed",item:"Määra oleku ''{state}'' toimeandmed"},command_payload:{heading:"Määra käskude toimeandmed",item:"Määra käsu ''{command}'' toimeandmed"}}},areas:{title:"Alad",description:"Alasid kasutatakse elamise jagamiseks valvetsoonideks.",no_items:"Valvestamise alad on loomata.",table:{remarks:"Ala teave",summary:"See ala sisaldab {summary_sensors} ja {summary_automations}.",summary_sensors:"{number} {number, plural,\n one {andur}\n other {andurit}\n}",summary_automations:"{number} {number, plural,\n one {automatiseering}\n other {automatiseeringut}\n}"},actions:{add:"Lisa"}}},dialogs:{create_area:{title:"Uus ala",fields:{copy_from:"Kopeeri sätted allikast:"}},edit_area:{title:"Ala ''{area}'' muutmine",name_warning:"NB! Nime muutmisel muutub ka olemi ID"},remove_area:{title:"Kas kustutada ala?",description:"Kas kustutada see ala? Ala kaasab andurid {sensors} ja automatiseeringud {automations} mis samuti eemaldatakse."},edit_master:{title:"Põhiala seaded"},disable_master:{title:"Kas keelata põhiala?",description:"Kas keelata põhiala? Ala kaasab andurid {sensors} ja automatiseeringud {automations} mis samuti eemaldatakse.."}}},sensors:{title:"Andurid",cards:{sensors:{description:"Kasutusel olevad andurid. Klõpsa olemil, et seadistada.",table:{no_items:"Andureid pole lisatud. Alustuseks lisa mõni andur.",no_area_warning:"Sensor is not assigned to any area.",arm_modes:"Valvestamise olek",always_on:"(alati)"}},add_sensors:{title:"Andurite lisamine",description:"Lisa veel andureid. Mõistlik on panna neile arusaadav nimi (friendly_name).",no_items:"Puuduvad valvestamiseks sobivad Home Assistanti olemid. Lisatavad olemid peavad olema olekuandurid (binary_sensor).",table:{type:"Detected type"},actions:{add_to_alarm:"Lisa valvesüsteemile",filter_supported:"Hide items with unknown type"}},editor:{title:"Andurite sätted",description:"Muuda olemi ''{entity}'' sätteid.",fields:{area:{heading:"Ala",description:"Vali ala kus see andur asub."},group:{heading:"Group",description:"Group with other sensors for combined triggering."},device_type:{heading:"Seadme tüüp",description:"Vali anduri tüüp, et automaatselt rakendada sobivad sätted.",choose:{door:{name:"Uks",description:"Uks, värav või muu piire mida kasutatakse sisenemiseks või väljumiseks."},window:{name:"Aken",description:"Aken või uks mida ei kasutata sisenemiseks nagu rõduuks."},motion:{name:"Liikumisandur",description:"Kohaloleku andurid mille rakendumiste vahel on viide."},tamper:{name:"Terviklikkus",description:"Anduri muukimine või klaasipurustusandur jms."},environmental:{name:"Ohu andurid",description:"Suitsu või gaasilekke andur, veeleke jne. (ei ole seotud sissetungimisega)."},other:{name:"Tavaandur"}}},always_on:{heading:"Alati kasutusel",description:"Andur käivitab häire igas valve olekus."},modes:{heading:"Valve olekute valik",description:"Valve olekud kus seda andurit kasutatakse."},arm_on_close:{heading:"Valvesta sulgemisel",description:"Selle anduri rakendumisel valvestatakse kohe ilma viiveta."},use_exit_delay:{heading:"Use exit delay",description:"Sensor is allowed to be active when the exit delay starts."},use_entry_delay:{heading:"Use entry delay",description:"Sensor activation triggers the alarm after the entry delay rather than directly."},allow_open:{heading:"Lahkumisviivitus",description:"See andur ei aktiveeru enne lahkumisviivituse lõppu."},auto_bypass:{heading:"Bypass automatically",description:"Exclude this sensor from the alarm if it is open while arming.",modes:"Modes in which sensor may be bypassed"},trigger_unavailable:{heading:"Andurite saadavus",description:"Käivita häire kui andur muutub kättesaamatuks."}},actions:{toggle_advanced:"Täpsemad sätted",remove:"Eemalda",setup_groups:"Setup groups"},errors:{description:"Palun paranda jägmised vead:",no_area:"Ala pole määratud",no_modes:"Anduri tüüp on määramata, ei tea kuida kasutada",no_auto_bypass_modes:"No modes are selected for the sensor may be automatically bypassed"}}},dialogs:{manage_groups:{title:"Manage sensor groups",description:"In a sensor group multiple sensors must be activated within a time period before the alarm is triggered.",no_items:"No groups yet",actions:{new_group:"New group"}},create_group:{title:"New sensor group",fields:{name:{heading:"Name",description:"Name for sensor group"},timeout:{heading:"Time-out",description:"Time period during which consecutive sensor activations triggers the alarm."},sensors:{heading:"Sensors",description:"Select the sensors which are contained by this group."}},errors:{invalid_name:"Invalid name provided.",insufficient_sensors:"At least 2 sensors need to be selected."}},edit_group:{title:"Edit sensor group ''{name}''"}}},codes:{title:"Koodid",cards:{codes:{description:"Valvestuskoodide muutmine.",fields:{code_arm_required:{heading:"Valvestamine koodiga",description:"Valvestamiseks tuleb sisestada kood"},code_disarm_required:{heading:"Valvest vabastamise kood",description:"Valvest vabastamiseks tulem sisestada kood"},code_format:{heading:"Koodi vorming",description:"Kasutajaliidese koodi tüübid.",code_format_number:"PIN kood",code_format_text:"Salasõna"}}},user_management:{title:"Kasutajate haldus",description:"Igal kasutajal on oma juhtkood.",no_items:"Kasutajaid pole määratud",actions:{new_user:"Uus kasutaja"}},new_user:{title:"Lisa uus kasutaja",description:"Valvesüsteemi kasutaja lisamine.",fields:{name:{heading:"Nimi",description:"Kasutaja nimi."},code:{heading:"Valvestuskood",description:"Selle kasutaja kood."},confirm_code:{heading:"Koodi kinnitamine",description:"Sisesta sama kood uuesti."},can_arm:{heading:"Tohib valvestada",description:"Koodi sisestamine valvestab."},can_disarm:{heading:"Tohib valvest maha võtta",description:"Koodi sisestamine võtab valvest maha."},is_override_code:{heading:"Alistuskood",description:"Koodi sisestamine käivitab kohese häire"},area_limit:{heading:"Restricted areas",description:"Limit user to control only the selected areas"}},errors:{no_name:"Nimi puudub.",no_code:"Kood peab olema vhemalt 4 tärki.",code_mismatch:"Sisestatud koodid ei klapi."}},edit_user:{title:"Muuda kasutaja sätteid",description:"Muuda kasutaja ''{name}'' sätteid.",fields:{old_code:{heading:"Kehtiv kood",description:"Kehtiv kood, jäta tühjaks kui ei taha muuta."}}}}},actions:{title:"Toimingud",cards:{notifications:{title:"Teavitused",description:"Halda saadetavaid teavitusi",table:{no_items:"Teavitusi pole veel loodud.",no_area_warning:"Action is not assigned to any area."},actions:{new_notification:"Uus teavitus"}},actions:{description:"Arenduses, mõeldud seadmete lülitamiseks.",table:{no_items:"Toiminguid pole veel määratud."},actions:{new_action:"Uus toiming"}},new_notification:{title:"Loo teavitus",description:"Uue teavituse loomine.",trigger:"Condition",action:"Task",options:"Options",fields:{event:{heading:"Sündmus",description:"Mille puhul teavitada",choose:{armed:{name:"Valvestatud",description:"Valvestamine oli edukas"},disarmed:{name:"Valvest maas",description:"Valve mahavõtmine õnnestus"},triggered:{name:"Häire",description:"Valvesüsteem andis häire"},arm_failure:{name:"Valvestamine nurjus",description:"Valvestamine ei õnnestunud mõne anduri oleku või vea tõttu"},arming:{name:"Valvestamise eelne viivitus algas",description:"Algas valvestamise eelviide, majast võib lahkuda."},pending:{name:"Sisenemise viide rakendus",description:"Märgati sisenemist, häire rakendub peale viidet."}}},mode:{heading:"Olek",description:"Millises valve olekus teavitada (valikuline)"},title:{heading:"Päis",description:"Teavitussõnumi päis"},message:{heading:"Sisu",description:"Teavitussõnumi tekst",insert_wildcard:"Insert wildcard",placeholders:{armed:"The alarm is set to {{arm_mode}}",disarmed:"The alarm is now OFF",triggered:"The alarm is triggered! Cause: {{open_sensors}}.",arm_failure:"The alarm could not be armed right now, due to: {{open_sensors}}.",arming:"The alarm will be armed soon, please leave the house.",pending:"The alarm is about to trigger, disarm it quickly!"}},open_sensors_format:{heading:"Format for open_sensors wildcard",description:"Choose which sensor information in inserted in the message",options:{default:"Names and states",short:"Names only"}},arm_mode_format:{heading:"Translation for arm_mode wildcard",description:"Choose in which language the arm mode is inserted in the message"},target:{heading:"Saaja",description:"Seade millele edastada teavitus"},name:{heading:"Nimi",description:"Teavituse kirjeldus",placeholders:{armed:"Notify {target} upon arming",disarmed:"Notify {target} upon disarming",triggered:"Notify {target} when triggered",arm_failure:"Notify {target} on failure",arming:"Notify {target} when leaving",pending:"Notify {target} when arriving"}},delete:{heading:"Delete automation",description:"Permanently remove this automation"}},actions:{test:"Try it"}},new_action:{title:"Loo toiming",description:"Seadme oleku muutmine valve oleku muutmisel.",fields:{event:{heading:"Sündmus",description:"Millisel juhul käivitada toiming"},area:{heading:"Ala",description:"Ala millele sündmus rakendub, põhiala puhul jäta tühjaks."},mode:{heading:"Olek",description:"Millises valve olekus toiming käivitada (valikuline)"},entity:{heading:"Olem",description:"Toimingu olem"},action:{heading:"Toiming",description:"Olemi toiming",no_common_actions:"Actions can only be assigned in YAML mode for the selected entities."},name:{heading:"Nimi",description:"Toimingu kirjeldus",placeholders:{armed:"Set {entity} to {state} upon arming",disarmed:"Set {entity} to {state} upon disarming",triggered:"Set {entity} to {state} when triggered",arm_failure:"Set {entity} to {state} on failure",arming:"Set {entity} to {state} when leaving",pending:"Set {entity} to {state} when arriving"}}}}}}},ft={common:pt,components:gt,title:"Alarm panel",panels:vt},_t=Object.freeze({__proto__:null,common:pt,components:gt,title:"Alarm panel",panels:vt,default:ft}),bt={modes_short:{armed_away:"Absence",armed_home:"Présence",armed_night:"Nuit",armed_custom_bypass:"Personnalisé",armed_vacation:"Vacances"},enabled:"Actif",disabled:"Inactif"},yt={time_slider:{seconds:"sec",minutes:"min",infinite:"infini",none:"Aucune"},editor:{ui_mode:"Afficher l'éditeur visuel",yaml_mode:"Afficher l'éditeur de code",edit_in_yaml:"Editer en YAML"},table:{filter:{label:"Filtrer par items",item:"Filtrer par {name}",hidden_items:"{number} {number, plural,\n one { item est caché}\n other { items sont cachés}\n} "}}},wt="Configuration de l' alarme",kt={general:{title:"Généraux",cards:{general:{description:"Ce panneau définit les paramètres globaux de l'alarme.",fields:{disarm_after_trigger:{heading:"Désactivation après déclenchement",description:"Lors que le temps de fonctionnement de la sirène est écoulé, désactive l'alarme au lieu de la réactiver."},enable_mqtt:{heading:"Utilisation avec MQTT",description:"Permet au panneau d'alarme d'être contrôlé via MQTT."},enable_master:{heading:"Activation de commande centralisée",description:"Créer une entité pour piloter toutes les zones en même temps."}},actions:{setup_mqtt:"Configuration MQTT",setup_master:"Configuration pricipale"}},modes:{title:"Modes",description:"Ce panneau définit le mode de gestion pour chaque type d'activation.",modes:{armed_away:"Ce mode sera utilisé lorsque toutes les personnes auront quitté la maison. Toutes les portes et fenêtres permettant l'accès à la maison seront surveillées, les détecteurs de mouvement à l'intérieur de la maison seront opérationnels.",armed_home:"Ce mode sera utilisée lorsque des personnes sont dans la maison. Toutes les portes et fenêtres permettant l'accès à la maison seront surveillées (périmétrie), les détecteurs de mouvement à l'intérieur de la maison seront inopérants.",armed_night:"Ce mode sera utilisé lors du réglage de l'alarme avant de s'endormir. Toutes les portes et fenêtres permettant l'accès à la maison seront surveillées, et les capteurs de mouvement sélectionnés (ex : rez de chaussée) dans la maison seront opérationnels.",armed_vacation:"Ce mode peut être utilisé comme une extension du mode armé absent en cas d'absence pour une durée plus longue. Les temps de retard et les réponses de déclenchement peuvent être adaptés (au choix) à l'éloignement du domicile.",armed_custom_bypass:"Ce mode supplémentaire permet de définir votre propre périmètre de sécurité."},number_sensors_active:"{number} {number, plural,\n one {capteur actif}\n other {capteurs actifs}\n} ",fields:{status:{heading:"Statut",description:"Active l'alarme dans ce mode."},exit_delay:{heading:"Délai pour sortir",description:"Lors de l'activation, pendant cette période, les capteurs ne déclencheront pas l'alarme."},entry_delay:{heading:"Délai pour entrer",description:"Temps d'attente avant que l'alarme ne se déclenche après détection d'un des capteurs."},trigger_time:{heading:"Temps de fonctionnement",description:"Temps de fonctionnement de la sirène"}}},mqtt:{title:"Configuration MQTT",description:"Ce panneau peut être utilisé pour la configuration de l'interface MQTT.",fields:{state_topic:{heading:"Etat des données",description:"Donnée sur laquelle les mises à jour d'état sont publiées"},event_topic:{heading:"Evènement de données",description:"Donnée sur laquelle les évènements d'état sont publiés"},command_topic:{heading:"Commande de données",description:"Donnée sur laquelle les commandes d'armement / désarmement sont envoyées."},require_code:{heading:"Code requis",description:"Exige que le code soit envoyé avec la commande."},state_payload:{heading:"Configurer une valeur par état",item:"Définir une valeur par état ''{state}''"},command_payload:{heading:"Configurer une valeur par commande",item:"Définir une valeur par commande ''{command}''"}}},areas:{title:"Zones",description:"Les zones peuvent être utilisées pour diviser votre système d'alarme en plusieurs secteurs.",no_items:"Il n'y a pas encore de zone définie.",table:{remarks:"Remarque",summary:"Cette zone contient des {summary_sensors} et {summary_automations}.",summary_sensors:"{number} {number, plural,\n one {capteur}\n other {capteurs}\n}",summary_automations:"{number} {number, plural,\n one {automatisation}\n other {automatisations}\n}"},actions:{add:"Ajouter"}}},dialogs:{create_area:{title:"Nouvelle zone",fields:{copy_from:"Copier les paramètres"}},edit_area:{title:"Editer la zone ''{area}''",name_warning:"Note: Changer le nom, changera l'entity ID"},remove_area:{title:"Suppression de zone?",description:"Etes vous sur de vouloir supprimer cette zone? Cette zone contient {sensors} des capteurs et {automations} automatisations, qui seront également supprimés."},edit_master:{title:"Configuration principale"},disable_master:{title:"Désactiver la configuration principale?",description:"Etes vous sur de vouloir supprimer la configuration principale? Cette zone contient {automations} automatisations, qui seront également supprimées."}}},sensors:{title:"Capteurs",cards:{sensors:{description:"Capteurs actuellement configurés. Cliquez sur une entité pour apporter des modifications.",table:{no_items:"Il n'y a pas encore de capteur ajouté à l'alarme. Assurez-vous de les ajouter d'abord.",no_area_warning:"Le capteur n'est affecté à aucune zone.",arm_modes:"Type d'activation",always_on:"(Toujours)"}},add_sensors:{title:"Ajouter un capteur",description:"Ajoutez plus de capteurs. Assurez-vous que vos capteurs ont un nom personnalisé afin de pouvoir les identifier.",no_items:"Aucune entité HA disponible ne peut être configurée pour l'alarme. Assurez-vous d'inclure les entités de type binary_sensor.",table:{type:"Type de détection"},actions:{add_to_alarm:"Ajouter à l'alarme",filter_supported:"Masquer les éléments de type inconnu"}},editor:{title:"Editer un capteur",description:"Configurer les paramètres du capteur ''{entity}''.",fields:{area:{heading:"Zone",description:"Selectionner une zone contenant ce capteur."},group:{heading:"Groupe",description:"Grouper avec d'autres capteurs pour un déclenchement combiné."},device_type:{heading:"Type de détection",description:"Choisissez un type de détection pour appliquer automatiquement les paramètres appropriés.",choose:{door:{name:"Porte",description:"Une porte, un portail ou une autre entrée utilisée pour entrer / sortir de la maison."},window:{name:"Fenêtre",description:"Une fenêtre, ou une porte non utilisée pour entrer dans la maison comme un balcon."},motion:{name:"Mouvement",description:"Capteur de présence ou appareil similaire présentant un délai entre les activations."},tamper:{name:"Effraction",description:"Détection d'arrachage du capteur, capteur de bris de verre, etc.."},environmental:{name:"Détecteur Environmental",description:"Détecteur de fumée / gaz, détecteur de fuite, etc. (non lié à la protection anti-effraction)."},other:{name:"Générique"}}},always_on:{heading:"Toujours en service",description:"Le capteur doit toujours déclencher l'alarme."},modes:{heading:"Mode possible",description:"Modes d'alarme dans lesquels ce capteur est actif."},arm_on_close:{heading:"Activer après fermeture",description:"Après la désactivation de ce capteur, le délai de sortie restant sera automatiquement ignoré."},use_exit_delay:{heading:"Utiliser le délai de sortie",description:"Le capteur sera actif à la fin du délai de sortie."},use_entry_delay:{heading:"Utiliser le délai d'entrée",description:"L'activation du capteur déclenche l'alarme après le délai d'entrée plutôt qu'instantanément."},allow_open:{heading:"Autoriser l'ouverture lors de l'activation",description:"Permet à ce capteur d'être actif, peu de temps après votre départ afin qu'il ne bloque pas l'armement."},auto_bypass:{heading:"Bypass automatique",description:"Exclut ce capteur de l'alarme s'il est ouvert lors de l'armement.",modes:"Modes dans lesquels le capteur peut être ignoré"},trigger_unavailable:{heading:"Déclenchement lorsqu'il n'est pas disponible",description:"Lorsque l'état du capteur devient `` indisponible '', cela activera l'alarme."}},actions:{toggle_advanced:"Paramètres avancées",remove:"Supprimer",setup_groups:"Configuration de Groupe"},errors:{description:"Veuillez corriger les erreurs suivantes:",no_area:"Aucune zone n'est sélectionnée",no_modes:"Aucun mode sélectionné pour lequel le capteur doit être actif",no_auto_bypass_modes:"Aucun mode n'est sélectionné car le capteur peut être automatiquement ignoré"}}},dialogs:{manage_groups:{title:"Gérer les groupes de capteurs",description:"Dans un groupe de capteurs, plusieurs capteurs doivent être activés dans un laps de temps avant que l'alarme ne se déclenche.",no_items:"Aucun groupe",actions:{new_group:"Nouveau groupe"}},create_group:{title:"Nouveau groupe de capteurs",fields:{name:{heading:"Nom",description:"Nom du nouveau groupe de capteurs"},timeout:{heading:"Laps de temps",description:"Période de temps pendant laquelle les activations consécutives du capteur déclenchent l'alarme."},sensors:{heading:"Capteurs",description:"Sélectionnez les capteurs qui sont contenus dans ce groupe."}},errors:{invalid_name:"Nom fourni non valide.",insufficient_sensors:"Au moins 2 capteurs doivent être sélectionnés."}},edit_group:{title:"Editer le groupe de capteurs ''{name}''"}}},codes:{title:"Codes",cards:{codes:{description:"Gestion des paramètres des codes.",fields:{code_arm_required:{heading:"Utiliser un code pour l'activation",description:"Code requis pour l'activation de l'alarme"},code_disarm_required:{heading:"Utiliser un code pour la désactivation",description:"Code requis pour la désactivation de l'alarme"},code_format:{heading:"Format du code",description:"Définit le type d'entrée pour la carte d'alarme Lovelace.",code_format_number:"pincode",code_format_text:"password"}}},user_management:{title:"Gestion des utilisateurs",description:"Chaque utilisateur a son propre code pour activer / désactiver l'alarme.",no_items:"Il n'y a aucun utilisateur de défini",actions:{new_user:"Nouvel utilisateur"}},new_user:{title:"Créer un nouvel utilisateur",description:"Des utilisateurs peuvent être créés pour donner accès au fonctionnement de l'alarme.",fields:{name:{heading:"Nom",description:"Nom de l'utilisateur."},code:{heading:"Code",description:"Code personnel de l'utilisateur."},confirm_code:{heading:"Confirmation du code",description:"Répèter le code."},can_arm:{heading:"Demande de code pour l'activation",description:"Entrer ce code pour activer l'alarme."},can_disarm:{heading:"Demande de code pour désactivation",description:"Entrer ce code pour désactiver l'alarme."},is_override_code:{heading:"Code de sécurité",description:"La saisie de ce code forcera l'activation l'alarme."},area_limit:{heading:"Zones Restreintes",description:"L'utilisateur ne peut contrôler uniquement les zones sélectionnées"}},errors:{no_name:"Aucun nom saisi.",no_code:"Le code doit contenir 4 caractères/chiffres minimum.",code_mismatch:"Les codes sont différents."}},edit_user:{title:"Editer l'utilisateur",description:"Changer la configuration pour l'utilisateur ''{name}''.",fields:{old_code:{heading:"Code utilisé",description:"Code actuel, laissez vide pour ne rien changer."}}}}},actions:{title:"Actions",cards:{notifications:{title:"Notifications",description:"À l'aide de ce panneau, vous pouvez gérer les notifications à envoyer lors d'un évènement d'alarme",table:{no_items:"Il n'y a aucune notification de créée.",no_area_warning:"L'action n'est affectée à aucune zone."},actions:{new_notification:"Nouvelle notification"}},actions:{description:"Ce panneau est utilisé pour changer d'état les appareils de votre choix.",table:{no_items:"Il n'y a aucune action de créer."},actions:{new_action:"Nouvelle action"}},new_notification:{title:"Créer une notification",description:"Créer une nouvelle notification.",trigger:"Condition",action:"Action",options:"Options",fields:{event:{heading:"Evènement",description:"Détermine quand la notification doit être envoyée",choose:{armed:{name:"Alarme activée ",description:"l'alarme s'est correctement activée"},disarmed:{name:"Alarme désactivée",description:"L'alarme est désactivée"},triggered:{name:"Alarme déclenchée",description:"L'alarme est déclenchée"},arm_failure:{name:"Armement impossible",description:"L'armement est impossible dû à un ou plusieurs capteurs"},arming:{name:"Délai de sortie activé",description:"Le délai de sortie est activé, vous devez quitter la maison."},pending:{name:"Délai d'entrée activé",description:"Le délai d'entrée est activé, sans action de désarmement, l'alarme va se déclencher."}}},mode:{heading:"Mode",description:"Limite la notification à un mode spécifique (optionnel)"},title:{heading:"Titre",description:"Titre du message de la notification"},message:{heading:"Message",description:"Contenu du message de la notification",insert_wildcard:"Inserer la wildcard",placeholders:{armed:"L'alarme est réglée sur {{arm_mode}}",disarmed:"L'alarme est maintenant désactivée",triggered:"L'alarme est déclenchée! En cause: {{open_sensors}}.",arm_failure:"L'alarme n'a pas pu être armée pour le moment, en cause: {{open_sensors}}.",arming:"L'alarme sera bientôt armée, veuillez quitter la maison.",pending:"L'alarme est sur le point de se déclencher, désarmez-la rapidement!"}},open_sensors_format:{heading:"Format pour les 'open_sensors wildcard'",description:"Choisissez les informations du capteur à insérer dans le message",options:{default:"Noms et états",short:"Noms seulement"}},arm_mode_format:{heading:"Traduction pour 'arm_mode wildcard'",description:"Choisissez dans quelle langue le mode d'armement est inséré dans le message"},target:{heading:"Cible",description:"Appareil recevant le message"},name:{heading:"Nom",description:"Description de la notification",placeholders:{armed:"Notification à l'armement de : {target}",disarmed:"Notification au désarmement de : {target}",triggered:"Notification au déclenchement de : {target}",arm_failure:"Notification en cas d'échec de : {target}",arming:"Notification en quittant de : {target}",pending:"Notification au retour de : {target}"}},delete:{heading:"Supprimer l'automatisme",description:"Supprimer définitivement cet automatisme"}},actions:{test:"Essai"}},new_action:{title:"Créer une action",description:"Ce panneau peut être utilisé pour commuter un appareil lorsque l'état de l'alarme change.",fields:{event:{heading:"Evènement",description:"Détermine quand l'action doit être exécutée"},area:{heading:"Zone",description:"Zone pour laquelle l'évènement s'applique, laissez vide pour sélectionner l'alarme globale."},mode:{heading:"Mode",description:"Limite l'action à un mode spécifique (optionnel)"},entity:{heading:"Entité",description:"Entité sur laquelle effectuer une action"},action:{heading:"Action",description:"Action à exécuter sur l'entité",no_common_actions:"Les actions ne peuvent être affectées qu'en mode YAML pour les entités sélectionnées."},name:{heading:"Nom",description:"Description de l'action",placeholders:{armed:"Mettre {entity} à {state} lors de l'armement",disarmed:"Mettre {entity} à {state} lors du désarmement",triggered:"Mettre {entity} à {state} lors du déclenchement de l'alarme",arm_failure:"Mettre {entity} à {state} en cas d'échec de l'armement",arming:"Mettre {entity} à {state} lors du départ de la maison",pending:"Mettre {entity} à {state} lors du retour à la maison"}}}}}}},$t={common:bt,components:yt,title:wt,panels:kt},At=Object.freeze({__proto__:null,common:bt,components:yt,title:wt,panels:kt,default:$t}),xt={modes_short:{armed_away:"Fuori casa",armed_home:"In casa",armed_night:"Notte",armed_custom_bypass:"Personalizzato",armed_vacation:"Vacation"},enabled:"Enabled",disabled:"Disabled"},Et={time_slider:{seconds:"sec",minutes:"min",infinite:"infinito",none:"niente"},editor:{ui_mode:"Passa a UI",yaml_mode:"Passa a YAML",edit_in_yaml:"Edit in YAML"},table:{filter:{label:"Filter items",item:"Filter by {name}",hidden_items:"{number} {number, plural,\n one {item is}\n other {items are}\n} hidden"}}},Ot={general:{title:"Generali",cards:{general:{description:"Questo pannello definisce alcune impostazioni da applicare alle modalità di allarme.",fields:{disarm_after_trigger:{heading:"Disattiva allarme dopo l'attivazione",description:"Dopo che il tempo di attivazione è scaduto, disattivare l'allarme invece di tornare allo stato inserito."},enable_mqtt:{heading:"Abilita MQTT",description:"Permetti al pannello allarme di essere controllato attraverso MQTT."},enable_master:{heading:"Enable alarm master",description:"Creates an entity for controlling all areas simultaneously."}},actions:{setup_mqtt:"Configurazione MQTT",setup_master:"Master Configuration"}},modes:{title:"Modes",description:"This panel can be used to set up the arm modes of the alarm.",modes:{armed_away:"Modalità 'fuori casa': da utilizzare quando tutte le persone lasciano la casa. Tutti i sensori di porte e finestre che consentono l'accesso alla casa saranno attivi, così come i sensori di movimento all'interno della casa.",armed_home:"Modalità 'in casa': da utilizzare quando si attiva l'allarme mentre le persone sono in casa. Tutti i sensori di porte e finestre che consentono l'accesso alla casa saranno attivi, ma non i sensori di movimento all'interno della casa.",armed_night:"Modalità 'notte': da utilizzare quando si imposta la sveglia prima di andare a dormire. Tutti i sensori di porte e finestre che consentono l'accesso alla casa saranno attivi e sensori di movimento selezionati (ad esempio al piano di sotto) nella casa.",armed_vacation:"Armed vacation can be used as an extension to the armed away mode in case of absence for longer duration. The delay times and trigger responses can be adapted (as desired) to being distant from home.",armed_custom_bypass:"Modalità 'personalizzato': da utilizzare per definire una modalità di allarme specifica per le esigenze dell'utilizzatore."},number_sensors_active:"{number} {number, plural,\n one {sensor}\n other {sensors}\n} active",fields:{status:{heading:"Status",description:"Controls whether the alarm can be armed in this mode."},exit_delay:{heading:"Tempo di preattivazione",description:"Quando si attiva l'allarme, entro questo periodo di tempo i sensori non attiveranno ancora l'allarme."},entry_delay:{heading:"Ritardo di attivazione",description:"Tempo di ritardo fino allo scatto dell'allarme dopo l'attivazione di uno dei sensori."},trigger_time:{heading:"Tempo di attivazione",description:"Tempo durante il quale suonerà la sirena"}}},mqtt:{title:"Configurazione MQTT",description:"Questo pannello può essere usato per le impostazioni MQTT.",fields:{state_topic:{heading:"Topic di stato",description:"Topic su cui vengono pubblicati gli aggiornamenti di stato"},event_topic:{heading:"Event topic",description:"Topic on which alarm events are published"},command_topic:{heading:"Topic di comando",description:"Topic su cui vengono inviati i comandi di inserimento / disinserimento."},require_code:{heading:"Richiedi Codice",description:"Richiedi il codice da inviare con il comando."},state_payload:{heading:"Configura payload per stato",item:"Definisci un payload per lo stato ''{state}''"},command_payload:{heading:"Configura payload per comando",item:"Definisci un payload per il comando ''{command}''"}}},areas:{title:"Areas",description:"Areas can be used for dividing your alarm system into multiple compartments.",no_items:"There are no areas defined yet.",table:{remarks:"Remarks",summary:"This area contains {summary_sensors} and {summary_automations}.",summary_sensors:"{number} {number, plural,\n one {sensor}\n other {sensors}\n}",summary_automations:"{number} {number, plural,\n one {automation}\n other {automations}\n}"},actions:{add:"Add"}}},dialogs:{create_area:{title:"New area",fields:{copy_from:"Copy settings from"}},edit_area:{title:"Editing area ''{area}''",name_warning:"Note: changing the name will change the entity ID"},remove_area:{title:"Remove area?",description:"Are you sure you want to remove this area? This area contains {sensors} sensors and {automations} automations, which will be removed as well."},edit_master:{title:"Master configuration"},disable_master:{title:"Disable master?",description:"Are you sure you want to remove the alarm master? This area contains {automations} automations, which will be removed with this action."}}},sensors:{title:"Sensori",cards:{sensors:{description:"Sensori attualmente configurati. Clicca sull'entità per modificare.",table:{no_items:"Non ci sono ancora sensori aggiunti a questo allarme. Assicurati di aggiungerli prima.",no_area_warning:"Sensor is not assigned to any area.",arm_modes:"Modalità di attivazione",always_on:"(Sempre)"}},add_sensors:{title:"Aggiungi Sensori",description:"Aggiungi più sensori. Assicurati che i sensori abbiano un friendly_name (nome amichevole), in modo da identificarli più facilmente.",no_items:"Non ci sono entità disponibili che possono essere configurate con l'allarme. Assicurati di includere entità del tipo binary_sensor (sensore binario).",table:{type:"Detected type"},actions:{add_to_alarm:"aggiungi all'allarme",filter_supported:"Hide items with unknown type"}},editor:{title:"Modifica Sensore",description:"Configura le impostazioni del sensore ''{entity}''.",fields:{area:{heading:"Area",description:"Select an area which contains this sensor."},group:{heading:"Group",description:"Group with other sensors for combined triggering."},device_type:{heading:"Device Type",description:"Choose a device type to automatically apply appropriate settings.",choose:{door:{name:"Door",description:"A door, gate or other entrance that is used for entering/leaving the home."},window:{name:"Window",description:"A window, or a door not used for entering the house such as balcony."},motion:{name:"Motion",description:"Presence sensor or similar device having a delay between activations."},tamper:{name:"Tamper",description:"Detector of sensor cover removal, glass break sensor, etc."},environmental:{name:"Environmental",description:"Smoke/gas sensor, leak detector, etc. (not related to burglar protection)."},other:{name:"Generic"}}},always_on:{heading:"Sempre attivo",description:"Il sensore attiverà sempre l'allarme."},modes:{heading:"Modalità attive",description:"Modalità di allarme in cui il sensore risulta collegato."},arm_on_close:{heading:"Arm after closing",description:"After deactivation of this sensor, the remaining exit delay will automatically be skipped."},use_exit_delay:{heading:"Use exit delay",description:"Sensor is allowed to be active when the exit delay starts."},use_entry_delay:{heading:"Use entry delay",description:"Sensor activation triggers the alarm after the entry delay rather than directly."},allow_open:{heading:"Permetti apertura",description:"Consentire a questo sensore di rimanere attivo poco dopo essere usciti."},auto_bypass:{heading:"Bypass automatically",description:"Exclude this sensor from the alarm if it is open while arming.",modes:"Modes in which sensor may be bypassed"},trigger_unavailable:{heading:"Fai scattare l'allarme quando non disponibile",description:"L'allarme scatterà quando lo stato del sensore diverrà 'non disponibile'."}},actions:{toggle_advanced:"Advanced settings",remove:"Remove",setup_groups:"Setup groups"},errors:{description:"Please correct the following errors:",no_area:"No area is selected",no_modes:"No modes are selected for which the sensor should be active",no_auto_bypass_modes:"No modes are selected for the sensor may be automatically bypassed"}}},dialogs:{manage_groups:{title:"Manage sensor groups",description:"In a sensor group multiple sensors must be activated within a time period before the alarm is triggered.",no_items:"No groups yet",actions:{new_group:"New group"}},create_group:{title:"New sensor group",fields:{name:{heading:"Name",description:"Name for sensor group"},timeout:{heading:"Time-out",description:"Time period during which consecutive sensor activations triggers the alarm."},sensors:{heading:"Sensors",description:"Select the sensors which are contained by this group."}},errors:{invalid_name:"Invalid name provided.",insufficient_sensors:"At least 2 sensors need to be selected."}},edit_group:{title:"Edit sensor group ''{name}''"}}},codes:{title:"Codici",cards:{codes:{description:"Modifica le impostazioni dei codici.",fields:{code_arm_required:{heading:"Usa codice d'attivazione",description:"Richiedi un codice per attivare l'allarme"},code_disarm_required:{heading:"Usa codice di disattivazione",description:"Richiedi un codice per disattivare l'allarme"},code_format:{heading:"Formato del codice",description:"Imposta il tipo di codice da digitare nella card di Lovelace.",code_format_number:"codice numerico",code_format_text:"password"}}},user_management:{title:"Gestione utente",description:"Ogni utente ha il suo codice per attivare/disattivare l'allarme.",no_items:"Non è stato creato nessun utente per ora",actions:{new_user:"nuovo utente"}},new_user:{title:"Crea nuovo utente",description:"Gli utenti potranno operare con l'allarme.",fields:{name:{heading:"Nome",description:"Nome dell'utente."},code:{heading:"Codice operativo",description:"Codice che utilizzerà quest'utente."},confirm_code:{heading:"Ripeti codice operativo",description:"Ripeti il codice operativo scelto."},can_arm:{heading:"Utilizza codice per attivare l'allarme",description:"Utilizza codice per attivare l'allarme"},can_disarm:{heading:"Utilizza codice per disattivare l'allarme",description:"Utilizza codice per disattivare l'allarme"},is_override_code:{heading:"E' un codice di forzatura",description:"Inserendo questo codice forzerai lo stato di attivazione dell'allarme"},area_limit:{heading:"Restricted areas",description:"Limit user to control only the selected areas"}},errors:{no_name:"Non hai inserito il nome.",no_code:"Il codice deve avere almeno 4 numeri o caratteri.",code_mismatch:"Il codice scelto non combacia, verifica il codice inserito."}},edit_user:{title:"Modifica Utente",description:"Cambia impostazioni per l'utente ''{name}''.",fields:{old_code:{heading:"Modifica Codice",description:"Codice attuale, lascia vuoto per non modificare."}}}}},actions:{title:"Azioni",cards:{notifications:{title:"Notifiche",description:"Con questo pannello puoi gestire le notifiche da inviare quanto accade un determinato evento",table:{no_items:"Non è stata creata nessuna notifica per ora.",no_area_warning:"Action is not assigned to any area."},actions:{new_notification:"nuova notifica"}},actions:{description:"Questo pannello è in fase di sviluppo. Sarà usato per cambiare lo stato di una o più entità.",table:{no_items:"Non è stata creata nessuna azione per ora."},actions:{new_action:"nuova azione"}},new_notification:{title:"Crea notifica",description:"Crea una nuova notifica.",trigger:"Condition",action:"Task",options:"Options",fields:{event:{heading:"Evento",description:"Quando questa notifica deve essere inviata",choose:{armed:{name:"Alarm is armed",description:"The alarm is succesfully armed"},disarmed:{name:"Alarm is disarmed",description:"The alarm is disarmed"},triggered:{name:"Alarm is triggered",description:"The alarm is triggered"},arm_failure:{name:"Failed to arm",description:"The arming of the alarm failed due to one or more open sensors"},arming:{name:"Exit delay started",description:"Exit delay started, ready to leave the house."},pending:{name:"Entry delay started",description:"Entry delay started, the alarm will trigger soon."}}},mode:{heading:"Modalità",description:"Limita ad una specifica modalità di allarme (opzionale)"},title:{heading:"Titolo",description:"Titolo per il messaggio di notifica"},message:{heading:"Messaggio",description:"Contenuto del messaggio di notifica",insert_wildcard:"Insert wildcard",placeholders:{armed:"The alarm is set to {{arm_mode}}",disarmed:"The alarm is now OFF",triggered:"The alarm is triggered! Cause: {{open_sensors}}.",arm_failure:"The alarm could not be armed right now, due to: {{open_sensors}}.",arming:"The alarm will be armed soon, please leave the house.",pending:"The alarm is about to trigger, disarm it quickly!"}},open_sensors_format:{heading:"Format for open_sensors wildcard",description:"Choose which sensor information in inserted in the message",options:{default:"Names and states",short:"Names only"}},arm_mode_format:{heading:"Translation for arm_mode wildcard",description:"Choose in which language the arm mode is inserted in the message"},target:{heading:"Destinatario",description:"Dispositivo a cui inviare il messaggio di notifica"},name:{heading:"Nome",description:"Descrizione della notifica",placeholders:{armed:"Notify {target} upon arming",disarmed:"Notify {target} upon disarming",triggered:"Notify {target} when triggered",arm_failure:"Notify {target} on failure",arming:"Notify {target} when leaving",pending:"Notify {target} when arriving"}},delete:{heading:"Delete automation",description:"Permanently remove this automation"}},actions:{test:"Try it"}},new_action:{title:"Crea azione",description:"Questo pannello può essere usato per cambiare lo stato di un entità quando lo stato dell'allarme cambia.",fields:{event:{heading:"Evento",description:"Quando questa azione deve essere eseguita"},area:{heading:"Area",description:"Area for which the event applies, leave empty to select the global alarm."},mode:{heading:"Modalità",description:"Limita ad una specifica modalità di allarme (opzionale)"},entity:{heading:"Entità",description:"Entità su cui eseguire l'azione"},action:{heading:"Azione",description:"Azione che deve eseguire l'entità",no_common_actions:"Actions can only be assigned in YAML mode for the selected entities."},name:{heading:"Nome",description:"Descrizione dell'azione",placeholders:{armed:"Set {entity} to {state} upon arming",disarmed:"Set {entity} to {state} upon disarming",triggered:"Set {entity} to {state} when triggered",arm_failure:"Set {entity} to {state} on failure",arming:"Set {entity} to {state} when leaving",pending:"Set {entity} to {state} when arriving"}}}}}}},Tt={common:xt,components:Et,title:"Alarm panel",panels:Ot},jt=Object.freeze({__proto__:null,common:xt,components:Et,title:"Alarm panel",panels:Ot,default:Tt}),St={modes_short:{armed_away:"Afwezig",armed_home:"Thuis",armed_night:"Nacht",armed_custom_bypass:"Aangepast",armed_vacation:"Vakantie"},enabled:"Actief",disabled:"Inactief"},Ct={time_slider:{seconds:"sec",minutes:"min",infinite:"oneindig",none:"geen"},editor:{ui_mode:"Naar UI",yaml_mode:"Naar YAML",edit_in_yaml:"In YAML bewerken"},table:{filter:{label:"Items filteren",item:"Filter op {name}",hidden_items:"{number} {number, plural,\n one {item is}\n other {items zijn}\n} verborgen"}}},Mt={general:{title:"Algemeen",cards:{general:{description:"Dit paneel definieert enkele instellingen die van toepassing zijn op alle inschakelmodi.",fields:{disarm_after_trigger:{heading:"Uitschakelen na activatie",description:"Nadat de triggertijd is verstreken, schakelt u het alarm uit in plaats van terug te keren naar de ingeschakelde toestand."},enable_mqtt:{heading:"MQTT inschakelen",description:"Toestaan het alarmpaneel via MQTT aan te sturen."},enable_master:{heading:"Master alarm inschakelen",description:"Creëert een entiteit om alle gebieden tegelijkertijd te besturen."}},actions:{setup_mqtt:"MQTT Configuratie",setup_master:"Master configuratie"}},modes:{title:"Modi",description:"Dit paneel kan worden gebruikt om de inschakelmodi van het alarm in te stellen.",modes:{armed_away:"De afwezigheidsmodus wordt gebruikt als alle mensen het huis hebben verlaten. Alle deuren en ramen die toegang geven tot het huis worden bewaakt, evenals bewegingssensoren in het huis.",armed_home:"De thuismodus wordt gebruikt bij het instellen van het alarm terwijl er mensen in huis zijn. Alle deuren en ramen die toegang geven tot het huis worden bewaakt, maar bewegingssensoren in het huis worden niet gebruikt.",armed_night:"De nachtmodus wordt gebruikt bij het instellen van het alarm voordat u gaat slapen. Alle deuren en ramen die toegang geven tot het huis worden bewaakt, en geselecteerde bewegingssensoren (beneden) in het huis.",armed_vacation:"De vakantiemodus dient voor afwezigheid voor langere duur. Er kunnen desgewenst andere vertragingstijden en acties worden ingesteld die beter passen bij de situatie.",armed_custom_bypass:"Een extra modus om uw eigen beveiligingsperimeter te definiëren."},number_sensors_active:"{number} {number, plural,\n one {sensor}\n other {sensoren}\n} ingesteld",fields:{status:{heading:"Status",description:"Stel in of het alarm op deze modus kan worden ingesteld."},exit_delay:{heading:"Vertrek vertraging",description:"Bij het inschakelen van het alarm zullen de sensoren binnen deze tijdsperiode het alarm nog niet activeren."},entry_delay:{heading:"Binnenkomst vertraging",description:"Vertragingstijd totdat het alarm afgaat nadat een van de sensoren is geactiveerd."},trigger_time:{heading:"Activatie tijd",description:"Tijd waarin het alarm in de geactiveerde toestand blijft na activatie."}}},mqtt:{title:"MQTT configuratie",description:"Dit paneel kan worden gebruikt voor configuratie van de MQTT-interface.",fields:{state_topic:{heading:"Toestand topic",description:"Topic waarop statusupdates worden gepubliceerd"},event_topic:{heading:"Gebeurtenis topic",description:"Topic waarop gebeurtenissen worden gepubliceerd"},command_topic:{heading:"Commando topic",description:"Topic waarop commando's voor in- / uitschakelen worden verzonden."},require_code:{heading:"Vereis code",description:"Vereis dat de code wordt verzonden met de opdracht."},state_payload:{heading:"Configureer de payload per toestand",item:"Definieer een payload voor toestand ''{state}''"},command_payload:{heading:"Configureer een payload per commando",item:"Definieer een payload voor commando ''{command}''"}}},areas:{title:"Gebieden",description:"Gebieden kunnen worden gebruikt om uw alarmsysteem in meerdere compartimenten op te delen.",no_items:"Er zijn nog geen gebieden gedefinieerd.",table:{remarks:"Opmerkingen",summary:"Dit gebied bevat {summary_sensors} en {summary_automations}.",summary_sensors:"{number} {number, plural,\n one {sensor}\n other {sensoren}\n}",summary_automations:"{number} {number, plural,\n one {automatisering}\n other {automatiseringen}\n}"},actions:{add:"Toevoegen"}}},dialogs:{create_area:{title:"Nieuw gebied",fields:{copy_from:"Kopieer instellingen van"}},edit_area:{title:"Bewerken van gebied ''{area}''",name_warning:"Opmerking: als u de naam wijzigt, wordt de entiteits-ID gewijzigd"},remove_area:{title:"Gebied verwijderen?",description:"Weet u zeker dat u dit gebied wilt verwijderen? Dit gebied bevat {sensors} sensoren en {automations} automatiseringen, die ook zullen worden verwijderd."},edit_master:{title:"Master configuratie"},disable_master:{title:"Master uitschakelen?",description:"Weet u zeker dat u het master alarm wilt verwijderen? Dit gebied bevat {automations} automatiseringen, die met deze actie worden verwijderd."}}},sensors:{title:"Sensoren",cards:{sensors:{description:"Momenteel geconfigureerde sensoren. Klik op een entiteit om wijzigingen aan te brengen.",table:{no_items:"Er zijn nog geen sensoren aan het alarm toegevoegd. Zorg ervoor dat u ze eerst toevoegt.",no_area_warning:"Sensor is niet aan een gebied toegewezen.",arm_modes:"Inschakelmodi",always_on:"(Altijd)"}},add_sensors:{title:"Voeg sensoren toe",description:"Voeg meer sensoren toe. Zorg ervoor dat uw sensoren een duidelijke naam hebben, zodat u ze kunt identificeren.",no_items:"Er zijn geen beschikbare HA-entiteiten die voor het alarm kunnen worden geconfigureerd. Zorg ervoor dat u entiteiten van het type binary_sensor opneemt.",table:{type:"Gedetecteerd type"},actions:{add_to_alarm:"Voeg aan alarm toe",filter_supported:"Verberg items met onbekend type"}},editor:{title:"Wijzig Sensor",description:"Configureren van de sensorinstellingen van ''{entity}''.",fields:{area:{heading:"Gebied",description:"Selecteer een gebied dat deze sensor bevat."},group:{heading:"Groep",description:"Groepeer met andere sensors voor gecombineerde triggers."},device_type:{heading:"Apparaat Type",description:"Kies een apparaattype om automatisch de juiste instellingen toe te passen.",choose:{door:{name:"Deur",description:"Een deur, poort of andere ingang die wordt gebruikt voor het betreden/verlaten van de woning."},window:{name:"Raam",description:"Een raam of een deur die niet wordt gebruikt om het huis binnen te komen, zoals een balkon."},motion:{name:"Beweging",description:"Aanwezigheidssensor of soortgelijk apparaat met een vertraging tussen activeringen."},tamper:{name:"Sabotage",description:"Detector van verwijdering van sensorkap, glasbreuksensor, enz."},environmental:{name:"Klimaat",description:"Rook/gassensor, lekkage detector, etc. (niet gerelateerd aan inbraakbeveiliging)."},other:{name:"Algemeen"}}},always_on:{heading:"Altijd aan",description:"Een sensor moet altijd het alarm activeren."},modes:{heading:"Ingeschakelde modi",description:"Alarmmodi waarin deze sensor actief is."},arm_on_close:{heading:"Inschakelen na sluiten",description:"Na deactivering van deze sensor wordt de resterende vertrek vertraging automatisch overgeslagen."},use_exit_delay:{heading:"Vertragingstijd bij vertrek",description:"De sensor mag actief zijn wanneer de vertrekperiode wordt gestart."},use_entry_delay:{heading:"Vertragingstijd bij binnenkomst",description:"Als de sensor actief wordt, activeert deze het alarm pas na de vertragingstijd voor binnenkomst."},allow_open:{heading:"Sta open toe tijdens het inschakelen",description:"Sta toe dat deze sensor kort na het verlaten actief is, zodat hij het inschakelen niet blokkeert."},auto_bypass:{heading:"Automatisch omzeilen",description:"Elimineer de sensor als deze actief is tijdens het inschakelen van het alarm.",modes:"Modi waarin de sensor automatisch omzeild mag worden"},trigger_unavailable:{heading:"Activeren indien niet beschikbaar",description:"Wanneer de sensorstatus 'niet beschikbaar' wordt, wordt de sensor geactiveerd."}},actions:{toggle_advanced:"Geavanceerde instellingen",remove:"Verwijder",setup_groups:"Configureer groepen"},errors:{description:"Corrigeer de volgende fouten:",no_area:"Er is geen gebied geselecteerd",no_modes:"Er zijn geen modi geselecteerd waarvoor de sensor actief zou moeten zijn",no_auto_bypass_modes:"Er zijn geen modi geselecteerd waarin de sensor automatisch omzeild mag worden"}}},dialogs:{manage_groups:{title:"Beheer sensorgroepen",description:"In een sensorgroep moeten twee of meer sensoren worden geactiveerd binnen een tijdsperiode voordat het alarm wordt geactiveerd.",no_items:"Nog geen groepen ingesteld.",actions:{new_group:"Nieuwe groep"}},create_group:{title:"Nieuwe sensorgroep",fields:{name:{heading:"Naam",description:"Naam voor sensorgroep."},timeout:{heading:"Time-out",description:"Tijdsperiode waarin meerdere sensoren moeten worden geactiveerd om het alarm te activeren."},sensors:{heading:"Sensoren",description:"Selecteer de sensoren die deel moeten uitmaken van deze groep."}},errors:{invalid_name:"Verkeerde naam opgegeven.",insufficient_sensors:"Tenminste 2 sensoren moeten worden geselecteerd."}},edit_group:{title:"Bewerk sensorgroep ''{name}''"}}},codes:{title:"Codes",cards:{codes:{description:"Wijzig de instellingen voor de code.",fields:{code_arm_required:{heading:"Gebruik inschakel code",description:"Vereist een code voor het inschakelen van het alarm"},code_disarm_required:{heading:"Gebruik uitschakelcode",description:"Vereist een code om het alarm uit te schakelen"},code_format:{heading:"Code opmaak",description:"Stelt het invoertype in voor de Lovelace alarmkaart.",code_format_number:"pincode",code_format_text:"wachtwoord"}}},user_management:{title:"Gebruikersbeheer",description:"Elke gebruiker heeft zijn eigen code om het alarm in/uit te schakelen.",no_items:"Er zijn nog geen gebruikers",actions:{new_user:"nieuwe gebruiker"}},new_user:{title:"Maak een nieuwe gebruiker aan",description:"Gebruikers kunnen worden aangemaakt om toegang te verlenen tot het bedienen van het alarm.",fields:{name:{heading:"Naam",description:"Naam van de gebruiker."},code:{heading:"Code",description:"Code voor deze gebruiker."},confirm_code:{heading:"Bevestig de code",description:"Herhaal de code."},can_arm:{heading:"Code toestaan voor inschakeling",description:"Door deze code in te voeren, wordt het alarm geactiveerd"},can_disarm:{heading:"Code toestaan voor uitschakelen",description:"Door deze code in te voeren, wordt het alarm gedeactiveerd"},is_override_code:{heading:"Is een forceer code",description:"Als u deze code invoert, wordt het alarm geforceerd geactiveerd"},area_limit:{heading:"Beperk gebieden",description:"Beperk de gebruiker tot controle over alleen de gelesecteerde gebieden"}},errors:{no_name:"Geen naam opgegeven.",no_code:"Code moet minimaal 4 tekens/cijfers bevatten.",code_mismatch:"De codes komen niet overeen."}},edit_user:{title:"Wijzig Gebruiker",description:"Wijzig de configuratie voor gebruiker ''{name}''.",fields:{old_code:{heading:"Huidige code",description:"Huidige code, laat leeg om ongewijzigd te laten."}}}}},actions:{title:"Acties",cards:{notifications:{title:"Meldingen",description:"Met dit paneel kunt u meldingen beheren die moeten worden verzonden tijdens een bepaalde alarmgebeurtenis",table:{no_items:"Er zijn nog geen notificaties aangemaakt.",no_area_warning:"Actie is niet toegewezen aan een gebied."},actions:{new_notification:"nieuwe melding"}},actions:{description:"Dit paneel kan worden gebruikt om een apparaat te schakelen wanneer de status van het alarm veranderd.",table:{no_items:"Er zijn nog geen acties gemaakt."},actions:{new_action:"nieuwe actie"}},new_notification:{title:"Notificatie instellen",description:"Ontvang een notificatie wanneer het alarm wordt in- of uitgeschakeld, wordt geactiveerd etc.",trigger:"Conditie",action:"Taak",options:"Opties",fields:{event:{heading:"Gebeurtenis",description:"Wanneer moet de notificatie worden verzonden",choose:{armed:{name:"Alarm is ingeschakeld",description:"Het alarm is succesvol ingeschakeld"},disarmed:{name:"Alarm is uitgeschakeld",description:"Het alarm is uitgeschakeld"},triggered:{name:"Alarm is afgegaan",description:"Het alarm gaat af"},arm_failure:{name:"Kan niet inschakelen",description:"Het inschakelen van het alarm is mislukt vanwege een of meerdere blokkerende sensoren"},arming:{name:"Vertrek",description:"Vertrekvertraging ingegaan, tijd om het huis te verlaten."},pending:{name:"Binnenkomst",description:"Binnenkomstvertraging ingegaan, het alarm dient te worden uitgeschakeld."}}},mode:{heading:"Modi",description:"Beperk de actie tot specifieke inschakel modi."},title:{heading:"Titel",description:"Titel voor de notificatie"},message:{heading:"Bericht",description:"Tekst voor de notificatie",insert_wildcard:"Wildcard invoegen",placeholders:{armed:"Het alarm is ingeschakeld op {{arm_mode}}",disarmed:"Het alarm is nu uit",triggered:"Het alarm is geactiveerd! Oorzaak: {{open_sensors}}.",arm_failure:"Het alarm kon niet worden ingeschakeld. Oorzaak: {{open_sensors}}.",arming:"Het alarm wordt ingeschakeld, verlaat het huis.",pending:"Het alarm moet nu worden uitgeschakeld, anders wordt deze geactiveerd."}},open_sensors_format:{heading:"Opmaak voor open_sensors wildcard",description:"Kies welke sensor informatie wordt weergegeven in het bericht",options:{default:"Naam en status",short:"Alleen naam"}},arm_mode_format:{heading:"Vertaling voor arm_mode wildcard",description:"Kies in welke taal de inschakelmodus wordt weergegeven in het bericht"},target:{heading:"Doel",description:"Apparaat om het push-bericht naar te sturen"},name:{heading:"Naam",description:"Beschrijving voor deze notificatie",placeholders:{armed:"Stuur notificatie naar {target} bij inschakelen",disarmed:"Stuur notificatie naar {target} bij uitschakelen",triggered:"Stuur notificatie naar {target} bij alarm",arm_failure:"Stuur notificatie naar {target} bij fout",arming:"Stuur notificatie naar {target} bij vertrek",pending:"Stuur notificatie naar {target} bij binnenkomst"}},delete:{heading:"Automatisering verwijderen",description:"Verwijder deze automatisering permanent"}},actions:{test:"Testen"}},new_action:{title:"Actie instellen",description:"Schakel verlichting of apparaatuur (bijv. sirene) wanneer het alarm wordt in- of uitgeschakeld of wordt geactiveerd etc.",fields:{event:{heading:"Gebeurtenis",description:"Wanneer moet de actie worden uitgevoerd"},area:{heading:"Gebied",description:"Het gebied waarop de gebeurtenis van toepassing is, laat leeg om het algemene alarm te selecteren."},mode:{heading:"Mode",description:"Beperk de actie tot specifieke inschakel modi (optioneel)"},entity:{heading:"Entiteit",description:"Entiteit om actie op uit te voeren"},action:{heading:"Actie",description:"Actie die op de entiteit moet worden uitgevoerd",no_common_actions:"Acties kunnen alleen worden toegewezen in de YAML modus voor de geselecteerde entiteiten."},name:{heading:"Naam",description:"Beschrijving voor deze actie",placeholders:{armed:"Schakel {entity} naar {state} bij inschakelen",disarmed:"Schakel {entity} naar {state} bij uitschakelen",triggered:"Schakel {entity} naar {state} bij alarm",arm_failure:"Schakel {entity} naar {state} bij fout",arming:"Schakel {entity} naar {state} bij vertrek",pending:"Schakel {entity} naar {state} bij binnenkomst"}}}}}}},Nt={common:St,components:Ct,title:"Alarmpaneel",panels:Mt},Dt=Object.freeze({__proto__:null,common:St,components:Ct,title:"Alarmpaneel",panels:Mt,default:Nt}),Lt={modes_short:{armed_away:"Borta",armed_home:"Hemma",armed_night:"Natt",armed_custom_bypass:"Anpassad",armed_vacation:"Vacation"},enabled:"Aktiverat",disabled:"Inaktiverat"},Pt={time_slider:{seconds:"sek",minutes:"min",infinite:"oändligt",none:"inget"},editor:{ui_mode:"Till UI",yaml_mode:"Till YAML",edit_in_yaml:"Redigera i YAML"},table:{filter:{label:"Filter items",item:"Filter by {name}",hidden_items:"{number} {number, plural,\n one {item is}\n other {items are}\n} hidden"}}},zt={general:{title:"Generellt",cards:{general:{description:"Denna panel definierar några globala inställningar för larmet.",fields:{disarm_after_trigger:{heading:"Larma av efter trigger",description:"Efter trigger tiden har gått ut, larma av larmet istället för att återgå till larmat läge."},enable_mqtt:{heading:"Aktivera MQTT",description:"Tillåt alarm panelen att kontrolleras via MQTT."},enable_master:{heading:"Aktivera alarm master",description:"Skapar en entity för att kontrollera alla areor samtidigt."}},actions:{setup_mqtt:"MQTT konfiguration",setup_master:"Master konfiguration"}},modes:{title:"Lägen",description:"Denna panel kan användas för att konfiguera larmets olika larmlägen.",modes:{armed_away:"Larmat borta användas när alla personer lämnat huset. Alla dörrar och fönster som tillåter tillgång till huset kommer att larmas, det samma gäller rörelsesensorer inne i huset.",armed_home:"Larmat hemma används när det finns personer kvar i huset. Alla dörrar och fönster som tillåter tillgång till huset kommer att larmas, dock inga rörelsesensorer inne i huset.",armed_night:"Larmat natt används när du aktiverar larmen innan du lägger dig. Alla dörrar och fönster som tillåter tillgång till huset kommer att larmas, det samma gäller utvalda rörelsesensorer inne i huset.",armed_vacation:"Armed vacation can be used as an extension to the armed away mode in case of absence for longer duration. The delay times and trigger responses can be adapted (as desired) to being distant from home.",armed_custom_bypass:"Ett extra läge för för att definiera sin egen säkerhetsperimeter."},number_sensors_active:"{number} {number, plural,\n one {sensor}\n other {sensorer}\n} aktiv",fields:{status:{heading:"Status",description:"Controls whether the alarm can be armed in this mode."},exit_delay:{heading:"Lämna fördröjning",description:"Efter att du har aktiverat larmet kommer dina sensorer inte trigga ditt larm inom denna tid."},entry_delay:{heading:"Ankomst fördröjning",description:"Fördröjning i tid tills att ditt larm triggas efter att en av dina sensorer har aktiverats."},trigger_time:{heading:"Trigger tid",description:"Tid som ditt larm kommer vara i triggat läge efter att ett larm har triggats."}}},mqtt:{title:"MQTT konfiguration",description:"Denna panel kan användas för att anpassa konfigurationen av MQTT.",fields:{state_topic:{heading:"Status topic",description:"Topic på vilket status uppdateringar publiceras till."},event_topic:{heading:"Event topic",description:"Topic på vilket alarm events publiceras till."},command_topic:{heading:"Kommando topic",description:"Topic på vilket Alarmo lyssnar på för larma/larma av kommandon."},require_code:{heading:"Kräv kod",description:"Kräv att koden ska skickas med kommandot."},state_payload:{heading:"Konfiguera payload per state",item:"Definiera en payload för state ''{state}''"},command_payload:{heading:"Konfiguera payload per kommando",item:"Definiera en payload för kommando ''{command}''"}}},areas:{title:"Areor",description:"Areor kan användas för att dela upp ditt larm till flera delar.",no_items:"Det är inga areor definierade än.",table:{remarks:"Anmärkningar",summary:"Denna area innehåller {summary_sensors} och {summary_automations}.",summary_sensors:"{number} {number, plural,\n one {sensor}\n other {sensorer}\n}",summary_automations:"{number} {number, plural,\n one {automation}\n other {automationer}\n}"},actions:{add:"Lägg till"}}},dialogs:{create_area:{title:"Ny area",fields:{copy_from:"Kopiera inställningarna från"}},edit_area:{title:"Redigera area ''{area}''",name_warning:"OBS: Ändrar du namn kommer entity ID att ändras"},remove_area:{title:"Ta bort area?",description:"Är du säker att du vill ta bort denna area? Denna area innehåller {sensors} sensorer och {automations} automationer, som också kommer att tas bort."},edit_master:{title:"Master konfiguration"},disable_master:{title:"Inaktivera master?",description:"Är du säker att du vill ta bort master alarm? Denna area innehåller {automations} automationer, som kommer att tas bort med detta val."}}},sensors:{title:"Sensorer",cards:{sensors:{description:"Nuvarande konfiguerade sensorer. Klicka på ett entity för att göra förändringar.",table:{no_items:"Det finns inga sensorer att visa här.",no_area_warning:"Sensor is not assigned to any area.",arm_modes:"Larmläge",always_on:"(Alltid)"}},add_sensors:{title:"Lägg till sensorer",description:"Lägg till mer sensorer. Säkerhetsställ att dina sensorer har ett friendly_name, så du kan identifiera dem.",no_items:"Det finns inga tillgängliga HA entities som kan konfigueras för larmet. Säkerhetsställ att inkludera entities av type binary_sensor.",table:{type:"Detekteringstyp"},actions:{add_to_alarm:"Addera till larmet",filter_supported:"Hide items with unknown type"}},editor:{title:"Justera Sensor",description:"Justera inställningarna för sensor ''{entity}''.",fields:{area:{heading:"Area",description:"Välj en area som innehåller denna sensor."},group:{heading:"Grupp",description:"Gruppera med andra sensorer för kombinerad trigger."},device_type:{heading:"Enhetstyp",description:"Välj en enhetstyp att automatiskt applicera rekomenderade inställningar på.",choose:{door:{name:"Dörr",description:"En dörr, grind eller annan entre som används för att gå in/lämna hemmet."},window:{name:"Fönster",description:"Ett fönster eller en dörr som inte används för att gå in/lämna huset, t.ex. en balkongdörr."},motion:{name:"Rörelse",description:"Närvarosensor eller liknande som har fördröjning mellan sina aktiveringar."},tamper:{name:"Manipulering",description:"Detektor av sensorskydd, glaskross sensor etc."},environmental:{name:"Miljö",description:"Rök/gas sensor eller läckage sensor etc. (Inte relaterat till inbrottsskydd)."},other:{name:"Generell"}}},always_on:{heading:"Larma alltid",description:"Sensorn ska alltid trigga larmet."},modes:{heading:"Aktiverat läge",description:"Larmläge när sensorn ska vara aktiv."},arm_on_close:{heading:"Larma efter stängning",description:"Resternade lämna fördröjning skippas automatiskt när denna sensor inaktiveras."},use_exit_delay:{heading:"Anväld lämna fördröjning",description:"Sensorn är tillåten att vara aktiv när lämna fördröjningen startar."},use_entry_delay:{heading:"Använd ankomst fördröjning",description:"Sensor aktivering triggar larmet after ankomst fördröjningen istället för direkt."},allow_open:{heading:"Tillåt öppnad efter larmning.",description:"Om sensorn fortfarande är aktiv efter lämna fördröjningen kommer det inte misslyckas att larma."},auto_bypass:{heading:"Exkludera automatiskt",description:"Exkludera denna sensor fr¨ån larmet open den är öppen vid pålarmning.",modes:"Lägen där sensor kan bli exkluderad"},trigger_unavailable:{heading:"Trigga vid otillgänglig",description:"Detta kommer aktiveras när sensorns status blir 'unavailable'."}},actions:{toggle_advanced:"Avancerade inställningar",remove:"Ta bort",setup_groups:"Hantera grupper"},errors:{description:"Var vänlig att justera följande fel:",no_area:"Ingen area är vald",no_modes:"Inga lägen är valda när sensorn ska vara aktiv",no_auto_bypass_modes:"Inga lägen är valda när sensorn eventuellt automatiskt ska förbikopplas"}}},dialogs:{manage_groups:{title:"Hantera sensor grupper",description:"I en sensor grupp måste flera sensorer bli aktiverade inom en tidsperiod för att larmet ska triggas.",no_items:"Inga grupper ännu",actions:{new_group:"Ny grupp"}},create_group:{title:"Ny sensor grupp",fields:{name:{heading:"Namn",description:"Namn för sensor gruppen"},timeout:{heading:"Time-out",description:"Tidsperiod för de sammankopplade sensorernas aktivitet ska trigga larmet."},sensors:{heading:"Sensorer",description:"Välj sensorer som tillhöra gruppen."}},errors:{invalid_name:"Ogiltigt namn specificerat.",insufficient_sensors:"Minst två sensorer behöver väljas."}},edit_group:{title:"Justera sensor grupp ''{name}''"}}},codes:{title:"Koder",cards:{codes:{description:"Ändra inställningar för kod.",fields:{code_arm_required:{heading:"Använd pålarmningskod",description:"Kräv en kod för att aktivera larmet"},code_disarm_required:{heading:"Använd avlarmningskod",description:"Kräv en kod för att inaktivera larmet"},code_format:{heading:"Kodformat",description:"Ändra inmatningstyp för Lovelace alarm kortet.",code_format_number:"pinkod",code_format_text:"lösenord"}}},user_management:{title:"Användarhantering",description:"Varje användare har sin egen kod för aktivera/inaktivera larmet.",no_items:"Det finns inga användae än",actions:{new_user:"ny användare"}},new_user:{title:"Skapa en ny användare",description:"Users can be created for providing access to operating the alarm.",fields:{name:{heading:"Namn",description:"Namn på användaren"},code:{heading:"Kod",description:"Koden för användaren."},confirm_code:{heading:"Repetra koden",description:"Repetra koden."},can_arm:{heading:"Tillåt kod för pålarming",description:"Denna kod aktiverar larmet"},can_disarm:{heading:"Tillåt kod för avlarming",description:"Denna kod inaktiverar larmet"},is_override_code:{heading:"Tvingande kod",description:"Denna kod tvingar aktivering av larmet"},area_limit:{heading:"Begränsade areor",description:"Begränsa användare att hantera utvalda areor"}},errors:{no_name:"Ingen namn angivet.",no_code:"Koden ska vara minst 4 tecken eller siffror.",code_mismatch:"Koderna matchar inte."}},edit_user:{title:"Justera användare",description:"Ändra inställningar för användare ''{name}''.",fields:{old_code:{heading:"Nuvarande kod",description:"Nuvarande kod, lämna tomt för att inte ändra."}}}}},actions:{title:"Actions",cards:{notifications:{title:"Notifikationer",description:"Du använder denna panel för att hantera notifikationer som ska sändas vid utvalda larmevents.",table:{no_items:"Det är inga notifikationer skapade än.",no_area_warning:"Action is not assigned to any area."},actions:{new_notification:"ny notifikation"}},actions:{description:"I denna panel kan du trigga olika beteende på enheter baserat på oliak events från ditt larm.",table:{no_items:"Det finns inga actions skapade ännu."},actions:{new_action:"ny action"}},new_notification:{title:"Konfiguera notifikationer",description:"Ta emot en notifikation när ditt larm aktivera/inaktiveras eller om en sensor aktiveras eller liknande.",trigger:"Villkor",action:"Task",options:"Inställningar",fields:{event:{heading:"Event",description:"När ska notifikationen skickas",choose:{armed:{name:"Larmet är aktiverat",description:"Larmet aktiveras framgångsrikt"},disarmed:{name:"Larmet är inaktiverat",description:"Larmet är inaktiverat"},triggered:{name:"Larmet har triggats",description:"Larmet har triggats"},arm_failure:{name:"Misslyckas att aktivera larm",description:"Larmet misslyckas att kativeras på grund av någon sensor"},arming:{name:"Lämna fördröjning startas",description:"Lämna fördröjning startas, redo att lämna huset."},pending:{name:"Ankomst fördröjning startas",description:"Ankomst fördröjning startas, larmet kommer triggas snart."}}},mode:{heading:"Läge",description:"Begräns action till specifikt larmläge (valfritt)"},title:{heading:"Titel",description:"Titel för notifikationsmeddelandet"},message:{heading:"Meddelande",description:"Innehåll av notifikationsmeddelandet",insert_wildcard:"Lägg in wildcard",placeholders:{armed:"Larmet har bytt status till {{arm_mode}}",disarmed:"Larmet är nu AVSTÄNGT",triggered:"Larmet har triggats! Anledning: {{open_sensors}}.",arm_failure:"Larmet kunde inte aktiveras nu, detta på grund av: {{open_sensors}}.",arming:"Larmet kommer aktiveras snart, lämna huset.",pending:"Larmet kommer snart triggas, inaktivera larmet snarast!"}},open_sensors_format:{heading:"Format for open_sensors wildcard",description:"Choose which sensor information in inserted in the message",options:{default:"Names and states",short:"Names only"}},arm_mode_format:{heading:"Translation for arm_mode wildcard",description:"Choose in which language the arm mode is inserted in the message"},target:{heading:"Mål",description:"Enhet att skicka push-meddelandet till"},name:{heading:"Namn",description:"Beskrivning av notifikationen",placeholders:{armed:"Notifiera {target} vid aktivering av larm",disarmed:"Notifiera {target} vid inaktivering av larm",triggered:"Notifiera {target} vid triggning av larm",arm_failure:"Notifiera {target} vid fel av larm",arming:"Notifiera {target} vid utpassering",pending:"Notifiera {target} vid ankomst"}},delete:{heading:"Ta bort automation",description:"Ta bort automation permanent"}},actions:{test:"Testa"}},new_action:{title:"Konfiguera action",description:"Aktivera lampor eller andra enheter som sirener eller högatalare vid aktivering/inaktivering av larmet, triggning av larmet osv.",fields:{event:{heading:"Event",description:"När ska denna action aktiveras"},area:{heading:"Area",description:"Area som etta event ska appliceras på, lämna tomt om det ska gälla globalt."},mode:{heading:"Läge",description:"Begränsa action till specifika larmläge (frivilligt)"},entity:{heading:"Entity",description:"Entity att utföra action på"},action:{heading:"Action",description:"Action att utföra på entity",no_common_actions:"Actions kan enbart bli applicerade i YAML läge för utvalda entities."},name:{heading:"Namn",description:"Beskrivning av denna action",placeholders:{armed:"Sätt {entity} till {state} vid aktivering av larmet",disarmed:"Sätt {entity} till {state} vid inaktivering av larmet",triggered:"Sätt {entity} till {state} när larmet triggas",arm_failure:"Sätt {entity} till {state} vid fel av larmet",arming:"Sätt {entity} till {state} vid utpassering",pending:"Sätt {entity} till {state} vid ankomst"}}}}}}},qt={common:Lt,components:Pt,title:"Alarm panel",panels:zt},Rt=Object.freeze({__proto__:null,common:Lt,components:Pt,title:"Alarm panel",panels:zt,default:qt}),It=function(e,t){return(It=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])})(e,t)};function Ut(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function a(){this.constructor=e}It(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}var Gt=function(){return(Gt=Object.assign||function(e){for(var t,a=1,i=arguments.length;a(a,i)=>{var s;if(void 0===i){const i=null!==(s=a.originalKey)&&void 0!==s?s:a.key,n=null!=t?{kind:"method",placement:"prototype",key:i,descriptor:t(a.key)}:{...a,key:i};return null!=e&&(n.finisher=function(t){e(t,i)}),n}{const s=a.constructor;void 0!==t&&Object.defineProperty(a,i,t(i)),null==e||e(s,i)}})({descriptor:a=>{const i={get(){var t;return null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(e)},enumerable:!0,configurable:!0};if(t){const t="symbol"==typeof a?Symbol():"__"+a;i.get=function(){var a;return void 0===this[t]&&(this[t]=null===(a=this.renderRoot)||void 0===a?void 0:a.querySelector(e)),this[t]}}return i}})}var ce=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,he="[^\\s]+",ue=/\[([^]*?)\]/gm;function me(e,t){for(var a=[],i=0,s=e.length;i-1?i:null}};function ge(e){for(var t=[],a=1;a3?0:(e-e%10!=10?1:0)*e%10]}},ye=ge({},be),we=function(e,t){for(void 0===t&&(t=2),e=String(e);e.length0?"-":"+")+we(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4)},Z:function(e){var t=e.getTimezoneOffset();return(t>0?"-":"+")+we(Math.floor(Math.abs(t)/60),2)+":"+we(Math.abs(t)%60,2)}},$e=function(e){return+e-1},Ae=[null,"[1-9]\\d?"],xe=[null,he],Ee=["isPm",he,function(e,t){var a=e.toLowerCase();return a===t.amPm[0]?0:a===t.amPm[1]?1:null}],Oe=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(e){var t=(e+"").match(/([+-]|\d\d)/gi);if(t){var a=60*+t[1]+parseInt(t[2],10);return"+"===t[0]?a:-a}return 0}],Te=(pe("monthNamesShort"),pe("monthNames"),{default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"});var je=function(e,t,a){if(void 0===t&&(t=Te.default),void 0===a&&(a={}),"number"==typeof e&&(e=new Date(e)),"[object Date]"!==Object.prototype.toString.call(e)||isNaN(e.getTime()))throw new Error("Invalid Date pass to format");var i=[];t=(t=Te[t]||t).replace(ue,(function(e,t){return i.push(t),"@@@"}));var s=ge(ge({},ye),a);return(t=t.replace(ce,(function(t){return ke[t](e,s)}))).replace(/@@@/g,(function(){return i.shift()}))};(function(){try{(new Date).toLocaleDateString("i")}catch(e){return"RangeError"===e.name}})(),function(){try{(new Date).toLocaleString("i")}catch(e){return"RangeError"===e.name}}(),function(){try{(new Date).toLocaleTimeString("i")}catch(e){return"RangeError"===e.name}}();function Se(e){return e.substr(0,e.indexOf("."))}function Ce(e){return e.substr(e.indexOf(".")+1)}var Me="hass:bookmark",Ne=function(e,t,a,i){i=i||{},a=null==a?{}:a;var s=new Event(t,{bubbles:void 0===i.bubbles||i.bubbles,cancelable:Boolean(i.cancelable),composed:void 0===i.composed||i.composed});return s.detail=a,e.dispatchEvent(s),s},De={alert:"hass:alert",automation:"hass:playlist-play",calendar:"hass:calendar",camera:"hass:video",climate:"hass:thermostat",configurator:"hass:settings",conversation:"hass:text-to-speech",device_tracker:"hass:account",fan:"hass:fan",group:"hass:google-circles-communities",history_graph:"hass:chart-line",homeassistant:"hass:home-assistant",homekit:"hass:home-automation",image_processing:"hass:image-filter-frames",input_boolean:"hass:drawing",input_datetime:"hass:calendar-clock",input_number:"hass:ray-vertex",input_select:"hass:format-list-bulleted",input_text:"hass:textbox",light:"hass:lightbulb",mailbox:"hass:mailbox",notify:"hass:comment-alert",person:"hass:account",plant:"hass:flower",proximity:"hass:apple-safari",remote:"hass:remote",scene:"hass:google-pages",script:"hass:file-document",sensor:"hass:eye",simple_alarm:"hass:bell",sun:"hass:white-balance-sunny",switch:"hass:flash",timer:"hass:timer",updater:"hass:cloud-upload",vacuum:"hass:robot-vacuum",water_heater:"hass:thermometer",weblink:"hass:open-in-new"};function Le(e,t){if(e in De)return De[e];switch(e){case"alarm_control_panel":switch(t){case"armed_home":return"hass:bell-plus";case"armed_night":return"hass:bell-sleep";case"disarmed":return"hass:bell-outline";case"triggered":return"hass:bell-ring";default:return"hass:bell"}case"binary_sensor":return t&&"off"===t?"hass:radiobox-blank":"hass:checkbox-marked-circle";case"cover":return"closed"===t?"hass:window-closed":"hass:window-open";case"lock":return t&&"unlocked"===t?"hass:lock-open":"hass:lock";case"media_player":return t&&"off"!==t&&"idle"!==t?"hass:cast-connected":"hass:cast";case"zwave":switch(t){case"dead":return"hass:emoticon-dead";case"sleeping":return"hass:sleep";case"initializing":return"hass:timer-sand";default:return"hass:z-wave"}default:return console.warn("Unable to find icon for domain "+e+" ("+t+")"),Me}}var Pe=function(e,t,a){void 0===a&&(a=!1),a?history.replaceState(null,"",t):history.pushState(null,"",t),Ne(window,"location-changed",{replace:a})},ze={humidity:"hass:water-percent",illuminance:"hass:brightness-5",temperature:"hass:thermometer",pressure:"hass:gauge",power:"hass:flash",signal_strength:"hass:wifi"},qe={binary_sensor:function(e){var t=e.state&&"off"===e.state;switch(e.attributes.device_class){case"battery":return t?"hass:battery":"hass:battery-outline";case"cold":return t?"hass:thermometer":"hass:snowflake";case"connectivity":return t?"hass:server-network-off":"hass:server-network";case"door":return t?"hass:door-closed":"hass:door-open";case"garage_door":return t?"hass:garage":"hass:garage-open";case"gas":case"power":case"problem":case"safety":case"smoke":return t?"hass:shield-check":"hass:alert";case"heat":return t?"hass:thermometer":"hass:fire";case"light":return t?"hass:brightness-5":"hass:brightness-7";case"lock":return t?"hass:lock":"hass:lock-open";case"moisture":return t?"hass:water-off":"hass:water";case"motion":return t?"hass:walk":"hass:run";case"occupancy":return t?"hass:home-outline":"hass:home";case"opening":return t?"hass:square":"hass:square-outline";case"plug":return t?"hass:power-plug-off":"hass:power-plug";case"presence":return t?"hass:home-outline":"hass:home";case"sound":return t?"hass:music-note-off":"hass:music-note";case"vibration":return t?"hass:crop-portrait":"hass:vibrate";case"window":return t?"hass:window-closed":"hass:window-open";default:return t?"hass:radiobox-blank":"hass:checkbox-marked-circle"}},cover:function(e){var t="closed"!==e.state;switch(e.attributes.device_class){case"garage":return t?"hass:garage-open":"hass:garage";case"door":return t?"hass:door-open":"hass:door-closed";case"shutter":return t?"hass:window-shutter-open":"hass:window-shutter";case"blind":return t?"hass:blinds-open":"hass:blinds";case"window":return t?"hass:window-open":"hass:window-closed";default:return Le("cover",e.state)}},sensor:function(e){var t=e.attributes.device_class;if(t&&t in ze)return ze[t];if("battery"===t){var a=Number(e.state);if(isNaN(a))return"hass:battery-unknown";var i=10*Math.round(a/10);return i>=100?"hass:battery":i<=0?"hass:battery-alert":"hass:battery-"+i}var s=e.attributes.unit_of_measurement;return"°C"===s||"°F"===s?"hass:thermometer":Le("sensor")},input_datetime:function(e){return e.attributes.has_date?e.attributes.has_time?Le("input_datetime"):"hass:calendar":"hass:clock"}};const Re=async()=>{if(customElements.get("ha-checkbox")&&customElements.get("ha-slider"))return;await customElements.whenDefined("partial-panel-resolver");const e=document.createElement("partial-panel-resolver");e.hass={panels:[{url_path:"tmp",component_name:"config"}]},e._updateRoutes(),await e.routerOptions.routes.tmp.load(),await customElements.whenDefined("ha-panel-config");const t=document.createElement("ha-panel-config");await t.routerOptions.routes.automation.load(),e.hass={panels:[{url_path:"tmp",component_name:"developer-tools"}]},e._updateRoutes(),await e.routerOptions.routes.tmp.load(),await customElements.whenDefined("ha-app-layout")},Ie=async()=>{var e,t,a,i,s,n,r,o;if(customElements.get("ha-yaml-editor"))return;const l=document.createElement("partial-panel-resolver").getRoutes([{component_name:"developer-tools",url_path:"a"}]);await(null===(a=null===(t=null===(e=null==l?void 0:l.routes)||void 0===e?void 0:e.a)||void 0===t?void 0:t.load)||void 0===a?void 0:a.call(t));const d=document.createElement("developer-tools-router");await(null===(o=null===(r=null===(n=null===(s=null===(i=d)||void 0===i?void 0:i.routerOptions)||void 0===s?void 0:s.routes)||void 0===n?void 0:n.service)||void 0===r?void 0:r.load)||void 0===o?void 0:o.call(r))},Ue=e=>e.callWS({type:"alarmo/config"}),Ge=e=>e.callWS({type:"alarmo/sensors"}),Fe=e=>e.callWS({type:"alarmo/users"}),Ve=e=>e.callWS({type:"alarmo/automations"}),He=e=>e.callWS({type:"alarmo/sensor_groups"}),Ye=(e,t)=>e.callApi("POST","alarmo/config",t),Be=(e,t)=>e.callApi("POST","alarmo/sensors",t),Ke=(e,t)=>e.callApi("POST","alarmo/users",t),Qe=(e,t)=>e.callApi("POST","alarmo/automations",t),We=(e,t)=>e.callApi("POST","alarmo/automations",{automation_id:t,remove:!0}),Xe=e=>e.callWS({type:"alarmo/areas"}),Ze=(e,t)=>e.callApi("POST","alarmo/area",t),Je=e=>{class a extends e{connectedCallback(){super.connectedCallback(),this.__checkSubscribed()}disconnectedCallback(){if(super.disconnectedCallback(),this.__unsubs){for(;this.__unsubs.length;){const e=this.__unsubs.pop();e instanceof Promise?e.then(e=>e()):e()}this.__unsubs=void 0}}updated(e){super.updated(e),e.has("hass")&&this.__checkSubscribed()}hassSubscribe(){return[]}__checkSubscribed(){void 0===this.__unsubs&&this.isConnected&&void 0!==this.hass&&(this.__unsubs=this.hassSubscribe())}}return t([oe({attribute:!1})],a.prototype,"hass",void 0),a};var et={modes_short:{armed_away:"Fora",armed_home:"Casa",armed_night:"Nit",armed_custom_bypass:"Personalitzat",armed_vacation:"Vacation"},enabled:"Activat",disabled:"Desactivat"},tt={time_slider:{seconds:"seg",minutes:"min",infinite:"infinit",none:"cap"},editor:{ui_mode:"Canvia a UI",yaml_mode:"Canvia a YAML",edit_in_yaml:"Edit in YAML"},table:{filter:{label:"Filter items",item:"Filter by {name}",hidden_items:"{number} {number, plural,\n one {item is}\n other {items are}\n} hidden"}}},at={general:{title:"General",cards:{general:{description:"Aquest tauler defineix alguns paràmetres globals de l'alarma.",fields:{disarm_after_trigger:{heading:"Desactivar després del disparador",description:"Quan hagi transcorregut el temps d’activació, desactiveu l’alarma en lloc de tornar a l’estat armat."},enable_mqtt:{heading:"Activa MQTT",description:"Permet controlar el tauler d'alarma mitjançant MQTT."},enable_master:{heading:"Activa l'alarma mestra",description:"Crea una entitat per controlar totes les àrees simultàniament."}},actions:{setup_mqtt:"Configuració MQTT",setup_master:"Configuració mestra"}},modes:{title:"Modes",description:"Aquest tauler es pot utilitzar per configurar els modes d'activació de l'alarma.",modes:{armed_away:"El mode fora de casa s'utilitzarà quan totes les persones surtin de casa. Es controlen totes les portes i finestres que permeten l'accés a la casa, així com els sensors de moviment dins de la casa.",armed_home:"El mode a casa (també conegut com mode casa) s'utilitzarà quan configureu l'alarma mentre hi hagi persones a la casa. Es controlen totes les portes i finestres que permetin l'accés a la casa, però no els sensors de moviment a l'interior de la casa.",armed_night:"El mode nit s'utilitzarà quan configureu l'alarma abans d'anar a dormir. Es controlaran totes les portes i finestres que permetin l'accés a la casa i es seleccionaran els sensors de moviment (per exemple, a la planta baixa) de la casa.",armed_vacation:"Armed vacation can be used as an extension to the armed away mode in case of absence for longer duration. The delay times and trigger responses can be adapted (as desired) to being distant from home.",armed_custom_bypass:"Un mode addicional per definir el vostre propi perímetre de seguretat."},number_sensors_active:"{number} {number, plural,\n one {sensor}\n other {sensors}\n} activa",fields:{status:{heading:"Status",description:"Controls whether the alarm can be armed in this mode."},exit_delay:{heading:"Retard de sortida",description:"Quan activeu l'alarma, en aquest període de temps els sensors encara no activaran l'alarma."},entry_delay:{heading:"Retard d'entrada",description:"Temps de retard fins que s'activi l'alarma després que s'activi un dels sensors."},trigger_time:{heading:"Temps d'activació",description:"Temps durant el qual sonarà la sirena"}}},mqtt:{title:"Configuració MQTT",description:"Aquest tauler es pot utilitzar per configurar la interfície MQTT.",fields:{state_topic:{heading:"Tema d'estat",description:"Tema sobre el qual es publiquen les actualitzacions d'estat"},event_topic:{heading:"Tema d'esdeveniment",description:"Tema sobre el qual es publiquen els esdeveniments d'alarma"},command_topic:{heading:"Tama d'ordre",description:"Tema sobre el qual s'envien les ordres d'activació/desactivació."},require_code:{heading:"Requereix codi",description:"Requereix l'enviament d'un codi amb l'ordre."},state_payload:{heading:"Configura la càrrega útil per estat",item:"Definiu una càrrega útil per a l'estat ''{state}''"},command_payload:{heading:"Configura la càrrega útil per ordre",item:"Definiu una càrrega útil per a l'ordre ''{command}''"}}},areas:{title:"Àrees",description:"Les àrees es poden utilitzar per dividir el sistema d'alarma en diversos compartiments.",no_items:"Encara no hi ha àrees definides.",table:{remarks:"Observacions",summary:"Aquesta àrea conté {summary_sensors} i {summary_automations}.",summary_sensors:"{number} {number, plural,\n one {sensor}\n other {sensors}\n}",summary_automations:"{number} {number, plural,\n one {automatisme}\n other {automatismes}\n}"},actions:{add:"Afegeix"}}},dialogs:{create_area:{title:"Àrea nova",fields:{copy_from:"Copia la configuració de"}},edit_area:{title:"Edita l'àrea ''{area}''",name_warning:"Nota: si canvieu el nom, es canviarà l'identificador d'entitat"},remove_area:{title:"Voleu eliminar l'àrea?",description:"Confirmeu que voleu eliminar aquesta àrea? Aquesta àrea conté {sensors} sensors i {automatismes} automatismes, que també s'eliminaran."},edit_master:{title:"Configuració mestra"},disable_master:{title:"Voleu desactivar l'alarma mestra?",description:"Confirmeu que voleu eliminar l'alarma mestra? Aquesta àrea conté automatismes {automatismes}, que s'eliminaran amb aquesta acció."}}},sensors:{title:"Sensors",cards:{sensors:{description:"Sensors configurats actualment. Feu clic a una entitat per fer canvis.",table:{no_items:"No hi ha cap sensor per mostrar",arm_modes:"Modes d'armat",always_on:"(Sempre)",no_area_warning:"Sensor is not assigned to any area."}},add_sensors:{title:"Afegeix sensors",description:"Afegiu més sensors. Assegureu-vos que els vostres sensors tinguin un friendly_name perquè pugueu identificar-los.",no_items:"No hi ha entitats HA disponibles que es puguin configurar per a l'alarma. Assegureu-vos d'incloure entitats del tipus binary_sensor.",table:{type:"Detected type"},actions:{add_to_alarm:"afegeix a l'alarma",show_all:"Mostra-ho tot"}},editor:{title:"Edita el sensor",description:"Edita la configuració del sensor de ''{entity}''.",fields:{area:{heading:"Àrea",description:"Seleccioneu una àrea que contingui aquest sensor."},group:{heading:"Group",description:"Group with other sensors for combined triggering."},device_type:{heading:"Tipus de dispositiu",description:"Trieu un tipus de dispositiu per aplicar automàticament la configuració adequada.",choose:{door:{name:"Porta",description:"Porta, porta de garatge o altra entrada que s'utilitzi per entrar/sortir de casa."},window:{name:"Finestra",description:"Finestra o una porta que no s'utilitza per entrar a la casa, com ara un balcó."},motion:{name:"Moviment",description:"Sensor de presència o dispositiu similar que té un retard entre les activacions."},tamper:{name:"Antisabotatge",description:"Detector de retirada de la coberta del sensor, sensor de trencament de vidre, etc."},environmental:{name:"Ambiental",description:"Sensor de fum o gas, detector de fuites, etc. (no relacionat amb la protecció antirobatori)."},other:{name:"Genèric"}}},always_on:{heading:"Sempre activat",description:"El sensor sempre ha de disparar l'alarma."},modes:{heading:"Modes habilitats",description:"Modes d'alarma en què aquest sensor està actiu."},arm_on_close:{heading:"Arma després de tancar",description:"Després de la desactivació d'aquest sensor, s'omet automàticament el temps de retard de sortida restant."},use_exit_delay:{heading:"Use exit delay",description:"Sensor is allowed to be active when the exit delay starts."},use_entry_delay:{heading:"Use entry delay",description:"Sensor activation triggers the alarm after the entry delay rather than directly."},allow_open:{heading:"Permet obrir mentre s'arma l'alarma",description:"Permeteu que aquest sensor estigui actiu poc després de configurar-lo de manera que no bloquegi l'activació de l'alarma."},auto_bypass:{heading:"Omet automàticament",description:"Excloeu aquest sensor de l'alarma si està obert mentre s'arma l'alarma.",modes:"Modes in which sensor may be bypassed"},trigger_unavailable:{heading:"Activador quan no estigui disponible",description:"Quan l'estat del sensor no estigui disponible, això activarà el sensor."}},actions:{toggle_advanced:"Configuració avançada",remove:"Elimina",setup_groups:"Setup groups"},errors:{description:"Corregiu els errors següents:",no_area:"No s'ha seleccionat cap àrea",no_modes:"No s'han seleccionat modes per als quals el sensor hauria d'estar actiu",no_auto_bypass_modes:"No modes are selected for the sensor may be automatically bypassed"}}},dialogs:{manage_groups:{title:"Manage sensor groups",description:"In a sensor group multiple sensors must be activated within a time period before the alarm is triggered.",no_items:"No groups yet",actions:{new_group:"New group"}},create_group:{title:"New sensor group",fields:{name:{heading:"Name",description:"Name for sensor group"},timeout:{heading:"Time-out",description:"Time period during which consecutive sensor activations triggers the alarm."},sensors:{heading:"Sensors",description:"Select the sensors which are contained by this group."}},errors:{invalid_name:"Invalid name provided.",insufficient_sensors:"At least 2 sensors need to be selected."}},edit_group:{title:"Edit sensor group ''{name}''"}}},codes:{title:"Codis",cards:{codes:{description:"Canvieu la configuració del codi.",fields:{code_arm_required:{heading:"Utilitzeu un codi d'activació",description:"Requereix un codi per activar l'alarma"},code_disarm_required:{heading:"Utilitzeu un codi de desactivació",description:"Requereix un codi per desactivar l'alarma"},code_format:{heading:"Format del codi",description:"Estableix el tipus de codi per a la targeta d'alarma Lovelace.",code_format_number:"codi PIN",code_format_text:"contrasenya"}}},user_management:{title:"Gestió d'usuaris",description:"Cada usuari té el seu propi codi per activar/desactivar l'alarma.",no_items:"Encara no hi ha usuaris",actions:{new_user:"usuari nou"}},new_user:{title:"Crea un usuari nou",description:"Es poden crear usuaris per proporcionar accés al funcionament de l'alarma.",fields:{name:{heading:"Nom",description:"Nom de l'usuari."},code:{heading:"Codi",description:"Codi d'aquest usuari."},confirm_code:{heading:"Confirmeu el codi",description:"Repetiu el codi."},can_arm:{heading:"Permetre que el codi active l'alarma",description:"Entering this code activates the alarm"},can_disarm:{heading:"Permetre que el codi desactive l'alarma",description:"Entering this code deactivates the alarm"},is_override_code:{heading:"És un codi de sobreescriptura",description:"Si introduïu aquest codi, es forçarà l'estat d'activació de l'alarma"},area_limit:{heading:"Restricted areas",description:"Limit user to control only the selected areas"}},errors:{no_name:"No s'ha proporcionat cap nom.",no_code:"El codi ha de tenir 4 caràcters o números com a mínim.",code_mismatch:"Els codis no coincideixen."}},edit_user:{title:"Edita l'usuari",description:"Canvia la configuració de l'usuari ''{name}''.",fields:{old_code:{heading:"Codi actual",description:"Codi actual, deixeu-lo en blanc per deixar-lo sense canvis."}}}}},actions:{title:"Accions",cards:{notifications:{title:"Notificacions",description:"Utilitzant aquest tauler, podeu gestionar les notificacions que s'envien quan es produeix un determinat esdeveniment d'alarma.",table:{no_items:"Encara no s'han creat notificacions.",no_area_warning:"Action is not assigned to any area."},actions:{new_notification:"nova notificació"}},actions:{description:"Aquest tauler es pot utilitzar per canviar un dispositiu quan l'estat d'alarma canvia.",table:{no_items:"Encara no s'han creat accions."},actions:{new_action:"nova acció"}},new_notification:{title:"Crea una notificació",description:"Crea una nova notificació.",trigger:"Condition",action:"Task",options:"Options",fields:{event:{heading:"Esdeveniment",description:"Quan s'ha d'enviar la notificació",choose:{armed:{name:"L'alarma està activada",description:"L'alarma s'ha activat correctament"},disarmed:{name:"L'alarma està desactivada",description:"L'alarma està desactivada"},triggered:{name:"L'alarma s'activat per esdeveniment",description:"L'alarma s'activat per esdeveniment"},arm_failure:{name:"No s'ha pogut activar l'alarma",description:"L'activació de l'alarma ha fallat a causa d'un o més sensors estan oberts"},arming:{name:"S'ha iniciat el retard de sortida",description:"S'ha iniciat el retard de sortida, a punt per sortir de casa."},pending:{name:"S'ha iniciat el retard d'entrada",description:"El retard d'entrada s'ha iniciat, l'alarma s'activarà aviat."}}},mode:{heading:"Mode",description:"Limita l'acció a modes específics d'activació (opcional)"},title:{heading:"Títol",description:"Títol del missatge de notificació"},message:{heading:"Missatge",description:"Contingut del missatge de notificació",insert_wildcard:"Insert wildcard",placeholders:{armed:"The alarm is set to {{arm_mode}}",disarmed:"The alarm is now OFF",triggered:"The alarm is triggered! Cause: {{open_sensors}}.",arm_failure:"The alarm could not be armed right now, due to: {{open_sensors}}.",arming:"The alarm will be armed soon, please leave the house.",pending:"The alarm is about to trigger, disarm it quickly!"}},open_sensors_format:{heading:"Format for open_sensors wildcard",description:"Choose which sensor information in inserted in the message",options:{default:"Names and states",short:"Names only"}},arm_mode_format:{heading:"Translation for arm_mode wildcard",description:"Choose in which language the arm mode is inserted in the message"},target:{heading:"Destinatari",description:"Dispositiu al qual enviar el missatge"},name:{heading:"Nom",description:"Descripció d'aquesta notificació",placeholders:{armed:"Notify {target} upon arming",disarmed:"Notify {target} upon disarming",triggered:"Notify {target} when triggered",arm_failure:"Notify {target} on failure",arming:"Notify {target} when leaving",pending:"Notify {target} when arriving"}},delete:{heading:"Delete automation",description:"Permanently remove this automation"}},actions:{test:"Prova-ho"}},new_action:{title:"Crea una acció",description:"Aquest tauler es pot utilitzar per canviar un dispositiu quan l'estat d'alarma canvia.",fields:{event:{heading:"Esdeveniment",description:"Quan s'ha d'executar l'acció"},area:{heading:"Àrea",description:"Àrea per a la qual s'aplica l'esdeveniment, deixeu-la en blanc per seleccionar l'alarma global."},mode:{heading:"Mode",description:"Limita l'acció a modes específics d'activació (opcional)"},entity:{heading:"Entitat",description:"Entitat en què es realitzarà l'acció"},action:{heading:"Acció",description:"Acció a realitzar a l'entitat",no_common_actions:"Actions can only be assigned in YAML mode for the selected entities."},name:{heading:"Nom",description:"Descripció d'aquesta acció",placeholders:{armed:"Set {entity} to {state} upon arming",disarmed:"Set {entity} to {state} upon disarming",triggered:"Set {entity} to {state} when triggered",arm_failure:"Set {entity} to {state} on failure",arming:"Set {entity} to {state} when leaving",pending:"Set {entity} to {state} when arriving"}}}}}}},it={common:et,components:tt,title:"Tauler alarma",panels:at},st=Object.freeze({__proto__:null,common:et,components:tt,title:"Tauler alarma",panels:at,default:it}),nt={modes_short:{armed_away:"Away",armed_home:"Home",armed_night:"Night",armed_custom_bypass:"Custom",armed_vacation:"Vacation"},enabled:"Enabled",disabled:"Disabled"},rt={time_slider:{seconds:"sec",minutes:"min",infinite:"infinite",none:"none"},editor:{ui_mode:"To UI",yaml_mode:"To YAML",edit_in_yaml:"Edit in YAML"},table:{filter:{label:"Filter items",item:"Filter by {name}",hidden_items:"{number} {number, plural,\n one {item is}\n other {items are}\n} hidden"}}},ot={general:{title:"General",cards:{general:{description:"This panel defines some global settings for the alarm.",fields:{disarm_after_trigger:{heading:"Disarm after trigger",description:"After trigger time has expired, disarm the alarm instead of returning to armed state."},enable_mqtt:{heading:"Enable MQTT",description:"Allow the alarm panel to be controlled through MQTT."},enable_master:{heading:"Enable alarm master",description:"Creates an entity for controlling all areas simultaneously."}},actions:{setup_mqtt:"MQTT Configuration",setup_master:"Master Configuration"}},modes:{title:"Modes",description:"This panel can be used to set up the arm modes of the alarm.",modes:{armed_away:"Armed away will be used when all people left the house. All doors and windows allowing access to the house will be guarded, as well as motion sensors inside the house.",armed_home:"Armed home (also known as armed stay) will be used when setting the alarm while people are in the house. All doors and windows allowing access to the house will be guarded, but not motion sensors inside the house.",armed_night:"Armed night will be used when setting the alarm before going to sleep. All doors and windows allowing access to the house will be guarded, and selected motion sensors (downstairs) in the house.",armed_vacation:"Armed vacation can be used as an extension to the armed away mode in case of absence for longer duration. The delay times and trigger responses can be adapted (as desired) to being distant from home.",armed_custom_bypass:"An extra mode for defining your own security perimeter."},number_sensors_active:"{number} {number, plural,\n one {sensor}\n other {sensors}\n} active",fields:{status:{heading:"Status",description:"Controls whether the alarm can be armed in this mode."},exit_delay:{heading:"Exit delay",description:"When arming the alarm, within this time period the sensors will not trigger the alarm yet."},entry_delay:{heading:"Entry delay",description:"Delay time until the alarm is triggered after one of the sensors is activated."},trigger_time:{heading:"Trigger time",description:"Time during which the alarm will remain in the triggered state after activation."}}},mqtt:{title:"MQTT configuration",description:"This panel can be used for configuration of the MQTT interface.",fields:{state_topic:{heading:"State topic",description:"Topic on which state updates are published"},event_topic:{heading:"Event topic",description:"Topic on which alarm events are published"},command_topic:{heading:"Command topic",description:"Topic which Alarmo listens to for arm/disarm commands."},require_code:{heading:"Require code",description:"Require the code to be sent with the command."},state_payload:{heading:"Configure payload per state",item:"Define a payload for state ''{state}''"},command_payload:{heading:"Configure payload per command",item:"Define a payload for command ''{command}''"}}},areas:{title:"Areas",description:"Areas can be used for dividing your alarm system into multiple compartments.",no_items:"There are no areas defined yet.",table:{remarks:"Remarks",summary:"This area contains {summary_sensors} and {summary_automations}.",summary_sensors:"{number} {number, plural,\n one {sensor}\n other {sensors}\n}",summary_automations:"{number} {number, plural,\n one {automation}\n other {automations}\n}"},actions:{add:"Add"}}},dialogs:{create_area:{title:"New area",fields:{copy_from:"Copy settings from"}},edit_area:{title:"Editing area ''{area}''",name_warning:"Note: changing the name will change the entity ID"},remove_area:{title:"Remove area?",description:"Are you sure you want to remove this area? This area contains {sensors} sensors and {automations} automations, which will be removed as well."},edit_master:{title:"Master configuration"},disable_master:{title:"Disable master?",description:"Are you sure you want to remove the alarm master? This area contains {automations} automations, which will be removed with this action."}}},sensors:{title:"Sensors",cards:{sensors:{description:"Currently configured sensors. Click on an item to make changes.",table:{no_items:"There are no sensors to be displayed here.",no_area_warning:"Sensor is not assigned to any area.",arm_modes:"Arm Modes",always_on:"(Always)"}},add_sensors:{title:"Add Sensors",description:"Add more sensors. Make sure that your sensors have a suitable name, so you can identify them.",no_items:"There are no available HA entities that can be configured for the alarm. Make sure to include entities of the type binary_sensor.",table:{type:"Detected type"},actions:{add_to_alarm:"add to alarm",filter_supported:"Hide items with unknown type"}},editor:{title:"Edit Sensor",description:"Configuring the sensor settings of ''{entity}''.",fields:{area:{heading:"Area",description:"Select an area which contains this sensor."},group:{heading:"Group",description:"Group with other sensors for combined triggering."},device_type:{heading:"Device Type",description:"Choose a device type to automatically apply appropriate settings.",choose:{door:{name:"Door",description:"A door, gate or other entrance that is used for entering/leaving the home."},window:{name:"Window",description:"A window, or a door not used for entering the house such as balcony."},motion:{name:"Motion",description:"Presence sensor or similar device having a delay between activations."},tamper:{name:"Tamper",description:"Detector of sensor cover removal, glass break sensor, etc."},environmental:{name:"Environmental",description:"Smoke/gas sensor, leak detector, etc. (not related to burglar protection)."},other:{name:"Generic"}}},always_on:{heading:"Always on",description:"Sensor should always trigger the alarm."},modes:{heading:"Enabled modes",description:"Alarm modes in which this sensor is active."},arm_on_close:{heading:"Arm after closing",description:"After deactivation of this sensor, the remaining exit delay will automatically be skipped."},use_exit_delay:{heading:"Use exit delay",description:"Sensor is allowed to be active when the exit delay starts."},use_entry_delay:{heading:"Use entry delay",description:"Sensor activation triggers the alarm after the entry delay rather than directly."},allow_open:{heading:"Allow open after arming",description:"If the sensor is still active after the exit delay, this will not cause arming to fail."},auto_bypass:{heading:"Bypass automatically",description:"Exclude this sensor from the alarm if it is open while arming.",modes:"Modes in which sensor may be bypassed"},trigger_unavailable:{heading:"Trigger when unavailable",description:"When the sensor state becomes 'unavailable', this will activate the sensor."}},actions:{toggle_advanced:"Advanced settings",remove:"Remove",setup_groups:"Setup groups"},errors:{description:"Please correct the following errors:",no_area:"No area is selected",no_modes:"No modes are selected for which the sensor should be active",no_auto_bypass_modes:"No modes are selected for the sensor may be automatically bypassed"}}},dialogs:{manage_groups:{title:"Manage sensor groups",description:"In a sensor group multiple sensors must be activated within a time period before the alarm is triggered.",no_items:"No groups yet",actions:{new_group:"New group"}},create_group:{title:"New sensor group",fields:{name:{heading:"Name",description:"Name for sensor group"},timeout:{heading:"Time-out",description:"Time period during which consecutive sensor activations triggers the alarm."},sensors:{heading:"Sensors",description:"Select the sensors which are contained by this group."}},errors:{invalid_name:"Invalid name provided.",insufficient_sensors:"At least 2 sensors need to be selected."}},edit_group:{title:"Edit sensor group ''{name}''"}}},codes:{title:"Codes",cards:{codes:{description:"Change settings for the code.",fields:{code_arm_required:{heading:"Use arm code",description:"Require a code for arming the alarm"},code_disarm_required:{heading:"Use disarm code",description:"Require a code for disarming the alarm"},code_format:{heading:"Code format",description:"Sets the input type for Lovelace alarm card.",code_format_number:"pincode",code_format_text:"password"}}},user_management:{title:"User management",description:"Each user has its own code to arm/disarm the alarm.",no_items:"There are no users yet",actions:{new_user:"new user"}},new_user:{title:"Create new user",description:"Users can be created for providing access to operating the alarm.",fields:{name:{heading:"Name",description:"Name of the user."},code:{heading:"Code",description:"Code for this user."},confirm_code:{heading:"Confirm code",description:"Repeat the code."},can_arm:{heading:"Allow code for arming",description:"Entering this code activates the alarm"},can_disarm:{heading:"Allow code for disarming",description:"Entering this code deactivates the alarm"},is_override_code:{heading:"Is override code",description:"Entering this code will arm the alarm in force"},area_limit:{heading:"Restricted areas",description:"Limit user to control only the selected areas"}},errors:{no_name:"No name provided.",no_code:"Code should have 4 characters/numbers minimum.",code_mismatch:"The codes don't match."}},edit_user:{title:"Edit User",description:"Change configuration for user ''{name}''.",fields:{old_code:{heading:"Current code",description:"Current code, leave empty to leave unchanged."}}}}},actions:{title:"Actions",cards:{notifications:{title:"Notifications",description:"Using this panel, you can manage notifications to be sent when during a certain alarm event.",table:{no_items:"There are no notifications created yet.",no_area_warning:"Action is not assigned to any area."},actions:{new_notification:"new notification"}},actions:{description:"This panel can be used to switch a device when the alarm state changes.",table:{no_items:"There are no actions created yet."},actions:{new_action:"new action"}},new_notification:{title:"Configure notification",description:"Receive a notification when arming/disarming the alarm, on activation, etc.",trigger:"Condition",action:"Task",options:"Options",fields:{event:{heading:"Event",description:"When should the notification be sent",choose:{armed:{name:"Alarm is armed",description:"The alarm is succesfully armed"},disarmed:{name:"Alarm is disarmed",description:"The alarm is disarmed"},triggered:{name:"Alarm is triggered",description:"The alarm is triggered"},arm_failure:{name:"Failed to arm",description:"The arming of the alarm failed due to one or more open sensors"},arming:{name:"Exit delay started",description:"Exit delay started, ready to leave the house."},pending:{name:"Entry delay started",description:"Entry delay started, the alarm will trigger soon."}}},mode:{heading:"Mode",description:"Limit the action to specific arm modes (optional)"},title:{heading:"Title",description:"Title for the notification message"},message:{heading:"Message",description:"Content of the notification message",insert_wildcard:"Insert wildcard",placeholders:{armed:"The alarm is set to {{arm_mode}}",disarmed:"The alarm is now OFF",triggered:"The alarm is triggered! Cause: {{open_sensors}}.",arm_failure:"The alarm could not be armed right now, due to: {{open_sensors}}.",arming:"The alarm will be armed soon, please leave the house.",pending:"The alarm is about to trigger, disarm it quickly!"}},open_sensors_format:{heading:"Format for open_sensors wildcard",description:"Choose which sensor information in inserted in the message",options:{default:"Names and states",short:"Names only"}},arm_mode_format:{heading:"Translation for arm_mode wildcard",description:"Choose in which language the arm mode is inserted in the message"},target:{heading:"Target",description:"Device to send the push message to"},name:{heading:"Name",description:"Description for this notification",placeholders:{armed:"Notify {target} upon arming",disarmed:"Notify {target} upon disarming",triggered:"Notify {target} when triggered",arm_failure:"Notify {target} on failure",arming:"Notify {target} when leaving",pending:"Notify {target} when arriving"}},delete:{heading:"Delete automation",description:"Permanently remove this automation"}},actions:{test:"Try it"}},new_action:{title:"Configure action",description:"Switch lights or devices (such as sirens) when arming/disarming the alarm, on activation, etc.",fields:{event:{heading:"Event",description:"When should the action be executed"},area:{heading:"Area",description:"Area for which the event applies, leave empty to select the global alarm."},mode:{heading:"Mode",description:"Limit the action to specific arm modes (optional)"},entity:{heading:"Entity",description:"Entity to perform action on"},action:{heading:"Action",description:"Action to perform on the entity",no_common_actions:"Actions can only be assigned in YAML mode for the selected entities."},name:{heading:"Name",description:"Description for this action",placeholders:{armed:"Set {entity} to {state} upon arming",disarmed:"Set {entity} to {state} upon disarming",triggered:"Set {entity} to {state} when triggered",arm_failure:"Set {entity} to {state} on failure",arming:"Set {entity} to {state} when leaving",pending:"Set {entity} to {state} when arriving"}}}}}}},lt={common:nt,components:rt,title:"Alarm panel",panels:ot},dt=Object.freeze({__proto__:null,common:nt,components:rt,title:"Alarm panel",panels:ot,default:lt}),ct={modes_short:{armed_away:"Ausente",armed_home:"En casa",armed_night:"Nocturno",armed_custom_bypass:"Personalizado",armed_vacation:"Vacaciones"},enabled:"Habilitar",disabled:"Deshabilitar"},ht={time_slider:{seconds:"seg",minutes:"min",infinite:"infinito",none:"ninguno"},editor:{ui_mode:"Editar en la UI",yaml_mode:"Editar en YAML",edit_in_yaml:"Editar en YAML"},table:{filter:{label:"Filtrar entidades",item:"Filtrar por {name}",hidden_items:"{number} {number, plural,\n one {entidas está}\n other {entidades están}\n} oculta"}}},ut={general:{title:"General",cards:{general:{description:"Este panel define algunos ajustes globales para la alarma.",fields:{disarm_after_trigger:{heading:"Desarmar después de disparar",description:"Una vez transcurrido el tiempo de activación, desactivar la alarma en lugar de volver al estado de armada."},enable_mqtt:{heading:"Habilitar MQTT",description:"Permitir que el panel de alarma se controle a través de MQTT."},enable_master:{heading:"Habilitar alarma maestra",description:"Crea una entidad para controlar todas las áreas simultáneamente."}},actions:{setup_mqtt:"Configuración MQTT",setup_master:"Configuración maestra"}},modes:{title:"Modos",description:"Este panel se puede utilizar para configurar los modos de armado de la alarma.",modes:{armed_away:"Armado ausente se utilizará cuando todas las personas salgan de la casa. Todas las puertas y ventanas que permitan el acceso a la casa estarán vigiladas, así como los sensores de movimiento dentro de la casa.",armed_home:"Armado en casa (también conocido como estancia armada) se utilizará cuando se active la alarma mientras haya personas en la casa. Todas las puertas y ventanas que permitan el acceso a la casa estarán protegidas, pero no los sensores de movimiento dentro de la casa.",armed_night:"Armado nocturno se usará al configurar la alarma antes de irse a dormir. Todas las puertas y ventanas que permitan el acceso a la casa estarán resguardadas y se seleccionarán sensores de movimiento en la casa.",armed_vacation:"Armado en vacaciones se puede usar como una extensión del modo armado ausente en caso de ausencia de mayor duración. Los tiempos de retardo y las respuestas de activación se pueden adaptar (como se desee) a estar lejos de casa.",armed_custom_bypass:"Un modo adicional para definir su propio perímetro de seguridad."},number_sensors_active:"{number} {number, plural,\n one {sensor}\n other {sensores}\n} activo",fields:{status:{heading:"Estado",description:"Controla si la alarma se puede armar en este modo."},exit_delay:{heading:"Retardo de salida",description:"Al armar la alarma, dentro de este período de tiempo, los sensores aún no dispararán la alarma."},entry_delay:{heading:"Retardo de entrada",description:"Tiempo de retardo hasta que se activa la alarma después de que se active alguno de los sensores."},trigger_time:{heading:"Tiempo de activación",description:"Tiempo durante el cual sonará la sirena."}}},mqtt:{title:"Configuración MQTT",description:"Este panel se puede utilizar para configurar la interfaz MQTT.",fields:{state_topic:{heading:"Tema del estado",description:"Tema sobre el que se publican las actualizaciones de estado."},event_topic:{heading:"Tema del evento",description:"Tema sobre el que se publican los eventos de alarma."},command_topic:{heading:"Tema del comando",description:"Tema sobre el que se envían los comandos de armado / desarmado."},require_code:{heading:"Requerir código",description:"Requiere que el código se envíe con el comando."},state_payload:{heading:"Configurar la carga útil por estado",item:"Defina una carga útil para el estado ''{'state}''"},command_payload:{heading:"Configurar la carga útil por comando",item:"Defina una carga útil para el comando ''{command}''"}}},areas:{title:"Áreas",description:"Las áreas se pueden utilizar para dividir su sistema de alarma en varios compartimentos.",no_items:"Aún no hay áreas definidas.",table:{remarks:"Comentarios",summary:"Esta área contiene {summary_sensors} y {summary_automations}.",summary_sensors:"{number} {number, plural,\n one {sensor}\n other {sensores}\n}",summary_automations:"{number} {number, plural,\n one {automatizacion}\n other {automatizaciones}\n}"},actions:{add:"Agregar"}}},dialogs:{create_area:{title:"Nueva área",fields:{copy_from:"Copiar la configuración de"}},edit_area:{title:"Editando área ''{'area}''",name_warning:"Nota: cambiar el nombre cambiará el ID de la entidad."},remove_area:{title:"¿Eliminar área?",description:"¿Está seguro de que desea eliminar esta área? Esta área contiene {sensors} sensores y {automations} automatizaciones que también se eliminarán."},edit_master:{title:"Configuración maestra"},disable_master:{title:"¿Deshabilitar maestro?",description:"¿Está seguro de que desea eliminar la alarma maestra? Esta área contiene {sensors} sensores y {automations} automatizaciones que también se eliminarán."}}},sensors:{title:"Sensores",cards:{sensors:{description:"Sensores configurados actualmente. Haga clic en una entidad para realizar cambios.",table:{no_items:"No hay sensores para mostrar aquí.",no_area_warning:"El sensor no está asignado a ningún área.",arm_modes:"Modos de armado",always_on:"(Siempre)"}},add_sensors:{title:"Agregar sensores",description:"Agrega más sensores. Asegúrate de que tus sensores tengan un nombre amigable, para que puedas identificarlos.",no_items:"No hay entidades HA disponibles que se puedan configurar para la alarma. Asegúrese de incluir entidades del tipo sensor binario.",table:{type:"Tipo detectado"},actions:{add_to_alarm:"agregar a la alarma",filter_supported:"Ocultar elementos con tipo desconocido"}},editor:{title:"Editar sensor",description:"Configurando los ajustes del sensor de ''{'entity}''.",fields:{area:{heading:"Área",description:"Seleccione un área que contenga este sensor."},group:{heading:"Grupo",description:"Agrupar con otros sensores para un disparado combinado."},device_type:{heading:"Tipo de dispositivo",description:"Elija un tipo de dispositivo para aplicar automáticamente la configuración adecuada.",choose:{door:{name:"Puerta",description:"Una puerta, portón u otra entrada que se utilice para entrar / salir de la casa."},window:{name:"Ventana",description:"Una ventana o una puerta que no se use para entrar a la casa, como un balcón."},motion:{name:"Movimiento",description:"Sensor de presencia o dispositivo similar que tiene un retardo entre activaciones."},tamper:{name:"Sabotaje",description:"Detector de extracción de la cubierta del sensor, sensor de rotura de vidrio, etc."},environmental:{name:"Medioambiental",description:"Sensor de humo / gas, detector de fugas, etc. (no relacionado con la protección antirrobo)."},other:{name:"Genérico"}}},always_on:{heading:"Siempre encendido",description:"El sensor siempre debe activar la alarma."},modes:{heading:"Modos habilitados",description:"Modos de alarma en los que este sensor está activo."},arm_on_close:{heading:"Armar después de cerrar",description:"Después de la desactivación de este sensor, se saltará automáticamente el retardo de salida restante."},use_exit_delay:{heading:"Usar retardo de salida",description:"Se permite que el sensor esté activo cuando comienza el retardo de salida."},use_entry_delay:{heading:"Usar retardo de entrada",description:"La activación del sensor activa la alarma después del retardo de entrada en lugar de directamente."},allow_open:{heading:"Permitir abrir mientras se arma",description:"Si el sensor aún está activo después del retardo de salida, esto no hará que falle el armado."},auto_bypass:{heading:"Omitir automáticamente",description:"Excluya este sensor de la alarma si está abierto mientras se arma.",modes:"Modos en los que se puede omitir el sensor"},trigger_unavailable:{heading:"Activar cuando no esté disponible",description:"Cuando el estado del sensor se vuelve 'no disponible', esto activará el sensor."}},actions:{toggle_advanced:"Configuración avanzada",remove:"Eliminar",setup_groups:"Configuraar grupos"},errors:{description:"Por favor, corrija los siguientes errores:",no_area:"No se ha seleccionado ninguna área",no_modes:"No se han seleccionados modos para los que el sensor deba estar activo",no_auto_bypass_modes:"No se han seleccionados modos para los que el sensor pueda ser omitido"}}},dialogs:{manage_groups:{title:"Administrar grupos de sensores",description:"En un grupo de sensores, se deben activar varios sensores dentro de un período de tiempo antes de que se dispare la alarma.",no_items:"Todavía no hay grupos",actions:{new_group:"Nuevo grupo"}},create_group:{title:"Nuevo grupo de sensores",fields:{name:{heading:"Nombre",description:"Nombre del grupo de sensores"},timeout:{heading:"Tiempo muerto",description:"Período de tiempo durante el cual las activaciones consecutivas del sensor activan la alarma."},sensors:{heading:"Sensores",description:"Seleccione los sensores que están contenidos en este grupo."}},errors:{invalid_name:"Nombre proporcionado no válido.",insufficient_sensors:"Se deben seleccionar al menos 2 sensores."}},edit_group:{title:"Editar grupo de sensores '{name}'"}}},codes:{title:"Códigos",cards:{codes:{description:"Cambiar la configuración del código.",fields:{code_arm_required:{heading:"Usar código de armado",description:"Requiere un código para armar la alarma."},code_disarm_required:{heading:"Usar código de desarmado",description:"Requiere un código para desarmar la alarma."},code_format:{heading:"Formato del código",description:"Establece el tipo de entrada para la tarjeta de la alarma.",code_format_number:"código PIN",code_format_text:"contraseña"}}},user_management:{title:"Gestión de usuarios",description:"Cada usuario tiene su propio código para armar / desarmar la alarma.",no_items:"Aún no hay usuarios",actions:{new_user:"nuevo usuario"}},new_user:{title:"Crear nuevo usuario",description:"Se pueden crear usuarios para proporcionar acceso a la operación de la alarma.",fields:{name:{heading:"Nombre",description:"Nombre del usuario."},code:{heading:"Código",description:"Código para este usuario."},confirm_code:{heading:"Confirmar código",description:"Repite el código."},can_arm:{heading:"Permitir código para armar",description:"Al ingresar este código se activa la alarma."},can_disarm:{heading:"Permitir código para desarmar",description:"Al ingresar este código se desactiva la alarma."},is_override_code:{heading:"Es un código de anulación",description:"Al ingresar este código se forzará el armado de la alarma."},area_limit:{heading:"Áreas restringidas",description:"Limitar al usuario a controlar solo las áreas seleccionadas"}},errors:{no_name:"No se proporcionó ningún nombre.",no_code:"El código debe tener 4 caracteres / números como mínimo.",code_mismatch:"Los códigos no coinciden."}},edit_user:{title:"Editar usuario",description:"Cambiar la configuración del usuario ''{'name}''.",fields:{old_code:{heading:"Código actual",description:"Código actual, déjelo en blanco para no modificarlo."}}}}},actions:{title:"Acciones",cards:{notifications:{title:"Notificaciones",description:"Usando este panel, puede administrar las notificaciones que se enviarán durante un evento de alarma determinado.",table:{no_items:"Aún no se han creado notificaciones.",no_area_warning:"La acción no está asignada a ningún área."},actions:{new_notification:"nueva notificación"}},actions:{description:"Este panel se puede utilizar para cambiar un dispositivo cuando cambia el estado de alarma.",table:{no_items:"Aún no se han creado acciones."},actions:{new_action:"nueva acción"}},new_notification:{title:"Crear notificación",description:"Crear una nueva notificación.",trigger:"Condición",action:"Tarea",options:"Opciones",fields:{event:{heading:"Evento",description:"Cuándo debe enviarse la notificación.",choose:{armed:{name:"La alarma está armada",description:"La alarma está correctamente armada."},disarmed:{name:"La alarma está desarmada",description:"La alarma está desarmada."},triggered:{name:"Se ha disparado la alarma",description:"La alarma se ha disparado."},arm_failure:{name:"No se pudo armar",description:"El armado de la alarma falló debido a uno o más sensores abiertos."},arming:{name:"Se ha iniciado el retardo de salida",description:"Se ha iniciado el retardo de salida, listo para salir de la casa."},pending:{name:"Se ha iniciado el retardo de entrada",description:"Se ha iniciado el retardo de entrada, la alarma se disparará pronto."}}},mode:{heading:"Modo",description:"Limita la acción a modos de armado específicos (opcional)."},title:{heading:"Título",description:"Título del mensaje de notificación."},message:{heading:"Mensaje",description:"Contenido del mensaje de notificación.",insert_wildcard:"Insertar comodín",placeholders:{armed:"La alarma está configurada en {{arm_mode}}",disarmed:"Ahora la alarma está APAGADA",triggered:"¡Se ha disparado la alarma! Causa: {{open_sensors}}.",arm_failure:"No se pudo armar la alarma en este momento debido a: {{open_sensors}}.",arming:"Se armará pronto la alarma, por favor, salga de la casa.",pending:"¡La alarma está a punto de dispararse, desarme rápidamente!"}},open_sensors_format:{heading:"Formato para el comodín open_sensors",description:"Elija qué información del sensor se inserta en el mensaje",options:{default:"Nombres y estados",short:"Solo nombres"}},arm_mode_format:{heading:"Traducción del comodín arm_mode",description:"Elija en qué idioma se inserta el modo de armado en el mensaje"},target:{heading:"Objetivo",description:"Dispositivo al que enviar el mensaje push."},name:{heading:"Nombre",description:"Descripción de esta notificación.",placeholders:{armed:"Notificar a {target} al armar",disarmed:"Notificar a {target} al desarmar",triggered:"Notificar a {target} cuando se dispare",arm_failure:"Notificar a {target} si falla",arming:"Notificar a {target} cuando se vaya",pending:"Notificar a {target} cuando llegue"}},delete:{heading:"Eliminar automatización",description:"Eliminar esta automatización de forma permanente"}},actions:{test:"Pruébelo"}},new_action:{title:"Crear acción",description:"Este panel se puede utilizar para cambiar un dispositivo cuando cambia el estado de la alarma.",fields:{event:{heading:"Evento",description:"¿Cuándo debe ejecutarse la acción?"},area:{heading:"Área",description:"Área para la que se aplica el evento, déjelo en blanco para seleccionar la alarma global."},mode:{heading:"Modo",description:"Limita la acción a modos de armado específicos (opcional)"},entity:{heading:"Entidad",description:"Entidad sobre la que realizar la acción."},action:{heading:"Acción",description:"Acción a realizar en la entidad.",no_common_actions:"Las acciones solo se pueden asignar en modo YAML para las entidades seleccionadas."},name:{heading:"Nombre",description:"Descripción de esta acción.",placeholders:{armed:"Establecer {entity} en {state} al armar",disarmed:"Establecer {entity} en {state} al desarmar",triggered:"Establecer {entity} en {state} cuando se dispare",arm_failure:"Establecer {entity} en {state} si falla",arming:"Establecer {entity} en {state} cuando se vaya",pending:"Establecer {entity} en {state} cuando llegue"}}}}}}},mt={common:ct,components:ht,title:"Panel de alarma",panels:ut},pt=Object.freeze({__proto__:null,common:ct,components:ht,title:"Panel de alarma",panels:ut,default:mt}),gt={modes_short:{armed_away:"Eemal",armed_home:"Kodus",armed_night:"Ööseks",armed_custom_bypass:"Valikuline",armed_vacation:"Vacation"},enabled:"Lubatud",disabled:"Keelatud"},vt={time_slider:{seconds:"sek",minutes:"min",infinite:"piiranguta",none:"puudub"},editor:{ui_mode:"Kasutajaliides",yaml_mode:"Koodiredaktor",edit_in_yaml:"Edit in YAML"},table:{filter:{label:"Filter items",item:"Filter by {name}",hidden_items:"{number} {number, plural,\n one {item is}\n other {items are}\n} hidden"}}},ft={general:{title:"Üldsätted",cards:{general:{description:"Need seaded kehtivad kõikides valve olekutes.",fields:{disarm_after_trigger:{heading:"Häire summutamine",description:"Peale häire lõppu võta valvest maha miite ära valvesta uuesti."},enable_mqtt:{heading:"Luba MQTT juhtimine",description:"Luba nupustiku juhtimist MQTT abil."},enable_master:{heading:"Luba põhivalvestus",description:"Loob olemi mis haldab kõiki valvestamise alasid korraga."}},actions:{setup_mqtt:"MQTT seadistamine",setup_master:"Põhivalvestuse sätted"}},modes:{title:"Režiimid",description:"Selles vaates seadistatakse valvestamise režiime.",modes:{armed_away:"Täielik valvestamine kui kedagi pole kodus. Kasutusel on kõik andurid.",armed_home:"Valvestatud kodus ei kasuta liikumisandureid kuid väisuksed ja aknad on valve all.",armed_night:"Valvestatud ööseks ei kasuta määratud liikumisandureid, välisperimeeter on valve all.",armed_vacation:"Armed vacation can be used as an extension to the armed away mode in case of absence for longer duration. The delay times and trigger responses can be adapted (as desired) to being distant from home.",armed_custom_bypass:"Valikulise valvestuse puhul saab määrata kasutatavad andurid."},number_sensors_active:"{number} {number, plural,\n one {andur}\n other {andurit}\n} aktiiv",fields:{status:{heading:"Status",description:"Controls whether the alarm can be armed in this mode."},exit_delay:{heading:"Ooteaeg valvestamisel",description:"Viivitus enne valvestamise rakendumist."},entry_delay:{heading:"Sisenemise viivitus",description:"Viivitus sisenemisel enne häire rakendumist."},trigger_time:{heading:"Häire kestus",description:"Sireeni jne. aktiveerimise kestus."}}},mqtt:{title:"MQTT sätted",description:"MQTT parameetrite seadistamine.",fields:{state_topic:{heading:"Oleku teema (topic)",description:"Teema milles avaldatakse oleku muutused."},event_topic:{heading:"Event topic",description:"Topic on which alarm events are published"},command_topic:{heading:"Käskude teema (topic)",description:"Teema milles avaldatakse valvestamise käsud."},require_code:{heading:"Nõua PIN koodi",description:"Käskude edastamiseks on vajalik PIN kood."},state_payload:{heading:"Määra olekute toimeandmed",item:"Määra oleku ''{state}'' toimeandmed"},command_payload:{heading:"Määra käskude toimeandmed",item:"Määra käsu ''{command}'' toimeandmed"}}},areas:{title:"Alad",description:"Alasid kasutatakse elamise jagamiseks valvetsoonideks.",no_items:"Valvestamise alad on loomata.",table:{remarks:"Ala teave",summary:"See ala sisaldab {summary_sensors} ja {summary_automations}.",summary_sensors:"{number} {number, plural,\n one {andur}\n other {andurit}\n}",summary_automations:"{number} {number, plural,\n one {automatiseering}\n other {automatiseeringut}\n}"},actions:{add:"Lisa"}}},dialogs:{create_area:{title:"Uus ala",fields:{copy_from:"Kopeeri sätted allikast:"}},edit_area:{title:"Ala ''{area}'' muutmine",name_warning:"NB! Nime muutmisel muutub ka olemi ID"},remove_area:{title:"Kas kustutada ala?",description:"Kas kustutada see ala? Ala kaasab andurid {sensors} ja automatiseeringud {automations} mis samuti eemaldatakse."},edit_master:{title:"Põhiala seaded"},disable_master:{title:"Kas keelata põhiala?",description:"Kas keelata põhiala? Ala kaasab andurid {sensors} ja automatiseeringud {automations} mis samuti eemaldatakse.."}}},sensors:{title:"Andurid",cards:{sensors:{description:"Kasutusel olevad andurid. Klõpsa olemil, et seadistada.",table:{no_items:"Andureid pole lisatud. Alustuseks lisa mõni andur.",no_area_warning:"Sensor is not assigned to any area.",arm_modes:"Valvestamise olek",always_on:"(alati)"}},add_sensors:{title:"Andurite lisamine",description:"Lisa veel andureid. Mõistlik on panna neile arusaadav nimi (friendly_name).",no_items:"Puuduvad valvestamiseks sobivad Home Assistanti olemid. Lisatavad olemid peavad olema olekuandurid (binary_sensor).",table:{type:"Detected type"},actions:{add_to_alarm:"Lisa valvesüsteemile",filter_supported:"Hide items with unknown type"}},editor:{title:"Andurite sätted",description:"Muuda olemi ''{entity}'' sätteid.",fields:{area:{heading:"Ala",description:"Vali ala kus see andur asub."},group:{heading:"Group",description:"Group with other sensors for combined triggering."},device_type:{heading:"Seadme tüüp",description:"Vali anduri tüüp, et automaatselt rakendada sobivad sätted.",choose:{door:{name:"Uks",description:"Uks, värav või muu piire mida kasutatakse sisenemiseks või väljumiseks."},window:{name:"Aken",description:"Aken või uks mida ei kasutata sisenemiseks nagu rõduuks."},motion:{name:"Liikumisandur",description:"Kohaloleku andurid mille rakendumiste vahel on viide."},tamper:{name:"Terviklikkus",description:"Anduri muukimine või klaasipurustusandur jms."},environmental:{name:"Ohu andurid",description:"Suitsu või gaasilekke andur, veeleke jne. (ei ole seotud sissetungimisega)."},other:{name:"Tavaandur"}}},always_on:{heading:"Alati kasutusel",description:"Andur käivitab häire igas valve olekus."},modes:{heading:"Valve olekute valik",description:"Valve olekud kus seda andurit kasutatakse."},arm_on_close:{heading:"Valvesta sulgemisel",description:"Selle anduri rakendumisel valvestatakse kohe ilma viiveta."},use_exit_delay:{heading:"Use exit delay",description:"Sensor is allowed to be active when the exit delay starts."},use_entry_delay:{heading:"Use entry delay",description:"Sensor activation triggers the alarm after the entry delay rather than directly."},allow_open:{heading:"Lahkumisviivitus",description:"See andur ei aktiveeru enne lahkumisviivituse lõppu."},auto_bypass:{heading:"Bypass automatically",description:"Exclude this sensor from the alarm if it is open while arming.",modes:"Modes in which sensor may be bypassed"},trigger_unavailable:{heading:"Andurite saadavus",description:"Käivita häire kui andur muutub kättesaamatuks."}},actions:{toggle_advanced:"Täpsemad sätted",remove:"Eemalda",setup_groups:"Setup groups"},errors:{description:"Palun paranda jägmised vead:",no_area:"Ala pole määratud",no_modes:"Anduri tüüp on määramata, ei tea kuida kasutada",no_auto_bypass_modes:"No modes are selected for the sensor may be automatically bypassed"}}},dialogs:{manage_groups:{title:"Manage sensor groups",description:"In a sensor group multiple sensors must be activated within a time period before the alarm is triggered.",no_items:"No groups yet",actions:{new_group:"New group"}},create_group:{title:"New sensor group",fields:{name:{heading:"Name",description:"Name for sensor group"},timeout:{heading:"Time-out",description:"Time period during which consecutive sensor activations triggers the alarm."},sensors:{heading:"Sensors",description:"Select the sensors which are contained by this group."}},errors:{invalid_name:"Invalid name provided.",insufficient_sensors:"At least 2 sensors need to be selected."}},edit_group:{title:"Edit sensor group ''{name}''"}}},codes:{title:"Koodid",cards:{codes:{description:"Valvestuskoodide muutmine.",fields:{code_arm_required:{heading:"Valvestamine koodiga",description:"Valvestamiseks tuleb sisestada kood"},code_disarm_required:{heading:"Valvest vabastamise kood",description:"Valvest vabastamiseks tulem sisestada kood"},code_format:{heading:"Koodi vorming",description:"Kasutajaliidese koodi tüübid.",code_format_number:"PIN kood",code_format_text:"Salasõna"}}},user_management:{title:"Kasutajate haldus",description:"Igal kasutajal on oma juhtkood.",no_items:"Kasutajaid pole määratud",actions:{new_user:"Uus kasutaja"}},new_user:{title:"Lisa uus kasutaja",description:"Valvesüsteemi kasutaja lisamine.",fields:{name:{heading:"Nimi",description:"Kasutaja nimi."},code:{heading:"Valvestuskood",description:"Selle kasutaja kood."},confirm_code:{heading:"Koodi kinnitamine",description:"Sisesta sama kood uuesti."},can_arm:{heading:"Tohib valvestada",description:"Koodi sisestamine valvestab."},can_disarm:{heading:"Tohib valvest maha võtta",description:"Koodi sisestamine võtab valvest maha."},is_override_code:{heading:"Alistuskood",description:"Koodi sisestamine käivitab kohese häire"},area_limit:{heading:"Restricted areas",description:"Limit user to control only the selected areas"}},errors:{no_name:"Nimi puudub.",no_code:"Kood peab olema vhemalt 4 tärki.",code_mismatch:"Sisestatud koodid ei klapi."}},edit_user:{title:"Muuda kasutaja sätteid",description:"Muuda kasutaja ''{name}'' sätteid.",fields:{old_code:{heading:"Kehtiv kood",description:"Kehtiv kood, jäta tühjaks kui ei taha muuta."}}}}},actions:{title:"Toimingud",cards:{notifications:{title:"Teavitused",description:"Halda saadetavaid teavitusi",table:{no_items:"Teavitusi pole veel loodud.",no_area_warning:"Action is not assigned to any area."},actions:{new_notification:"Uus teavitus"}},actions:{description:"Arenduses, mõeldud seadmete lülitamiseks.",table:{no_items:"Toiminguid pole veel määratud."},actions:{new_action:"Uus toiming"}},new_notification:{title:"Loo teavitus",description:"Uue teavituse loomine.",trigger:"Condition",action:"Task",options:"Options",fields:{event:{heading:"Sündmus",description:"Mille puhul teavitada",choose:{armed:{name:"Valvestatud",description:"Valvestamine oli edukas"},disarmed:{name:"Valvest maas",description:"Valve mahavõtmine õnnestus"},triggered:{name:"Häire",description:"Valvesüsteem andis häire"},arm_failure:{name:"Valvestamine nurjus",description:"Valvestamine ei õnnestunud mõne anduri oleku või vea tõttu"},arming:{name:"Valvestamise eelne viivitus algas",description:"Algas valvestamise eelviide, majast võib lahkuda."},pending:{name:"Sisenemise viide rakendus",description:"Märgati sisenemist, häire rakendub peale viidet."}}},mode:{heading:"Olek",description:"Millises valve olekus teavitada (valikuline)"},title:{heading:"Päis",description:"Teavitussõnumi päis"},message:{heading:"Sisu",description:"Teavitussõnumi tekst",insert_wildcard:"Insert wildcard",placeholders:{armed:"The alarm is set to {{arm_mode}}",disarmed:"The alarm is now OFF",triggered:"The alarm is triggered! Cause: {{open_sensors}}.",arm_failure:"The alarm could not be armed right now, due to: {{open_sensors}}.",arming:"The alarm will be armed soon, please leave the house.",pending:"The alarm is about to trigger, disarm it quickly!"}},open_sensors_format:{heading:"Format for open_sensors wildcard",description:"Choose which sensor information in inserted in the message",options:{default:"Names and states",short:"Names only"}},arm_mode_format:{heading:"Translation for arm_mode wildcard",description:"Choose in which language the arm mode is inserted in the message"},target:{heading:"Saaja",description:"Seade millele edastada teavitus"},name:{heading:"Nimi",description:"Teavituse kirjeldus",placeholders:{armed:"Notify {target} upon arming",disarmed:"Notify {target} upon disarming",triggered:"Notify {target} when triggered",arm_failure:"Notify {target} on failure",arming:"Notify {target} when leaving",pending:"Notify {target} when arriving"}},delete:{heading:"Delete automation",description:"Permanently remove this automation"}},actions:{test:"Try it"}},new_action:{title:"Loo toiming",description:"Seadme oleku muutmine valve oleku muutmisel.",fields:{event:{heading:"Sündmus",description:"Millisel juhul käivitada toiming"},area:{heading:"Ala",description:"Ala millele sündmus rakendub, põhiala puhul jäta tühjaks."},mode:{heading:"Olek",description:"Millises valve olekus toiming käivitada (valikuline)"},entity:{heading:"Olem",description:"Toimingu olem"},action:{heading:"Toiming",description:"Olemi toiming",no_common_actions:"Actions can only be assigned in YAML mode for the selected entities."},name:{heading:"Nimi",description:"Toimingu kirjeldus",placeholders:{armed:"Set {entity} to {state} upon arming",disarmed:"Set {entity} to {state} upon disarming",triggered:"Set {entity} to {state} when triggered",arm_failure:"Set {entity} to {state} on failure",arming:"Set {entity} to {state} when leaving",pending:"Set {entity} to {state} when arriving"}}}}}}},_t={common:gt,components:vt,title:"Alarm panel",panels:ft},bt=Object.freeze({__proto__:null,common:gt,components:vt,title:"Alarm panel",panels:ft,default:_t}),yt={modes_short:{armed_away:"Absence",armed_home:"Présence",armed_night:"Nuit",armed_custom_bypass:"Personnalisé",armed_vacation:"Vacances"},enabled:"Actif",disabled:"Inactif"},wt={time_slider:{seconds:"sec",minutes:"min",infinite:"infini",none:"Aucune"},editor:{ui_mode:"Afficher l'éditeur visuel",yaml_mode:"Afficher l'éditeur de code",edit_in_yaml:"Editer en YAML"},table:{filter:{label:"Filtrer par items",item:"Filtrer par {name}",hidden_items:"{number} {number, plural,\n one { item est caché}\n other { items sont cachés}\n} "}}},kt="Configuration de l' alarme",$t={general:{title:"Généraux",cards:{general:{description:"Ce panneau définit les paramètres globaux de l'alarme.",fields:{disarm_after_trigger:{heading:"Désactivation après déclenchement",description:"Lors que le temps de fonctionnement de la sirène est écoulé, désactive l'alarme au lieu de la réactiver."},enable_mqtt:{heading:"Utilisation avec MQTT",description:"Permet au panneau d'alarme d'être contrôlé via MQTT."},enable_master:{heading:"Activation de commande centralisée",description:"Créer une entité pour piloter toutes les zones en même temps."}},actions:{setup_mqtt:"Configuration MQTT",setup_master:"Configuration pricipale"}},modes:{title:"Modes",description:"Ce panneau définit le mode de gestion pour chaque type d'activation.",modes:{armed_away:"Ce mode sera utilisé lorsque toutes les personnes auront quitté la maison. Toutes les portes et fenêtres permettant l'accès à la maison seront surveillées, les détecteurs de mouvement à l'intérieur de la maison seront opérationnels.",armed_home:"Ce mode sera utilisée lorsque des personnes sont dans la maison. Toutes les portes et fenêtres permettant l'accès à la maison seront surveillées (périmétrie), les détecteurs de mouvement à l'intérieur de la maison seront inopérants.",armed_night:"Ce mode sera utilisé lors du réglage de l'alarme avant de s'endormir. Toutes les portes et fenêtres permettant l'accès à la maison seront surveillées, et les capteurs de mouvement sélectionnés (ex : rez de chaussée) dans la maison seront opérationnels.",armed_vacation:"Ce mode peut être utilisé comme une extension du mode armé absent en cas d'absence pour une durée plus longue. Les temps de retard et les réponses de déclenchement peuvent être adaptés (au choix) à l'éloignement du domicile.",armed_custom_bypass:"Ce mode supplémentaire permet de définir votre propre périmètre de sécurité."},number_sensors_active:"{number} {number, plural,\n one {capteur actif}\n other {capteurs actifs}\n} ",fields:{status:{heading:"Statut",description:"Active l'alarme dans ce mode."},exit_delay:{heading:"Délai pour sortir",description:"Lors de l'activation, pendant cette période, les capteurs ne déclencheront pas l'alarme."},entry_delay:{heading:"Délai pour entrer",description:"Temps d'attente avant que l'alarme ne se déclenche après détection d'un des capteurs."},trigger_time:{heading:"Temps de fonctionnement",description:"Temps de fonctionnement de la sirène"}}},mqtt:{title:"Configuration MQTT",description:"Ce panneau peut être utilisé pour la configuration de l'interface MQTT.",fields:{state_topic:{heading:"Etat des données",description:"Donnée sur laquelle les mises à jour d'état sont publiées"},event_topic:{heading:"Evènement de données",description:"Donnée sur laquelle les évènements d'état sont publiés"},command_topic:{heading:"Commande de données",description:"Donnée sur laquelle les commandes d'armement / désarmement sont envoyées."},require_code:{heading:"Code requis",description:"Exige que le code soit envoyé avec la commande."},state_payload:{heading:"Configurer une valeur par état",item:"Définir une valeur par état ''{state}''"},command_payload:{heading:"Configurer une valeur par commande",item:"Définir une valeur par commande ''{command}''"}}},areas:{title:"Zones",description:"Les zones peuvent être utilisées pour diviser votre système d'alarme en plusieurs secteurs.",no_items:"Il n'y a pas encore de zone définie.",table:{remarks:"Remarque",summary:"Cette zone contient des {summary_sensors} et {summary_automations}.",summary_sensors:"{number} {number, plural,\n one {capteur}\n other {capteurs}\n}",summary_automations:"{number} {number, plural,\n one {automatisation}\n other {automatisations}\n}"},actions:{add:"Ajouter"}}},dialogs:{create_area:{title:"Nouvelle zone",fields:{copy_from:"Copier les paramètres"}},edit_area:{title:"Editer la zone ''{area}''",name_warning:"Note: Changer le nom, changera l'entity ID"},remove_area:{title:"Suppression de zone?",description:"Etes vous sur de vouloir supprimer cette zone? Cette zone contient {sensors} des capteurs et {automations} automatisations, qui seront également supprimés."},edit_master:{title:"Configuration principale"},disable_master:{title:"Désactiver la configuration principale?",description:"Etes vous sur de vouloir supprimer la configuration principale? Cette zone contient {automations} automatisations, qui seront également supprimées."}}},sensors:{title:"Capteurs",cards:{sensors:{description:"Capteurs actuellement configurés. Cliquez sur une entité pour apporter des modifications.",table:{no_items:"Il n'y a pas encore de capteur ajouté à l'alarme. Assurez-vous de les ajouter d'abord.",no_area_warning:"Le capteur n'est affecté à aucune zone.",arm_modes:"Type d'activation",always_on:"(Toujours)"}},add_sensors:{title:"Ajouter un capteur",description:"Ajoutez plus de capteurs. Assurez-vous que vos capteurs ont un nom personnalisé afin de pouvoir les identifier.",no_items:"Aucune entité HA disponible ne peut être configurée pour l'alarme. Assurez-vous d'inclure les entités de type binary_sensor.",table:{type:"Type de détection"},actions:{add_to_alarm:"Ajouter à l'alarme",filter_supported:"Masquer les éléments de type inconnu"}},editor:{title:"Editer un capteur",description:"Configurer les paramètres du capteur ''{entity}''.",fields:{area:{heading:"Zone",description:"Selectionner une zone contenant ce capteur."},group:{heading:"Groupe",description:"Grouper avec d'autres capteurs pour un déclenchement combiné."},device_type:{heading:"Type de détection",description:"Choisissez un type de détection pour appliquer automatiquement les paramètres appropriés.",choose:{door:{name:"Porte",description:"Une porte, un portail ou une autre entrée utilisée pour entrer / sortir de la maison."},window:{name:"Fenêtre",description:"Une fenêtre, ou une porte non utilisée pour entrer dans la maison comme un balcon."},motion:{name:"Mouvement",description:"Capteur de présence ou appareil similaire présentant un délai entre les activations."},tamper:{name:"Effraction",description:"Détection d'arrachage du capteur, capteur de bris de verre, etc.."},environmental:{name:"Détecteur Environmental",description:"Détecteur de fumée / gaz, détecteur de fuite, etc. (non lié à la protection anti-effraction)."},other:{name:"Générique"}}},always_on:{heading:"Toujours en service",description:"Le capteur doit toujours déclencher l'alarme."},modes:{heading:"Mode possible",description:"Modes d'alarme dans lesquels ce capteur est actif."},arm_on_close:{heading:"Activer après fermeture",description:"Après la désactivation de ce capteur, le délai de sortie restant sera automatiquement ignoré."},use_exit_delay:{heading:"Utiliser le délai de sortie",description:"Le capteur sera actif à la fin du délai de sortie."},use_entry_delay:{heading:"Utiliser le délai d'entrée",description:"L'activation du capteur déclenche l'alarme après le délai d'entrée plutôt qu'instantanément."},allow_open:{heading:"Autoriser l'ouverture lors de l'activation",description:"Permet à ce capteur d'être actif, peu de temps après votre départ afin qu'il ne bloque pas l'armement."},auto_bypass:{heading:"Bypass automatique",description:"Exclut ce capteur de l'alarme s'il est ouvert lors de l'armement.",modes:"Modes dans lesquels le capteur peut être ignoré"},trigger_unavailable:{heading:"Déclenchement lorsqu'il n'est pas disponible",description:"Lorsque l'état du capteur devient `` indisponible '', cela activera l'alarme."}},actions:{toggle_advanced:"Paramètres avancées",remove:"Supprimer",setup_groups:"Configuration de Groupe"},errors:{description:"Veuillez corriger les erreurs suivantes:",no_area:"Aucune zone n'est sélectionnée",no_modes:"Aucun mode sélectionné pour lequel le capteur doit être actif",no_auto_bypass_modes:"Aucun mode n'est sélectionné car le capteur peut être automatiquement ignoré"}}},dialogs:{manage_groups:{title:"Gérer les groupes de capteurs",description:"Dans un groupe de capteurs, plusieurs capteurs doivent être activés dans un laps de temps avant que l'alarme ne se déclenche.",no_items:"Aucun groupe",actions:{new_group:"Nouveau groupe"}},create_group:{title:"Nouveau groupe de capteurs",fields:{name:{heading:"Nom",description:"Nom du nouveau groupe de capteurs"},timeout:{heading:"Laps de temps",description:"Période de temps pendant laquelle les activations consécutives du capteur déclenchent l'alarme."},sensors:{heading:"Capteurs",description:"Sélectionnez les capteurs qui sont contenus dans ce groupe."}},errors:{invalid_name:"Nom fourni non valide.",insufficient_sensors:"Au moins 2 capteurs doivent être sélectionnés."}},edit_group:{title:"Editer le groupe de capteurs ''{name}''"}}},codes:{title:"Codes",cards:{codes:{description:"Gestion des paramètres des codes.",fields:{code_arm_required:{heading:"Utiliser un code pour l'activation",description:"Code requis pour l'activation de l'alarme"},code_disarm_required:{heading:"Utiliser un code pour la désactivation",description:"Code requis pour la désactivation de l'alarme"},code_format:{heading:"Format du code",description:"Définit le type d'entrée pour la carte d'alarme Lovelace.",code_format_number:"pincode",code_format_text:"password"}}},user_management:{title:"Gestion des utilisateurs",description:"Chaque utilisateur a son propre code pour activer / désactiver l'alarme.",no_items:"Il n'y a aucun utilisateur de défini",actions:{new_user:"Nouvel utilisateur"}},new_user:{title:"Créer un nouvel utilisateur",description:"Des utilisateurs peuvent être créés pour donner accès au fonctionnement de l'alarme.",fields:{name:{heading:"Nom",description:"Nom de l'utilisateur."},code:{heading:"Code",description:"Code personnel de l'utilisateur."},confirm_code:{heading:"Confirmation du code",description:"Répèter le code."},can_arm:{heading:"Demande de code pour l'activation",description:"Entrer ce code pour activer l'alarme."},can_disarm:{heading:"Demande de code pour désactivation",description:"Entrer ce code pour désactiver l'alarme."},is_override_code:{heading:"Code de sécurité",description:"La saisie de ce code forcera l'activation l'alarme."},area_limit:{heading:"Zones Restreintes",description:"L'utilisateur ne peut contrôler uniquement les zones sélectionnées"}},errors:{no_name:"Aucun nom saisi.",no_code:"Le code doit contenir 4 caractères/chiffres minimum.",code_mismatch:"Les codes sont différents."}},edit_user:{title:"Editer l'utilisateur",description:"Changer la configuration pour l'utilisateur ''{name}''.",fields:{old_code:{heading:"Code utilisé",description:"Code actuel, laissez vide pour ne rien changer."}}}}},actions:{title:"Actions",cards:{notifications:{title:"Notifications",description:"À l'aide de ce panneau, vous pouvez gérer les notifications à envoyer lors d'un évènement d'alarme",table:{no_items:"Il n'y a aucune notification de créée.",no_area_warning:"L'action n'est affectée à aucune zone."},actions:{new_notification:"Nouvelle notification"}},actions:{description:"Ce panneau est utilisé pour changer d'état les appareils de votre choix.",table:{no_items:"Il n'y a aucune action de créer."},actions:{new_action:"Nouvelle action"}},new_notification:{title:"Créer une notification",description:"Créer une nouvelle notification.",trigger:"Condition",action:"Action",options:"Options",fields:{event:{heading:"Evènement",description:"Détermine quand la notification doit être envoyée",choose:{armed:{name:"Alarme activée ",description:"l'alarme s'est correctement activée"},disarmed:{name:"Alarme désactivée",description:"L'alarme est désactivée"},triggered:{name:"Alarme déclenchée",description:"L'alarme est déclenchée"},arm_failure:{name:"Armement impossible",description:"L'armement est impossible dû à un ou plusieurs capteurs"},arming:{name:"Délai de sortie activé",description:"Le délai de sortie est activé, vous devez quitter la maison."},pending:{name:"Délai d'entrée activé",description:"Le délai d'entrée est activé, sans action de désarmement, l'alarme va se déclencher."}}},mode:{heading:"Mode",description:"Limite la notification à un mode spécifique (optionnel)"},title:{heading:"Titre",description:"Titre du message de la notification"},message:{heading:"Message",description:"Contenu du message de la notification",insert_wildcard:"Inserer la wildcard",placeholders:{armed:"L'alarme est réglée sur {{arm_mode}}",disarmed:"L'alarme est maintenant désactivée",triggered:"L'alarme est déclenchée! En cause: {{open_sensors}}.",arm_failure:"L'alarme n'a pas pu être armée pour le moment, en cause: {{open_sensors}}.",arming:"L'alarme sera bientôt armée, veuillez quitter la maison.",pending:"L'alarme est sur le point de se déclencher, désarmez-la rapidement!"}},open_sensors_format:{heading:"Format pour les 'open_sensors wildcard'",description:"Choisissez les informations du capteur à insérer dans le message",options:{default:"Noms et états",short:"Noms seulement"}},arm_mode_format:{heading:"Traduction pour 'arm_mode wildcard'",description:"Choisissez dans quelle langue le mode d'armement est inséré dans le message"},target:{heading:"Cible",description:"Appareil recevant le message"},name:{heading:"Nom",description:"Description de la notification",placeholders:{armed:"Notification à l'armement de : {target}",disarmed:"Notification au désarmement de : {target}",triggered:"Notification au déclenchement de : {target}",arm_failure:"Notification en cas d'échec de : {target}",arming:"Notification en quittant de : {target}",pending:"Notification au retour de : {target}"}},delete:{heading:"Supprimer l'automatisme",description:"Supprimer définitivement cet automatisme"}},actions:{test:"Essai"}},new_action:{title:"Créer une action",description:"Ce panneau peut être utilisé pour commuter un appareil lorsque l'état de l'alarme change.",fields:{event:{heading:"Evènement",description:"Détermine quand l'action doit être exécutée"},area:{heading:"Zone",description:"Zone pour laquelle l'évènement s'applique, laissez vide pour sélectionner l'alarme globale."},mode:{heading:"Mode",description:"Limite l'action à un mode spécifique (optionnel)"},entity:{heading:"Entité",description:"Entité sur laquelle effectuer une action"},action:{heading:"Action",description:"Action à exécuter sur l'entité",no_common_actions:"Les actions ne peuvent être affectées qu'en mode YAML pour les entités sélectionnées."},name:{heading:"Nom",description:"Description de l'action",placeholders:{armed:"Mettre {entity} à {state} lors de l'armement",disarmed:"Mettre {entity} à {state} lors du désarmement",triggered:"Mettre {entity} à {state} lors du déclenchement de l'alarme",arm_failure:"Mettre {entity} à {state} en cas d'échec de l'armement",arming:"Mettre {entity} à {state} lors du départ de la maison",pending:"Mettre {entity} à {state} lors du retour à la maison"}}}}}}},At={common:yt,components:wt,title:kt,panels:$t},xt=Object.freeze({__proto__:null,common:yt,components:wt,title:kt,panels:$t,default:At}),Et={modes_short:{armed_away:"Fuori casa",armed_home:"In casa",armed_night:"Notte",armed_custom_bypass:"Personalizzato",armed_vacation:"Vacation"},enabled:"Enabled",disabled:"Disabled"},Ot={time_slider:{seconds:"sec",minutes:"min",infinite:"infinito",none:"niente"},editor:{ui_mode:"Passa a UI",yaml_mode:"Passa a YAML",edit_in_yaml:"Edit in YAML"},table:{filter:{label:"Filter items",item:"Filter by {name}",hidden_items:"{number} {number, plural,\n one {item is}\n other {items are}\n} hidden"}}},Tt={general:{title:"Generali",cards:{general:{description:"Questo pannello definisce alcune impostazioni da applicare alle modalità di allarme.",fields:{disarm_after_trigger:{heading:"Disattiva allarme dopo l'attivazione",description:"Dopo che il tempo di attivazione è scaduto, disattivare l'allarme invece di tornare allo stato inserito."},enable_mqtt:{heading:"Abilita MQTT",description:"Permetti al pannello allarme di essere controllato attraverso MQTT."},enable_master:{heading:"Enable alarm master",description:"Creates an entity for controlling all areas simultaneously."}},actions:{setup_mqtt:"Configurazione MQTT",setup_master:"Master Configuration"}},modes:{title:"Modes",description:"This panel can be used to set up the arm modes of the alarm.",modes:{armed_away:"Modalità 'fuori casa': da utilizzare quando tutte le persone lasciano la casa. Tutti i sensori di porte e finestre che consentono l'accesso alla casa saranno attivi, così come i sensori di movimento all'interno della casa.",armed_home:"Modalità 'in casa': da utilizzare quando si attiva l'allarme mentre le persone sono in casa. Tutti i sensori di porte e finestre che consentono l'accesso alla casa saranno attivi, ma non i sensori di movimento all'interno della casa.",armed_night:"Modalità 'notte': da utilizzare quando si imposta la sveglia prima di andare a dormire. Tutti i sensori di porte e finestre che consentono l'accesso alla casa saranno attivi e sensori di movimento selezionati (ad esempio al piano di sotto) nella casa.",armed_vacation:"Armed vacation can be used as an extension to the armed away mode in case of absence for longer duration. The delay times and trigger responses can be adapted (as desired) to being distant from home.",armed_custom_bypass:"Modalità 'personalizzato': da utilizzare per definire una modalità di allarme specifica per le esigenze dell'utilizzatore."},number_sensors_active:"{number} {number, plural,\n one {sensor}\n other {sensors}\n} active",fields:{status:{heading:"Status",description:"Controls whether the alarm can be armed in this mode."},exit_delay:{heading:"Tempo di preattivazione",description:"Quando si attiva l'allarme, entro questo periodo di tempo i sensori non attiveranno ancora l'allarme."},entry_delay:{heading:"Ritardo di attivazione",description:"Tempo di ritardo fino allo scatto dell'allarme dopo l'attivazione di uno dei sensori."},trigger_time:{heading:"Tempo di attivazione",description:"Tempo durante il quale suonerà la sirena"}}},mqtt:{title:"Configurazione MQTT",description:"Questo pannello può essere usato per le impostazioni MQTT.",fields:{state_topic:{heading:"Topic di stato",description:"Topic su cui vengono pubblicati gli aggiornamenti di stato"},event_topic:{heading:"Event topic",description:"Topic on which alarm events are published"},command_topic:{heading:"Topic di comando",description:"Topic su cui vengono inviati i comandi di inserimento / disinserimento."},require_code:{heading:"Richiedi Codice",description:"Richiedi il codice da inviare con il comando."},state_payload:{heading:"Configura payload per stato",item:"Definisci un payload per lo stato ''{state}''"},command_payload:{heading:"Configura payload per comando",item:"Definisci un payload per il comando ''{command}''"}}},areas:{title:"Areas",description:"Areas can be used for dividing your alarm system into multiple compartments.",no_items:"There are no areas defined yet.",table:{remarks:"Remarks",summary:"This area contains {summary_sensors} and {summary_automations}.",summary_sensors:"{number} {number, plural,\n one {sensor}\n other {sensors}\n}",summary_automations:"{number} {number, plural,\n one {automation}\n other {automations}\n}"},actions:{add:"Add"}}},dialogs:{create_area:{title:"New area",fields:{copy_from:"Copy settings from"}},edit_area:{title:"Editing area ''{area}''",name_warning:"Note: changing the name will change the entity ID"},remove_area:{title:"Remove area?",description:"Are you sure you want to remove this area? This area contains {sensors} sensors and {automations} automations, which will be removed as well."},edit_master:{title:"Master configuration"},disable_master:{title:"Disable master?",description:"Are you sure you want to remove the alarm master? This area contains {automations} automations, which will be removed with this action."}}},sensors:{title:"Sensori",cards:{sensors:{description:"Sensori attualmente configurati. Clicca sull'entità per modificare.",table:{no_items:"Non ci sono ancora sensori aggiunti a questo allarme. Assicurati di aggiungerli prima.",no_area_warning:"Sensor is not assigned to any area.",arm_modes:"Modalità di attivazione",always_on:"(Sempre)"}},add_sensors:{title:"Aggiungi Sensori",description:"Aggiungi più sensori. Assicurati che i sensori abbiano un friendly_name (nome amichevole), in modo da identificarli più facilmente.",no_items:"Non ci sono entità disponibili che possono essere configurate con l'allarme. Assicurati di includere entità del tipo binary_sensor (sensore binario).",table:{type:"Detected type"},actions:{add_to_alarm:"aggiungi all'allarme",filter_supported:"Hide items with unknown type"}},editor:{title:"Modifica Sensore",description:"Configura le impostazioni del sensore ''{entity}''.",fields:{area:{heading:"Area",description:"Select an area which contains this sensor."},group:{heading:"Group",description:"Group with other sensors for combined triggering."},device_type:{heading:"Device Type",description:"Choose a device type to automatically apply appropriate settings.",choose:{door:{name:"Door",description:"A door, gate or other entrance that is used for entering/leaving the home."},window:{name:"Window",description:"A window, or a door not used for entering the house such as balcony."},motion:{name:"Motion",description:"Presence sensor or similar device having a delay between activations."},tamper:{name:"Tamper",description:"Detector of sensor cover removal, glass break sensor, etc."},environmental:{name:"Environmental",description:"Smoke/gas sensor, leak detector, etc. (not related to burglar protection)."},other:{name:"Generic"}}},always_on:{heading:"Sempre attivo",description:"Il sensore attiverà sempre l'allarme."},modes:{heading:"Modalità attive",description:"Modalità di allarme in cui il sensore risulta collegato."},arm_on_close:{heading:"Arm after closing",description:"After deactivation of this sensor, the remaining exit delay will automatically be skipped."},use_exit_delay:{heading:"Use exit delay",description:"Sensor is allowed to be active when the exit delay starts."},use_entry_delay:{heading:"Use entry delay",description:"Sensor activation triggers the alarm after the entry delay rather than directly."},allow_open:{heading:"Permetti apertura",description:"Consentire a questo sensore di rimanere attivo poco dopo essere usciti."},auto_bypass:{heading:"Bypass automatically",description:"Exclude this sensor from the alarm if it is open while arming.",modes:"Modes in which sensor may be bypassed"},trigger_unavailable:{heading:"Fai scattare l'allarme quando non disponibile",description:"L'allarme scatterà quando lo stato del sensore diverrà 'non disponibile'."}},actions:{toggle_advanced:"Advanced settings",remove:"Remove",setup_groups:"Setup groups"},errors:{description:"Please correct the following errors:",no_area:"No area is selected",no_modes:"No modes are selected for which the sensor should be active",no_auto_bypass_modes:"No modes are selected for the sensor may be automatically bypassed"}}},dialogs:{manage_groups:{title:"Manage sensor groups",description:"In a sensor group multiple sensors must be activated within a time period before the alarm is triggered.",no_items:"No groups yet",actions:{new_group:"New group"}},create_group:{title:"New sensor group",fields:{name:{heading:"Name",description:"Name for sensor group"},timeout:{heading:"Time-out",description:"Time period during which consecutive sensor activations triggers the alarm."},sensors:{heading:"Sensors",description:"Select the sensors which are contained by this group."}},errors:{invalid_name:"Invalid name provided.",insufficient_sensors:"At least 2 sensors need to be selected."}},edit_group:{title:"Edit sensor group ''{name}''"}}},codes:{title:"Codici",cards:{codes:{description:"Modifica le impostazioni dei codici.",fields:{code_arm_required:{heading:"Usa codice d'attivazione",description:"Richiedi un codice per attivare l'allarme"},code_disarm_required:{heading:"Usa codice di disattivazione",description:"Richiedi un codice per disattivare l'allarme"},code_format:{heading:"Formato del codice",description:"Imposta il tipo di codice da digitare nella card di Lovelace.",code_format_number:"codice numerico",code_format_text:"password"}}},user_management:{title:"Gestione utente",description:"Ogni utente ha il suo codice per attivare/disattivare l'allarme.",no_items:"Non è stato creato nessun utente per ora",actions:{new_user:"nuovo utente"}},new_user:{title:"Crea nuovo utente",description:"Gli utenti potranno operare con l'allarme.",fields:{name:{heading:"Nome",description:"Nome dell'utente."},code:{heading:"Codice operativo",description:"Codice che utilizzerà quest'utente."},confirm_code:{heading:"Ripeti codice operativo",description:"Ripeti il codice operativo scelto."},can_arm:{heading:"Utilizza codice per attivare l'allarme",description:"Utilizza codice per attivare l'allarme"},can_disarm:{heading:"Utilizza codice per disattivare l'allarme",description:"Utilizza codice per disattivare l'allarme"},is_override_code:{heading:"E' un codice di forzatura",description:"Inserendo questo codice forzerai lo stato di attivazione dell'allarme"},area_limit:{heading:"Restricted areas",description:"Limit user to control only the selected areas"}},errors:{no_name:"Non hai inserito il nome.",no_code:"Il codice deve avere almeno 4 numeri o caratteri.",code_mismatch:"Il codice scelto non combacia, verifica il codice inserito."}},edit_user:{title:"Modifica Utente",description:"Cambia impostazioni per l'utente ''{name}''.",fields:{old_code:{heading:"Modifica Codice",description:"Codice attuale, lascia vuoto per non modificare."}}}}},actions:{title:"Azioni",cards:{notifications:{title:"Notifiche",description:"Con questo pannello puoi gestire le notifiche da inviare quanto accade un determinato evento",table:{no_items:"Non è stata creata nessuna notifica per ora.",no_area_warning:"Action is not assigned to any area."},actions:{new_notification:"nuova notifica"}},actions:{description:"Questo pannello è in fase di sviluppo. Sarà usato per cambiare lo stato di una o più entità.",table:{no_items:"Non è stata creata nessuna azione per ora."},actions:{new_action:"nuova azione"}},new_notification:{title:"Crea notifica",description:"Crea una nuova notifica.",trigger:"Condition",action:"Task",options:"Options",fields:{event:{heading:"Evento",description:"Quando questa notifica deve essere inviata",choose:{armed:{name:"Alarm is armed",description:"The alarm is succesfully armed"},disarmed:{name:"Alarm is disarmed",description:"The alarm is disarmed"},triggered:{name:"Alarm is triggered",description:"The alarm is triggered"},arm_failure:{name:"Failed to arm",description:"The arming of the alarm failed due to one or more open sensors"},arming:{name:"Exit delay started",description:"Exit delay started, ready to leave the house."},pending:{name:"Entry delay started",description:"Entry delay started, the alarm will trigger soon."}}},mode:{heading:"Modalità",description:"Limita ad una specifica modalità di allarme (opzionale)"},title:{heading:"Titolo",description:"Titolo per il messaggio di notifica"},message:{heading:"Messaggio",description:"Contenuto del messaggio di notifica",insert_wildcard:"Insert wildcard",placeholders:{armed:"The alarm is set to {{arm_mode}}",disarmed:"The alarm is now OFF",triggered:"The alarm is triggered! Cause: {{open_sensors}}.",arm_failure:"The alarm could not be armed right now, due to: {{open_sensors}}.",arming:"The alarm will be armed soon, please leave the house.",pending:"The alarm is about to trigger, disarm it quickly!"}},open_sensors_format:{heading:"Format for open_sensors wildcard",description:"Choose which sensor information in inserted in the message",options:{default:"Names and states",short:"Names only"}},arm_mode_format:{heading:"Translation for arm_mode wildcard",description:"Choose in which language the arm mode is inserted in the message"},target:{heading:"Destinatario",description:"Dispositivo a cui inviare il messaggio di notifica"},name:{heading:"Nome",description:"Descrizione della notifica",placeholders:{armed:"Notify {target} upon arming",disarmed:"Notify {target} upon disarming",triggered:"Notify {target} when triggered",arm_failure:"Notify {target} on failure",arming:"Notify {target} when leaving",pending:"Notify {target} when arriving"}},delete:{heading:"Delete automation",description:"Permanently remove this automation"}},actions:{test:"Try it"}},new_action:{title:"Crea azione",description:"Questo pannello può essere usato per cambiare lo stato di un entità quando lo stato dell'allarme cambia.",fields:{event:{heading:"Evento",description:"Quando questa azione deve essere eseguita"},area:{heading:"Area",description:"Area for which the event applies, leave empty to select the global alarm."},mode:{heading:"Modalità",description:"Limita ad una specifica modalità di allarme (opzionale)"},entity:{heading:"Entità",description:"Entità su cui eseguire l'azione"},action:{heading:"Azione",description:"Azione che deve eseguire l'entità",no_common_actions:"Actions can only be assigned in YAML mode for the selected entities."},name:{heading:"Nome",description:"Descrizione dell'azione",placeholders:{armed:"Set {entity} to {state} upon arming",disarmed:"Set {entity} to {state} upon disarming",triggered:"Set {entity} to {state} when triggered",arm_failure:"Set {entity} to {state} on failure",arming:"Set {entity} to {state} when leaving",pending:"Set {entity} to {state} when arriving"}}}}}}},jt={common:Et,components:Ot,title:"Alarm panel",panels:Tt},St=Object.freeze({__proto__:null,common:Et,components:Ot,title:"Alarm panel",panels:Tt,default:jt}),Ct={modes_short:{armed_away:"Afwezig",armed_home:"Thuis",armed_night:"Nacht",armed_custom_bypass:"Aangepast",armed_vacation:"Vakantie"},enabled:"Actief",disabled:"Inactief"},Mt={time_slider:{seconds:"sec",minutes:"min",infinite:"oneindig",none:"geen"},editor:{ui_mode:"Naar UI",yaml_mode:"Naar YAML",edit_in_yaml:"In YAML bewerken"},table:{filter:{label:"Items filteren",item:"Filter op {name}",hidden_items:"{number} {number, plural,\n one {item is}\n other {items zijn}\n} verborgen"}}},Nt={general:{title:"Algemeen",cards:{general:{description:"Dit paneel definieert enkele instellingen die van toepassing zijn op alle inschakelmodi.",fields:{disarm_after_trigger:{heading:"Uitschakelen na activatie",description:"Nadat de triggertijd is verstreken, schakelt u het alarm uit in plaats van terug te keren naar de ingeschakelde toestand."},enable_mqtt:{heading:"MQTT inschakelen",description:"Toestaan het alarmpaneel via MQTT aan te sturen."},enable_master:{heading:"Master alarm inschakelen",description:"Creëert een entiteit om alle gebieden tegelijkertijd te besturen."}},actions:{setup_mqtt:"MQTT Configuratie",setup_master:"Master configuratie"}},modes:{title:"Modi",description:"Dit paneel kan worden gebruikt om de inschakelmodi van het alarm in te stellen.",modes:{armed_away:"De afwezigheidsmodus wordt gebruikt als alle mensen het huis hebben verlaten. Alle deuren en ramen die toegang geven tot het huis worden bewaakt, evenals bewegingssensoren in het huis.",armed_home:"De thuismodus wordt gebruikt bij het instellen van het alarm terwijl er mensen in huis zijn. Alle deuren en ramen die toegang geven tot het huis worden bewaakt, maar bewegingssensoren in het huis worden niet gebruikt.",armed_night:"De nachtmodus wordt gebruikt bij het instellen van het alarm voordat u gaat slapen. Alle deuren en ramen die toegang geven tot het huis worden bewaakt, en geselecteerde bewegingssensoren (beneden) in het huis.",armed_vacation:"De vakantiemodus dient voor afwezigheid voor langere duur. Er kunnen desgewenst andere vertragingstijden en acties worden ingesteld die beter passen bij de situatie.",armed_custom_bypass:"Een extra modus om uw eigen beveiligingsperimeter te definiëren."},number_sensors_active:"{number} {number, plural,\n one {sensor}\n other {sensoren}\n} ingesteld",fields:{status:{heading:"Status",description:"Stel in of het alarm op deze modus kan worden ingesteld."},exit_delay:{heading:"Vertrek vertraging",description:"Bij het inschakelen van het alarm zullen de sensoren binnen deze tijdsperiode het alarm nog niet activeren."},entry_delay:{heading:"Binnenkomst vertraging",description:"Vertragingstijd totdat het alarm afgaat nadat een van de sensoren is geactiveerd."},trigger_time:{heading:"Activatie tijd",description:"Tijd waarin het alarm in de geactiveerde toestand blijft na activatie."}}},mqtt:{title:"MQTT configuratie",description:"Dit paneel kan worden gebruikt voor configuratie van de MQTT-interface.",fields:{state_topic:{heading:"Toestand topic",description:"Topic waarop statusupdates worden gepubliceerd"},event_topic:{heading:"Gebeurtenis topic",description:"Topic waarop gebeurtenissen worden gepubliceerd"},command_topic:{heading:"Commando topic",description:"Topic waarop commando's voor in- / uitschakelen worden verzonden."},require_code:{heading:"Vereis code",description:"Vereis dat de code wordt verzonden met de opdracht."},state_payload:{heading:"Configureer de payload per toestand",item:"Definieer een payload voor toestand ''{state}''"},command_payload:{heading:"Configureer een payload per commando",item:"Definieer een payload voor commando ''{command}''"}}},areas:{title:"Gebieden",description:"Gebieden kunnen worden gebruikt om uw alarmsysteem in meerdere compartimenten op te delen.",no_items:"Er zijn nog geen gebieden gedefinieerd.",table:{remarks:"Opmerkingen",summary:"Dit gebied bevat {summary_sensors} en {summary_automations}.",summary_sensors:"{number} {number, plural,\n one {sensor}\n other {sensoren}\n}",summary_automations:"{number} {number, plural,\n one {automatisering}\n other {automatiseringen}\n}"},actions:{add:"Toevoegen"}}},dialogs:{create_area:{title:"Nieuw gebied",fields:{copy_from:"Kopieer instellingen van"}},edit_area:{title:"Bewerken van gebied ''{area}''",name_warning:"Opmerking: als u de naam wijzigt, wordt de entiteits-ID gewijzigd"},remove_area:{title:"Gebied verwijderen?",description:"Weet u zeker dat u dit gebied wilt verwijderen? Dit gebied bevat {sensors} sensoren en {automations} automatiseringen, die ook zullen worden verwijderd."},edit_master:{title:"Master configuratie"},disable_master:{title:"Master uitschakelen?",description:"Weet u zeker dat u het master alarm wilt verwijderen? Dit gebied bevat {automations} automatiseringen, die met deze actie worden verwijderd."}}},sensors:{title:"Sensoren",cards:{sensors:{description:"Momenteel geconfigureerde sensoren. Klik op een entiteit om wijzigingen aan te brengen.",table:{no_items:"Er zijn nog geen sensoren aan het alarm toegevoegd. Zorg ervoor dat u ze eerst toevoegt.",no_area_warning:"Sensor is niet aan een gebied toegewezen.",arm_modes:"Inschakelmodi",always_on:"(Altijd)"}},add_sensors:{title:"Voeg sensoren toe",description:"Voeg meer sensoren toe. Zorg ervoor dat uw sensoren een duidelijke naam hebben, zodat u ze kunt identificeren.",no_items:"Er zijn geen beschikbare HA-entiteiten die voor het alarm kunnen worden geconfigureerd. Zorg ervoor dat u entiteiten van het type binary_sensor opneemt.",table:{type:"Gedetecteerd type"},actions:{add_to_alarm:"Voeg aan alarm toe",filter_supported:"Verberg items met onbekend type"}},editor:{title:"Wijzig Sensor",description:"Configureren van de sensorinstellingen van ''{entity}''.",fields:{area:{heading:"Gebied",description:"Selecteer een gebied dat deze sensor bevat."},group:{heading:"Groep",description:"Groepeer met andere sensors voor gecombineerde triggers."},device_type:{heading:"Apparaat Type",description:"Kies een apparaattype om automatisch de juiste instellingen toe te passen.",choose:{door:{name:"Deur",description:"Een deur, poort of andere ingang die wordt gebruikt voor het betreden/verlaten van de woning."},window:{name:"Raam",description:"Een raam of een deur die niet wordt gebruikt om het huis binnen te komen, zoals een balkon."},motion:{name:"Beweging",description:"Aanwezigheidssensor of soortgelijk apparaat met een vertraging tussen activeringen."},tamper:{name:"Sabotage",description:"Detector van verwijdering van sensorkap, glasbreuksensor, enz."},environmental:{name:"Klimaat",description:"Rook/gassensor, lekkage detector, etc. (niet gerelateerd aan inbraakbeveiliging)."},other:{name:"Algemeen"}}},always_on:{heading:"Altijd aan",description:"Een sensor moet altijd het alarm activeren."},modes:{heading:"Ingeschakelde modi",description:"Alarmmodi waarin deze sensor actief is."},arm_on_close:{heading:"Inschakelen na sluiten",description:"Na deactivering van deze sensor wordt de resterende vertrek vertraging automatisch overgeslagen."},use_exit_delay:{heading:"Vertragingstijd bij vertrek",description:"De sensor mag actief zijn wanneer de vertrekperiode wordt gestart."},use_entry_delay:{heading:"Vertragingstijd bij binnenkomst",description:"Als de sensor actief wordt, activeert deze het alarm pas na de vertragingstijd voor binnenkomst."},allow_open:{heading:"Sta open toe tijdens het inschakelen",description:"Sta toe dat deze sensor kort na het verlaten actief is, zodat hij het inschakelen niet blokkeert."},auto_bypass:{heading:"Automatisch omzeilen",description:"Elimineer de sensor als deze actief is tijdens het inschakelen van het alarm.",modes:"Modi waarin de sensor automatisch omzeild mag worden"},trigger_unavailable:{heading:"Activeren indien niet beschikbaar",description:"Wanneer de sensorstatus 'niet beschikbaar' wordt, wordt de sensor geactiveerd."}},actions:{toggle_advanced:"Geavanceerde instellingen",remove:"Verwijder",setup_groups:"Configureer groepen"},errors:{description:"Corrigeer de volgende fouten:",no_area:"Er is geen gebied geselecteerd",no_modes:"Er zijn geen modi geselecteerd waarvoor de sensor actief zou moeten zijn",no_auto_bypass_modes:"Er zijn geen modi geselecteerd waarin de sensor automatisch omzeild mag worden"}}},dialogs:{manage_groups:{title:"Beheer sensorgroepen",description:"In een sensorgroep moeten twee of meer sensoren worden geactiveerd binnen een tijdsperiode voordat het alarm wordt geactiveerd.",no_items:"Nog geen groepen ingesteld.",actions:{new_group:"Nieuwe groep"}},create_group:{title:"Nieuwe sensorgroep",fields:{name:{heading:"Naam",description:"Naam voor sensorgroep."},timeout:{heading:"Time-out",description:"Tijdsperiode waarin meerdere sensoren moeten worden geactiveerd om het alarm te activeren."},sensors:{heading:"Sensoren",description:"Selecteer de sensoren die deel moeten uitmaken van deze groep."}},errors:{invalid_name:"Verkeerde naam opgegeven.",insufficient_sensors:"Tenminste 2 sensoren moeten worden geselecteerd."}},edit_group:{title:"Bewerk sensorgroep ''{name}''"}}},codes:{title:"Codes",cards:{codes:{description:"Wijzig de instellingen voor de code.",fields:{code_arm_required:{heading:"Gebruik inschakel code",description:"Vereist een code voor het inschakelen van het alarm"},code_disarm_required:{heading:"Gebruik uitschakelcode",description:"Vereist een code om het alarm uit te schakelen"},code_format:{heading:"Code opmaak",description:"Stelt het invoertype in voor de Lovelace alarmkaart.",code_format_number:"pincode",code_format_text:"wachtwoord"}}},user_management:{title:"Gebruikersbeheer",description:"Elke gebruiker heeft zijn eigen code om het alarm in/uit te schakelen.",no_items:"Er zijn nog geen gebruikers",actions:{new_user:"nieuwe gebruiker"}},new_user:{title:"Maak een nieuwe gebruiker aan",description:"Gebruikers kunnen worden aangemaakt om toegang te verlenen tot het bedienen van het alarm.",fields:{name:{heading:"Naam",description:"Naam van de gebruiker."},code:{heading:"Code",description:"Code voor deze gebruiker."},confirm_code:{heading:"Bevestig de code",description:"Herhaal de code."},can_arm:{heading:"Code toestaan voor inschakeling",description:"Door deze code in te voeren, wordt het alarm geactiveerd"},can_disarm:{heading:"Code toestaan voor uitschakelen",description:"Door deze code in te voeren, wordt het alarm gedeactiveerd"},is_override_code:{heading:"Is een forceer code",description:"Als u deze code invoert, wordt het alarm geforceerd geactiveerd"},area_limit:{heading:"Beperk gebieden",description:"Beperk de gebruiker tot controle over alleen de gelesecteerde gebieden"}},errors:{no_name:"Geen naam opgegeven.",no_code:"Code moet minimaal 4 tekens/cijfers bevatten.",code_mismatch:"De codes komen niet overeen."}},edit_user:{title:"Wijzig Gebruiker",description:"Wijzig de configuratie voor gebruiker ''{name}''.",fields:{old_code:{heading:"Huidige code",description:"Huidige code, laat leeg om ongewijzigd te laten."}}}}},actions:{title:"Acties",cards:{notifications:{title:"Meldingen",description:"Met dit paneel kunt u meldingen beheren die moeten worden verzonden tijdens een bepaalde alarmgebeurtenis",table:{no_items:"Er zijn nog geen notificaties aangemaakt.",no_area_warning:"Actie is niet toegewezen aan een gebied."},actions:{new_notification:"nieuwe melding"}},actions:{description:"Dit paneel kan worden gebruikt om een apparaat te schakelen wanneer de status van het alarm veranderd.",table:{no_items:"Er zijn nog geen acties gemaakt."},actions:{new_action:"nieuwe actie"}},new_notification:{title:"Notificatie instellen",description:"Ontvang een notificatie wanneer het alarm wordt in- of uitgeschakeld, wordt geactiveerd etc.",trigger:"Conditie",action:"Taak",options:"Opties",fields:{event:{heading:"Gebeurtenis",description:"Wanneer moet de notificatie worden verzonden",choose:{armed:{name:"Alarm is ingeschakeld",description:"Het alarm is succesvol ingeschakeld"},disarmed:{name:"Alarm is uitgeschakeld",description:"Het alarm is uitgeschakeld"},triggered:{name:"Alarm is afgegaan",description:"Het alarm gaat af"},arm_failure:{name:"Kan niet inschakelen",description:"Het inschakelen van het alarm is mislukt vanwege een of meerdere blokkerende sensoren"},arming:{name:"Vertrek",description:"Vertrekvertraging ingegaan, tijd om het huis te verlaten."},pending:{name:"Binnenkomst",description:"Binnenkomstvertraging ingegaan, het alarm dient te worden uitgeschakeld."}}},mode:{heading:"Modi",description:"Beperk de actie tot specifieke inschakel modi."},title:{heading:"Titel",description:"Titel voor de notificatie"},message:{heading:"Bericht",description:"Tekst voor de notificatie",insert_wildcard:"Wildcard invoegen",placeholders:{armed:"Het alarm is ingeschakeld op {{arm_mode}}",disarmed:"Het alarm is nu uit",triggered:"Het alarm is geactiveerd! Oorzaak: {{open_sensors}}.",arm_failure:"Het alarm kon niet worden ingeschakeld. Oorzaak: {{open_sensors}}.",arming:"Het alarm wordt ingeschakeld, verlaat het huis.",pending:"Het alarm moet nu worden uitgeschakeld, anders wordt deze geactiveerd."}},open_sensors_format:{heading:"Opmaak voor open_sensors wildcard",description:"Kies welke sensor informatie wordt weergegeven in het bericht",options:{default:"Naam en status",short:"Alleen naam"}},arm_mode_format:{heading:"Vertaling voor arm_mode wildcard",description:"Kies in welke taal de inschakelmodus wordt weergegeven in het bericht"},target:{heading:"Doel",description:"Apparaat om het push-bericht naar te sturen"},name:{heading:"Naam",description:"Beschrijving voor deze notificatie",placeholders:{armed:"Stuur notificatie naar {target} bij inschakelen",disarmed:"Stuur notificatie naar {target} bij uitschakelen",triggered:"Stuur notificatie naar {target} bij alarm",arm_failure:"Stuur notificatie naar {target} bij fout",arming:"Stuur notificatie naar {target} bij vertrek",pending:"Stuur notificatie naar {target} bij binnenkomst"}},delete:{heading:"Automatisering verwijderen",description:"Verwijder deze automatisering permanent"}},actions:{test:"Testen"}},new_action:{title:"Actie instellen",description:"Schakel verlichting of apparaatuur (bijv. sirene) wanneer het alarm wordt in- of uitgeschakeld of wordt geactiveerd etc.",fields:{event:{heading:"Gebeurtenis",description:"Wanneer moet de actie worden uitgevoerd"},area:{heading:"Gebied",description:"Het gebied waarop de gebeurtenis van toepassing is, laat leeg om het algemene alarm te selecteren."},mode:{heading:"Mode",description:"Beperk de actie tot specifieke inschakel modi (optioneel)"},entity:{heading:"Entiteit",description:"Entiteit om actie op uit te voeren"},action:{heading:"Actie",description:"Actie die op de entiteit moet worden uitgevoerd",no_common_actions:"Acties kunnen alleen worden toegewezen in de YAML modus voor de geselecteerde entiteiten."},name:{heading:"Naam",description:"Beschrijving voor deze actie",placeholders:{armed:"Schakel {entity} naar {state} bij inschakelen",disarmed:"Schakel {entity} naar {state} bij uitschakelen",triggered:"Schakel {entity} naar {state} bij alarm",arm_failure:"Schakel {entity} naar {state} bij fout",arming:"Schakel {entity} naar {state} bij vertrek",pending:"Schakel {entity} naar {state} bij binnenkomst"}}}}}}},Dt={common:Ct,components:Mt,title:"Alarmpaneel",panels:Nt},Lt=Object.freeze({__proto__:null,common:Ct,components:Mt,title:"Alarmpaneel",panels:Nt,default:Dt}),Pt={modes_short:{armed_away:"Borta",armed_home:"Hemma",armed_night:"Natt",armed_custom_bypass:"Anpassad",armed_vacation:"Vacation"},enabled:"Aktiverat",disabled:"Inaktiverat"},zt={time_slider:{seconds:"sek",minutes:"min",infinite:"oändligt",none:"inget"},editor:{ui_mode:"Till UI",yaml_mode:"Till YAML",edit_in_yaml:"Redigera i YAML"},table:{filter:{label:"Filter items",item:"Filter by {name}",hidden_items:"{number} {number, plural,\n one {item is}\n other {items are}\n} hidden"}}},qt={general:{title:"Generellt",cards:{general:{description:"Denna panel definierar några globala inställningar för larmet.",fields:{disarm_after_trigger:{heading:"Larma av efter trigger",description:"Efter trigger tiden har gått ut, larma av larmet istället för att återgå till larmat läge."},enable_mqtt:{heading:"Aktivera MQTT",description:"Tillåt alarm panelen att kontrolleras via MQTT."},enable_master:{heading:"Aktivera alarm master",description:"Skapar en entity för att kontrollera alla areor samtidigt."}},actions:{setup_mqtt:"MQTT konfiguration",setup_master:"Master konfiguration"}},modes:{title:"Lägen",description:"Denna panel kan användas för att konfiguera larmets olika larmlägen.",modes:{armed_away:"Larmat borta användas när alla personer lämnat huset. Alla dörrar och fönster som tillåter tillgång till huset kommer att larmas, det samma gäller rörelsesensorer inne i huset.",armed_home:"Larmat hemma används när det finns personer kvar i huset. Alla dörrar och fönster som tillåter tillgång till huset kommer att larmas, dock inga rörelsesensorer inne i huset.",armed_night:"Larmat natt används när du aktiverar larmen innan du lägger dig. Alla dörrar och fönster som tillåter tillgång till huset kommer att larmas, det samma gäller utvalda rörelsesensorer inne i huset.",armed_vacation:"Armed vacation can be used as an extension to the armed away mode in case of absence for longer duration. The delay times and trigger responses can be adapted (as desired) to being distant from home.",armed_custom_bypass:"Ett extra läge för för att definiera sin egen säkerhetsperimeter."},number_sensors_active:"{number} {number, plural,\n one {sensor}\n other {sensorer}\n} aktiv",fields:{status:{heading:"Status",description:"Controls whether the alarm can be armed in this mode."},exit_delay:{heading:"Lämna fördröjning",description:"Efter att du har aktiverat larmet kommer dina sensorer inte trigga ditt larm inom denna tid."},entry_delay:{heading:"Ankomst fördröjning",description:"Fördröjning i tid tills att ditt larm triggas efter att en av dina sensorer har aktiverats."},trigger_time:{heading:"Trigger tid",description:"Tid som ditt larm kommer vara i triggat läge efter att ett larm har triggats."}}},mqtt:{title:"MQTT konfiguration",description:"Denna panel kan användas för att anpassa konfigurationen av MQTT.",fields:{state_topic:{heading:"Status topic",description:"Topic på vilket status uppdateringar publiceras till."},event_topic:{heading:"Event topic",description:"Topic på vilket alarm events publiceras till."},command_topic:{heading:"Kommando topic",description:"Topic på vilket Alarmo lyssnar på för larma/larma av kommandon."},require_code:{heading:"Kräv kod",description:"Kräv att koden ska skickas med kommandot."},state_payload:{heading:"Konfiguera payload per state",item:"Definiera en payload för state ''{state}''"},command_payload:{heading:"Konfiguera payload per kommando",item:"Definiera en payload för kommando ''{command}''"}}},areas:{title:"Areor",description:"Areor kan användas för att dela upp ditt larm till flera delar.",no_items:"Det är inga areor definierade än.",table:{remarks:"Anmärkningar",summary:"Denna area innehåller {summary_sensors} och {summary_automations}.",summary_sensors:"{number} {number, plural,\n one {sensor}\n other {sensorer}\n}",summary_automations:"{number} {number, plural,\n one {automation}\n other {automationer}\n}"},actions:{add:"Lägg till"}}},dialogs:{create_area:{title:"Ny area",fields:{copy_from:"Kopiera inställningarna från"}},edit_area:{title:"Redigera area ''{area}''",name_warning:"OBS: Ändrar du namn kommer entity ID att ändras"},remove_area:{title:"Ta bort area?",description:"Är du säker att du vill ta bort denna area? Denna area innehåller {sensors} sensorer och {automations} automationer, som också kommer att tas bort."},edit_master:{title:"Master konfiguration"},disable_master:{title:"Inaktivera master?",description:"Är du säker att du vill ta bort master alarm? Denna area innehåller {automations} automationer, som kommer att tas bort med detta val."}}},sensors:{title:"Sensorer",cards:{sensors:{description:"Nuvarande konfiguerade sensorer. Klicka på ett entity för att göra förändringar.",table:{no_items:"Det finns inga sensorer att visa här.",no_area_warning:"Sensor is not assigned to any area.",arm_modes:"Larmläge",always_on:"(Alltid)"}},add_sensors:{title:"Lägg till sensorer",description:"Lägg till mer sensorer. Säkerhetsställ att dina sensorer har ett friendly_name, så du kan identifiera dem.",no_items:"Det finns inga tillgängliga HA entities som kan konfigueras för larmet. Säkerhetsställ att inkludera entities av type binary_sensor.",table:{type:"Detekteringstyp"},actions:{add_to_alarm:"Addera till larmet",filter_supported:"Hide items with unknown type"}},editor:{title:"Justera Sensor",description:"Justera inställningarna för sensor ''{entity}''.",fields:{area:{heading:"Area",description:"Välj en area som innehåller denna sensor."},group:{heading:"Grupp",description:"Gruppera med andra sensorer för kombinerad trigger."},device_type:{heading:"Enhetstyp",description:"Välj en enhetstyp att automatiskt applicera rekomenderade inställningar på.",choose:{door:{name:"Dörr",description:"En dörr, grind eller annan entre som används för att gå in/lämna hemmet."},window:{name:"Fönster",description:"Ett fönster eller en dörr som inte används för att gå in/lämna huset, t.ex. en balkongdörr."},motion:{name:"Rörelse",description:"Närvarosensor eller liknande som har fördröjning mellan sina aktiveringar."},tamper:{name:"Manipulering",description:"Detektor av sensorskydd, glaskross sensor etc."},environmental:{name:"Miljö",description:"Rök/gas sensor eller läckage sensor etc. (Inte relaterat till inbrottsskydd)."},other:{name:"Generell"}}},always_on:{heading:"Larma alltid",description:"Sensorn ska alltid trigga larmet."},modes:{heading:"Aktiverat läge",description:"Larmläge när sensorn ska vara aktiv."},arm_on_close:{heading:"Larma efter stängning",description:"Resternade lämna fördröjning skippas automatiskt när denna sensor inaktiveras."},use_exit_delay:{heading:"Anväld lämna fördröjning",description:"Sensorn är tillåten att vara aktiv när lämna fördröjningen startar."},use_entry_delay:{heading:"Använd ankomst fördröjning",description:"Sensor aktivering triggar larmet after ankomst fördröjningen istället för direkt."},allow_open:{heading:"Tillåt öppnad efter larmning.",description:"Om sensorn fortfarande är aktiv efter lämna fördröjningen kommer det inte misslyckas att larma."},auto_bypass:{heading:"Exkludera automatiskt",description:"Exkludera denna sensor fr¨ån larmet open den är öppen vid pålarmning.",modes:"Lägen där sensor kan bli exkluderad"},trigger_unavailable:{heading:"Trigga vid otillgänglig",description:"Detta kommer aktiveras när sensorns status blir 'unavailable'."}},actions:{toggle_advanced:"Avancerade inställningar",remove:"Ta bort",setup_groups:"Hantera grupper"},errors:{description:"Var vänlig att justera följande fel:",no_area:"Ingen area är vald",no_modes:"Inga lägen är valda när sensorn ska vara aktiv",no_auto_bypass_modes:"Inga lägen är valda när sensorn eventuellt automatiskt ska förbikopplas"}}},dialogs:{manage_groups:{title:"Hantera sensor grupper",description:"I en sensor grupp måste flera sensorer bli aktiverade inom en tidsperiod för att larmet ska triggas.",no_items:"Inga grupper ännu",actions:{new_group:"Ny grupp"}},create_group:{title:"Ny sensor grupp",fields:{name:{heading:"Namn",description:"Namn för sensor gruppen"},timeout:{heading:"Time-out",description:"Tidsperiod för de sammankopplade sensorernas aktivitet ska trigga larmet."},sensors:{heading:"Sensorer",description:"Välj sensorer som tillhöra gruppen."}},errors:{invalid_name:"Ogiltigt namn specificerat.",insufficient_sensors:"Minst två sensorer behöver väljas."}},edit_group:{title:"Justera sensor grupp ''{name}''"}}},codes:{title:"Koder",cards:{codes:{description:"Ändra inställningar för kod.",fields:{code_arm_required:{heading:"Använd pålarmningskod",description:"Kräv en kod för att aktivera larmet"},code_disarm_required:{heading:"Använd avlarmningskod",description:"Kräv en kod för att inaktivera larmet"},code_format:{heading:"Kodformat",description:"Ändra inmatningstyp för Lovelace alarm kortet.",code_format_number:"pinkod",code_format_text:"lösenord"}}},user_management:{title:"Användarhantering",description:"Varje användare har sin egen kod för aktivera/inaktivera larmet.",no_items:"Det finns inga användae än",actions:{new_user:"ny användare"}},new_user:{title:"Skapa en ny användare",description:"Users can be created for providing access to operating the alarm.",fields:{name:{heading:"Namn",description:"Namn på användaren"},code:{heading:"Kod",description:"Koden för användaren."},confirm_code:{heading:"Repetra koden",description:"Repetra koden."},can_arm:{heading:"Tillåt kod för pålarming",description:"Denna kod aktiverar larmet"},can_disarm:{heading:"Tillåt kod för avlarming",description:"Denna kod inaktiverar larmet"},is_override_code:{heading:"Tvingande kod",description:"Denna kod tvingar aktivering av larmet"},area_limit:{heading:"Begränsade areor",description:"Begränsa användare att hantera utvalda areor"}},errors:{no_name:"Ingen namn angivet.",no_code:"Koden ska vara minst 4 tecken eller siffror.",code_mismatch:"Koderna matchar inte."}},edit_user:{title:"Justera användare",description:"Ändra inställningar för användare ''{name}''.",fields:{old_code:{heading:"Nuvarande kod",description:"Nuvarande kod, lämna tomt för att inte ändra."}}}}},actions:{title:"Actions",cards:{notifications:{title:"Notifikationer",description:"Du använder denna panel för att hantera notifikationer som ska sändas vid utvalda larmevents.",table:{no_items:"Det är inga notifikationer skapade än.",no_area_warning:"Action is not assigned to any area."},actions:{new_notification:"ny notifikation"}},actions:{description:"I denna panel kan du trigga olika beteende på enheter baserat på oliak events från ditt larm.",table:{no_items:"Det finns inga actions skapade ännu."},actions:{new_action:"ny action"}},new_notification:{title:"Konfiguera notifikationer",description:"Ta emot en notifikation när ditt larm aktivera/inaktiveras eller om en sensor aktiveras eller liknande.",trigger:"Villkor",action:"Task",options:"Inställningar",fields:{event:{heading:"Event",description:"När ska notifikationen skickas",choose:{armed:{name:"Larmet är aktiverat",description:"Larmet aktiveras framgångsrikt"},disarmed:{name:"Larmet är inaktiverat",description:"Larmet är inaktiverat"},triggered:{name:"Larmet har triggats",description:"Larmet har triggats"},arm_failure:{name:"Misslyckas att aktivera larm",description:"Larmet misslyckas att kativeras på grund av någon sensor"},arming:{name:"Lämna fördröjning startas",description:"Lämna fördröjning startas, redo att lämna huset."},pending:{name:"Ankomst fördröjning startas",description:"Ankomst fördröjning startas, larmet kommer triggas snart."}}},mode:{heading:"Läge",description:"Begräns action till specifikt larmläge (valfritt)"},title:{heading:"Titel",description:"Titel för notifikationsmeddelandet"},message:{heading:"Meddelande",description:"Innehåll av notifikationsmeddelandet",insert_wildcard:"Lägg in wildcard",placeholders:{armed:"Larmet har bytt status till {{arm_mode}}",disarmed:"Larmet är nu AVSTÄNGT",triggered:"Larmet har triggats! Anledning: {{open_sensors}}.",arm_failure:"Larmet kunde inte aktiveras nu, detta på grund av: {{open_sensors}}.",arming:"Larmet kommer aktiveras snart, lämna huset.",pending:"Larmet kommer snart triggas, inaktivera larmet snarast!"}},open_sensors_format:{heading:"Format for open_sensors wildcard",description:"Choose which sensor information in inserted in the message",options:{default:"Names and states",short:"Names only"}},arm_mode_format:{heading:"Translation for arm_mode wildcard",description:"Choose in which language the arm mode is inserted in the message"},target:{heading:"Mål",description:"Enhet att skicka push-meddelandet till"},name:{heading:"Namn",description:"Beskrivning av notifikationen",placeholders:{armed:"Notifiera {target} vid aktivering av larm",disarmed:"Notifiera {target} vid inaktivering av larm",triggered:"Notifiera {target} vid triggning av larm",arm_failure:"Notifiera {target} vid fel av larm",arming:"Notifiera {target} vid utpassering",pending:"Notifiera {target} vid ankomst"}},delete:{heading:"Ta bort automation",description:"Ta bort automation permanent"}},actions:{test:"Testa"}},new_action:{title:"Konfiguera action",description:"Aktivera lampor eller andra enheter som sirener eller högatalare vid aktivering/inaktivering av larmet, triggning av larmet osv.",fields:{event:{heading:"Event",description:"När ska denna action aktiveras"},area:{heading:"Area",description:"Area som etta event ska appliceras på, lämna tomt om det ska gälla globalt."},mode:{heading:"Läge",description:"Begränsa action till specifika larmläge (frivilligt)"},entity:{heading:"Entity",description:"Entity att utföra action på"},action:{heading:"Action",description:"Action att utföra på entity",no_common_actions:"Actions kan enbart bli applicerade i YAML läge för utvalda entities."},name:{heading:"Namn",description:"Beskrivning av denna action",placeholders:{armed:"Sätt {entity} till {state} vid aktivering av larmet",disarmed:"Sätt {entity} till {state} vid inaktivering av larmet",triggered:"Sätt {entity} till {state} när larmet triggas",arm_failure:"Sätt {entity} till {state} vid fel av larmet",arming:"Sätt {entity} till {state} vid utpassering",pending:"Sätt {entity} till {state} vid ankomst"}}}}}}},Rt={common:Pt,components:zt,title:"Alarm panel",panels:qt},It=Object.freeze({__proto__:null,common:Pt,components:zt,title:"Alarm panel",panels:qt,default:Rt}),Ut=function(e,t){return(Ut=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])})(e,t)};function Gt(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function a(){this.constructor=e}Ut(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}var Ft=function(){return(Ft=Object.assign||function(e){for(var t,a=1,i=arguments.length;a(a,i)=>{var s;if(void 0===i LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - ***************************************************************************** */var Vt,Ht,Yt,Bt=function(){return(Bt=Object.assign||function(e){for(var t,a=1,i=arguments.length;a(a,i)=>{var s;if(void 0===i LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - ***************************************************************************** */var la=function(){return(la=Object.assign||function(e){for(var t,a=1,i=arguments.length;a1)throw new RangeError("integer-width stems only accept a single optional option");s.options[0].replace(ma,(function(e,a,i,s,n,r){if(a)t.minimumIntegerDigits=i.length;else{if(s&&n)throw new Error("We currently do not support maximum integer digits");if(r)throw new Error("We currently do not support exact integer digits")}return""}));continue}if(pa.test(s.stem))t.minimumIntegerDigits=s.stem.length;else if(ha.test(s.stem)){if(s.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");s.stem.replace(ha,(function(e,a,i,s,n,r){return"*"===i?t.minimumFractionDigits=a.length:s&&"#"===s[0]?t.maximumFractionDigits=s.length:n&&r?(t.minimumFractionDigits=n.length,t.maximumFractionDigits=n.length+r.length):(t.minimumFractionDigits=a.length,t.maximumFractionDigits=a.length),""}));var n=s.options[0];"w"===n?t=la(la({},t),{trailingZeroDisplay:"stripIfInteger"}):n&&(t=la(la({},t),ga(n)))}else if(ua.test(s.stem))t=la(la({},t),ga(s.stem));else{var r=va(s.stem);r&&(t=la(la({},t),r));var o=fa(s.stem);o&&(t=la(la({},t),o))}}return t}var ya=new RegExp("^".concat(na.source,"*")),wa=new RegExp("".concat(na.source,"*$"));function ka(e,t){return{start:e,end:t}}var $a=!!String.prototype.startsWith,Aa=!!String.fromCodePoint,xa=!!Object.fromEntries,Ea=!!String.prototype.codePointAt,Oa=!!String.prototype.trimStart,Ta=!!String.prototype.trimEnd,ja=!!Number.isSafeInteger?Number.isSafeInteger:function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Sa=!0;try{Sa="a"===(null===(ca=qa("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===ca?void 0:ca[0])}catch(M){Sa=!1}var Ca,Ma=$a?function(e,t,a){return e.startsWith(t,a)}:function(e,t,a){return e.slice(a,a+t.length)===t},Na=Aa?String.fromCodePoint:function(){for(var e=[],t=0;tn;){if((a=e[n++])>1114111)throw RangeError(a+" is not a valid code point");i+=a<65536?String.fromCharCode(a):String.fromCharCode(55296+((a-=65536)>>10),a%1024+56320)}return i},Da=xa?Object.fromEntries:function(e){for(var t={},a=0,i=e;a=a)){var i,s=e.charCodeAt(t);return s<55296||s>56319||t+1===a||(i=e.charCodeAt(t+1))<56320||i>57343?s:i-56320+(s-55296<<10)+65536}},Pa=Oa?function(e){return e.trimStart()}:function(e){return e.replace(ya,"")},za=Ta?function(e){return e.trimEnd()}:function(e){return e.replace(wa,"")};function qa(e,t){return new RegExp(e,t)}if(Sa){var Ra=qa("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Ca=function(e,t){var a;return Ra.lastIndex=t,null!==(a=Ra.exec(e)[1])&&void 0!==a?a:""}}else Ca=function(e,t){for(var a=[];;){var i=La(e,t);if(void 0===i||Fa(i)||Va(i))break;a.push(i),t+=i>=65536?2:1}return Na.apply(void 0,a)};var Ia=function(){function e(e,t){void 0===t&&(t={}),this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!t.ignoreTag,this.requiresOtherClause=!!t.requiresOtherClause,this.shouldParseSkeletons=!!t.shouldParseSkeletons}return e.prototype.parse=function(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(e,t,a){for(var i=[];!this.isEOF();){var s=this.char();if(123===s){if((n=this.parseArgument(e,a)).err)return n;i.push(n.val)}else{if(125===s&&e>0)break;if(35!==s||"plural"!==t&&"selectordinal"!==t){if(60===s&&!this.ignoreTag&&47===this.peek()){if(a)break;return this.error(Vt.UNMATCHED_CLOSING_TAG,ka(this.clonePosition(),this.clonePosition()))}if(60===s&&!this.ignoreTag&&Ua(this.peek()||0)){if((n=this.parseTag(e,t)).err)return n;i.push(n.val)}else{var n;if((n=this.parseLiteral(e,t)).err)return n;i.push(n.val)}}else{var r=this.clonePosition();this.bump(),i.push({type:Ht.pound,location:ka(r,this.clonePosition())})}}}return{val:i,err:null}},e.prototype.parseTag=function(e,t){var a=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:Ht.literal,value:"<".concat(i,"/>"),location:ka(a,this.clonePosition())},err:null};if(this.bumpIf(">")){var s=this.parseMessage(e+1,t,!0);if(s.err)return s;var n=s.val,r=this.clonePosition();if(this.bumpIf("")?{val:{type:Ht.tag,value:i,children:n,location:ka(a,this.clonePosition())},err:null}:this.error(Vt.INVALID_TAG,ka(r,this.clonePosition())))}return this.error(Vt.UNCLOSED_TAG,ka(a,this.clonePosition()))}return this.error(Vt.INVALID_TAG,ka(a,this.clonePosition()))},e.prototype.parseTagName=function(){var e=this.offset();for(this.bump();!this.isEOF()&&Ga(this.char());)this.bump();return this.message.slice(e,this.offset())},e.prototype.parseLiteral=function(e,t){for(var a=this.clonePosition(),i="";;){var s=this.tryParseQuote(t);if(s)i+=s;else{var n=this.tryParseUnquoted(e,t);if(n)i+=n;else{var r=this.tryParseLeftAngleBracket();if(!r)break;i+=r}}}var o=ka(a,this.clonePosition());return{val:{type:Ht.literal,value:i,location:o},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60!==this.char()||!this.ignoreTag&&(Ua(e=this.peek()||0)||47===e)?null:(this.bump(),"<");var e},e.prototype.tryParseQuote=function(e){if(this.isEOF()||39!==this.char())return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if("plural"===e||"selectordinal"===e)break;return null;default:return null}this.bump();var t=[this.char()];for(this.bump();!this.isEOF();){var a=this.char();if(39===a){if(39!==this.peek()){this.bump();break}t.push(39),this.bump()}else t.push(a);this.bump()}return Na.apply(void 0,t)},e.prototype.tryParseUnquoted=function(e,t){if(this.isEOF())return null;var a=this.char();return 60===a||123===a||35===a&&("plural"===t||"selectordinal"===t)||125===a&&e>0?null:(this.bump(),Na(a))},e.prototype.parseArgument=function(e,t){var a=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(Vt.EXPECT_ARGUMENT_CLOSING_BRACE,ka(a,this.clonePosition()));if(125===this.char())return this.bump(),this.error(Vt.EMPTY_ARGUMENT,ka(a,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(Vt.MALFORMED_ARGUMENT,ka(a,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(Vt.EXPECT_ARGUMENT_CLOSING_BRACE,ka(a,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:Ht.argument,value:i,location:ka(a,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(Vt.EXPECT_ARGUMENT_CLOSING_BRACE,ka(a,this.clonePosition())):this.parseArgumentOptions(e,t,i,a);default:return this.error(Vt.MALFORMED_ARGUMENT,ka(a,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),t=this.offset(),a=Ca(this.message,t),i=t+a.length;return this.bumpTo(i),{value:a,location:ka(e,this.clonePosition())}},e.prototype.parseArgumentOptions=function(e,t,a,i){var s,n=this.clonePosition(),r=this.parseIdentifierIfPossible().value,o=this.clonePosition();switch(r){case"":return this.error(Vt.EXPECT_ARGUMENT_TYPE,ka(n,o));case"number":case"date":case"time":this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var d=this.clonePosition();if((v=this.parseSimpleArgStyleIfPossible()).err)return v;if(0===(u=za(v.val)).length)return this.error(Vt.EXPECT_ARGUMENT_STYLE,ka(this.clonePosition(),this.clonePosition()));l={style:u,styleLocation:ka(d,this.clonePosition())}}if((f=this.tryParseArgumentClose(i)).err)return f;var c=ka(i,this.clonePosition());if(l&&Ma(null==l?void 0:l.style,"::",0)){var h=Pa(l.style.slice(2));if("number"===r)return(v=this.parseNumberSkeletonFromString(h,l.styleLocation)).err?v:{val:{type:Ht.number,value:a,location:c,style:v.val},err:null};if(0===h.length)return this.error(Vt.EXPECT_DATE_TIME_SKELETON,c);var u={type:Yt.dateTime,pattern:h,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?oa(h):{}};return{val:{type:"date"===r?Ht.date:Ht.time,value:a,location:c,style:u},err:null}}return{val:{type:"number"===r?Ht.number:"date"===r?Ht.date:Ht.time,value:a,location:c,style:null!==(s=null==l?void 0:l.style)&&void 0!==s?s:null},err:null};case"plural":case"selectordinal":case"select":var m=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(Vt.EXPECT_SELECT_ARGUMENT_OPTIONS,ka(m,Bt({},m)));this.bumpSpace();var p=this.parseIdentifierIfPossible(),g=0;if("select"!==r&&"offset"===p.value){if(!this.bumpIf(":"))return this.error(Vt.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,ka(this.clonePosition(),this.clonePosition()));var v;if(this.bumpSpace(),(v=this.tryParseDecimalInteger(Vt.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Vt.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return v;this.bumpSpace(),p=this.parseIdentifierIfPossible(),g=v.val}var f,_=this.tryParsePluralOrSelectOptions(e,r,t,p);if(_.err)return _;if((f=this.tryParseArgumentClose(i)).err)return f;var b=ka(i,this.clonePosition());return"select"===r?{val:{type:Ht.select,value:a,options:Da(_.val),location:b},err:null}:{val:{type:Ht.plural,value:a,options:Da(_.val),offset:g,pluralType:"plural"===r?"cardinal":"ordinal",location:b},err:null};default:return this.error(Vt.INVALID_ARGUMENT_TYPE,ka(n,o))}},e.prototype.tryParseArgumentClose=function(e){return this.isEOF()||125!==this.char()?this.error(Vt.EXPECT_ARGUMENT_CLOSING_BRACE,ka(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var e=0,t=this.clonePosition();!this.isEOF();){switch(this.char()){case 39:this.bump();var a=this.clonePosition();if(!this.bumpUntil("'"))return this.error(Vt.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,ka(a,this.clonePosition()));this.bump();break;case 123:e+=1,this.bump();break;case 125:if(!(e>0))return{val:this.message.slice(t.offset,this.offset()),err:null};e-=1;break;default:this.bump()}}return{val:this.message.slice(t.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(e,t){var a=[];try{a=function(e){if(0===e.length)throw new Error("Number skeleton cannot be empty");for(var t=[],a=0,i=e.split(da).filter((function(e){return e.length>0}));a=48&&r<=57))break;s=!0,n=10*n+(r-48),this.bump()}var o=ka(i,this.clonePosition());return s?ja(n*=a)?{val:n,err:null}:this.error(t,o):this.error(e,o)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");var t=La(this.message,e);if(void 0===t)throw Error("Offset ".concat(e," is at invalid UTF-16 code unit boundary"));return t},e.prototype.error=function(e,t){return{val:null,err:{kind:e,message:this.message,location:t}}},e.prototype.bump=function(){if(!this.isEOF()){var e=this.char();10===e?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}},e.prototype.bumpIf=function(e){if(Ma(this.message,e,this.offset())){for(var t=0;t=0?(this.bumpTo(a),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(e){if(this.offset()>e)throw Error("targetOffset ".concat(e," must be greater than or equal to the current offset ").concat(this.offset()));for(e=Math.min(e,this.message.length);;){var t=this.offset();if(t===e)break;if(t>e)throw Error("targetOffset ".concat(e," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&Fa(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),t=this.offset(),a=this.message.charCodeAt(t+(e>=65536?2:1));return null!=a?a:null},e}();function Ua(e){return e>=97&&e<=122||e>=65&&e<=90}function Ga(e){return 45===e||46===e||e>=48&&e<=57||95===e||e>=97&&e<=122||e>=65&&e<=90||183==e||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function Fa(e){return e>=9&&e<=13||32===e||133===e||e>=8206&&e<=8207||8232===e||8233===e}function Va(e){return e>=33&&e<=35||36===e||e>=37&&e<=39||40===e||41===e||42===e||43===e||44===e||45===e||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||91===e||92===e||93===e||94===e||96===e||123===e||124===e||125===e||126===e||161===e||e>=162&&e<=165||166===e||167===e||169===e||171===e||172===e||174===e||176===e||177===e||182===e||187===e||191===e||215===e||247===e||e>=8208&&e<=8213||e>=8214&&e<=8215||8216===e||8217===e||8218===e||e>=8219&&e<=8220||8221===e||8222===e||8223===e||e>=8224&&e<=8231||e>=8240&&e<=8248||8249===e||8250===e||e>=8251&&e<=8254||e>=8257&&e<=8259||8260===e||8261===e||8262===e||e>=8263&&e<=8273||8274===e||8275===e||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||8608===e||e>=8609&&e<=8610||8611===e||e>=8612&&e<=8613||8614===e||e>=8615&&e<=8621||8622===e||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||8658===e||8659===e||8660===e||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||8968===e||8969===e||8970===e||8971===e||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||9001===e||9002===e||e>=9003&&e<=9083||9084===e||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||9655===e||e>=9656&&e<=9664||9665===e||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||9839===e||e>=9840&&e<=10087||10088===e||10089===e||10090===e||10091===e||10092===e||10093===e||10094===e||10095===e||10096===e||10097===e||10098===e||10099===e||10100===e||10101===e||e>=10132&&e<=10175||e>=10176&&e<=10180||10181===e||10182===e||e>=10183&&e<=10213||10214===e||10215===e||10216===e||10217===e||10218===e||10219===e||10220===e||10221===e||10222===e||10223===e||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||10627===e||10628===e||10629===e||10630===e||10631===e||10632===e||10633===e||10634===e||10635===e||10636===e||10637===e||10638===e||10639===e||10640===e||10641===e||10642===e||10643===e||10644===e||10645===e||10646===e||10647===e||10648===e||e>=10649&&e<=10711||10712===e||10713===e||10714===e||10715===e||e>=10716&&e<=10747||10748===e||10749===e||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||11158===e||e>=11159&&e<=11263||e>=11776&&e<=11777||11778===e||11779===e||11780===e||11781===e||e>=11782&&e<=11784||11785===e||11786===e||11787===e||11788===e||11789===e||e>=11790&&e<=11798||11799===e||e>=11800&&e<=11801||11802===e||11803===e||11804===e||11805===e||e>=11806&&e<=11807||11808===e||11809===e||11810===e||11811===e||11812===e||11813===e||11814===e||11815===e||11816===e||11817===e||e>=11818&&e<=11822||11823===e||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||11840===e||11841===e||11842===e||e>=11843&&e<=11855||e>=11856&&e<=11857||11858===e||e>=11859&&e<=11903||e>=12289&&e<=12291||12296===e||12297===e||12298===e||12299===e||12300===e||12301===e||12302===e||12303===e||12304===e||12305===e||e>=12306&&e<=12307||12308===e||12309===e||12310===e||12311===e||12312===e||12313===e||12314===e||12315===e||12316===e||12317===e||e>=12318&&e<=12319||12320===e||12336===e||64830===e||64831===e||e>=65093&&e<=65094}function Ha(e,t){void 0===t&&(t={}),t=Bt({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var a=new Ia(e,t).parse();if(a.err){var i=SyntaxError(Vt[a.err.kind]);throw i.location=a.err.location,i.originalMessage=a.err.message,i}return(null==t?void 0:t.captureLocation)||function e(t){t.forEach((function(t){if(delete t.location,Jt(t)||ea(t))for(var a in t.options)delete t.options[a].location,e(t.options[a].value);else Wt(t)&&ia(t.style)||(Xt(t)||Zt(t))&&sa(t.style)?delete t.style.location:aa(t)&&e(t.children)}))}(a.val),a.val}function Ya(e,t){var a=t&&t.cache?t.cache:ei,i=t&&t.serializer?t.serializer:Xa;return(t&&t.strategy?t.strategy:Wa)(e,{cache:a,serializer:i})}function Ba(e,t,a,i){var s,n=null==(s=i)||"number"==typeof s||"boolean"==typeof s?i:a(i),r=t.get(n);return void 0===r&&(r=e.call(this,i),t.set(n,r)),r}function Ka(e,t,a){var i=Array.prototype.slice.call(arguments,3),s=a(i),n=t.get(s);return void 0===n&&(n=e.apply(this,i),t.set(s,n)),n}function Qa(e,t,a,i,s){return a.bind(t,e,i,s)}function Wa(e,t){return Qa(e,this,1===e.length?Ba:Ka,t.cache.create(),t.serializer)}var Xa=function(){return JSON.stringify(arguments)};function Za(){this.cache=Object.create(null)}Za.prototype.get=function(e){return this.cache[e]},Za.prototype.set=function(e,t){this.cache[e]=t};var Ja,ei={create:function(){return new Za}},ti={variadic:function(e,t){return Qa(e,this,Ka,t.cache.create(),t.serializer)},monadic:function(e,t){return Qa(e,this,Ba,t.cache.create(),t.serializer)}};!function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"}(Ja||(Ja={}));var ai,ii=function(e){function t(t,a,i){var s=e.call(this,t)||this;return s.code=a,s.originalMessage=i,s}return Ut(t,e),t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),si=function(e){function t(t,a,i,s){return e.call(this,'Invalid values for "'.concat(t,'": "').concat(a,'". Options are "').concat(Object.keys(i).join('", "'),'"'),Ja.INVALID_VALUE,s)||this}return Ut(t,e),t}(ii),ni=function(e){function t(t,a,i){return e.call(this,'Value for "'.concat(t,'" must be of type ').concat(a),Ja.INVALID_VALUE,i)||this}return Ut(t,e),t}(ii),ri=function(e){function t(t,a){return e.call(this,'The intl string context variable "'.concat(t,'" was not provided to the string "').concat(a,'"'),Ja.MISSING_VALUE,a)||this}return Ut(t,e),t}(ii);function oi(e){return"function"==typeof e}function li(e,t,a,i,s,n,r){if(1===e.length&&Kt(e[0]))return[{type:ai.literal,value:e[0].value}];for(var o=[],l=0,d=e;le[t],ui[i])}catch(t){s=e.split(".").reduce((e,t)=>e[t],ui.en)}if(void 0===s&&(s=e.split(".").reduce((e,t)=>e[t],ui.en)),!a.length)return s;const n={};for(let e=0;e{t.find(t=>"object"==typeof e?function(...e){return e.every(t=>JSON.stringify(t)===JSON.stringify(e[0]))}(t,e):t===e)||t.push(e)}),t}function Ei(e,t){return e.filter(e=>e!==t)}function Oi(e,t){return e?Object.entries(e).filter(([e])=>t.includes(e)).reduce((e,[t,a])=>Object.assign(e,{[t]:a}),{}):{}}!function(e){e.ArmedAway="hass:car-traction-control",e.ArmedHome="hass:home-outline",e.ArmedNight="hass:weather-night",e.ArmedCustom="hass:star-outline",e.ArmedVacation="hass:airplane-takeoff"}(pi||(pi={})),function(e){e.STATE_ALARM_DISARMED="disarmed",e.STATE_ALARM_ARMED_HOME="armed_home",e.STATE_ALARM_ARMED_AWAY="armed_away",e.STATE_ALARM_ARMED_NIGHT="armed_night",e.STATE_ALARM_ARMED_CUSTOM_BYPASS="armed_custom_bypass",e.STATE_ALARM_ARMED_VACATION="armed_vacation",e.STATE_ALARM_PENDING="pending",e.STATE_ALARM_ARMING="arming",e.STATE_ALARM_DISARMING="disarming",e.STATE_ALARM_TRIGGERED="triggered"}(gi||(gi={})),function(e){e.COMMAND_ALARM_DISARM="disarm",e.COMMAND_ALARM_ARM_HOME="arm_home",e.COMMAND_ALARM_ARM_AWAY="arm_away",e.COMMAND_ALARM_ARM_NIGHT="arm_night",e.COMMAND_ALARM_ARM_CUSTOM_BYPASS="arm_custom_bypass",e.COMMAND_ALARM_ARM_VACATION="arm_vacation"}(vi||(vi={})),function(e){e.Door="door",e.Window="window",e.Motion="motion",e.Tamper="tamper",e.Environmental="environmental",e.Other="other"}(fi||(fi={})),function(e){e.Door="hass:door-closed",e.Window="hass:window-closed",e.Motion="hass:motion-sensor",e.Tamper="hass:vibrate",e.Environmental="hass:fire",e.Other="hass:contactless-payment-circle-outline"}(_i||(_i={})),function(e){e.Notification="notification",e.Action="action"}(bi||(bi={})),function(e){e.ArmedAway="armed_away",e.ArmedHome="armed_home",e.ArmedNight="armed_night",e.ArmedVacation="armed_vacation",e.ArmedCustom="armed_custom_bypass"}(yi||(yi={})),function(e){e.Armed="armed",e.Disarmed="disarmed",e.Triggered="triggered",e.ArmFailure="arm_failure",e.Arming="arming",e.Pending="pending"}(wi||(wi={}));const Ti=(e,...t)=>{const a={};let i;for(i in e)t.includes(i)||(a[i]=e[i]);return a};function ji(e){return null!=e}function Si(e,t){if(null===e||null===t)return e===t;const a=Object.keys(e),i=Object.keys(t);if(a.length!==i.length)return!1;for(const i of a)if("object"==typeof e[i]&&"object"==typeof t[i]){if(!Si(e[i],t[i]))return!1}else if(e[i]!==t[i])return!1;return!0}function Ci(e,t){const a=e.hasOwnProperty("tagName")?e:e.target;Ne(a,"show-dialog",{dialogTag:"error-dialog",dialogImport:()=>Promise.resolve().then((function(){return vs})),dialogParams:{error:t}})}function Mi(e,t){Ci(t,q` + ***************************************************************************** */var da=function(){return(da=Object.assign||function(e){for(var t,a=1,i=arguments.length;a1)throw new RangeError("integer-width stems only accept a single optional option");s.options[0].replace(pa,(function(e,a,i,s,n,r){if(a)t.minimumIntegerDigits=i.length;else{if(s&&n)throw new Error("We currently do not support maximum integer digits");if(r)throw new Error("We currently do not support exact integer digits")}return""}));continue}if(ga.test(s.stem))t.minimumIntegerDigits=s.stem.length;else if(ua.test(s.stem)){if(s.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");s.stem.replace(ua,(function(e,a,i,s,n,r){return"*"===i?t.minimumFractionDigits=a.length:s&&"#"===s[0]?t.maximumFractionDigits=s.length:n&&r?(t.minimumFractionDigits=n.length,t.maximumFractionDigits=n.length+r.length):(t.minimumFractionDigits=a.length,t.maximumFractionDigits=a.length),""}));var n=s.options[0];"w"===n?t=da(da({},t),{trailingZeroDisplay:"stripIfInteger"}):n&&(t=da(da({},t),va(n)))}else if(ma.test(s.stem))t=da(da({},t),va(s.stem));else{var r=fa(s.stem);r&&(t=da(da({},t),r));var o=_a(s.stem);o&&(t=da(da({},t),o))}}return t}var wa=new RegExp("^".concat(ra.source,"*")),ka=new RegExp("".concat(ra.source,"*$"));function $a(e,t){return{start:e,end:t}}var Aa=!!String.prototype.startsWith,xa=!!String.fromCodePoint,Ea=!!Object.fromEntries,Oa=!!String.prototype.codePointAt,Ta=!!String.prototype.trimStart,ja=!!String.prototype.trimEnd,Sa=!!Number.isSafeInteger?Number.isSafeInteger:function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Ca=!0;try{Ca="a"===(null===(ha=Ra("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===ha?void 0:ha[0])}catch(M){Ca=!1}var Ma,Na=Aa?function(e,t,a){return e.startsWith(t,a)}:function(e,t,a){return e.slice(a,a+t.length)===t},Da=xa?String.fromCodePoint:function(){for(var e=[],t=0;tn;){if((a=e[n++])>1114111)throw RangeError(a+" is not a valid code point");i+=a<65536?String.fromCharCode(a):String.fromCharCode(55296+((a-=65536)>>10),a%1024+56320)}return i},La=Ea?Object.fromEntries:function(e){for(var t={},a=0,i=e;a=a)){var i,s=e.charCodeAt(t);return s<55296||s>56319||t+1===a||(i=e.charCodeAt(t+1))<56320||i>57343?s:i-56320+(s-55296<<10)+65536}},za=Ta?function(e){return e.trimStart()}:function(e){return e.replace(wa,"")},qa=ja?function(e){return e.trimEnd()}:function(e){return e.replace(ka,"")};function Ra(e,t){return new RegExp(e,t)}if(Ca){var Ia=Ra("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Ma=function(e,t){var a;return Ia.lastIndex=t,null!==(a=Ia.exec(e)[1])&&void 0!==a?a:""}}else Ma=function(e,t){for(var a=[];;){var i=Pa(e,t);if(void 0===i||Va(i)||Ha(i))break;a.push(i),t+=i>=65536?2:1}return Da.apply(void 0,a)};var Ua=function(){function e(e,t){void 0===t&&(t={}),this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!t.ignoreTag,this.requiresOtherClause=!!t.requiresOtherClause,this.shouldParseSkeletons=!!t.shouldParseSkeletons}return e.prototype.parse=function(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(e,t,a){for(var i=[];!this.isEOF();){var s=this.char();if(123===s){if((n=this.parseArgument(e,a)).err)return n;i.push(n.val)}else{if(125===s&&e>0)break;if(35!==s||"plural"!==t&&"selectordinal"!==t){if(60===s&&!this.ignoreTag&&47===this.peek()){if(a)break;return this.error(Ht.UNMATCHED_CLOSING_TAG,$a(this.clonePosition(),this.clonePosition()))}if(60===s&&!this.ignoreTag&&Ga(this.peek()||0)){if((n=this.parseTag(e,t)).err)return n;i.push(n.val)}else{var n;if((n=this.parseLiteral(e,t)).err)return n;i.push(n.val)}}else{var r=this.clonePosition();this.bump(),i.push({type:Yt.pound,location:$a(r,this.clonePosition())})}}}return{val:i,err:null}},e.prototype.parseTag=function(e,t){var a=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:Yt.literal,value:"<".concat(i,"/>"),location:$a(a,this.clonePosition())},err:null};if(this.bumpIf(">")){var s=this.parseMessage(e+1,t,!0);if(s.err)return s;var n=s.val,r=this.clonePosition();if(this.bumpIf("")?{val:{type:Yt.tag,value:i,children:n,location:$a(a,this.clonePosition())},err:null}:this.error(Ht.INVALID_TAG,$a(r,this.clonePosition())))}return this.error(Ht.UNCLOSED_TAG,$a(a,this.clonePosition()))}return this.error(Ht.INVALID_TAG,$a(a,this.clonePosition()))},e.prototype.parseTagName=function(){var e=this.offset();for(this.bump();!this.isEOF()&&Fa(this.char());)this.bump();return this.message.slice(e,this.offset())},e.prototype.parseLiteral=function(e,t){for(var a=this.clonePosition(),i="";;){var s=this.tryParseQuote(t);if(s)i+=s;else{var n=this.tryParseUnquoted(e,t);if(n)i+=n;else{var r=this.tryParseLeftAngleBracket();if(!r)break;i+=r}}}var o=$a(a,this.clonePosition());return{val:{type:Yt.literal,value:i,location:o},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60!==this.char()||!this.ignoreTag&&(Ga(e=this.peek()||0)||47===e)?null:(this.bump(),"<");var e},e.prototype.tryParseQuote=function(e){if(this.isEOF()||39!==this.char())return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if("plural"===e||"selectordinal"===e)break;return null;default:return null}this.bump();var t=[this.char()];for(this.bump();!this.isEOF();){var a=this.char();if(39===a){if(39!==this.peek()){this.bump();break}t.push(39),this.bump()}else t.push(a);this.bump()}return Da.apply(void 0,t)},e.prototype.tryParseUnquoted=function(e,t){if(this.isEOF())return null;var a=this.char();return 60===a||123===a||35===a&&("plural"===t||"selectordinal"===t)||125===a&&e>0?null:(this.bump(),Da(a))},e.prototype.parseArgument=function(e,t){var a=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(Ht.EXPECT_ARGUMENT_CLOSING_BRACE,$a(a,this.clonePosition()));if(125===this.char())return this.bump(),this.error(Ht.EMPTY_ARGUMENT,$a(a,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(Ht.MALFORMED_ARGUMENT,$a(a,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(Ht.EXPECT_ARGUMENT_CLOSING_BRACE,$a(a,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:Yt.argument,value:i,location:$a(a,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(Ht.EXPECT_ARGUMENT_CLOSING_BRACE,$a(a,this.clonePosition())):this.parseArgumentOptions(e,t,i,a);default:return this.error(Ht.MALFORMED_ARGUMENT,$a(a,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),t=this.offset(),a=Ma(this.message,t),i=t+a.length;return this.bumpTo(i),{value:a,location:$a(e,this.clonePosition())}},e.prototype.parseArgumentOptions=function(e,t,a,i){var s,n=this.clonePosition(),r=this.parseIdentifierIfPossible().value,o=this.clonePosition();switch(r){case"":return this.error(Ht.EXPECT_ARGUMENT_TYPE,$a(n,o));case"number":case"date":case"time":this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var d=this.clonePosition();if((v=this.parseSimpleArgStyleIfPossible()).err)return v;if(0===(u=qa(v.val)).length)return this.error(Ht.EXPECT_ARGUMENT_STYLE,$a(this.clonePosition(),this.clonePosition()));l={style:u,styleLocation:$a(d,this.clonePosition())}}if((f=this.tryParseArgumentClose(i)).err)return f;var c=$a(i,this.clonePosition());if(l&&Na(null==l?void 0:l.style,"::",0)){var h=za(l.style.slice(2));if("number"===r)return(v=this.parseNumberSkeletonFromString(h,l.styleLocation)).err?v:{val:{type:Yt.number,value:a,location:c,style:v.val},err:null};if(0===h.length)return this.error(Ht.EXPECT_DATE_TIME_SKELETON,c);var u={type:Bt.dateTime,pattern:h,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?la(h):{}};return{val:{type:"date"===r?Yt.date:Yt.time,value:a,location:c,style:u},err:null}}return{val:{type:"number"===r?Yt.number:"date"===r?Yt.date:Yt.time,value:a,location:c,style:null!==(s=null==l?void 0:l.style)&&void 0!==s?s:null},err:null};case"plural":case"selectordinal":case"select":var m=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(Ht.EXPECT_SELECT_ARGUMENT_OPTIONS,$a(m,Kt({},m)));this.bumpSpace();var p=this.parseIdentifierIfPossible(),g=0;if("select"!==r&&"offset"===p.value){if(!this.bumpIf(":"))return this.error(Ht.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,$a(this.clonePosition(),this.clonePosition()));var v;if(this.bumpSpace(),(v=this.tryParseDecimalInteger(Ht.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Ht.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return v;this.bumpSpace(),p=this.parseIdentifierIfPossible(),g=v.val}var f,_=this.tryParsePluralOrSelectOptions(e,r,t,p);if(_.err)return _;if((f=this.tryParseArgumentClose(i)).err)return f;var b=$a(i,this.clonePosition());return"select"===r?{val:{type:Yt.select,value:a,options:La(_.val),location:b},err:null}:{val:{type:Yt.plural,value:a,options:La(_.val),offset:g,pluralType:"plural"===r?"cardinal":"ordinal",location:b},err:null};default:return this.error(Ht.INVALID_ARGUMENT_TYPE,$a(n,o))}},e.prototype.tryParseArgumentClose=function(e){return this.isEOF()||125!==this.char()?this.error(Ht.EXPECT_ARGUMENT_CLOSING_BRACE,$a(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var e=0,t=this.clonePosition();!this.isEOF();){switch(this.char()){case 39:this.bump();var a=this.clonePosition();if(!this.bumpUntil("'"))return this.error(Ht.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,$a(a,this.clonePosition()));this.bump();break;case 123:e+=1,this.bump();break;case 125:if(!(e>0))return{val:this.message.slice(t.offset,this.offset()),err:null};e-=1;break;default:this.bump()}}return{val:this.message.slice(t.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(e,t){var a=[];try{a=function(e){if(0===e.length)throw new Error("Number skeleton cannot be empty");for(var t=[],a=0,i=e.split(ca).filter((function(e){return e.length>0}));a=48&&r<=57))break;s=!0,n=10*n+(r-48),this.bump()}var o=$a(i,this.clonePosition());return s?Sa(n*=a)?{val:n,err:null}:this.error(t,o):this.error(e,o)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");var t=Pa(this.message,e);if(void 0===t)throw Error("Offset ".concat(e," is at invalid UTF-16 code unit boundary"));return t},e.prototype.error=function(e,t){return{val:null,err:{kind:e,message:this.message,location:t}}},e.prototype.bump=function(){if(!this.isEOF()){var e=this.char();10===e?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}},e.prototype.bumpIf=function(e){if(Na(this.message,e,this.offset())){for(var t=0;t=0?(this.bumpTo(a),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(e){if(this.offset()>e)throw Error("targetOffset ".concat(e," must be greater than or equal to the current offset ").concat(this.offset()));for(e=Math.min(e,this.message.length);;){var t=this.offset();if(t===e)break;if(t>e)throw Error("targetOffset ".concat(e," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&Va(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),t=this.offset(),a=this.message.charCodeAt(t+(e>=65536?2:1));return null!=a?a:null},e}();function Ga(e){return e>=97&&e<=122||e>=65&&e<=90}function Fa(e){return 45===e||46===e||e>=48&&e<=57||95===e||e>=97&&e<=122||e>=65&&e<=90||183==e||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function Va(e){return e>=9&&e<=13||32===e||133===e||e>=8206&&e<=8207||8232===e||8233===e}function Ha(e){return e>=33&&e<=35||36===e||e>=37&&e<=39||40===e||41===e||42===e||43===e||44===e||45===e||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||91===e||92===e||93===e||94===e||96===e||123===e||124===e||125===e||126===e||161===e||e>=162&&e<=165||166===e||167===e||169===e||171===e||172===e||174===e||176===e||177===e||182===e||187===e||191===e||215===e||247===e||e>=8208&&e<=8213||e>=8214&&e<=8215||8216===e||8217===e||8218===e||e>=8219&&e<=8220||8221===e||8222===e||8223===e||e>=8224&&e<=8231||e>=8240&&e<=8248||8249===e||8250===e||e>=8251&&e<=8254||e>=8257&&e<=8259||8260===e||8261===e||8262===e||e>=8263&&e<=8273||8274===e||8275===e||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||8608===e||e>=8609&&e<=8610||8611===e||e>=8612&&e<=8613||8614===e||e>=8615&&e<=8621||8622===e||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||8658===e||8659===e||8660===e||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||8968===e||8969===e||8970===e||8971===e||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||9001===e||9002===e||e>=9003&&e<=9083||9084===e||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||9655===e||e>=9656&&e<=9664||9665===e||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||9839===e||e>=9840&&e<=10087||10088===e||10089===e||10090===e||10091===e||10092===e||10093===e||10094===e||10095===e||10096===e||10097===e||10098===e||10099===e||10100===e||10101===e||e>=10132&&e<=10175||e>=10176&&e<=10180||10181===e||10182===e||e>=10183&&e<=10213||10214===e||10215===e||10216===e||10217===e||10218===e||10219===e||10220===e||10221===e||10222===e||10223===e||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||10627===e||10628===e||10629===e||10630===e||10631===e||10632===e||10633===e||10634===e||10635===e||10636===e||10637===e||10638===e||10639===e||10640===e||10641===e||10642===e||10643===e||10644===e||10645===e||10646===e||10647===e||10648===e||e>=10649&&e<=10711||10712===e||10713===e||10714===e||10715===e||e>=10716&&e<=10747||10748===e||10749===e||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||11158===e||e>=11159&&e<=11263||e>=11776&&e<=11777||11778===e||11779===e||11780===e||11781===e||e>=11782&&e<=11784||11785===e||11786===e||11787===e||11788===e||11789===e||e>=11790&&e<=11798||11799===e||e>=11800&&e<=11801||11802===e||11803===e||11804===e||11805===e||e>=11806&&e<=11807||11808===e||11809===e||11810===e||11811===e||11812===e||11813===e||11814===e||11815===e||11816===e||11817===e||e>=11818&&e<=11822||11823===e||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||11840===e||11841===e||11842===e||e>=11843&&e<=11855||e>=11856&&e<=11857||11858===e||e>=11859&&e<=11903||e>=12289&&e<=12291||12296===e||12297===e||12298===e||12299===e||12300===e||12301===e||12302===e||12303===e||12304===e||12305===e||e>=12306&&e<=12307||12308===e||12309===e||12310===e||12311===e||12312===e||12313===e||12314===e||12315===e||12316===e||12317===e||e>=12318&&e<=12319||12320===e||12336===e||64830===e||64831===e||e>=65093&&e<=65094}function Ya(e,t){void 0===t&&(t={}),t=Kt({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var a=new Ua(e,t).parse();if(a.err){var i=SyntaxError(Ht[a.err.kind]);throw i.location=a.err.location,i.originalMessage=a.err.message,i}return(null==t?void 0:t.captureLocation)||function e(t){t.forEach((function(t){if(delete t.location,ea(t)||ta(t))for(var a in t.options)delete t.options[a].location,e(t.options[a].value);else Xt(t)&&sa(t.style)||(Zt(t)||Jt(t))&&na(t.style)?delete t.style.location:ia(t)&&e(t.children)}))}(a.val),a.val}function Ba(e,t){var a=t&&t.cache?t.cache:ti,i=t&&t.serializer?t.serializer:Za;return(t&&t.strategy?t.strategy:Xa)(e,{cache:a,serializer:i})}function Ka(e,t,a,i){var s,n=null==(s=i)||"number"==typeof s||"boolean"==typeof s?i:a(i),r=t.get(n);return void 0===r&&(r=e.call(this,i),t.set(n,r)),r}function Qa(e,t,a){var i=Array.prototype.slice.call(arguments,3),s=a(i),n=t.get(s);return void 0===n&&(n=e.apply(this,i),t.set(s,n)),n}function Wa(e,t,a,i,s){return a.bind(t,e,i,s)}function Xa(e,t){return Wa(e,this,1===e.length?Ka:Qa,t.cache.create(),t.serializer)}var Za=function(){return JSON.stringify(arguments)};function Ja(){this.cache=Object.create(null)}Ja.prototype.get=function(e){return this.cache[e]},Ja.prototype.set=function(e,t){this.cache[e]=t};var ei,ti={create:function(){return new Ja}},ai={variadic:function(e,t){return Wa(e,this,Qa,t.cache.create(),t.serializer)},monadic:function(e,t){return Wa(e,this,Ka,t.cache.create(),t.serializer)}};!function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"}(ei||(ei={}));var ii,si=function(e){function t(t,a,i){var s=e.call(this,t)||this;return s.code=a,s.originalMessage=i,s}return Gt(t,e),t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),ni=function(e){function t(t,a,i,s){return e.call(this,'Invalid values for "'.concat(t,'": "').concat(a,'". Options are "').concat(Object.keys(i).join('", "'),'"'),ei.INVALID_VALUE,s)||this}return Gt(t,e),t}(si),ri=function(e){function t(t,a,i){return e.call(this,'Value for "'.concat(t,'" must be of type ').concat(a),ei.INVALID_VALUE,i)||this}return Gt(t,e),t}(si),oi=function(e){function t(t,a){return e.call(this,'The intl string context variable "'.concat(t,'" was not provided to the string "').concat(a,'"'),ei.MISSING_VALUE,a)||this}return Gt(t,e),t}(si);function li(e){return"function"==typeof e}function di(e,t,a,i,s,n,r){if(1===e.length&&Qt(e[0]))return[{type:ii.literal,value:e[0].value}];for(var o=[],l=0,d=e;le[t],mi[i])}catch(t){s=e.split(".").reduce((e,t)=>e[t],mi.en)}if(void 0===s&&(s=e.split(".").reduce((e,t)=>e[t],mi.en)),!a.length)return s;const n={};for(let e=0;e{t.find(t=>"object"==typeof e?function(...e){return e.every(t=>JSON.stringify(t)===JSON.stringify(e[0]))}(t,e):t===e)||t.push(e)}),t}function Oi(e,t){return e.filter(e=>e!==t)}function Ti(e,t){return e?Object.entries(e).filter(([e])=>t.includes(e)).reduce((e,[t,a])=>Object.assign(e,{[t]:a}),{}):{}}!function(e){e.ArmedAway="hass:car-traction-control",e.ArmedHome="hass:home-outline",e.ArmedNight="hass:weather-night",e.ArmedCustom="hass:star-outline",e.ArmedVacation="hass:airplane-takeoff"}(gi||(gi={})),function(e){e.STATE_ALARM_DISARMED="disarmed",e.STATE_ALARM_ARMED_HOME="armed_home",e.STATE_ALARM_ARMED_AWAY="armed_away",e.STATE_ALARM_ARMED_NIGHT="armed_night",e.STATE_ALARM_ARMED_CUSTOM_BYPASS="armed_custom_bypass",e.STATE_ALARM_ARMED_VACATION="armed_vacation",e.STATE_ALARM_PENDING="pending",e.STATE_ALARM_ARMING="arming",e.STATE_ALARM_DISARMING="disarming",e.STATE_ALARM_TRIGGERED="triggered"}(vi||(vi={})),function(e){e.COMMAND_ALARM_DISARM="disarm",e.COMMAND_ALARM_ARM_HOME="arm_home",e.COMMAND_ALARM_ARM_AWAY="arm_away",e.COMMAND_ALARM_ARM_NIGHT="arm_night",e.COMMAND_ALARM_ARM_CUSTOM_BYPASS="arm_custom_bypass",e.COMMAND_ALARM_ARM_VACATION="arm_vacation"}(fi||(fi={})),function(e){e.Door="door",e.Window="window",e.Motion="motion",e.Tamper="tamper",e.Environmental="environmental",e.Other="other"}(_i||(_i={})),function(e){e.Door="hass:door-closed",e.Window="hass:window-closed",e.Motion="hass:motion-sensor",e.Tamper="hass:vibrate",e.Environmental="hass:fire",e.Other="hass:contactless-payment-circle-outline"}(bi||(bi={})),function(e){e.Notification="notification",e.Action="action"}(yi||(yi={})),function(e){e.ArmedAway="armed_away",e.ArmedHome="armed_home",e.ArmedNight="armed_night",e.ArmedVacation="armed_vacation",e.ArmedCustom="armed_custom_bypass"}(wi||(wi={})),function(e){e.Armed="armed",e.Disarmed="disarmed",e.Triggered="triggered",e.ArmFailure="arm_failure",e.Arming="arming",e.Pending="pending"}(ki||(ki={}));const ji=(e,...t)=>{const a={};let i;for(i in e)t.includes(i)||(a[i]=e[i]);return a};function Si(e){return null!=e}function Ci(e,t){if(null===e||null===t)return e===t;const a=Object.keys(e),i=Object.keys(t);if(a.length!==i.length)return!1;for(const i of a)if("object"==typeof e[i]&&"object"==typeof t[i]){if(!Ci(e[i],t[i]))return!1}else if(e[i]!==t[i])return!1;return!0}function Mi(e,t){const a=e.hasOwnProperty("tagName")?e:e.target;Ne(a,"show-dialog",{dialogTag:"error-dialog",dialogImport:()=>Promise.resolve().then((function(){return fs})),dialogParams:{error:t}})}function Ni(e,t){Mi(t,q` Something went wrong!
${e.body.message?q` @@ -103,7 +103,7 @@ function de(e,t){return(({finisher:e,descriptor:t})=>(a,i)=>{var s;if(void 0===i Please report the bug. - `)}const Ni=(e,t)=>{var a,i,s,n,r;if(!e)return!1;switch(e){case gi.STATE_ALARM_ARMED_AWAY:return null===(a=t[yi.ArmedAway])||void 0===a?void 0:a.enabled;case gi.STATE_ALARM_ARMED_HOME:return null===(i=t[yi.ArmedHome])||void 0===i?void 0:i.enabled;case gi.STATE_ALARM_ARMED_NIGHT:return null===(s=t[yi.ArmedNight])||void 0===s?void 0:s.enabled;case gi.STATE_ALARM_ARMED_CUSTOM_BYPASS:return null===(n=t[yi.ArmedCustom])||void 0===n?void 0:n.enabled;case gi.STATE_ALARM_ARMED_VACATION:return null===(r=t[yi.ArmedVacation])||void 0===r?void 0:r.enabled;default:return!0}};function Di(e,t){return Object.entries(t).forEach(([t,a])=>{e=t in e&&"object"==typeof e[t]&&null!==e[t]?Object.assign(Object.assign({},e),{[t]:Di(e[t],a)}):Object.assign(Object.assign({},e),{[t]:a})}),e}function Li(e,t){const a=e=>"object"==typeof e?a(e.name):e.trim().toLowerCase();return a(e){var a,i,s,n,r;if(!e)return!1;switch(e){case vi.STATE_ALARM_ARMED_AWAY:return null===(a=t[wi.ArmedAway])||void 0===a?void 0:a.enabled;case vi.STATE_ALARM_ARMED_HOME:return null===(i=t[wi.ArmedHome])||void 0===i?void 0:i.enabled;case vi.STATE_ALARM_ARMED_NIGHT:return null===(s=t[wi.ArmedNight])||void 0===s?void 0:s.enabled;case vi.STATE_ALARM_ARMED_CUSTOM_BYPASS:return null===(n=t[wi.ArmedCustom])||void 0===n?void 0:n.enabled;case vi.STATE_ALARM_ARMED_VACATION:return null===(r=t[wi.ArmedVacation])||void 0===r?void 0:r.enabled;default:return!0}};function Li(e,t){return Object.entries(t).forEach(([t,a])=>{e=t in e&&"object"==typeof e[t]&&null!==e[t]?Object.assign(Object.assign({},e),{[t]:Li(e[t],a)}):Object.assign(Object.assign({},e),{[t]:a})}),e}function Pi(e,t){const a=e=>"object"==typeof e?a(e.name):e.trim().toLowerCase();return a(e)(a,i)=>{var s;if(void 0===i margin-bottom: -20px; } - paper-textarea { - width: 100%; + ha-textfield { + min-width: 220px; } a, @@ -238,29 +238,7 @@ function de(e,t){return(({finisher:e,descriptor:t})=>(a,i)=>{var s;if(void 0===i ha-card > ha-card { margin: 10px; } -`,zi=o` - @media all and (min-width: 450px) and (min-height: 500px) { - ha-paper-dialog { - min-width: 400px; - } - } - @media all and (max-width: 450px), all and (max-height: 500px) { - paper-dialog, - ha-paper-dialog { - margin: 0; - width: calc(100% - env(safe-area-inset-right) - env(safe-area-inset-left)) !important; - min-width: calc(100% - env(safe-area-inset-right) - env(safe-area-inset-left)) !important; - max-width: calc(100% - env(safe-area-inset-right) - env(safe-area-inset-left)) !important; - max-height: calc(100% - var(--header-height)); - position: fixed !important; - bottom: 0px; - left: env(safe-area-inset-left); - right: env(safe-area-inset-right); - overflow: scroll; - border-bottom-left-radius: 0px; - border-bottom-right-radius: 0px; - } - } +`,qi=o` /* mwc-dialog (ha-dialog) styles */ ha-dialog { --mdc-dialog-min-width: 400px; @@ -269,23 +247,21 @@ function de(e,t){return(({finisher:e,descriptor:t})=>(a,i)=>{var s;if(void 0===i --mdc-dialog-content-ink-color: var(--primary-text-color); --justify-action-buttons: space-between; } - + /* make dialog fullscreen on small screens */ @media all and (max-width: 450px), all and (max-height: 500px) { - /* overrule the ha-style-dialog max-height on small screens */ ha-dialog { + --mdc-dialog-min-width: calc(100vw - env(safe-area-inset-right) - env(safe-area-inset-left)); + --mdc-dialog-max-width: calc(100vw - env(safe-area-inset-right) - env(safe-area-inset-left)); + --mdc-dialog-min-height: 100%; --mdc-dialog-max-height: 100%; - height: 100%; - } - } - @media all and (min-width: 850px) { - ha-dialog { - --mdc-dialog-min-width: 550px; + --vertial-align-dialog: flex-end; + --ha-dialog-border-radius: 0px; } } ha-dialog div.description { margin-bottom: 10px; } -`,qi=()=>{const e=e=>{let t={};for(var a=0;a3){let i=t.slice(3);if(t.includes("filter")){const t=i.findIndex(e=>"filter"==e),s=i.slice(t+1);i=i.slice(0,t),a=Object.assign(Object.assign({},a),{filter:e(s)})}i.length&&(i.length%2&&(a=Object.assign(Object.assign({},a),{subpage:i.shift()})),i.length&&(a=Object.assign(Object.assign({},a),{params:e(i)})))}return a},Ri=(e,...t)=>{let a={page:e,params:{}};t.forEach(e=>{"string"==typeof e?a=Object.assign(Object.assign({},a),{subpage:e}):"params"in e?a=Object.assign(Object.assign({},a),{params:e.params}):"filter"in e&&(a=Object.assign(Object.assign({},a),{filter:e.filter}))});const i=e=>{let t=Object.keys(e);t=t.filter(t=>e[t]),t.sort();let a="";return t.forEach(t=>{let i=e[t];a=a.length?`${a}/${t}/${i}`:`${t}/${i}`}),a};let s="/alarmo/"+a.page;return a.subpage&&(s=`${s}/${a.subpage}`),i(a.params).length&&(s=`${s}/${i(a.params)}`),a.filter&&(s=`${s}/filter/${i(a.filter)}`),s};let Ii=class extends se{constructor(){super(...arguments),this.min=0,this.max=100,this.step=10,this.value=0,this.scaleFactor=1,this.unit="",this.disabled=!1}firstUpdated(){this.value>0&&this.value<60&&(this.unit="sec"),"min"==this.unit&&(this.scaleFactor=1/60),"min"==this.unit&&(this.step=1)}render(){return q` +`,Ri=()=>{const e=e=>{let t={};for(var a=0;a3){let i=t.slice(3);if(t.includes("filter")){const t=i.findIndex(e=>"filter"==e),s=i.slice(t+1);i=i.slice(0,t),a=Object.assign(Object.assign({},a),{filter:e(s)})}i.length&&(i.length%2&&(a=Object.assign(Object.assign({},a),{subpage:i.shift()})),i.length&&(a=Object.assign(Object.assign({},a),{params:e(i)})))}return a},Ii=(e,...t)=>{let a={page:e,params:{}};t.forEach(e=>{"string"==typeof e?a=Object.assign(Object.assign({},a),{subpage:e}):"params"in e?a=Object.assign(Object.assign({},a),{params:e.params}):"filter"in e&&(a=Object.assign(Object.assign({},a),{filter:e.filter}))});const i=e=>{let t=Object.keys(e);t=t.filter(t=>e[t]),t.sort();let a="";return t.forEach(t=>{let i=e[t];a=a.length?`${a}/${t}/${i}`:`${t}/${i}`}),a};let s="/alarmo/"+a.page;return a.subpage&&(s=`${s}/${a.subpage}`),i(a.params).length&&(s=`${s}/${i(a.params)}`),a.filter&&(s=`${s}/filter/${i(a.filter)}`),s};let Ui=class extends se{constructor(){super(...arguments),this.min=0,this.max=100,this.step=10,this.value=0,this.scaleFactor=1,this.unit="",this.disabled=!1}firstUpdated(){this.value>0&&this.value<60&&(this.unit="sec"),"min"==this.unit&&(this.scaleFactor=1/60),"min"==this.unit&&(this.step=1)}render(){return q`
@@ -297,7 +273,7 @@ function de(e,t){return(({finisher:e,descriptor:t})=>(a,i)=>{var s;if(void 0===i ${this.getValue()}
- `}getValue(){const e=Number(Math.round(this.value*this.scaleFactor));return!e&&this.zeroValue?this.zeroValue:`${e} ${this.getUnit()}`}getUnit(){switch(this.unit){case"sec":return mi("components.time_slider.seconds",this.hass.language);case"min":return mi("components.time_slider.minutes",this.hass.language);default:return""}}getSlider(){return q` + `}getValue(){const e=Number(Math.round(this.value*this.scaleFactor));return!e&&this.zeroValue?this.zeroValue:`${e} ${this.getUnit()}`}getUnit(){switch(this.unit){case"sec":return pi("components.time_slider.seconds",this.hass.language);case"min":return pi("components.time_slider.minutes",this.hass.language);default:return""}}getSlider(){return q` (a,i)=>{var s;if(void 0===i ?disabled=${this.disabled} @change=${this.updateValue} > - `}updateValue(e){const t=Number(e.target.value);this.value=Math.round(t/this.scaleFactor)}toggleUnit(){this.unit="min"==this.unit?"sec":"min",this.scaleFactor="min"==this.unit?1/60:1,this.step="min"==this.unit?1:10}};Ii.styles=o` + `}updateValue(e){const t=Number(e.target.value);this.value=Math.round(t/this.scaleFactor)}toggleUnit(){this.unit="min"==this.unit?"sec":"min",this.scaleFactor="min"==this.unit?1/60:1,this.step="min"==this.unit?1:10}};Ui.styles=o` :host { display: flex; flex-direction: column; @@ -344,14 +320,13 @@ function de(e,t){return(({finisher:e,descriptor:t})=>(a,i)=>{var s;if(void 0===i } ha-slider { - --paper-slider-pin-start-color: var(--primary-color); width: 100%; } .disabled { color: var(--disabled-text-color); } - `,t([oe({type:Number})],Ii.prototype,"min",void 0),t([oe({type:Number})],Ii.prototype,"max",void 0),t([oe({type:Number})],Ii.prototype,"step",void 0),t([oe({type:Number})],Ii.prototype,"value",void 0),t([oe()],Ii.prototype,"scaleFactor",void 0),t([oe({type:String})],Ii.prototype,"unit",void 0),t([oe({type:Boolean})],Ii.prototype,"disabled",void 0),t([oe({type:String})],Ii.prototype,"zeroValue",void 0),Ii=t([ne("time-slider")],Ii);var Ui="M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z",Gi="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z";let Fi=class extends se{constructor(){super(...arguments),this.label="",this.items=[],this.clearable=!1,this.icons=!1,this.disabled=!1,this.invalid=!1,this.rowRenderer=(e,t,a)=>{!e.firstElementChild&&this.icons?e.innerHTML='\n \n \n \n \n
\n
\n
\n
\n ':e.firstElementChild||(e.innerHTML='\n \n \n \n
\n
\n
\n
\n '),e.querySelector(".name").textContent=a.item.name,e.querySelector("[secondary]").textContent=a.item.description||"",this.icons&&(e.querySelector("ha-icon").icon=a.item.icon)}}open(){this.updateComplete.then(()=>{var e,t;null===(t=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector("vaadin-combo-box-light"))||void 0===t||t.open()})}focus(){this.updateComplete.then(()=>{var e;(null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector("paper-input")).focus()})}shouldUpdate(e){if(e.get("items"))if(Si(this.items,e.get("items"))){if(1==e.size)return!1}else this.firstUpdated();return!0}firstUpdated(){this._comboBox.items=this.items}render(){return q` + `,t([oe({type:Number})],Ui.prototype,"min",void 0),t([oe({type:Number})],Ui.prototype,"max",void 0),t([oe({type:Number})],Ui.prototype,"step",void 0),t([oe({type:Number})],Ui.prototype,"value",void 0),t([oe()],Ui.prototype,"scaleFactor",void 0),t([oe({type:String})],Ui.prototype,"unit",void 0),t([oe({type:Boolean})],Ui.prototype,"disabled",void 0),t([oe({type:String})],Ui.prototype,"zeroValue",void 0),Ui=t([ne("time-slider")],Ui);var Gi="M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z",Fi="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z";let Vi=class extends se{constructor(){super(...arguments),this.label="",this.items=[],this.clearable=!1,this.icons=!1,this.disabled=!1,this.invalid=!1,this.rowRenderer=(e,t,a)=>{const i=Si(a.item.description);!e.firstElementChild&&this.icons?e.innerHTML=`\n \n \n \n \n \n \n `:e.firstElementChild||(e.innerHTML=`\n \n \n \n \n \n `),e.querySelector(".name").textContent=a.item.name,e.querySelector('[slot="secondary"]').textContent=a.item.description||"",this.icons&&(e.querySelector("ha-icon").icon=a.item.icon)}}open(){this.updateComplete.then(()=>{var e,t;null===(t=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector("vaadin-combo-box-light"))||void 0===t||t.open()})}focus(){this.updateComplete.then(()=>{var e;(null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector("ha-textfield")).focus()})}shouldUpdate(e){if(e.get("items"))if(Ci(this.items,e.get("items"))){if(1==e.size)return!1}else this.firstUpdated();return!0}firstUpdated(){this._comboBox.items=this.items}render(){const e=Si(this._value)&&this.items.find(e=>e.value==this._value);return q` (a,i)=>{var s;if(void 0===i @opened-changed=${this._openedChanged} @value-changed=${this._valueChanged} > - (a,i)=>{var s;if(void 0===i spellcheck="false" ?disabled=${this.disabled} ?invalid=${this.invalid} + .icon=${this.icons&&e} > - ${ji(this._value)&&this.items.find(e=>e.value==this._value)?q` - ${this.icons?q` - - `:""} - ${this.clearable?q` - - - `:""} - `:""} - - - + + + + ${this.clearable&&e?q` + + `:""} - `}_clearValue(e){e.stopPropagation(),this._setValue("")}get _value(){return ji(this.value)?this.value:""}_openedChanged(e){this._opened=e.detail.value}_valueChanged(e){const t=e.detail.value;t!==this._value&&this._setValue(t)}_setValue(e){this.value=e,setTimeout(()=>{Ne(this,"value-changed",{value:e})},0)}static get styles(){return o` + `}_clearValue(e){e.stopPropagation(),this._setValue("")}get _value(){return Si(this.value)?this.value:""}_toggleOpen(e){var t,a,i,s,n,r;this.items.length?this._opened?(null===(i=null===(a=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector("vaadin-combo-box-light"))||void 0===a?void 0:a.inputElement)||void 0===i||i.blur(),e.stopPropagation()):null===(r=null===(n=null===(s=this.shadowRoot)||void 0===s?void 0:s.querySelector("vaadin-combo-box-light"))||void 0===n?void 0:n.inputElement)||void 0===r||r.focus():e.stopPropagation()}_openedChanged(e){this._opened=e.detail.value}_valueChanged(e){const t=e.detail.value;t!==this._value&&this._setValue(t)}_setValue(e){this.value=e,setTimeout(()=>{Ne(this,"value-changed",{value:e})},0)}static get styles(){return o` :host { - line-height: 1em; + display: block; + } + vaadin-combo-box-light { + position: relative; + } + ha-textfield { + width: 100%; } - paper-input > ha-icon-button { + ha-textfield > ha-icon-button { --mdc-icon-button-size: 24px; padding: 2px; color: var(--secondary-text-color); } - [hidden] { - display: none; + ha-svg-icon { + color: var(--input-dropdown-icon-color); + position: absolute; + cursor: pointer; } - paper-input > ha-icon { - display: flex; - flex: 0 0 40px; - color: var(--state-icon-color); - width: 40px; - height: 26px; - align-items: center; + ha-svg-icon.disabled { + cursor: default; + color: var(--disabled-text-color); } - `}};t([oe()],Fi.prototype,"label",void 0),t([oe()],Fi.prototype,"value",void 0),t([oe()],Fi.prototype,"items",void 0),t([oe()],Fi.prototype,"clearable",void 0),t([oe()],Fi.prototype,"icons",void 0),t([oe({type:Boolean})],Fi.prototype,"disabled",void 0),t([le()],Fi.prototype,"_opened",void 0),t([oe({attribute:"allow-custom-value",type:Boolean})],Fi.prototype,"allowCustomValue",void 0),t([oe({type:Boolean})],Fi.prototype,"invalid",void 0),t([de("vaadin-combo-box-light",!0)],Fi.prototype,"_comboBox",void 0),Fi=t([ne("alarmo-select")],Fi);let Vi=class extends se{static get styles(){return o` + .toggle-button { + right: 12px; + bottom: 5px; + } + :host([opened]) .toggle-button { + color: var(--primary-color); + } + .clear-button { + --mdc-icon-size: 20px; + bottom: 5px; + right: 36px; + } + `}};t([oe()],Vi.prototype,"label",void 0),t([oe()],Vi.prototype,"value",void 0),t([oe()],Vi.prototype,"items",void 0),t([oe()],Vi.prototype,"clearable",void 0),t([oe()],Vi.prototype,"icons",void 0),t([oe({type:Boolean})],Vi.prototype,"disabled",void 0),t([le()],Vi.prototype,"_opened",void 0),t([oe({attribute:"allow-custom-value",type:Boolean})],Vi.prototype,"allowCustomValue",void 0),t([oe({type:Boolean})],Vi.prototype,"invalid",void 0),t([de("vaadin-combo-box-light",!0)],Vi.prototype,"_comboBox",void 0),Vi=t([ne("alarmo-select")],Vi);let Hi=class extends se{static get styles(){return o` :host { display: block; } `}render(){return q` - `}constructor(){super(),this.addEventListener("clickHeader",this.manageSpoilers)}manageSpoilers(e){e.target.toggleAttribute("active"),this.querySelectorAll("alarmo-collapsible-header[active]").forEach((function(t){t!==e.target&&t.removeAttribute("active")}))}};Vi=t([ne("alarmo-collapsible-group")],Vi);let Hi=class extends se{static get styles(){return o` + `}constructor(){super(),this.addEventListener("clickHeader",this.manageSpoilers)}manageSpoilers(e){const t=e.target;t.getAttribute("active")?t.removeAttribute("active"):t.setAttribute("active","true"),this.querySelectorAll("alarmo-collapsible-header[active]").forEach((function(e){e!==t&&e.removeAttribute("active")}))}};Hi=t([ne("alarmo-collapsible-group")],Hi);let Yi=class extends se{static get styles(){return o` :host { display: block; } `}render(){return q` - `}};Hi=t([ne("alarmo-collapsible-item")],Hi);let Yi=class extends se{constructor(){super(),this.clickHeader=new CustomEvent("clickHeader",{detail:{message:"clickHeader happened."},bubbles:!0,composed:!0}),this.active=!1,this.addEventListener("click",this.handleClick)}handleClick(){this.dispatchEvent(this.clickHeader)}render(){return q` - - - - -
- -
-
- -
+ `}};Yi=t([ne("alarmo-collapsible-item")],Yi);let Bi=class extends se{constructor(){super(),this.clickHeader=new CustomEvent("clickHeader",{detail:{message:"clickHeader happened."},bubbles:!0,composed:!0}),this.active=!1,this.addEventListener("click",this.handleClick)}handleClick(){this.dispatchEvent(this.clickHeader)}render(){return q` + + + + + + `}static get styles(){return o` :host { display: block; cursor: pointer; } - :host .chevron { - transition: 0.4s; - } - :host([active]) .chevron { - transform: rotate(180deg); - } - - :host paper-icon-item::before { + :host mwc-list-item::before { position: absolute; top: 0; right: 0; @@ -454,28 +437,39 @@ function de(e,t){return(({finisher:e,descriptor:t})=>(a,i)=>{var s;if(void 0===i background-color: black; opacity: 0; } - :host paper-icon-item:hover::before { + :host mwc-list-item:hover::before { opacity: 0.04; } - :host([active]) paper-icon-item::before { + :host([active]) mwc-list-item::before { opacity: 0.1; } - :host([active]) paper-icon-item:hover::before { + :host([active]) mwc-list-item:hover::before { opacity: 0.12; } - :host paper-icon-item:active::before, :host([active]) paper-icon-item:active::before { + :host mwc-list-item:active::before, + :host([active]) mwc-list-item:active::before { opacity: 0.14; } ::slotted(ha-icon) { - width: 40px; - height: 40px; - display: flex; - align-items: center; - justify-content: center; - margin-right: 16px; - } - } - `}attributeChangedCallback(e,t,a){this.hasAttribute("active")&&this.nextElementSibling?this.nextElementSibling.style.maxHeight=this.nextElementSibling.scrollHeight+"px":this.nextElementSibling&&(this.nextElementSibling.style.maxHeight="0px"),super.attributeChangedCallback(e,t,a)}};t([oe({type:CustomEvent})],Yi.prototype,"clickHeader",void 0),t([oe({type:Boolean,attribute:!0,reflect:!0})],Yi.prototype,"active",void 0),Yi=t([ne("alarmo-collapsible-header")],Yi);let Bi=class extends se{static get styles(){return o` + width: 40px; + height: 40px; + display: flex; + align-items: center; + justify-content: center; + margin-right: 16px; + } + :host mwc-list-item { + font-size: 15px; + --mdc-typography-body2-font-size: 14px; + } + :host .chevron { + display: block; + transition: 0.4s; + } + :host([active]) .chevron { + transform: rotate(180deg); + } + `}attributeChangedCallback(e,t,a){this.hasAttribute("active")&&this.nextElementSibling?this.nextElementSibling.style.maxHeight=this.nextElementSibling.scrollHeight+"px":this.nextElementSibling&&(this.nextElementSibling.style.maxHeight="0px"),super.attributeChangedCallback(e,t,a)}};t([oe({type:CustomEvent})],Bi.prototype,"clickHeader",void 0),t([oe({type:Boolean,attribute:!0,reflect:!0})],Bi.prototype,"active",void 0),Bi=t([ne("alarmo-collapsible-header")],Bi);let Ki=class extends se{static get styles(){return o` :host { display: block; background-color: var(--card-background-color); @@ -489,11 +483,11 @@ function de(e,t){return(({finisher:e,descriptor:t})=>(a,i)=>{var s;if(void 0===i
Default details
- `}};Bi=t([ne("alarmo-collapsible-body")],Bi);let Ki=class extends(Ze(se)){hassSubscribe(){return this._fetchData(),[this.hass.connection.subscribeMessage(()=>this._fetchData(),{type:"alarmo_config_updated"})]}async _fetchData(){this.hass&&(this.areas=await We(this.hass),this.sensors=await Ue(this.hass))}async firstUpdated(){await this._fetchData(),this.selectedArea=Object.keys(this.areas)[0],this.data=Object.assign({},this.areas[this.selectedArea].modes)}render(){return this.data?q` + `}};Ki=t([ne("alarmo-collapsible-body")],Ki);let Qi=class extends(Je(se)){hassSubscribe(){return this._fetchData(),[this.hass.connection.subscribeMessage(()=>this._fetchData(),{type:"alarmo_config_updated"})]}async _fetchData(){this.hass&&(this.areas=await Xe(this.hass),this.sensors=await Ge(this.hass))}async firstUpdated(){await this._fetchData(),this.selectedArea=Object.keys(this.areas)[0],this.data=Object.assign({},this.areas[this.selectedArea].modes)}render(){return this.data?q`
- ${mi("panels.general.cards.modes.title",this.hass.language)} + ${pi("panels.general.cards.modes.title",this.hass.language)}
${Object.keys(this.areas).length>1?q` @@ -506,24 +500,24 @@ function de(e,t){return(({finisher:e,descriptor:t})=>(a,i)=>{var s;if(void 0===i `:""}
- ${mi("panels.general.cards.modes.description",this.hass.language)} + ${pi("panels.general.cards.modes.description",this.hass.language)}
- ${Object.entries(yi).map(([e,t])=>{var a;return q` + ${Object.entries(wi).map(([e,t])=>{var a;return q` - + ${this.hass.localize("component.alarm_control_panel.state._."+t)} ${(null===(a=this.data[t])||void 0===a?void 0:a.enabled)?q` - ${mi("common.enabled",this.hass.language)}, - - ${mi("panels.general.cards.modes.number_sensors_active",this.hass.language,"number",this.getSensorsByMode(t))} + ${pi("common.enabled",this.hass.language)}, + + ${pi("panels.general.cards.modes.number_sensors_active",this.hass.language,"number",this.getSensorsByMode(t))} - `:mi("common.disabled",this.hass.language)} + `:pi("common.disabled",this.hass.language)} @@ -536,41 +530,41 @@ function de(e,t){return(({finisher:e,descriptor:t})=>(a,i)=>{var s;if(void 0===i `:q``}getSensorsByMode(e){return Object.values(this.sensors).filter(t=>t.modes.includes(e)||t.always_on).length}renderModeConfig(e){const t=e in this.data?this.data[e]:void 0;return q`
- ${mi("panels.general.cards.modes.modes."+e,this.hass.language)} + ${pi("panels.general.cards.modes.modes."+e,this.hass.language)}
- ${mi("panels.general.cards.modes.fields.status.heading",this.hass.language)} + ${pi("panels.general.cards.modes.fields.status.heading",this.hass.language)} - ${mi("panels.general.cards.modes.fields.status.description",this.hass.language)} + ${pi("panels.general.cards.modes.fields.status.description",this.hass.language)}
this.saveData(e,{enabled:!0})}> - ${mi("common.enabled",this.hass.language)} + ${pi("common.enabled",this.hass.language)} this.saveData(e,{enabled:!1})} > - ${mi("common.disabled",this.hass.language)} + ${pi("common.disabled",this.hass.language)}
- ${mi("panels.general.cards.modes.fields.exit_delay.heading",this.hass.language)} + ${pi("panels.general.cards.modes.fields.exit_delay.heading",this.hass.language)} - ${mi("panels.general.cards.modes.fields.exit_delay.description",this.hass.language)} + ${pi("panels.general.cards.modes.fields.exit_delay.description",this.hass.language)} this.saveData(e,{exit_time:Number(t.target.value)})} ?disabled=${!(null==t?void 0:t.enabled)} @@ -578,16 +572,16 @@ function de(e,t){return(({finisher:e,descriptor:t})=>(a,i)=>{var s;if(void 0===i - ${mi("panels.general.cards.modes.fields.entry_delay.heading",this.hass.language)} + ${pi("panels.general.cards.modes.fields.entry_delay.heading",this.hass.language)} - ${mi("panels.general.cards.modes.fields.entry_delay.description",this.hass.language)} + ${pi("panels.general.cards.modes.fields.entry_delay.description",this.hass.language)} this.saveData(e,{entry_time:Number(t.target.value)})} ?disabled=${!(null==t?void 0:t.enabled)} @@ -595,23 +589,23 @@ function de(e,t){return(({finisher:e,descriptor:t})=>(a,i)=>{var s;if(void 0===i - ${mi("panels.general.cards.modes.fields.trigger_time.heading",this.hass.language)} + ${pi("panels.general.cards.modes.fields.trigger_time.heading",this.hass.language)} - ${mi("panels.general.cards.modes.fields.trigger_time.description",this.hass.language)} + ${pi("panels.general.cards.modes.fields.trigger_time.description",this.hass.language)} this.saveData(e,{trigger_time:Number(t.target.value)})} ?disabled=${!(null==t?void 0:t.enabled)} > - `}selectArea(e){e!=this.selectedArea&&(this.selectedArea=e,this.data=Object.assign({},this.areas[e].modes))}saveClick(e){Xe(this.hass,{area_id:this.selectedArea,modes:this.data}).catch(t=>Mi(t,e)).then()}saveData(e,t){this.data=Object.assign(Object.assign({},this.data),{[e]:Object.assign(Object.assign({},this.data[e]||{enabled:!1,exit_time:0,entry_time:0,trigger_time:0}),t)}),Xe(this.hass,{area_id:this.selectedArea,modes:this.data}).catch(e=>Mi(e,this.shadowRoot.querySelector("ha-card"))).then()}static get styles(){return o` - ${Pi} + `}selectArea(e){e!=this.selectedArea&&(this.selectedArea=e,this.data=Object.assign({},this.areas[e].modes))}saveClick(e){Ze(this.hass,{area_id:this.selectedArea,modes:this.data}).catch(t=>Ni(t,e)).then()}saveData(e,t){this.data=Object.assign(Object.assign({},this.data),{[e]:Object.assign(Object.assign({},this.data[e]||{enabled:!1,exit_time:0,entry_time:0,trigger_time:0}),t)}),Ze(this.hass,{area_id:this.selectedArea,modes:this.data}).catch(e=>Ni(e,this.shadowRoot.querySelector("ha-card"))).then()}static get styles(){return o` + ${zi} alarmo-collapsible-header:first-of-type { border-top: 1px solid var(--divider-color); } @@ -645,7 +639,7 @@ function de(e,t){return(({finisher:e,descriptor:t})=>(a,i)=>{var s;if(void 0===i margin-right: 12px; align-self: flex-start; } - `}};t([oe()],Ki.prototype,"hass",void 0),t([oe({type:Boolean})],Ki.prototype,"narrow",void 0),t([oe()],Ki.prototype,"config",void 0),t([oe()],Ki.prototype,"areas",void 0),t([oe()],Ki.prototype,"sensors",void 0),t([oe()],Ki.prototype,"data",void 0),t([oe()],Ki.prototype,"selectedArea",void 0),Ki=t([ne("alarm-mode-card")],Ki);let Qi=class extends se{constructor(){super(...arguments),this.threeLine=!1}render(){return q` + `}};t([oe()],Qi.prototype,"hass",void 0),t([oe({type:Boolean})],Qi.prototype,"narrow",void 0),t([oe()],Qi.prototype,"config",void 0),t([oe()],Qi.prototype,"areas",void 0),t([oe()],Qi.prototype,"sensors",void 0),t([oe()],Qi.prototype,"data",void 0),t([oe()],Qi.prototype,"selectedArea",void 0),Qi=t([ne("alarm-mode-card")],Qi);let Wi=class extends se{constructor(){super(...arguments),this.threeLine=!1}render(){return q`
@@ -715,7 +709,7 @@ function de(e,t){return(({finisher:e,descriptor:t})=>(a,i)=>{var s;if(void 0===i :host(:not([large]):not([narrow])):not([dialog])) ::slotted(*) { max-width: 66%; } - `}};t([oe({type:Boolean,reflect:!0})],Qi.prototype,"narrow",void 0),t([oe({type:Boolean,reflect:!0})],Qi.prototype,"large",void 0),t([oe({type:Boolean,attribute:"three-line"})],Qi.prototype,"threeLine",void 0),t([oe({type:Boolean})],Qi.prototype,"nested",void 0),t([oe({type:Boolean})],Qi.prototype,"dialog",void 0),Qi=t([ne("settings-row")],Qi);let Wi=class extends se{constructor(){super(...arguments),this.header="",this.open=!1}render(){return q` + `}};t([oe({type:Boolean,reflect:!0})],Wi.prototype,"narrow",void 0),t([oe({type:Boolean,reflect:!0})],Wi.prototype,"large",void 0),t([oe({type:Boolean,attribute:"three-line"})],Wi.prototype,"threeLine",void 0),t([oe({type:Boolean})],Wi.prototype,"nested",void 0),t([oe({type:Boolean})],Wi.prototype,"dialog",void 0),Wi=t([ne("settings-row")],Wi);let Xi=class extends se{constructor(){super(...arguments),this.header="",this.open=!1}render(){return q` ${this.open?q`
{this.open=!1}}>${this.header} @@ -731,7 +725,7 @@ function de(e,t){return(({finisher:e,descriptor:t})=>(a,i)=>{var s;if(void 0===i `:q`
{this.open=!0}}>${this.header} - {this.open=!0}}> + {this.open=!0}}>
`} @@ -766,102 +760,102 @@ function de(e,t){return(({finisher:e,descriptor:t})=>(a,i)=>{var s;if(void 0===i height: 1px; background: var(--divider-color); } - `}};t([oe({type:Boolean,reflect:!0})],Wi.prototype,"narrow",void 0),t([oe()],Wi.prototype,"header",void 0),t([oe()],Wi.prototype,"open",void 0),Wi=t([ne("collapsible-section")],Wi);let Xi=class extends(Ze(se)){constructor(){super(...arguments),this.areas={}}hassSubscribe(){return this._fetchData(),[this.hass.connection.subscribeMessage(()=>this._fetchData(),{type:"alarmo_config_updated"})]}async _fetchData(){if(!this.hass)return;const e=await Ie(this.hass);this.config=e,this.areas=await We(this.hass),this.selection=e.mqtt}firstUpdated(){(async()=>{await Re()})()}render(){return this.hass&&this.selection?q` + `}};t([oe({type:Boolean,reflect:!0})],Xi.prototype,"narrow",void 0),t([oe()],Xi.prototype,"header",void 0),t([oe()],Xi.prototype,"open",void 0),Xi=t([ne("collapsible-section")],Xi);let Zi=class extends(Je(se)){constructor(){super(...arguments),this.areas={}}hassSubscribe(){return this._fetchData(),[this.hass.connection.subscribeMessage(()=>this._fetchData(),{type:"alarmo_config_updated"})]}async _fetchData(){if(!this.hass)return;const e=await Ue(this.hass);this.config=e,this.areas=await Xe(this.hass),this.selection=e.mqtt}firstUpdated(){(async()=>{await Re()})()}render(){return this.hass&&this.selection?q`
-
${mi("panels.general.cards.mqtt.title",this.hass.language)}
- +
${pi("panels.general.cards.mqtt.title",this.hass.language)}
+
-
${mi("panels.general.cards.mqtt.description",this.hass.language)}
+
${pi("panels.general.cards.mqtt.description",this.hass.language)}
- ${mi("panels.general.cards.mqtt.fields.state_topic.heading",this.hass.language)} + ${pi("panels.general.cards.mqtt.fields.state_topic.heading",this.hass.language)} - ${mi("panels.general.cards.mqtt.fields.state_topic.description",this.hass.language)} + ${pi("panels.general.cards.mqtt.fields.state_topic.description",this.hass.language)} - {this.selection={...this.selection,state_topic:e.target.value}}} - > + > - ${Object.values(gi).filter(e=>Object.values(this.areas).some(t=>Ni(e,t.modes))).map(e=>q` + ${Object.values(vi).filter(e=>Object.values(this.areas).some(t=>Di(e,t.modes))).map(e=>q` - ${$i(e)} + ${Ai(e)} - ${mi("panels.general.cards.mqtt.fields.state_payload.item",this.hass.language,"{state}",$i(e))} + ${pi("panels.general.cards.mqtt.fields.state_payload.item",this.hass.language,"{state}",Ai(e))} - {this.selection=Di(this.selection,{state_payload:{[e]:t.target.value}})}} - > + @change=${t=>{this.selection=Li(this.selection,{state_payload:{[e]:t.target.value}})}} + > `)} - ${mi("panels.general.cards.mqtt.fields.event_topic.heading",this.hass.language)} + ${pi("panels.general.cards.mqtt.fields.event_topic.heading",this.hass.language)} - ${mi("panels.general.cards.mqtt.fields.event_topic.description",this.hass.language)} + ${pi("panels.general.cards.mqtt.fields.event_topic.description",this.hass.language)} - {this.selection={...this.selection,event_topic:e.target.value}}} - > + > - ${mi("panels.general.cards.mqtt.fields.command_topic.heading",this.hass.language)} + ${pi("panels.general.cards.mqtt.fields.command_topic.heading",this.hass.language)} - ${mi("panels.general.cards.mqtt.fields.command_topic.description",this.hass.language)} + ${pi("panels.general.cards.mqtt.fields.command_topic.description",this.hass.language)} - {this.selection={...this.selection,command_topic:e.target.value}}} - > + > - ${Object.values(vi).filter(e=>Object.values(this.areas).some(t=>Ni((e=>{switch(e){case vi.COMMAND_ALARM_DISARM:return gi.STATE_ALARM_DISARMED;case vi.COMMAND_ALARM_ARM_HOME:return gi.STATE_ALARM_ARMED_HOME;case vi.COMMAND_ALARM_ARM_AWAY:return gi.STATE_ALARM_ARMED_AWAY;case vi.COMMAND_ALARM_ARM_NIGHT:return gi.STATE_ALARM_ARMED_NIGHT;case vi.COMMAND_ALARM_ARM_CUSTOM_BYPASS:return gi.STATE_ALARM_ARMED_CUSTOM_BYPASS;case vi.COMMAND_ALARM_ARM_VACATION:return gi.STATE_ALARM_ARMED_VACATION;default:return}})(e),t.modes))).map(e=>q` + ${Object.values(fi).filter(e=>Object.values(this.areas).some(t=>Di((e=>{switch(e){case fi.COMMAND_ALARM_DISARM:return vi.STATE_ALARM_DISARMED;case fi.COMMAND_ALARM_ARM_HOME:return vi.STATE_ALARM_ARMED_HOME;case fi.COMMAND_ALARM_ARM_AWAY:return vi.STATE_ALARM_ARMED_AWAY;case fi.COMMAND_ALARM_ARM_NIGHT:return vi.STATE_ALARM_ARMED_NIGHT;case fi.COMMAND_ALARM_ARM_CUSTOM_BYPASS:return vi.STATE_ALARM_ARMED_CUSTOM_BYPASS;case fi.COMMAND_ALARM_ARM_VACATION:return vi.STATE_ALARM_ARMED_VACATION;default:return}})(e),t.modes))).map(e=>q` - ${$i(e)} + ${Ai(e)} - ${mi("panels.general.cards.mqtt.fields.command_payload.item",this.hass.language,"{command}",$i(e))} + ${pi("panels.general.cards.mqtt.fields.command_payload.item",this.hass.language,"{command}",Ai(e))} - {this.selection=Di(this.selection,{command_payload:{[e]:t.target.value}})}} - > + @change=${t=>{this.selection=Li(this.selection,{command_payload:{[e]:t.target.value}})}} + > `)} - ${mi("panels.general.cards.mqtt.fields.require_code.heading",this.hass.language)} + ${pi("panels.general.cards.mqtt.fields.require_code.heading",this.hass.language)} - ${mi("panels.general.cards.mqtt.fields.require_code.description",this.hass.language)} + ${pi("panels.general.cards.mqtt.fields.require_code.description",this.hass.language)} (a,i)=>{var s;if(void 0===i
- `:q``}saveClick(e){this.hass&&He(this.hass,{mqtt:Object.assign(Object.assign({},this.selection),{enabled:!0})}).catch(t=>Mi(t,e)).then(()=>{this.cancelClick()})}cancelClick(){Pe(0,Ri("general"),!0)}};Xi.styles=Pi,t([oe()],Xi.prototype,"narrow",void 0),t([oe()],Xi.prototype,"config",void 0),t([oe()],Xi.prototype,"areas",void 0),t([oe()],Xi.prototype,"selection",void 0),Xi=t([ne("mqtt-config-card")],Xi); + `:q``}saveClick(e){this.hass&&Ye(this.hass,{mqtt:Object.assign(Object.assign({},this.selection),{enabled:!0})}).catch(t=>Ni(t,e)).then(()=>{this.cancelClick()})}cancelClick(){Pe(0,Ii("general"),!0)}};Zi.styles=zi,t([oe()],Zi.prototype,"narrow",void 0),t([oe()],Zi.prototype,"config",void 0),t([oe()],Zi.prototype,"areas",void 0),t([oe()],Zi.prototype,"selection",void 0),Zi=t([ne("mqtt-config-card")],Zi); /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const Zi=2; +const Ji=2; /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -class Ji extends class{constructor(e){}T(e,t,a){this.Σdt=e,this.M=t,this.Σct=a}S(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}{constructor(e){if(super(e),this.vt=I,e.type!==Zi)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===I)return this.Vt=void 0,this.vt=e;if(e===R)return e;if("string"!=typeof e)throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.vt)return this.Vt;this.vt=e;const t=[e];return t.raw=t,this.Vt={_$litType$:this.constructor.resultType,strings:t,values:[]}}}Ji.directiveName="unsafeHTML",Ji.resultType=1;const es=(e=>(...t)=>({_$litDirective$:e,values:t}))(Ji);let ts=class extends se{render(){return q` +class es extends class{constructor(e){}T(e,t,a){this.Σdt=e,this.M=t,this.Σct=a}S(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}{constructor(e){if(super(e),this.vt=I,e.type!==Ji)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===I)return this.Vt=void 0,this.vt=e;if(e===R)return e;if("string"!=typeof e)throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.vt)return this.Vt;this.vt=e;const t=[e];return t.raw=t,this.Vt={_$litType$:this.constructor.resultType,strings:t,values:[]}}}es.directiveName="unsafeHTML",es.resultType=1;const ts=(e=>(...t)=>({_$litDirective$:e,values:t}))(es);let as=class extends se{render(){return q`
${this.renderCheckmark()} @@ -1040,7 +1034,7 @@ class Ji extends class{constructor(e){}T(e,t,a){this.Σdt=e,this.M=t,this.Σct=a :host([table]) .chip:before { border-radius: 4px; } - `}};t([oe({type:String})],ts.prototype,"value",void 0),t([oe({type:Boolean})],ts.prototype,"checked",void 0),t([oe({type:Boolean})],ts.prototype,"checkmark",void 0),t([oe({type:Boolean})],ts.prototype,"selectable",void 0),t([oe({type:Boolean})],ts.prototype,"clickable",void 0),t([oe({type:Boolean})],ts.prototype,"cancellable",void 0),t([oe({type:Number})],ts.prototype,"badge",void 0),t([oe({type:Boolean})],ts.prototype,"table",void 0),ts=t([ne("alarmo-chip")],ts);let as=class extends se{constructor(){super(...arguments),this.value=[]}render(){return this.items?q` + `}};t([oe({type:String})],as.prototype,"value",void 0),t([oe({type:Boolean})],as.prototype,"checked",void 0),t([oe({type:Boolean})],as.prototype,"checkmark",void 0),t([oe({type:Boolean})],as.prototype,"selectable",void 0),t([oe({type:Boolean})],as.prototype,"clickable",void 0),t([oe({type:Boolean})],as.prototype,"cancellable",void 0),t([oe({type:Number})],as.prototype,"badge",void 0),t([oe({type:Boolean})],as.prototype,"table",void 0),as=t([ne("alarmo-chip")],as);let is=class extends se{constructor(){super(...arguments),this.value=[]}render(){return this.items?q` ${Object.values(this.items).map(e=>q` this.filterTableData(e,this.filterConfig));return q` + `}};t([oe()],is.prototype,"items",void 0),t([oe()],is.prototype,"value",void 0),t([oe({type:Boolean})],is.prototype,"selectable",void 0),is=t([ne("alarmo-chip-set")],is);let ss=class extends se{set filters(e){this.filterConfig||(this.filterConfig=e)}shouldUpdate(e){return e.get("filters")&&!this.filterConfig&&(this.filterConfig=e.get("filters")),!0}render(){if(!this.columns||!this.data)return q``;const e=this.data.filter(e=>this.filterTableData(e,this.filterConfig));return q` ${this.renderFilterRow()}
${this.renderHeaderRow()} @@ -1104,7 +1098,7 @@ class Ji extends class{constructor(e){}T(e,t,a){this.Σdt=e,this.M=t,this.Σct=a @@ -1113,16 +1107,16 @@ class Ji extends class{constructor(e){}T(e,t,a){this.Σdt=e,this.M=t,this.Σct=a ${this._getFilteredItems()?q` - ${mi("components.table.filter.hidden_items",this.hass.language,"number",this._getFilteredItems())} + ${pi("components.table.filter.hidden_items",this.hass.language,"number",this._getFilteredItems())} `:""}
- `:q``}_toggleFilterMenu(e){const t=e.target;this._menu.anchor=t,this._menu.open?this._menu.close():(this.filterSelection=Object.entries(this.filterConfig).reduce((e,[t,a])=>Object.assign(Object.assign({},e),{[t]:Oi(a,["value"])}),{}),this._menu.show())}renderFilterMenu(){return this.filterConfig&&this.filterSelection?q` + `:q``}_toggleFilterMenu(e){const t=e.target;this._menu.anchor=t,this._menu.open?this._menu.close():(this.filterSelection=Object.entries(this.filterConfig).reduce((e,[t,a])=>Object.assign(Object.assign({},e),{[t]:Ti(a,["value"])}),{}),this._menu.show())}renderFilterMenu(){return this.filterConfig&&this.filterSelection?q` - ${mi("components.table.filter.label",this.hass.language)} + ${pi("components.table.filter.label",this.hass.language)} {this._menu.close(),setTimeout(()=>this._menu.anchor.blur(),50)}} > ${Object.keys(this.filterConfig).map(e=>{if(this.filterConfig[e].binary)return q` @@ -1135,7 +1129,7 @@ class Ji extends class{constructor(e){}T(e,t,a){this.Σdt=e,this.M=t,this.Σct=a ${this.filterConfig[e].name}
- `;let t=this.filterConfig[e].items;t=t.map(t=>{var a;return t.badge&&"function"==typeof t.badge?{...t,badge:t.badge(null===(a=this.data)||void 0===a?void 0:a.filter(t=>this.filterTableData(t,Ti(this.filterSelection,e))))}:t});const a=this.filterSelection[e].value;return q` + `;let t=this.filterConfig[e].items;t=t.map(t=>{var a;return t.badge&&"function"==typeof t.badge?{...t,badge:t.badge(null===(a=this.data)||void 0===a?void 0:a.filter(t=>this.filterTableData(t,ji(this.filterSelection,e))))}:t});const a=this.filterSelection[e].value;return q` `})} - `:q``}_updateFilterSelection(e,t){"boolean"==typeof t&&(t=t?this.filterConfig[e].items[0].value:[],1==Object.keys(this.filterConfig).length&&(this._menu.close(),setTimeout(()=>this._menu.anchor.blur(),50))),this.filterSelection=Object.assign(Object.assign({},this.filterSelection),{[e]:{value:t}})}_clearFilters(){Object.keys(this.filterConfig).forEach(e=>{this.filterConfig=Object.assign(Object.assign({},this.filterConfig),{[e]:Object.assign(Object.assign({},this.filterConfig[e]),{value:[]})})})}_applyFilterSelection(){Object.keys(this.filterConfig).forEach(e=>{this.filterConfig=Object.assign(Object.assign({},this.filterConfig),{[e]:Object.assign(Object.assign({},this.filterConfig[e]),this.filterSelection[e])})})}};is.styles=o` + `:q``}_updateFilterSelection(e,t){"boolean"==typeof t&&(t=t?this.filterConfig[e].items[0].value:[],1==Object.keys(this.filterConfig).length&&(this._menu.close(),setTimeout(()=>this._menu.anchor.blur(),50))),this.filterSelection=Object.assign(Object.assign({},this.filterSelection),{[e]:{value:t}})}_clearFilters(){Object.keys(this.filterConfig).forEach(e=>{this.filterConfig=Object.assign(Object.assign({},this.filterConfig),{[e]:Object.assign(Object.assign({},this.filterConfig[e]),{value:[]})})})}_applyFilterSelection(){Object.keys(this.filterConfig).forEach(e=>{this.filterConfig=Object.assign(Object.assign({},this.filterConfig),{[e]:Object.assign(Object.assign({},this.filterConfig[e]),this.filterSelection[e])})})}};ss.styles=o` :host { width: 100%; } @@ -1246,7 +1240,7 @@ class Ji extends class{constructor(e){}T(e,t,a){this.Σdt=e,this.M=t,this.Σct=a } ha-icon { - color: var(--paper-item-icon-color); + color: var(--state-icon-color); padding: 8px; } @@ -1316,11 +1310,11 @@ class Ji extends class{constructor(e){}T(e,t,a){this.Σdt=e,this.M=t,this.Σct=a ha-button-menu mwc-button { margin-left: 16px; } - `,t([oe()],is.prototype,"hass",void 0),t([oe()],is.prototype,"columns",void 0),t([oe()],is.prototype,"data",void 0),t([le()],is.prototype,"filterConfig",void 0),t([le()],is.prototype,"filterSelection",void 0),t([oe({type:Boolean})],is.prototype,"selectable",void 0),t([de("mwc-menu",!0)],is.prototype,"_menu",void 0),is=t([ne("alarmo-table")],is);let ss=class extends se{async showDialog(e){this._params=e,await this.updateComplete}async closeDialog(){this._params&&this._params.cancel(),this._params=void 0}render(){return this._params?q` + `,t([oe()],ss.prototype,"hass",void 0),t([oe()],ss.prototype,"columns",void 0),t([oe()],ss.prototype,"data",void 0),t([le()],ss.prototype,"filterConfig",void 0),t([le()],ss.prototype,"filterSelection",void 0),t([oe({type:Boolean})],ss.prototype,"selectable",void 0),t([de("mwc-menu",!0)],ss.prototype,"_menu",void 0),ss=t([ne("alarmo-table")],ss);let ns=class extends se{async showDialog(e){this._params=e,await this.updateComplete}async closeDialog(){this._params&&this._params.cancel(),this._params=void 0}render(){return this._params?q`
- + ${this._params.title} @@ -1337,36 +1331,36 @@ class Ji extends class{constructor(e){}T(e,t,a){this.Σdt=e,this.M=t,this.Σct=a `:q``}confirmClick(){this._params.confirm()}cancelClick(){this._params.cancel()}static get styles(){return o` - ${Pi} + ${zi} div.wrapper { color: var(--primary-text-color); } - `}};t([oe({attribute:!1})],ss.prototype,"hass",void 0),t([le()],ss.prototype,"_params",void 0),ss=t([ne("confirm-delete-dialog")],ss);var ns=Object.freeze({__proto__:null,get ConfirmDeleteDialog(){return ss}});let rs=class extends(Ze(se)){constructor(){super(...arguments),this.areas={},this.sensors={},this.automations={},this.name=""}hassSubscribe(){return this._fetchData(),[this.hass.connection.subscribeMessage(()=>this._fetchData(),{type:"alarmo_config_updated"})]}async _fetchData(){this.hass&&(this.areas=await We(this.hass),this.sensors=await Ue(this.hass),this.automations=await Fe(this.hass))}async showDialog(e){await this._fetchData(),this._params=e,e.area_id&&(this.area_id=e.area_id,this.name=this.areas[this.area_id].name),await this.updateComplete}async closeDialog(){this._params=void 0,this.area_id=void 0,this.name=""}render(){return this._params?q` + `}};t([oe({attribute:!1})],ns.prototype,"hass",void 0),t([le()],ns.prototype,"_params",void 0),ns=t([ne("confirm-delete-dialog")],ns);var rs=Object.freeze({__proto__:null,get ConfirmDeleteDialog(){return ns}});let os=class extends(Je(se)){constructor(){super(...arguments),this.areas={},this.sensors={},this.automations={},this.name=""}hassSubscribe(){return this._fetchData(),[this.hass.connection.subscribeMessage(()=>this._fetchData(),{type:"alarmo_config_updated"})]}async _fetchData(){this.hass&&(this.areas=await Xe(this.hass),this.sensors=await Ge(this.hass),this.automations=await Ve(this.hass))}async showDialog(e){await this._fetchData(),this._params=e,e.area_id&&(this.area_id=e.area_id,this.name=this.areas[this.area_id].name),await this.updateComplete}async closeDialog(){this._params=void 0,this.area_id=void 0,this.name=""}render(){return this._params?q`
- + - ${this.area_id?mi("panels.general.dialogs.edit_area.title",this.hass.language,"{area}",this.areas[this.area_id].name):mi("panels.general.dialogs.create_area.title",this.hass.language)} + ${this.area_id?pi("panels.general.dialogs.edit_area.title",this.hass.language,"{area}",this.areas[this.area_id].name):pi("panels.general.dialogs.create_area.title",this.hass.language)}
- this.name=e.target.value} + @input=${e=>this.name=e.target.value} value="${this.name}" - > + > ${this.area_id?q` - ${mi("panels.general.dialogs.edit_area.name_warning",this.hass.language)} + ${pi("panels.general.dialogs.edit_area.name_warning",this.hass.language)} `:""} ${this.area_id?"":q` Object({value:e.area_id,name:e.name}))} value=${this.selectedArea} - label="${mi("panels.general.dialogs.create_area.fields.copy_from",this.hass.language)}" + label="${pi("panels.general.dialogs.create_area.fields.copy_from",this.hass.language)}" clearable=${!0} @value-changed=${e=>this.selectedArea=e.target.value} > @@ -1386,48 +1380,52 @@ class Ji extends class{constructor(e){}T(e,t,a){this.Σdt=e,this.M=t,this.Σct=a `:""} - `:q``}saveClick(e){const t=this.name.trim();if(!t.length)return;let a={name:t};this.area_id?a=Object.assign(Object.assign({},a),{area_id:this.area_id}):this.selectedArea&&(a=Object.assign(Object.assign({},a),{modes:Object.assign({},this.areas[this.selectedArea].modes)})),Xe(this.hass,a).catch(t=>Mi(t,e)).then(()=>{this.closeDialog()})}async deleteClick(e){if(!this.area_id)return;const t=Object.values(this.sensors).filter(e=>e.area==this.area_id).length,a=Object.values(this.automations).filter(e=>{var t;return null===(t=e.triggers)||void 0===t?void 0:t.map(e=>e.area).includes(this.area_id)}).length;let i=!1;var s,n;i=!t&&!a||await new Promise(i=>{Ne(e.target,"show-dialog",{dialogTag:"confirm-delete-dialog",dialogImport:()=>Promise.resolve().then((function(){return ns})),dialogParams:{title:mi("panels.general.dialogs.remove_area.title",this.hass.language),description:mi("panels.general.dialogs.remove_area.description",this.hass.language,"sensors",String(t),"automations",String(a)),cancel:()=>i(!1),confirm:()=>i(!0)}})}),i&&(s=this.hass,n=this.area_id,s.callApi("POST","alarmo/area",{area_id:n,remove:!0})).catch(t=>Mi(t,e)).then(()=>{this.closeDialog()})}static get styles(){return o` - ${Pi} + `:q``}saveClick(e){const t=this.name.trim();if(!t.length)return;let a={name:t};this.area_id?a=Object.assign(Object.assign({},a),{area_id:this.area_id}):this.selectedArea&&(a=Object.assign(Object.assign({},a),{modes:Object.assign({},this.areas[this.selectedArea].modes)})),Ze(this.hass,a).catch(t=>Ni(t,e)).then(()=>{this.closeDialog()})}async deleteClick(e){if(!this.area_id)return;const t=Object.values(this.sensors).filter(e=>e.area==this.area_id).length,a=Object.values(this.automations).filter(e=>{var t;return null===(t=e.triggers)||void 0===t?void 0:t.map(e=>e.area).includes(this.area_id)}).length;let i=!1;var s,n;i=!t&&!a||await new Promise(i=>{Ne(e.target,"show-dialog",{dialogTag:"confirm-delete-dialog",dialogImport:()=>Promise.resolve().then((function(){return rs})),dialogParams:{title:pi("panels.general.dialogs.remove_area.title",this.hass.language),description:pi("panels.general.dialogs.remove_area.description",this.hass.language,"sensors",String(t),"automations",String(a)),cancel:()=>i(!1),confirm:()=>i(!0)}})}),i&&(s=this.hass,n=this.area_id,s.callApi("POST","alarmo/area",{area_id:n,remove:!0})).catch(t=>Ni(t,e)).then(()=>{this.closeDialog()})}static get styles(){return o` + ${zi} div.wrapper { color: var(--primary-text-color); } span.note { color: var(--secondary-text-color); } - `}};t([oe({attribute:!1})],rs.prototype,"hass",void 0),t([le()],rs.prototype,"_params",void 0),t([oe()],rs.prototype,"areas",void 0),t([oe()],rs.prototype,"sensors",void 0),t([oe()],rs.prototype,"automations",void 0),t([oe()],rs.prototype,"name",void 0),t([oe()],rs.prototype,"area_id",void 0),t([oe()],rs.prototype,"selectedArea",void 0),rs=t([ne("create-area-dialog")],rs);var os=Object.freeze({__proto__:null,get CreateAreaDialog(){return rs}});let ls=class extends(Ze(se)){constructor(){super(...arguments),this.areas={},this.sensors={},this.automations={}}hassSubscribe(){return this._fetchData(),[this.hass.connection.subscribeMessage(()=>this._fetchData(),{type:"alarmo_config_updated"})]}async _fetchData(){this.hass&&(this.areas=await We(this.hass),this.sensors=await Ue(this.hass),this.automations=await Fe(this.hass))}render(){if(!this.hass)return q``;const e=Object.values(this.areas);e.sort(Li);const t={actions:{width:"48px"},name:{title:this.hass.localize("ui.components.area-picker.add_dialog.name"),width:"40%",grow:!0,text:!0},remarks:{title:mi("panels.general.cards.areas.table.remarks",this.hass.language),width:"60%",hide:this.narrow,text:!0}},a=Object.values(e).map(t=>{const a=Object.values(this.sensors).filter(e=>e.area==t.area_id).length,i=1==Object.values(e).length?Object.values(this.automations).filter(e=>{var a,i;return(null===(a=e.triggers)||void 0===a?void 0:a.map(e=>e.area).includes(t.area_id))||!(null===(i=e.triggers)||void 0===i?void 0:i.map(e=>e.area).length)}).length:Object.values(this.automations).filter(e=>{var a;return null===(a=e.triggers)||void 0===a?void 0:a.map(e=>e.area).includes(t.area_id)}).length,s=`${mi("panels.general.cards.areas.table.summary_sensors",this.hass.language,"number",a)}`,n=`${mi("panels.general.cards.areas.table.summary_automations",this.hass.language,"number",i)}`;return{id:t.area_id,actions:q` + ha-textfield { + display: block; + } + alarmo-select { + margin-top: 10px; + } + `}};t([oe({attribute:!1})],os.prototype,"hass",void 0),t([le()],os.prototype,"_params",void 0),t([oe()],os.prototype,"areas",void 0),t([oe()],os.prototype,"sensors",void 0),t([oe()],os.prototype,"automations",void 0),t([oe()],os.prototype,"name",void 0),t([oe()],os.prototype,"area_id",void 0),t([oe()],os.prototype,"selectedArea",void 0),os=t([ne("create-area-dialog")],os);var ls=Object.freeze({__proto__:null,get CreateAreaDialog(){return os}});let ds=class extends(Je(se)){constructor(){super(...arguments),this.areas={},this.sensors={},this.automations={}}hassSubscribe(){return this._fetchData(),[this.hass.connection.subscribeMessage(()=>this._fetchData(),{type:"alarmo_config_updated"})]}async _fetchData(){this.hass&&(this.areas=await Xe(this.hass),this.sensors=await Ge(this.hass),this.automations=await Ve(this.hass))}render(){if(!this.hass)return q``;const e=Object.values(this.areas);e.sort(Pi);const t={actions:{width:"48px"},name:{title:this.hass.localize("ui.components.area-picker.add_dialog.name"),width:"40%",grow:!0,text:!0},remarks:{title:pi("panels.general.cards.areas.table.remarks",this.hass.language),width:"60%",hide:this.narrow,text:!0}},a=Object.values(e).map(t=>{const a=Object.values(this.sensors).filter(e=>e.area==t.area_id).length,i=1==Object.values(e).length?Object.values(this.automations).filter(e=>{var a,i;return(null===(a=e.triggers)||void 0===a?void 0:a.map(e=>e.area).includes(t.area_id))||!(null===(i=e.triggers)||void 0===i?void 0:i.map(e=>e.area).length)}).length:Object.values(this.automations).filter(e=>{var a;return null===(a=e.triggers)||void 0===a?void 0:a.map(e=>e.area).includes(t.area_id)}).length,s=`${pi("panels.general.cards.areas.table.summary_sensors",this.hass.language,"number",a)}`,n=`${pi("panels.general.cards.areas.table.summary_automations",this.hass.language,"number",i)}`;return{id:t.area_id,actions:q` this.editClick(e,t.area_id)} .path=${"M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z"}> - `,name:$i(t.name),remarks:es(mi("panels.general.cards.areas.table.summary",this.hass.language,"summary_sensors",s,"summary_automations",n))}});return q` - + `,name:Ai(t.name),remarks:ts(pi("panels.general.cards.areas.table.summary",this.hass.language,"summary_sensors",s,"summary_automations",n))}});return q` +
- ${mi("panels.general.cards.areas.description",this.hass.language)} + ${pi("panels.general.cards.areas.description",this.hass.language)}
- ${mi("panels.general.cards.areas.no_items",this.hass.language)} + ${pi("panels.general.cards.areas.no_items",this.hass.language)}
- ${mi("panels.general.cards.areas.actions.add",this.hass.language)} + ${pi("panels.general.cards.areas.actions.add",this.hass.language)}
- `}addClick(e){const t=e.target;Ne(t,"show-dialog",{dialogTag:"create-area-dialog",dialogImport:()=>Promise.resolve().then((function(){return os})),dialogParams:{}})}editClick(e,t){const a=e.target;Ne(a,"show-dialog",{dialogTag:"create-area-dialog",dialogImport:()=>Promise.resolve().then((function(){return os})),dialogParams:{area_id:t}})}};ls.styles=Pi,t([oe()],ls.prototype,"narrow",void 0),t([oe()],ls.prototype,"path",void 0),t([oe()],ls.prototype,"config",void 0),t([oe()],ls.prototype,"areas",void 0),t([oe()],ls.prototype,"sensors",void 0),t([oe()],ls.prototype,"automations",void 0),ls=t([ne("area-config-card")],ls);let ds=class extends se{constructor(){super(...arguments),this.name=""}async showDialog(e){this._params=e;const t=await Ie(this.hass);this.name=t.master.name||"",await this.updateComplete}async closeDialog(){this._params=void 0}render(){return this._params?q` + `}addClick(e){const t=e.target;Ne(t,"show-dialog",{dialogTag:"create-area-dialog",dialogImport:()=>Promise.resolve().then((function(){return ls})),dialogParams:{}})}editClick(e,t){const a=e.target;Ne(a,"show-dialog",{dialogTag:"create-area-dialog",dialogImport:()=>Promise.resolve().then((function(){return ls})),dialogParams:{area_id:t}})}};ds.styles=zi,t([oe()],ds.prototype,"narrow",void 0),t([oe()],ds.prototype,"path",void 0),t([oe()],ds.prototype,"config",void 0),t([oe()],ds.prototype,"areas",void 0),t([oe()],ds.prototype,"sensors",void 0),t([oe()],ds.prototype,"automations",void 0),ds=t([ne("area-config-card")],ds);let cs=class extends se{constructor(){super(...arguments),this.name=""}async showDialog(e){this._params=e;const t=await Ue(this.hass);this.name=t.master.name||"",await this.updateComplete}async closeDialog(){this._params=void 0}render(){return this._params?q`
- - - ${mi("panels.general.dialogs.edit_master.title",this.hass.language)} + + ${pi("panels.general.dialogs.edit_master.title",this.hass.language)}
- this.name=e.target.value} + @input=${e=>this.name=e.target.value} value="${this.name}" - > - - ${mi("panels.general.dialogs.edit_area.name_warning",this.hass.language)} + > + ${pi("panels.general.dialogs.edit_area.name_warning",this.hass.language)}
${this.hass.localize("ui.common.save")} @@ -1436,14 +1434,17 @@ class Ji extends class{constructor(e){}T(e,t,a){this.Σdt=e,this.M=t,this.Σct=a ${this.hass.localize("ui.common.cancel")}
- `:q``}saveClick(){const e=this.name.trim();e.length&&He(this.hass,{master:{enabled:!0,name:e}}).catch().then(()=>{this.closeDialog()})}static get styles(){return o` + `:q``}saveClick(){const e=this.name.trim();e.length&&Ye(this.hass,{master:{enabled:!0,name:e}}).catch().then(()=>{this.closeDialog()})}static get styles(){return o` div.wrapper { color: var(--primary-text-color); } span.note { color: var(--secondary-text-color); } - `}};t([oe({attribute:!1})],ds.prototype,"hass",void 0),t([le()],ds.prototype,"_params",void 0),t([oe()],ds.prototype,"name",void 0),ds=t([ne("edit-master-dialog")],ds);var cs=Object.freeze({__proto__:null,get EditMasterDialog(){return ds}});let hs=class extends(Ze(se)){constructor(){super(...arguments),this.areas={},this.automations={}}hassSubscribe(){return this._fetchData(),[this.hass.connection.subscribeMessage(()=>this._fetchData(),{type:"alarmo_config_updated"})]}async _fetchData(){this.hass&&(this.config=await Ie(this.hass),this.areas=await We(this.hass),this.automations=await Fe(this.hass),this.data=Oi(this.config,["trigger_time","disarm_after_trigger","mqtt","master"]))}firstUpdated(){(async()=>{await Re()})()}render(){var e,t,a,i,s,n,r,o;return this.hass&&this.config&&this.data?"mqtt_configuration"==this.path.subpage?q` + ha-textfield { + display: block; + } + `}};t([oe({attribute:!1})],cs.prototype,"hass",void 0),t([le()],cs.prototype,"_params",void 0),t([oe()],cs.prototype,"name",void 0),cs=t([ne("edit-master-dialog")],cs);var hs=Object.freeze({__proto__:null,get EditMasterDialog(){return cs}});let us=class extends(Je(se)){constructor(){super(...arguments),this.areas={},this.automations={}}hassSubscribe(){return this._fetchData(),[this.hass.connection.subscribeMessage(()=>this._fetchData(),{type:"alarmo_config_updated"})]}async _fetchData(){this.hass&&(this.config=await Ue(this.hass),this.areas=await Xe(this.hass),this.automations=await Ve(this.hass),this.data=Ti(this.config,["trigger_time","disarm_after_trigger","mqtt","master"]))}firstUpdated(){(async()=>{await Re()})()}render(){var e,t,a,i,s,n,r,o;return this.hass&&this.config&&this.data?"mqtt_configuration"==this.path.subpage?q` `:this.path.params.edit_area?q` `:q` - +
- ${mi("panels.general.cards.general.description",this.hass.language)} + ${pi("panels.general.cards.general.description",this.hass.language)}
- ${mi("panels.general.cards.general.fields.disarm_after_trigger.heading",this.hass.language)} + ${pi("panels.general.cards.general.fields.disarm_after_trigger.heading",this.hass.language)} - ${mi("panels.general.cards.general.fields.disarm_after_trigger.description",this.hass.language)} + ${pi("panels.general.cards.general.fields.disarm_after_trigger.description",this.hass.language)} - ${mi("panels.general.cards.general.fields.enable_mqtt.heading",this.hass.language)} + ${pi("panels.general.cards.general.fields.enable_mqtt.heading",this.hass.language)} - ${mi("panels.general.cards.general.fields.enable_mqtt.description",this.hass.language)} + ${pi("panels.general.cards.general.fields.enable_mqtt.description",this.hass.language)} Pe(0,Ri("general","mqtt_configuration"),!0)} + @click=${()=>Pe(0,Ii("general","mqtt_configuration"),!0)} > - ${mi("panels.general.cards.general.actions.setup_mqtt",this.hass.language)} + ${pi("panels.general.cards.general.actions.setup_mqtt",this.hass.language)}
`:""} ${Object.keys(this.areas).length>=2?q` - ${mi("panels.general.cards.general.fields.enable_master.heading",this.hass.language)} + ${pi("panels.general.cards.general.fields.enable_master.heading",this.hass.language)} - ${mi("panels.general.cards.general.fields.enable_master.description",this.hass.language)} + ${pi("panels.general.cards.general.fields.enable_master.description",this.hass.language)} =2} @@ -1511,7 +1512,7 @@ class Ji extends class{constructor(e){}T(e,t,a){this.Σdt=e,this.M=t,this.Σct=a ${(null===(o=null===(r=this.data)||void 0===r?void 0:r.master)||void 0===o?void 0:o.enabled)&&Object.keys(this.areas).length>=2?q`
- ${mi("panels.general.cards.general.actions.setup_master",this.hass.language)} + ${pi("panels.general.cards.general.actions.setup_master",this.hass.language)}
`:""} @@ -1520,11 +1521,11 @@ class Ji extends class{constructor(e){}T(e,t,a){this.Σdt=e,this.M=t,this.Σct=a - `:q``}setupMasterClick(e){const t=e.target;Ne(t,"show-dialog",{dialogTag:"edit-master-dialog",dialogImport:()=>Promise.resolve().then((function(){return cs})),dialogParams:{}})}async toggleEnableMaster(e){const t=e.target;let a=t.checked;if(!a){const i=Object.values(this.automations).filter(e=>e.triggers.some(e=>!e.area));if(i.length){await new Promise(e=>{Ne(t,"show-dialog",{dialogTag:"confirm-delete-dialog",dialogImport:()=>Promise.resolve().then((function(){return ns})),dialogParams:{title:mi("panels.general.dialogs.disable_master.title",this.hass.language),description:mi("panels.general.dialogs.disable_master.description",this.hass.language,"automations",String(i.length)),cancel:()=>e(!1),confirm:()=>e(!0)}})})?!a&&i.length&&i.forEach(t=>{Qe(this.hass,t.automation_id).catch(t=>Mi(t,e))}):(a=!0,t.checked=!0)}}this.saveData({master:Object.assign(Object.assign({},this.data.master),{enabled:a})})}saveData(e){this.hass&&this.data&&(this.data=Object.assign(Object.assign({},this.data),e),He(this.hass,this.data).catch(e=>Mi(e,this.shadowRoot.querySelector("ha-card"))).then())}};hs.styles=Pi,t([oe()],hs.prototype,"narrow",void 0),t([oe()],hs.prototype,"path",void 0),t([oe()],hs.prototype,"data",void 0),t([oe()],hs.prototype,"config",void 0),t([oe()],hs.prototype,"areas",void 0),t([oe()],hs.prototype,"automations",void 0),hs=t([ne("alarm-view-general")],hs);const us=(e,t)=>{if("binary_sensor"==function(e){const t="string"==typeof e?e:e.entity_id;return String(t.split(".").shift())}(e.entity_id)){if(t)return!0;const a=e.attributes.device_class;return!!a&&!!["door","garage_door","gas","heat","lock","moisture","motion","moving","occupancy","opening","presence","safety","smoke","sound","vibration","window"].includes(a)}return!1},ms=e=>{switch(e.attributes.device_class){case"door":case"garage_door":case"lock":return fi.Door;case"window":return fi.Window;case"gas":case"heat":case"moisture":case"smoke":case"safety":return fi.Environmental;case"motion":case"moving":case"occupancy":case"presence":return fi.Motion;case"sound":case"opening":case"vibration":return fi.Tamper;default:return}},ps=e=>{const t=t=>t.filter(t=>e.includes(t));return{[fi.Door]:{modes:t([yi.ArmedAway,yi.ArmedHome,yi.ArmedNight,yi.ArmedVacation]),always_on:!1,allow_open:!1,arm_on_close:!1,use_entry_delay:!0,use_exit_delay:!1},[fi.Window]:{modes:t([yi.ArmedAway,yi.ArmedHome,yi.ArmedNight,yi.ArmedVacation]),always_on:!1,allow_open:!1,arm_on_close:!1,use_entry_delay:!1,use_exit_delay:!1},[fi.Motion]:{modes:t([yi.ArmedAway,yi.ArmedVacation]),always_on:!1,allow_open:!0,arm_on_close:!1,use_entry_delay:!0,use_exit_delay:!0},[fi.Tamper]:{modes:t([yi.ArmedAway,yi.ArmedHome,yi.ArmedNight,yi.ArmedVacation,yi.ArmedCustom]),always_on:!1,allow_open:!1,arm_on_close:!1,use_entry_delay:!1,use_exit_delay:!1},[fi.Environmental]:{modes:t([yi.ArmedAway,yi.ArmedHome,yi.ArmedNight,yi.ArmedVacation,yi.ArmedCustom]),always_on:!0,allow_open:!1,arm_on_close:!1,use_entry_delay:!1,use_exit_delay:!1}}};let gs=class extends se{async showDialog(e){this._params=e,await this.updateComplete}async closeDialog(){this._params=void 0}render(){return this._params?q` + `:q``}setupMasterClick(e){const t=e.target;Ne(t,"show-dialog",{dialogTag:"edit-master-dialog",dialogImport:()=>Promise.resolve().then((function(){return hs})),dialogParams:{}})}async toggleEnableMaster(e){const t=e.target;let a=t.checked;if(!a){const i=Object.values(this.automations).filter(e=>e.triggers.some(e=>!e.area));if(i.length){await new Promise(e=>{Ne(t,"show-dialog",{dialogTag:"confirm-delete-dialog",dialogImport:()=>Promise.resolve().then((function(){return rs})),dialogParams:{title:pi("panels.general.dialogs.disable_master.title",this.hass.language),description:pi("panels.general.dialogs.disable_master.description",this.hass.language,"automations",String(i.length)),cancel:()=>e(!1),confirm:()=>e(!0)}})})?!a&&i.length&&i.forEach(t=>{We(this.hass,t.automation_id).catch(t=>Ni(t,e))}):(a=!0,t.checked=!0)}}this.saveData({master:Object.assign(Object.assign({},this.data.master),{enabled:a})})}saveData(e){this.hass&&this.data&&(this.data=Object.assign(Object.assign({},this.data),e),Ye(this.hass,this.data).catch(e=>Ni(e,this.shadowRoot.querySelector("ha-card"))).then())}};us.styles=zi,t([oe()],us.prototype,"narrow",void 0),t([oe()],us.prototype,"path",void 0),t([oe()],us.prototype,"data",void 0),t([oe()],us.prototype,"config",void 0),t([oe()],us.prototype,"areas",void 0),t([oe()],us.prototype,"automations",void 0),us=t([ne("alarm-view-general")],us);const ms=(e,t)=>{if("binary_sensor"==function(e){const t="string"==typeof e?e:e.entity_id;return String(t.split(".").shift())}(e.entity_id)){if(t)return!0;const a=e.attributes.device_class;return!!a&&!!["door","garage_door","gas","heat","lock","moisture","motion","moving","occupancy","opening","presence","safety","smoke","sound","vibration","window"].includes(a)}return!1},ps=e=>{switch(e.attributes.device_class){case"door":case"garage_door":case"lock":return _i.Door;case"window":return _i.Window;case"gas":case"heat":case"moisture":case"smoke":case"safety":return _i.Environmental;case"motion":case"moving":case"occupancy":case"presence":return _i.Motion;case"sound":case"opening":case"vibration":return _i.Tamper;default:return}},gs=e=>{const t=t=>t.filter(t=>e.includes(t));return{[_i.Door]:{modes:t([wi.ArmedAway,wi.ArmedHome,wi.ArmedNight,wi.ArmedVacation]),always_on:!1,allow_open:!1,arm_on_close:!1,use_entry_delay:!0,use_exit_delay:!1},[_i.Window]:{modes:t([wi.ArmedAway,wi.ArmedHome,wi.ArmedNight,wi.ArmedVacation]),always_on:!1,allow_open:!1,arm_on_close:!1,use_entry_delay:!1,use_exit_delay:!1},[_i.Motion]:{modes:t([wi.ArmedAway,wi.ArmedVacation]),always_on:!1,allow_open:!0,arm_on_close:!1,use_entry_delay:!0,use_exit_delay:!0},[_i.Tamper]:{modes:t([wi.ArmedAway,wi.ArmedHome,wi.ArmedNight,wi.ArmedVacation,wi.ArmedCustom]),always_on:!1,allow_open:!1,arm_on_close:!1,use_entry_delay:!1,use_exit_delay:!1},[_i.Environmental]:{modes:t([wi.ArmedAway,wi.ArmedHome,wi.ArmedNight,wi.ArmedVacation,wi.ArmedCustom]),always_on:!0,allow_open:!1,arm_on_close:!1,use_entry_delay:!1,use_exit_delay:!1}}};let vs=class extends se{async showDialog(e){this._params=e,await this.updateComplete}async closeDialog(){this._params=void 0}render(){return this._params?q`
- + ${this.hass.localize("state_badge.default.error")} @@ -1543,29 +1544,29 @@ class Ji extends class{constructor(e){}T(e,t,a){this.Σdt=e,this.M=t,this.Σct=a div.wrapper { color: var(--primary-text-color); } - `}};t([oe({attribute:!1})],gs.prototype,"hass",void 0),t([le()],gs.prototype,"_params",void 0),gs=t([ne("error-dialog")],gs);var vs=Object.freeze({__proto__:null,get ErrorDialog(){return gs}});let fs=class extends(Ze(se)){constructor(){super(...arguments),this.sensorGroups={},this.sensors={}}hassSubscribe(){return this._fetchData(),[this.hass.connection.subscribeMessage(()=>this._fetchData(),{type:"alarmo_config_updated"})]}async _fetchData(){this.hass&&(this.sensorGroups=await Ve(this.hass),this.sensors=await Ue(this.hass))}async showDialog(e){await this._fetchData(),this._params=e,e.group_id&&Object.keys(this.sensorGroups).includes(e.group_id)?this.data=Object.assign({},this.sensorGroups[e.group_id]):this.data={name:"",entities:[],timeout:600},await this.updateComplete}async closeDialog(){this._params=void 0}render(){return this._params?q` + `}};t([oe({attribute:!1})],vs.prototype,"hass",void 0),t([le()],vs.prototype,"_params",void 0),vs=t([ne("error-dialog")],vs);var fs=Object.freeze({__proto__:null,get ErrorDialog(){return vs}});let _s=class extends(Je(se)){constructor(){super(...arguments),this.sensorGroups={},this.sensors={}}hassSubscribe(){return this._fetchData(),[this.hass.connection.subscribeMessage(()=>this._fetchData(),{type:"alarmo_config_updated"})]}async _fetchData(){this.hass&&(this.sensorGroups=await He(this.hass),this.sensors=await Ge(this.hass))}async showDialog(e){await this._fetchData(),this._params=e,e.group_id&&Object.keys(this.sensorGroups).includes(e.group_id)?this.data=Object.assign({},this.sensorGroups[e.group_id]):this.data={name:"",entities:[],timeout:600},await this.updateComplete}async closeDialog(){this._params=void 0}render(){return this._params?q`
- ${mi("panels.sensors.dialogs.create_group.fields.name.heading",this.hass.language)} + ${pi("panels.sensors.dialogs.create_group.fields.name.heading",this.hass.language)} - ${mi("panels.sensors.dialogs.create_group.fields.name.description",this.hass.language)} + ${pi("panels.sensors.dialogs.create_group.fields.name.description",this.hass.language)} - this.data={...this.data,name:String(e.target.value).trim()}} + @input=${e=>this.data={...this.data,name:String(e.target.value).trim()}} value="${this.data.name}" - > + > - ${mi("panels.sensors.dialogs.create_group.fields.sensors.heading",this.hass.language)} + ${pi("panels.sensors.dialogs.create_group.fields.sensors.heading",this.hass.language)} - ${mi("panels.sensors.dialogs.create_group.fields.sensors.description",this.hass.language)} + ${pi("panels.sensors.dialogs.create_group.fields.sensors.description",this.hass.language)}
${this.renderSensorOptions()} @@ -1574,10 +1575,10 @@ class Ji extends class{constructor(e){}T(e,t,a){this.Σdt=e,this.M=t,this.Σct=a - ${mi("panels.sensors.dialogs.create_group.fields.timeout.heading",this.hass.language)} + ${pi("panels.sensors.dialogs.create_group.fields.timeout.heading",this.hass.language)} - ${mi("panels.sensors.dialogs.create_group.fields.timeout.description",this.hass.language)} + ${pi("panels.sensors.dialogs.create_group.fields.timeout.description",this.hass.language)} `:q``}renderHeader(){return q` - ${this.data.group_id?mi("panels.sensors.dialogs.edit_group.title",this.hass.language,"{name}",this.sensorGroups[this.data.group_id].name):mi("panels.sensors.dialogs.create_group.title",this.hass.language)} + ${this.data.group_id?pi("panels.sensors.dialogs.edit_group.title",this.hass.language,"{name}",this.sensorGroups[this.data.group_id].name):pi("panels.sensors.dialogs.create_group.title",this.hass.language)} - `}renderSensorOptions(){const e=Object.keys(this.sensors).filter(e=>!ji(this.sensors[e].group)||this.sensors[e].group===this.data.group_id).map(e=>{const t=this.hass.states[e],a=Object.entries(fi).find(([,t])=>t==this.sensors[e].type)[0];return{value:e,name:$i(Ai(t)),icon:_i[a]}});return e.sort(Li),e.length?q` + `}renderSensorOptions(){const e=Object.keys(this.sensors).filter(e=>!Si(this.sensors[e].group)||this.sensors[e].group===this.data.group_id).map(e=>{const t=this.hass.states[e],a=Object.entries(_i).find(([,t])=>t==this.sensors[e].type)[0];return{value:e,name:Ai(xi(t)),icon:bi[a]}});return e.sort(Pi),e.length?q` this.data={...this.data,entities:e.detail}} > - `:mi("panels.sensors.cards.sensors.no_items",this.hass.language)}saveClick(e){var t,a;this.data.name.length&&(this.data.group_id&&this.data.name==this.sensorGroups[this.data.group_id].name||!Object.values(this.sensorGroups).find(e=>e.name.toLowerCase()==this.data.name.toLowerCase()))?this.data.entities.length<2?Ci(e,mi("panels.sensors.dialogs.create_group.errors.insufficient_sensors",this.hass.language)):(t=this.hass,a=this.data,t.callApi("POST","alarmo/sensor_groups",a)).catch(t=>Mi(t,e)).then(()=>{this.closeDialog()}):Ci(e,mi("panels.sensors.dialogs.create_group.errors.invalid_name",this.hass.language))}deleteClick(e){var t,a;this.data.group_id&&(t=this.hass,a=this.data.group_id,t.callApi("POST","alarmo/sensor_groups",{group_id:a,remove:!0})).catch(t=>Mi(t,e)).then(()=>{this.closeDialog()})}static get styles(){return o` - ${zi} + `:pi("panels.sensors.cards.sensors.no_items",this.hass.language)}saveClick(e){var t,a;this.data.name.length&&(this.data.group_id&&this.data.name==this.sensorGroups[this.data.group_id].name||!Object.values(this.sensorGroups).find(e=>e.name.toLowerCase()==this.data.name.toLowerCase()))?this.data.entities.length<2?Mi(e,pi("panels.sensors.dialogs.create_group.errors.insufficient_sensors",this.hass.language)):(t=this.hass,a=this.data,t.callApi("POST","alarmo/sensor_groups",a)).catch(t=>Ni(t,e)).then(()=>{this.closeDialog()}):Mi(e,pi("panels.sensors.dialogs.create_group.errors.invalid_name",this.hass.language))}deleteClick(e){var t,a;this.data.group_id&&(t=this.hass,a=this.data.group_id,t.callApi("POST","alarmo/sensor_groups",{group_id:a,remove:!0})).catch(t=>Ni(t,e)).then(()=>{this.closeDialog()})}static get styles(){return o` + ${qi} div.wrapper { color: var(--primary-text-color); } mwc-button.warning { --mdc-theme-primary: var(--error-color); } - `}};t([oe({attribute:!1})],fs.prototype,"hass",void 0),t([le()],fs.prototype,"_params",void 0),t([oe()],fs.prototype,"sensorGroups",void 0),t([oe()],fs.prototype,"sensors",void 0),t([oe()],fs.prototype,"data",void 0),fs=t([ne("create-sensor-group-dialog")],fs);var _s=Object.freeze({__proto__:null,get CreateSensorGroupDialog(){return fs}});let bs=class extends(Ze(se)){constructor(){super(...arguments),this.sensorGroups={},this.sensors={}}hassSubscribe(){return this._fetchData(),[this.hass.connection.subscribeMessage(()=>this._fetchData(),{type:"alarmo_config_updated"})]}async _fetchData(){this.hass&&(this.sensorGroups=await Ve(this.hass),this.sensors=await Ue(this.hass))}async showDialog(e){await this._fetchData(),this._params=e,await this.updateComplete}async closeDialog(){this._params=void 0}render(){return this._params?q` + `}};t([oe({attribute:!1})],_s.prototype,"hass",void 0),t([le()],_s.prototype,"_params",void 0),t([oe()],_s.prototype,"sensorGroups",void 0),t([oe()],_s.prototype,"sensors",void 0),t([oe()],_s.prototype,"data",void 0),_s=t([ne("create-sensor-group-dialog")],_s);var bs=Object.freeze({__proto__:null,get CreateSensorGroupDialog(){return _s}});let ys=class extends(Je(se)){constructor(){super(...arguments),this.sensorGroups={},this.sensors={}}hassSubscribe(){return this._fetchData(),[this.hass.connection.subscribeMessage(()=>this._fetchData(),{type:"alarmo_config_updated"})]}async _fetchData(){this.hass&&(this.sensorGroups=await He(this.hass),this.sensors=await Ge(this.hass))}async showDialog(e){await this._fetchData(),this._params=e,await this.updateComplete}async closeDialog(){this._params=void 0}render(){return this._params?q`
- ${mi("panels.sensors.dialogs.manage_groups.description",this.hass.language)} + ${pi("panels.sensors.dialogs.manage_groups.description",this.hass.language)}
- ${Object.keys(this.sensorGroups).length?Object.values(this.sensorGroups).map(e=>this.renderGroup(e)):mi("panels.sensors.dialogs.manage_groups.no_items",this.hass.language)} + ${Object.keys(this.sensorGroups).length?Object.values(this.sensorGroups).map(e=>this.renderGroup(e)):pi("panels.sensors.dialogs.manage_groups.no_items",this.hass.language)}
- ${mi("panels.sensors.dialogs.manage_groups.actions.new_group",this.hass.language)} + ${pi("panels.sensors.dialogs.manage_groups.actions.new_group",this.hass.language)}
`:q``}renderHeader(){return q` - ${mi("panels.sensors.dialogs.manage_groups.title",this.hass.language)} + ${pi("panels.sensors.dialogs.manage_groups.title",this.hass.language)} @@ -1654,13 +1655,13 @@ class Ji extends class{constructor(e){}T(e,t,a){this.Σdt=e,this.M=t,this.Σct=a
${e.name} - ${mi("panels.general.cards.areas.table.summary_sensors",this.hass.language,"{number}",String(e.entities.length))} + ${pi("panels.general.cards.areas.table.summary_sensors",this.hass.language,"{number}",String(e.entities.length))}
- + - `}createGroupClick(e){const t=e.target;Ne(t,"show-dialog",{dialogTag:"create-sensor-group-dialog",dialogImport:()=>Promise.resolve().then((function(){return _s})),dialogParams:{}})}editGroupClick(e,t){const a=e.target;Ne(a,"show-dialog",{dialogTag:"create-sensor-group-dialog",dialogImport:()=>Promise.resolve().then((function(){return _s})),dialogParams:{group_id:t}})}static get styles(){return o` - ${zi} + `}createGroupClick(e){const t=e.target;Ne(t,"show-dialog",{dialogTag:"create-sensor-group-dialog",dialogImport:()=>Promise.resolve().then((function(){return bs})),dialogParams:{}})}editGroupClick(e,t){const a=e.target;Ne(a,"show-dialog",{dialogTag:"create-sensor-group-dialog",dialogImport:()=>Promise.resolve().then((function(){return bs})),dialogParams:{group_id:t}})}static get styles(){return o` + ${qi} div.wrapper { color: var(--primary-text-color); @@ -1714,29 +1715,29 @@ class Ji extends class{constructor(e){}T(e,t,a){this.Σdt=e,this.M=t,this.Σct=a mwc-button ha-icon { padding-right: 11px; } - `}};t([oe({attribute:!1})],bs.prototype,"hass",void 0),t([le()],bs.prototype,"_params",void 0),t([oe()],bs.prototype,"sensorGroups",void 0),t([oe()],bs.prototype,"sensors",void 0),bs=t([ne("manage-sensor-groups-dialog")],bs);var ys=Object.freeze({__proto__:null,get ManageSensorGroupsDialog(){return bs}});let ws=class extends(Ze(se)){constructor(){super(...arguments),this.showBypassModes=!1}hassSubscribe(){return this._fetchData(),[this.hass.connection.subscribeMessage(()=>this._fetchData(),{type:"alarmo_config_updated"})]}async _fetchData(){var e;if(!this.hass)return;const t=await We(this.hass);this.areas=t;const a=await Ve(this.hass);this.sensorGroups=a;const i=await Ue(this.hass);this.data=Object.keys(i).includes(this.item)?i[this.item]:void 0,this.data&&!(null===(e=this.data)||void 0===e?void 0:e.area)&&1==Object.keys(t).length&&(this.data=Object.assign(Object.assign({},this.data),{area:Object.keys(this.areas)[0]}))}render(){if(!this.data)return q``;this.hass.states[this.data.entity_id];return q` + `}};t([oe({attribute:!1})],ys.prototype,"hass",void 0),t([le()],ys.prototype,"_params",void 0),t([oe()],ys.prototype,"sensorGroups",void 0),t([oe()],ys.prototype,"sensors",void 0),ys=t([ne("manage-sensor-groups-dialog")],ys);var ws=Object.freeze({__proto__:null,get ManageSensorGroupsDialog(){return ys}});let ks=class extends(Je(se)){constructor(){super(...arguments),this.showBypassModes=!1}hassSubscribe(){return this._fetchData(),[this.hass.connection.subscribeMessage(()=>this._fetchData(),{type:"alarmo_config_updated"})]}async _fetchData(){var e;if(!this.hass)return;const t=await Xe(this.hass);this.areas=t;const a=await He(this.hass);this.sensorGroups=a;const i=await Ge(this.hass);this.data=Object.keys(i).includes(this.item)?i[this.item]:void 0,this.data&&!(null===(e=this.data)||void 0===e?void 0:e.area)&&1==Object.keys(t).length&&(this.data=Object.assign(Object.assign({},this.data),{area:Object.keys(this.areas)[0]}))}render(){if(!this.data)return q``;this.hass.states[this.data.entity_id];return q`
-
${mi("panels.sensors.cards.editor.title",this.hass.language)}
- +
${pi("panels.sensors.cards.editor.title",this.hass.language)}
+
- ${mi("panels.sensors.cards.editor.description",this.hass.language,"{entity}",Ai(this.hass.states[this.item]))} + ${pi("panels.sensors.cards.editor.description",this.hass.language,"{entity}",xi(this.hass.states[this.item]))}
${Object.keys(this.areas).length>1?q` - ${mi("panels.sensors.cards.editor.fields.area.heading",this.hass.language)} + ${pi("panels.sensors.cards.editor.fields.area.heading",this.hass.language)} - ${mi("panels.sensors.cards.editor.fields.area.description",this.hass.language)} + ${pi("panels.sensors.cards.editor.fields.area.description",this.hass.language)} Object({value:e.area_id,name:e.name}))} value=${this.data.area} - label=${mi("panels.sensors.cards.editor.fields.area.heading",this.hass.language)} + label=${pi("panels.sensors.cards.editor.fields.area.heading",this.hass.language)} @value-changed=${e=>this.data={...this.data,area:e.target.value}} ?invalid=${!this.data.area} > @@ -1745,29 +1746,29 @@ class Ji extends class{constructor(e){}T(e,t,a){this.Σdt=e,this.M=t,this.Σct=a - ${mi("panels.sensors.cards.editor.fields.device_type.heading",this.hass.language)} + ${pi("panels.sensors.cards.editor.fields.device_type.heading",this.hass.language)} - ${mi("panels.sensors.cards.editor.fields.device_type.description",this.hass.language)} + ${pi("panels.sensors.cards.editor.fields.device_type.description",this.hass.language)} e!=fi.Other).map(([t,a])=>Object({value:a,name:mi(`panels.sensors.cards.editor.fields.device_type.choose.${a}.name`,e.language),description:mi(`panels.sensors.cards.editor.fields.device_type.choose.${a}.description`,e.language),icon:_i[t]}))} - label=${mi("panels.sensors.cards.editor.fields.device_type.heading",this.hass.language)} + .items=${e=this.hass,Object.entries(_i).filter(([,e])=>e!=_i.Other).map(([t,a])=>Object({value:a,name:pi(`panels.sensors.cards.editor.fields.device_type.choose.${a}.name`,e.language),description:pi(`panels.sensors.cards.editor.fields.device_type.choose.${a}.description`,e.language),icon:bi[t]}))} + label=${pi("panels.sensors.cards.editor.fields.device_type.heading",this.hass.language)} clearable=${!0} icons=${!0} value=${this.data.type} - @value-changed=${e=>this.setType(e.target.value||fi.Other)} + @value-changed=${e=>this.setType(e.target.value||_i.Other)} > 3}> - ${mi("panels.sensors.cards.editor.fields.modes.heading",this.hass.language)} + ${pi("panels.sensors.cards.editor.fields.modes.heading",this.hass.language)} - ${mi("panels.sensors.cards.editor.fields.modes.description",this.hass.language)} + ${pi("panels.sensors.cards.editor.fields.modes.description",this.hass.language)}
@@ -1776,8 +1777,8 @@ class Ji extends class{constructor(e){}T(e,t,a){this.Σdt=e,this.M=t,this.Σct=a class="${this.data.modes.includes(e)?"active":""}" @click=${()=>{this.setMode(e)}} > - - ${mi("common.modes_short."+e,this.hass.language)} + + ${pi("common.modes_short."+e,this.hass.language)} `)}
@@ -1785,10 +1786,10 @@ class Ji extends class{constructor(e){}T(e,t,a){this.Σdt=e,this.M=t,this.Σct=a - ${mi("panels.sensors.cards.editor.fields.group.heading",this.hass.language)} + ${pi("panels.sensors.cards.editor.fields.group.heading",this.hass.language)} - ${mi("panels.sensors.cards.editor.fields.group.description",this.hass.language)} + ${pi("panels.sensors.cards.editor.fields.group.description",this.hass.language)}
@@ -1797,27 +1798,27 @@ class Ji extends class{constructor(e){}T(e,t,a){this.Σdt=e,this.M=t,this.Σct=a .clearable=${!0} .items=${this.getSensorGroups()} value=${this.data.group} - label="${mi("panels.sensors.cards.editor.fields.group.heading",this.hass.language)}" + label="${pi("panels.sensors.cards.editor.fields.group.heading",this.hass.language)}" @value-changed=${e=>{this.data={...this.data,group:e.detail.value}}} > `:""} - ${mi("panels.sensors.cards.editor.actions.setup_groups",this.hass.language)} + ${pi("panels.sensors.cards.editor.actions.setup_groups",this.hass.language)}
- ${!this.data.type||[fi.Environmental,fi.Other].includes(this.data.type)?q` + ${!this.data.type||[_i.Environmental,_i.Other].includes(this.data.type)?q` - ${mi("panels.sensors.cards.editor.fields.always_on.heading",this.hass.language)} + ${pi("panels.sensors.cards.editor.fields.always_on.heading",this.hass.language)} - ${mi("panels.sensors.cards.editor.fields.always_on.description",this.hass.language)} + ${pi("panels.sensors.cards.editor.fields.always_on.description",this.hass.language)} `:""} - ${!this.data.type||[fi.Window,fi.Door,fi.Motion,fi.Other].includes(this.data.type)?q` + ${!this.data.type||[_i.Window,_i.Door,_i.Motion,_i.Other].includes(this.data.type)?q` - ${mi("panels.sensors.cards.editor.fields.use_exit_delay.heading",this.hass.language)} + ${pi("panels.sensors.cards.editor.fields.use_exit_delay.heading",this.hass.language)} - ${mi("panels.sensors.cards.editor.fields.use_exit_delay.description",this.hass.language)} + ${pi("panels.sensors.cards.editor.fields.use_exit_delay.description",this.hass.language)} - ${this.data.type&&![fi.Motion,fi.Other].includes(this.data.type)||!this.data.use_exit_delay?"":q` + ${this.data.type&&![_i.Motion,_i.Other].includes(this.data.type)||!this.data.use_exit_delay?"":q` - ${mi("panels.sensors.cards.editor.fields.allow_open.heading",this.hass.language)} + ${pi("panels.sensors.cards.editor.fields.allow_open.heading",this.hass.language)} - ${mi("panels.sensors.cards.editor.fields.allow_open.description",this.hass.language)} + ${pi("panels.sensors.cards.editor.fields.allow_open.description",this.hass.language)} `} `:""} - ${!this.data.type||[fi.Window,fi.Door,fi.Motion,fi.Other].includes(this.data.type)?q` + ${!this.data.type||[_i.Window,_i.Door,_i.Motion,_i.Other].includes(this.data.type)?q` - ${mi("panels.sensors.cards.editor.fields.use_entry_delay.heading",this.hass.language)} + ${pi("panels.sensors.cards.editor.fields.use_entry_delay.heading",this.hass.language)} - ${mi("panels.sensors.cards.editor.fields.use_entry_delay.description",this.hass.language)} + ${pi("panels.sensors.cards.editor.fields.use_entry_delay.description",this.hass.language)} `:""} - ${!this.data.type||[fi.Door,fi.Other].includes(this.data.type)?q` + ${!this.data.type||[_i.Door,_i.Other].includes(this.data.type)?q` - ${mi("panels.sensors.cards.editor.fields.arm_on_close.heading",this.hass.language)} + ${pi("panels.sensors.cards.editor.fields.arm_on_close.heading",this.hass.language)} - ${mi("panels.sensors.cards.editor.fields.arm_on_close.description",this.hass.language)} + ${pi("panels.sensors.cards.editor.fields.arm_on_close.description",this.hass.language)} `:""} - ${!this.data.type||[fi.Window,fi.Door,fi.Other].includes(this.data.type)?q` + ${!this.data.type||[_i.Window,_i.Door,_i.Other].includes(this.data.type)?q` - ${mi("panels.sensors.cards.editor.fields.auto_bypass.heading",this.hass.language)} + ${pi("panels.sensors.cards.editor.fields.auto_bypass.heading",this.hass.language)} - ${mi("panels.sensors.cards.editor.fields.auto_bypass.description",this.hass.language)} + ${pi("panels.sensors.cards.editor.fields.auto_bypass.description",this.hass.language)} - ${mi("panels.sensors.cards.editor.fields.auto_bypass.modes",this.hass.language)} + ${pi("panels.sensors.cards.editor.fields.auto_bypass.modes",this.hass.language)}
${this.modesByArea(this.data.area).map(e=>q` @@ -1920,9 +1921,9 @@ class Ji extends class{constructor(e){}T(e,t,a){this.Σdt=e,this.M=t,this.Σct=a @click=${()=>{this.setBypassMode(e)}} > - ${mi("common.modes_short."+e,this.hass.language)} + ${pi("common.modes_short."+e,this.hass.language)} `)}
@@ -1932,10 +1933,10 @@ class Ji extends class{constructor(e){}T(e,t,a){this.Σdt=e,this.M=t,this.Σct=a - ${mi("panels.sensors.cards.editor.fields.trigger_unavailable.heading",this.hass.language)} + ${pi("panels.sensors.cards.editor.fields.trigger_unavailable.heading",this.hass.language)} - ${mi("panels.sensors.cards.editor.fields.trigger_unavailable.description",this.hass.language)} + ${pi("panels.sensors.cards.editor.fields.trigger_unavailable.description",this.hass.language)} - ${mi("panels.sensors.cards.editor.actions.remove",this.hass.language)} + ${pi("panels.sensors.cards.editor.actions.remove",this.hass.language)}
- `;var e}modesByArea(e){const t=Object.keys(this.areas).reduce((e,t)=>Object.assign(e,{[t]:Object.entries(this.areas[t].modes).filter(([,e])=>e.enabled).map(([e])=>e)}),{});return e?t[e]:Object.values(t).reduce((e,t)=>e.filter(e=>t.includes(e)))}_SetData(e){if(this.data)for(const[t,a]of Object.entries(e))switch(t){case"always_on":this.data=Object.assign(Object.assign({},this.data),{always_on:1==a}),a&&(this.data=Object.assign(Object.assign({},this.data),{arm_on_close:!1,use_exit_delay:!1,use_entry_delay:!1,allow_open:!1,auto_bypass:!1}));break;case"use_entry_delay":this.data=Object.assign(Object.assign({},this.data),{use_entry_delay:1==a});break;case"use_exit_delay":this.data=Object.assign(Object.assign({},this.data),{use_exit_delay:1==a}),a&&(this.data=Object.assign(Object.assign({},this.data),{allow_open:!1}));break;case"arm_on_close":this.data=Object.assign(Object.assign({},this.data),{arm_on_close:1==a}),a&&(this.data=Object.assign(Object.assign({},this.data),{always_on:!1,allow_open:!1}));break;case"allow_open":this.data=Object.assign(Object.assign({},this.data),{allow_open:1==a}),a&&(this.data=Object.assign(Object.assign({},this.data),{arm_on_close:!1,always_on:!1,use_exit_delay:!0}));break;case"auto_bypass":this.data=Object.assign(Object.assign({},this.data),{auto_bypass:1==a}),a&&(this.data=Object.assign(Object.assign({},this.data),{always_on:!1}));break;case"trigger_unavailable":this.data=Object.assign(Object.assign({},this.data),{trigger_unavailable:1==a})}}setMode(e){this.data&&(this.data=Object.assign(Object.assign({},this.data),{modes:this.data.modes.includes(e)?Ei(this.data.modes,e):xi(this.data.modes.concat([e]))}))}setBypassMode(e){this.data&&(this.data=Object.assign(Object.assign({},this.data),{auto_bypass_modes:this.data.auto_bypass_modes.includes(e)?Ei(this.data.auto_bypass_modes,e):xi(this.data.auto_bypass_modes.concat([e]))}))}setType(e){if(!this.data)return;const t=e!=fi.Other?ps(this.modesByArea(this.data.area))[e]:{};this.data=Object.assign(Object.assign(Object.assign({},this.data),{type:e}),t)}deleteClick(e){var t,a;(t=this.hass,a=this.item,t.callApi("POST","alarmo/sensors",{entity_id:a,remove:!0})).catch(t=>Mi(t,e)).then(()=>{this.cancelClick()})}saveClick(e){if(!this.data)return;const t=[];this.data=Object.assign(Object.assign({},this.data),{auto_bypass_modes:this.data.auto_bypass_modes.filter(e=>this.data.modes.includes(e))}),this.data.area||t.push(mi("panels.sensors.cards.editor.errors.no_area",this.hass.language)),this.data.modes.length||this.data.always_on||t.push(mi("panels.sensors.cards.editor.errors.no_modes",this.hass.language)),this.data.auto_bypass&&!this.data.auto_bypass_modes.length&&t.push(mi("panels.sensors.cards.editor.errors.no_auto_bypass_modes",this.hass.language)),t.length?Ci(e,q` - ${mi("panels.sensors.cards.editor.errors.description",this.hass.language)} + `;var e}modesByArea(e){const t=Object.keys(this.areas).reduce((e,t)=>Object.assign(e,{[t]:Object.entries(this.areas[t].modes).filter(([,e])=>e.enabled).map(([e])=>e)}),{});return e?t[e]:Object.values(t).reduce((e,t)=>e.filter(e=>t.includes(e)))}_SetData(e){if(this.data)for(const[t,a]of Object.entries(e))switch(t){case"always_on":this.data=Object.assign(Object.assign({},this.data),{always_on:1==a}),a&&(this.data=Object.assign(Object.assign({},this.data),{arm_on_close:!1,use_exit_delay:!1,use_entry_delay:!1,allow_open:!1,auto_bypass:!1}));break;case"use_entry_delay":this.data=Object.assign(Object.assign({},this.data),{use_entry_delay:1==a});break;case"use_exit_delay":this.data=Object.assign(Object.assign({},this.data),{use_exit_delay:1==a}),a&&(this.data=Object.assign(Object.assign({},this.data),{allow_open:!1}));break;case"arm_on_close":this.data=Object.assign(Object.assign({},this.data),{arm_on_close:1==a}),a&&(this.data=Object.assign(Object.assign({},this.data),{always_on:!1,allow_open:!1}));break;case"allow_open":this.data=Object.assign(Object.assign({},this.data),{allow_open:1==a}),a&&(this.data=Object.assign(Object.assign({},this.data),{arm_on_close:!1,always_on:!1,use_exit_delay:!0}));break;case"auto_bypass":this.data=Object.assign(Object.assign({},this.data),{auto_bypass:1==a}),a&&(this.data=Object.assign(Object.assign({},this.data),{always_on:!1}));break;case"trigger_unavailable":this.data=Object.assign(Object.assign({},this.data),{trigger_unavailable:1==a})}}setMode(e){this.data&&(this.data=Object.assign(Object.assign({},this.data),{modes:this.data.modes.includes(e)?Oi(this.data.modes,e):Ei(this.data.modes.concat([e]))}))}setBypassMode(e){this.data&&(this.data=Object.assign(Object.assign({},this.data),{auto_bypass_modes:this.data.auto_bypass_modes.includes(e)?Oi(this.data.auto_bypass_modes,e):Ei(this.data.auto_bypass_modes.concat([e]))}))}setType(e){if(!this.data)return;const t=e!=_i.Other?gs(this.modesByArea(this.data.area))[e]:{};this.data=Object.assign(Object.assign(Object.assign({},this.data),{type:e}),t)}deleteClick(e){var t,a;(t=this.hass,a=this.item,t.callApi("POST","alarmo/sensors",{entity_id:a,remove:!0})).catch(t=>Ni(t,e)).then(()=>{this.cancelClick()})}saveClick(e){if(!this.data)return;const t=[];this.data=Object.assign(Object.assign({},this.data),{auto_bypass_modes:this.data.auto_bypass_modes.filter(e=>this.data.modes.includes(e))}),this.data.area||t.push(pi("panels.sensors.cards.editor.errors.no_area",this.hass.language)),this.data.modes.length||this.data.always_on||t.push(pi("panels.sensors.cards.editor.errors.no_modes",this.hass.language)),this.data.auto_bypass&&!this.data.auto_bypass_modes.length&&t.push(pi("panels.sensors.cards.editor.errors.no_auto_bypass_modes",this.hass.language)),t.length?Mi(e,q` + ${pi("panels.sensors.cards.editor.errors.description",this.hass.language)}
    ${t.map(e=>q`
  • ${e}
  • `)}
- `):Ye(this.hass,Object.assign({},this.data)).catch(t=>Mi(t,e)).then(()=>{this.cancelClick()})}cancelClick(){Pe(0,Ri("sensors"),!0)}manageGroupsClick(e){const t=e.target;Ne(t,"show-dialog",{dialogTag:"manage-sensor-groups-dialog",dialogImport:()=>Promise.resolve().then((function(){return ys})),dialogParams:{}})}getSensorGroups(){return Object.keys(this.sensorGroups).map(e=>Object({value:e,name:this.sensorGroups[e].name}))}};ws.styles=Pi,t([oe()],ws.prototype,"hass",void 0),t([oe()],ws.prototype,"narrow",void 0),t([oe()],ws.prototype,"item",void 0),t([oe()],ws.prototype,"data",void 0),t([oe()],ws.prototype,"showBypassModes",void 0),ws=t([ne("sensor-editor-card")],ws);const ks=e=>Object.keys(e.modes).filter(t=>e.modes[t].enabled),$s=e=>{let t=[];return Object.values(e).forEach(e=>{t=[...t,...ks(e)]}),t=xi(t),t.sort((e,t)=>{const a=Object.values(yi);return a.findIndex(t=>t==e)-a.findIndex(e=>e==t)}),t},As="no_area";let xs=class extends(Ze(se)){hassSubscribe(){return this._fetchData(),[this.hass.connection.subscribeMessage(()=>this._fetchData(),{type:"alarmo_config_updated"})]}async _fetchData(){this.hass&&(this.areas=await We(this.hass),this.sensors=await Ue(this.hass))}async firstUpdated(){this.path&&2==this.path.length&&"filter"==this.path[0]&&(this.selectedArea=this.path[1])}render(){return this.hass&&this.areas&&this.sensors?q` - + `):Be(this.hass,Object.assign({},this.data)).catch(t=>Ni(t,e)).then(()=>{this.cancelClick()})}cancelClick(){Pe(0,Ii("sensors"),!0)}manageGroupsClick(e){const t=e.target;Ne(t,"show-dialog",{dialogTag:"manage-sensor-groups-dialog",dialogImport:()=>Promise.resolve().then((function(){return ws})),dialogParams:{}})}getSensorGroups(){return Object.keys(this.sensorGroups).map(e=>Object({value:e,name:this.sensorGroups[e].name}))}};ks.styles=zi,t([oe()],ks.prototype,"hass",void 0),t([oe()],ks.prototype,"narrow",void 0),t([oe()],ks.prototype,"item",void 0),t([oe()],ks.prototype,"data",void 0),t([oe()],ks.prototype,"showBypassModes",void 0),ks=t([ne("sensor-editor-card")],ks);const $s=e=>Object.keys(e.modes).filter(t=>e.modes[t].enabled),As=e=>{let t=[];return Object.values(e).forEach(e=>{t=[...t,...$s(e)]}),t=Ei(t),t.sort((e,t)=>{const a=Object.values(wi);return a.findIndex(t=>t==e)-a.findIndex(e=>e==t)}),t},xs="no_area";let Es=class extends(Je(se)){hassSubscribe(){return this._fetchData(),[this.hass.connection.subscribeMessage(()=>this._fetchData(),{type:"alarmo_config_updated"})]}async _fetchData(){this.hass&&(this.areas=await Xe(this.hass),this.sensors=await Ge(this.hass))}async firstUpdated(){this.path&&2==this.path.length&&"filter"==this.path[0]&&(this.selectedArea=this.path[1])}render(){return this.hass&&this.areas&&this.sensors?q` +
- ${mi("panels.sensors.cards.sensors.description",this.hass.language)} + ${pi("panels.sensors.cards.sensors.description",this.hass.language)}
{Pe(0,Ri("sensors",{params:{edit:e.detail.id}}),!0)}} + @row-click=${e=>{Pe(0,Ii("sensors",{params:{edit:e.detail.id}}),!0)}} > - ${mi("panels.sensors.cards.sensors.table.no_items",this.hass.language)} + ${pi("panels.sensors.cards.sensors.table.no_items",this.hass.language)}
`:q``}tableColumns(){const e=()=>q` - ${mi("panels.sensors.cards.sensors.table.no_area_warning",this.hass.language)} + ${pi("panels.sensors.cards.sensors.table.no_area_warning",this.hass.language)} - `;return{icon:{width:"40px",renderer:t=>{const a=this.hass.states[t.entity_id],i=Object.keys(fi).find(e=>fi[e]==t.type),s=a?_i[i]:"hass:help-circle-outline";return t.area==As?q` + `;return{icon:{width:"40px",renderer:t=>{const a=this.hass.states[t.entity_id],i=Object.keys(_i).find(e=>_i[e]==t.type),s=a?bi[i]:"hass:help-circle-outline";return t.area==xs?q` ${e()} `:q` - ${a?mi(`panels.sensors.cards.editor.fields.device_type.choose.${t.type}.name`,this.hass.language):this.hass.localize("state_badge.default.entity_not_found")} + ${a?pi(`panels.sensors.cards.editor.fields.device_type.choose.${t.type}.name`,this.hass.language):this.hass.localize("state_badge.default.entity_not_found")} `}},name:{title:this.hass.localize("ui.components.entity.entity-picker.entity"),width:"60%",grow:!0,text:!0,renderer:t=>q` - ${t.area==As?e():""} + ${t.area==xs?e():""} ${t.name} ${t.entity_id} - `},modes:{title:mi("panels.sensors.cards.sensors.table.arm_modes",this.hass.language),width:"25%",hide:this.narrow,text:!0,renderer:t=>q` - ${t.area==As?e():""} + `},modes:{title:pi("panels.sensors.cards.sensors.table.arm_modes",this.hass.language),width:"25%",hide:this.narrow,text:!0,renderer:t=>q` + ${t.area==xs?e():""} - ${t.always_on?mi("panels.sensors.cards.sensors.table.always_on",this.hass.language):t.modes.length?t.modes.map(e=>mi("common.modes_short."+e,this.hass.language)).join(", "):this.hass.localize("state_attributes.climate.preset_mode.none")} + ${t.always_on?pi("panels.sensors.cards.sensors.table.always_on",this.hass.language):t.modes.length?t.modes.map(e=>pi("common.modes_short."+e,this.hass.language)).join(", "):this.hass.localize("state_attributes.climate.preset_mode.none")} - `},enabled:{title:mi("common.enabled",this.hass.language),width:"68px",align:"center",renderer:e=>q` + `},enabled:{title:pi("common.enabled",this.hass.language),width:"68px",align:"center",renderer:e=>q` {e.stopPropagation()}} ?checked=${e.enabled} @change=${t=>this.toggleEnabled(t,e.entity_id)} > - `}}}getTableData(){let e=Object.keys(this.sensors).map(e=>{const t=this.hass.states[e],a=this.sensors[e];return Object.assign(Object.assign({},a),{id:e,name:Ai(t),modes:a.modes.filter(e=>a.area?ks(this.areas[a.area]).includes(e):$s(this.areas).includes(e)),warning:!a.area,area:a.area||As})});return e.sort(Li),e}toggleEnabled(e,t){const a=e.target.checked;Ye(this.hass,{entity_id:t,enabled:a}).catch(t=>Mi(t,e)).then()}removeCustomName(e){let t={entity_id:e,name:""};Ye(this.hass,t)}getTableFilterOptions(){let e=Object.values(this.areas).map(e=>Object({value:e.area_id,name:e.name,badge:t=>t.filter(t=>t.area==e.area_id).length})).sort(Li);Object.values(this.sensors).filter(e=>!e.area).length&&(e=[{value:As,name:this.hass.localize("state_attributes.climate.preset_mode.none"),badge:e=>e.filter(e=>e.area==As).length},...e]);const t=$s(this.areas).map(e=>Object({value:e,name:mi("common.modes_short."+e,this.hass.language),badge:t=>t.filter(t=>t.modes.includes(e)).length}));return{area:{name:mi("components.table.filter.item",this.hass.language,"name",mi("panels.actions.cards.new_action.fields.area.heading",this.hass.language)),items:e,value:this.selectedArea?[this.selectedArea]:[]},modes:{name:mi("components.table.filter.item",this.hass.language,"name",mi("panels.actions.cards.new_action.fields.mode.heading",this.hass.language)),items:t,value:this.selectedMode?[this.selectedMode]:[]}}}};xs.styles=Pi,t([oe()],xs.prototype,"hass",void 0),t([oe()],xs.prototype,"narrow",void 0),t([oe()],xs.prototype,"areas",void 0),t([oe()],xs.prototype,"sensors",void 0),t([oe()],xs.prototype,"selectedArea",void 0),t([oe()],xs.prototype,"selectedMode",void 0),t([oe()],xs.prototype,"path",void 0),xs=t([ne("sensors-overview-card")],xs);let Es=class extends(Ze(se)){constructor(){super(...arguments),this.addSelection=[],this.areas={},this.sensors={}}hassSubscribe(){return this._fetchData(),[this.hass.connection.subscribeMessage(()=>this._fetchData(),{type:"alarmo_config_updated"})]}async _fetchData(){this.hass&&(this.areas=await We(this.hass))}async firstUpdated(){this.areas=await We(this.hass),this.sensors=await Ue(this.hass)}render(){const e={checkbox:{width:"48px",renderer:e=>q` + `}}}getTableData(){let e=Object.keys(this.sensors).map(e=>{const t=this.hass.states[e],a=this.sensors[e];return Object.assign(Object.assign({},a),{id:e,name:xi(t),modes:a.modes.filter(e=>a.area?$s(this.areas[a.area]).includes(e):As(this.areas).includes(e)),warning:!a.area,area:a.area||xs})});return e.sort(Pi),e}toggleEnabled(e,t){const a=e.target.checked;Be(this.hass,{entity_id:t,enabled:a}).catch(t=>Ni(t,e)).then()}removeCustomName(e){let t={entity_id:e,name:""};Be(this.hass,t)}getTableFilterOptions(){let e=Object.values(this.areas).map(e=>Object({value:e.area_id,name:e.name,badge:t=>t.filter(t=>t.area==e.area_id).length})).sort(Pi);Object.values(this.sensors).filter(e=>!e.area).length&&(e=[{value:xs,name:this.hass.localize("state_attributes.climate.preset_mode.none"),badge:e=>e.filter(e=>e.area==xs).length},...e]);const t=As(this.areas).map(e=>Object({value:e,name:pi("common.modes_short."+e,this.hass.language),badge:t=>t.filter(t=>t.modes.includes(e)).length}));return{area:{name:pi("components.table.filter.item",this.hass.language,"name",pi("panels.actions.cards.new_action.fields.area.heading",this.hass.language)),items:e,value:this.selectedArea?[this.selectedArea]:[]},modes:{name:pi("components.table.filter.item",this.hass.language,"name",pi("panels.actions.cards.new_action.fields.mode.heading",this.hass.language)),items:t,value:this.selectedMode?[this.selectedMode]:[]}}}};Es.styles=zi,t([oe()],Es.prototype,"hass",void 0),t([oe()],Es.prototype,"narrow",void 0),t([oe()],Es.prototype,"areas",void 0),t([oe()],Es.prototype,"sensors",void 0),t([oe()],Es.prototype,"selectedArea",void 0),t([oe()],Es.prototype,"selectedMode",void 0),t([oe()],Es.prototype,"path",void 0),Es=t([ne("sensors-overview-card")],Es);let Os=class extends(Je(se)){constructor(){super(...arguments),this.addSelection=[],this.areas={},this.sensors={}}hassSubscribe(){return this._fetchData(),[this.hass.connection.subscribeMessage(()=>this._fetchData(),{type:"alarmo_config_updated"})]}async _fetchData(){this.hass&&(this.areas=await Xe(this.hass))}async firstUpdated(){this.areas=await Xe(this.hass),this.sensors=await Ge(this.hass)}render(){const e={checkbox:{width:"48px",renderer:e=>q` this.toggleSelect(t,e.id)} ?checked=${this.addSelection.includes(e.id)} @@ -2014,12 +2015,12 @@ class Ji extends class{constructor(e){}T(e,t,a){this.Σdt=e,this.M=t,this.Σct=a `},icon:{width:"40px",renderer:e=>q` `},name:{title:this.hass.localize("ui.components.entity.entity-picker.entity"),width:"40%",grow:!0,text:!0,renderer:e=>q` - ${$i(e.name)} + ${Ai(e.name)} ${e.id} - `},type:{title:mi("panels.sensors.cards.add_sensors.table.type",this.hass.language),width:"40%",hide:this.narrow,text:!0,renderer:e=>e.type?mi(`panels.sensors.cards.editor.fields.device_type.choose.${e.type}.name`,this.hass.language):this.hass.localize("state.default.unknown")}},t=((e,t,a=!1)=>{const i=Object.values(e.states).filter(e=>us(e,a)).filter(e=>!t.includes(e.entity_id)).map(e=>Object({id:e.entity_id,name:Ai(e),icon:ki(e)}));return i.sort(Li),i})(this.hass,Object.keys(this.sensors),!0).map(e=>Object.assign(Object.assign({},e),{type:ms(this.hass.states[e.id]),isSupportedType:void 0!==ms(this.hass.states[e.id])?"true":"false"}));return q` - + `},type:{title:pi("panels.sensors.cards.add_sensors.table.type",this.hass.language),width:"40%",hide:this.narrow,text:!0,renderer:e=>e.type?pi(`panels.sensors.cards.editor.fields.device_type.choose.${e.type}.name`,this.hass.language):this.hass.localize("state.default.unknown")}},t=((e,t,a=!1)=>{const i=Object.values(e.states).filter(e=>ms(e,a)).filter(e=>!t.includes(e.entity_id)).map(e=>Object({id:e.entity_id,name:xi(e),icon:$i(e)}));return i.sort(Pi),i})(this.hass,Object.keys(this.sensors),!0).map(e=>Object.assign(Object.assign({},e),{type:ps(this.hass.states[e.id]),isSupportedType:void 0!==ps(this.hass.states[e.id])?"true":"false"}));return q` +
- ${mi("panels.sensors.cards.add_sensors.description",this.hass.language)} + ${pi("panels.sensors.cards.add_sensors.description",this.hass.language)}
- ${mi("panels.sensors.cards.add_sensors.no_items",this.hass.language)} + ${pi("panels.sensors.cards.add_sensors.no_items",this.hass.language)}
- ${mi("panels.sensors.cards.add_sensors.actions.add_to_alarm",this.hass.language)} + ${pi("panels.sensors.cards.add_sensors.actions.add_to_alarm",this.hass.language)}
- `}toggleSelect(e,t){const a=e.target.checked;this.addSelection=a&&!this.addSelection.includes(t)?[...this.addSelection,t]:a?this.addSelection:this.addSelection.filter(e=>e!=t)}addSelected(e){if(!this.hass)return;const t=Object.values(this.areas).map(e=>Object.entries(e.modes).filter(([,e])=>e.enabled).map(([e])=>e)).reduce((e,t)=>e.filter(e=>t.includes(e)));this.addSelection.map(e=>function(e,t){if(!e)return null;const a=Se(e.entity_id);let i={entity_id:e.entity_id,modes:[],use_entry_delay:!0,use_exit_delay:!0,arm_on_close:!1,allow_open:!1,always_on:!1,auto_bypass:!1,auto_bypass_modes:[],trigger_unavailable:!1,type:fi.Other,enabled:!0};if("binary_sensor"==a){const a=ms(e);a&&(i=Object.assign(Object.assign(Object.assign({},i),{type:a}),ps(t)[a]))}return i}(this.hass.states[e],t)).map(e=>1==Object.keys(this.areas).length?Object.assign(e,{area:Object.keys(this.areas)[0]}):e).filter(e=>e).forEach(t=>{Ye(this.hass,t).catch(t=>Mi(t,e)).then()}),this.addSelection=[]}getTableFilterOptions(){return{isSupportedType:{name:mi("panels.sensors.cards.add_sensors.actions.filter_supported",this.hass.language),items:[{value:"true",name:"true"}],value:["true"],binary:!0}}}};Es.styles=Pi,t([oe()],Es.prototype,"hass",void 0),t([oe()],Es.prototype,"narrow",void 0),t([oe()],Es.prototype,"addSelection",void 0),t([oe()],Es.prototype,"areas",void 0),t([oe()],Es.prototype,"sensors",void 0),Es=t([ne("add-sensors-card")],Es);let Os=class extends se{firstUpdated(){(async()=>{await Re()})()}render(){var e,t;if(!this.hass)return q``;if(this.path.params.edit)return q` + `}toggleSelect(e,t){const a=e.target.checked;this.addSelection=a&&!this.addSelection.includes(t)?[...this.addSelection,t]:a?this.addSelection:this.addSelection.filter(e=>e!=t)}addSelected(e){if(!this.hass)return;const t=Object.values(this.areas).map(e=>Object.entries(e.modes).filter(([,e])=>e.enabled).map(([e])=>e)).reduce((e,t)=>e.filter(e=>t.includes(e)));this.addSelection.map(e=>function(e,t){if(!e)return null;const a=Se(e.entity_id);let i={entity_id:e.entity_id,modes:[],use_entry_delay:!0,use_exit_delay:!0,arm_on_close:!1,allow_open:!1,always_on:!1,auto_bypass:!1,auto_bypass_modes:[],trigger_unavailable:!1,type:_i.Other,enabled:!0};if("binary_sensor"==a){const a=ps(e);a&&(i=Object.assign(Object.assign(Object.assign({},i),{type:a}),gs(t)[a]))}return i}(this.hass.states[e],t)).map(e=>1==Object.keys(this.areas).length?Object.assign(e,{area:Object.keys(this.areas)[0]}):e).filter(e=>e).forEach(t=>{Be(this.hass,t).catch(t=>Ni(t,e)).then()}),this.addSelection=[]}getTableFilterOptions(){return{isSupportedType:{name:pi("panels.sensors.cards.add_sensors.actions.filter_supported",this.hass.language),items:[{value:"true",name:"true"}],value:["true"],binary:!0}}}};Os.styles=zi,t([oe()],Os.prototype,"hass",void 0),t([oe()],Os.prototype,"narrow",void 0),t([oe()],Os.prototype,"addSelection",void 0),t([oe()],Os.prototype,"areas",void 0),t([oe()],Os.prototype,"sensors",void 0),Os=t([ne("add-sensors-card")],Os);let Ts=class extends se{firstUpdated(){(async()=>{await Re()})()}render(){var e,t;if(!this.hass)return q``;if(this.path.params.edit)return q` - `}}};t([oe()],Os.prototype,"hass",void 0),t([oe()],Os.prototype,"narrow",void 0),t([oe()],Os.prototype,"path",void 0),Os=t([ne("alarm-view-sensors")],Os);let Ts=class extends se{constructor(){super(...arguments),this.data={can_arm:!0,can_disarm:!0,is_override_code:!1},this.repeatCode="",this.areas={}}async firstUpdated(){if(this.users=await Ge(this.hass),this.areas=await We(this.hass),this.item){const e=this.users[this.item];this.data=Ti(e,"code","code_format","code_length")}this.data=Object.assign(Object.assign({},this.data),{area_limit:(this.data.area_limit||[]).filter(e=>Object.keys(this.areas).includes(e))}),(this.data.area_limit||[]).length||(this.data=Object.assign(Object.assign({},this.data),{area_limit:Object.keys(this.areas)}))}render(){var e;return this.users?q` + `}}};t([oe()],Ts.prototype,"hass",void 0),t([oe()],Ts.prototype,"narrow",void 0),t([oe()],Ts.prototype,"path",void 0),Ts=t([ne("alarm-view-sensors")],Ts);let js=class extends se{constructor(){super(...arguments),this.data={can_arm:!0,can_disarm:!0,is_override_code:!1},this.repeatCode="",this.areas={}}async firstUpdated(){if(this.users=await Fe(this.hass),this.areas=await Xe(this.hass),this.item){const e=this.users[this.item];this.data=ji(e,"code","code_format","code_length")}this.data=Object.assign(Object.assign({},this.data),{area_limit:(this.data.area_limit||[]).filter(e=>Object.keys(this.areas).includes(e))}),(this.data.area_limit||[]).length||(this.data=Object.assign(Object.assign({},this.data),{area_limit:Object.keys(this.areas)}))}render(){var e;return this.users?q`
- ${this.item?mi("panels.codes.cards.edit_user.title",this.hass.language):mi("panels.codes.cards.new_user.title",this.hass.language)} + ${this.item?pi("panels.codes.cards.edit_user.title",this.hass.language):pi("panels.codes.cards.new_user.title",this.hass.language)}
- +
- ${this.item?mi("panels.codes.cards.edit_user.description",this.hass.language,"{name}",this.users[this.item].name):mi("panels.codes.cards.new_user.description",this.hass.language)} + ${this.item?pi("panels.codes.cards.edit_user.description",this.hass.language,"{name}",this.users[this.item].name):pi("panels.codes.cards.new_user.description",this.hass.language)}
- ${mi("panels.codes.cards.new_user.fields.name.heading",this.hass.language)} + ${pi("panels.codes.cards.new_user.fields.name.heading",this.hass.language)} - ${mi("panels.codes.cards.new_user.fields.name.description",this.hass.language)} + ${pi("panels.codes.cards.new_user.fields.name.description",this.hass.language)} - this.data={...this.data,name:e.target.value}} - > + @input=${e=>this.data={...this.data,name:e.target.value}} + > ${this.item?q` - ${mi("panels.codes.cards.edit_user.fields.old_code.heading",this.hass.language)} + ${pi("panels.codes.cards.edit_user.fields.old_code.heading",this.hass.language)} - ${mi("panels.codes.cards.edit_user.fields.old_code.description",this.hass.language)} + ${pi("panels.codes.cards.edit_user.fields.old_code.description",this.hass.language)} - this.data={...this.data,old_code:String(e.target.value).trim()}} - > + @input=${e=>this.data={...this.data,old_code:String(e.target.value).trim()}} + > `:""} ${this.item&&!(null===(e=this.data.old_code)||void 0===e?void 0:e.length)?"":q` - ${mi("panels.codes.cards.new_user.fields.code.heading",this.hass.language)} + ${pi("panels.codes.cards.new_user.fields.code.heading",this.hass.language)} - ${mi("panels.codes.cards.new_user.fields.code.description",this.hass.language)} + ${pi("panels.codes.cards.new_user.fields.code.description",this.hass.language)} - this.data={...this.data,code:String(e.target.value).trim()}} - > + @input=${e=>this.data={...this.data,code:String(e.target.value).trim()}} + > - ${mi("panels.codes.cards.new_user.fields.confirm_code.heading",this.hass.language)} + ${pi("panels.codes.cards.new_user.fields.confirm_code.heading",this.hass.language)} - ${mi("panels.codes.cards.new_user.fields.confirm_code.description",this.hass.language)} + ${pi("panels.codes.cards.new_user.fields.confirm_code.description",this.hass.language)} - this.repeatCode=String(e.target.value).trim()} - > + @input=${e=>this.repeatCode=String(e.target.value).trim()} + > `} - ${mi("panels.codes.cards.new_user.fields.can_arm.heading",this.hass.language)} + ${pi("panels.codes.cards.new_user.fields.can_arm.heading",this.hass.language)} - ${mi("panels.codes.cards.new_user.fields.can_arm.description",this.hass.language)} + ${pi("panels.codes.cards.new_user.fields.can_arm.description",this.hass.language)} - ${mi("panels.codes.cards.new_user.fields.can_disarm.heading",this.hass.language)} + ${pi("panels.codes.cards.new_user.fields.can_disarm.heading",this.hass.language)} - ${mi("panels.codes.cards.new_user.fields.can_disarm.description",this.hass.language)} + ${pi("panels.codes.cards.new_user.fields.can_disarm.description",this.hass.language)} =2?q` - ${mi("panels.codes.cards.new_user.fields.area_limit.heading",this.hass.language)} + ${pi("panels.codes.cards.new_user.fields.area_limit.heading",this.hass.language)} - ${mi("panels.codes.cards.new_user.fields.area_limit.description",this.hass.language)} + ${pi("panels.codes.cards.new_user.fields.area_limit.description",this.hass.language)}
@@ -2187,10 +2188,10 @@ class Ji extends class{constructor(e){}T(e,t,a){this.Σdt=e,this.M=t,this.Σct=a - ${mi("panels.codes.cards.new_user.fields.is_override_code.heading",this.hass.language)} + ${pi("panels.codes.cards.new_user.fields.is_override_code.heading",this.hass.language)} - ${mi("panels.codes.cards.new_user.fields.is_override_code.description",this.hass.language)} + ${pi("panels.codes.cards.new_user.fields.is_override_code.description",this.hass.language)} - `:q``}getAreaOptions(){let e=Object.keys(this.areas||{}).map(e=>Object({value:e,name:this.areas[e].name}));return e.sort(Li),e}toggleSelectArea(e,t){if((this.data.area_limit||[]).length<=1&&!t)return;let a=this.data.area_limit||[];a=t?a.includes(e)?a:[...a,e]:a.includes(e)?a.filter(t=>t!=e):a,this.data=Object.assign(Object.assign({},this.data),{area_limit:a})}deleteClick(e){var t,a;this.item&&(t=this.hass,a=this.item,t.callApi("POST","alarmo/users",{user_id:a,remove:!0})).catch(t=>Mi(t,e)).then(()=>{this.cancelClick()})}saveClick(e){var t,a,i;let s=Object.assign({},this.data);(null===(t=s.name)||void 0===t?void 0:t.length)?(null===(a=s.code)||void 0===a?void 0:a.length)&&!(s.code.length<4)||this.item&&!(null===(i=s.old_code)||void 0===i?void 0:i.length)?(s.code||"").length&&s.code!==this.repeatCode?(Ci(e,mi("panels.codes.cards.new_user.errors.code_mismatch",this.hass.language)),this.data=Ti(this.data,"code"),this.repeatCode=""):(this.item&&(s.old_code||"").length<4&&Ti(s,"old_code","code"),this.getAreaOptions().length&&!this.getAreaOptions().every(e=>(this.data.area_limit||[]).includes(e.value))||(s=Object.assign(Object.assign({},s),{area_limit:[]})),Be(this.hass,s).catch(t=>Mi(t,e)).then(()=>{this.cancelClick()})):Ci(e,mi("panels.codes.cards.new_user.errors.no_code",this.hass.language)):Ci(e,mi("panels.codes.cards.new_user.errors.no_name",this.hass.language))}cancelClick(){Pe(0,Ri("codes"),!0)}static get styles(){return o` - ${Pi} + `:q``}getAreaOptions(){let e=Object.keys(this.areas||{}).map(e=>Object({value:e,name:this.areas[e].name}));return e.sort(Pi),e}toggleSelectArea(e,t){if((this.data.area_limit||[]).length<=1&&!t)return;let a=this.data.area_limit||[];a=t?a.includes(e)?a:[...a,e]:a.includes(e)?a.filter(t=>t!=e):a,this.data=Object.assign(Object.assign({},this.data),{area_limit:a})}deleteClick(e){var t,a;this.item&&(t=this.hass,a=this.item,t.callApi("POST","alarmo/users",{user_id:a,remove:!0})).catch(t=>Ni(t,e)).then(()=>{this.cancelClick()})}saveClick(e){var t,a,i;let s=Object.assign({},this.data);(null===(t=s.name)||void 0===t?void 0:t.length)?(null===(a=s.code)||void 0===a?void 0:a.length)&&!(s.code.length<4)||this.item&&!(null===(i=s.old_code)||void 0===i?void 0:i.length)?(s.code||"").length&&s.code!==this.repeatCode?(Mi(e,pi("panels.codes.cards.new_user.errors.code_mismatch",this.hass.language)),this.data=ji(this.data,"code"),this.repeatCode=""):(this.item&&(s.old_code||"").length<4&&ji(s,"old_code","code"),this.getAreaOptions().length&&!this.getAreaOptions().every(e=>(this.data.area_limit||[]).includes(e.value))||(s=Object.assign(Object.assign({},s),{area_limit:[]})),Ke(this.hass,s).catch(t=>Ni(t,e)).then(()=>{this.cancelClick()})):Mi(e,pi("panels.codes.cards.new_user.errors.no_code",this.hass.language)):Mi(e,pi("panels.codes.cards.new_user.errors.no_name",this.hass.language))}cancelClick(){Pe(0,Ii("codes"),!0)}static get styles(){return o` + ${zi} div.checkbox-list { display: flex; flex-direction: row; @@ -2224,7 +2225,7 @@ class Ji extends class{constructor(e){}T(e,t,a){this.Σdt=e,this.M=t,this.Σct=a div.checkbox-list div span { cursor: pointer; } - `}};t([oe()],Ts.prototype,"hass",void 0),t([oe()],Ts.prototype,"narrow",void 0),t([oe()],Ts.prototype,"item",void 0),t([oe()],Ts.prototype,"data",void 0),t([oe()],Ts.prototype,"repeatCode",void 0),Ts=t([ne("user-editor-card")],Ts);let js=class extends(Ze(se)){constructor(){super(...arguments),this.users={}}hassSubscribe(){return this._fetchData(),[this.hass.connection.subscribeMessage(()=>this._fetchData(),{type:"alarmo_config_updated"})]}async _fetchData(){if(!this.hass)return;const e=await Ie(this.hass);this.data=Oi(e,["code_arm_required","code_disarm_required","code_format"]);const t=await Ge(this.hass);this.users=t}render(){return this.hass&&this.data?"new_user"==this.path.subpage?q` + `}};t([oe()],js.prototype,"hass",void 0),t([oe()],js.prototype,"narrow",void 0),t([oe()],js.prototype,"item",void 0),t([oe()],js.prototype,"data",void 0),t([oe()],js.prototype,"repeatCode",void 0),js=t([ne("user-editor-card")],js);let Ss=class extends(Je(se)){constructor(){super(...arguments),this.users={}}hassSubscribe(){return this._fetchData(),[this.hass.connection.subscribeMessage(()=>this._fetchData(),{type:"alarmo_config_updated"})]}async _fetchData(){if(!this.hass)return;const e=await Ue(this.hass);this.data=Ti(e,["code_arm_required","code_disarm_required","code_format"]);const t=await Fe(this.hass);this.users=t}render(){return this.hass&&this.data?"new_user"==this.path.subpage?q` `:this.path.params.edit_user?q` `:q` - -
${mi("panels.codes.cards.codes.description",this.hass.language)}
+ +
${pi("panels.codes.cards.codes.description",this.hass.language)}
- ${mi("panels.codes.cards.codes.fields.code_arm_required.heading",this.hass.language)} + ${pi("panels.codes.cards.codes.fields.code_arm_required.heading",this.hass.language)} - ${mi("panels.codes.cards.codes.fields.code_arm_required.description",this.hass.language)} + ${pi("panels.codes.cards.codes.fields.code_arm_required.description",this.hass.language)} - ${mi("panels.codes.cards.codes.fields.code_disarm_required.heading",this.hass.language)} + ${pi("panels.codes.cards.codes.fields.code_disarm_required.heading",this.hass.language)} - ${mi("panels.codes.cards.codes.fields.code_disarm_required.description",this.hass.language)} + ${pi("panels.codes.cards.codes.fields.code_disarm_required.description",this.hass.language)} - ${mi("panels.codes.cards.codes.fields.code_format.heading",this.hass.language)} + ${pi("panels.codes.cards.codes.fields.code_format.heading",this.hass.language)} - ${mi("panels.codes.cards.codes.fields.code_format.description",this.hass.language)} + ${pi("panels.codes.cards.codes.fields.code_format.description",this.hass.language)} {this.saveData({code_format:"number"})}} ?disabled=${!this.data.code_arm_required&&!this.data.code_disarm_required} > - ${mi("panels.codes.cards.codes.fields.code_format.code_format_number",this.hass.language)} + ${pi("panels.codes.cards.codes.fields.code_format.code_format_number",this.hass.language)} {this.saveData({code_format:"text"})}} ?disabled=${!this.data.code_arm_required&&!this.data.code_disarm_required} > - ${mi("panels.codes.cards.codes.fields.code_format.code_format_text",this.hass.language)} + ${pi("panels.codes.cards.codes.fields.code_format.code_format_text",this.hass.language)}
${this.usersPanel()} - `:q``}usersPanel(){if(!this.hass)return q``;const e=Object.values(this.users);e.sort(Li);const t={icon:{width:"40px"},name:{title:this.hass.localize("ui.components.area-picker.add_dialog.name"),width:"40%",grow:!0,text:!0},code_format:{title:mi("panels.codes.cards.codes.fields.code_format.heading",this.hass.language),width:"40%",hide:this.narrow,text:!0},enabled:{title:mi("common.enabled",this.hass.language),width:"68px",align:"center"}},a=e.map(e=>({id:e.user_id,icon:q` + `:q``}usersPanel(){if(!this.hass)return q``;const e=Object.values(this.users);e.sort(Pi);const t={icon:{width:"40px"},name:{title:this.hass.localize("ui.components.area-picker.add_dialog.name"),width:"40%",grow:!0,text:!0},code_format:{title:pi("panels.codes.cards.codes.fields.code_format.heading",this.hass.language),width:"40%",hide:this.narrow,text:!0},enabled:{title:pi("common.enabled",this.hass.language),width:"68px",align:"center"}},a=e.map(e=>({id:e.user_id,icon:q` - `,name:$i(e.name),code_format:"number"==e.code_format?$i(mi("panels.codes.cards.codes.fields.code_format.code_format_number",this.hass.language)):"text"==e.code_format?$i(mi("panels.codes.cards.codes.fields.code_format.code_format_text",this.hass.language)):this.hass.localize("state.default.unknown"),enabled:q` + `,name:Ai(e.name),code_format:"number"==e.code_format?Ai(pi("panels.codes.cards.codes.fields.code_format.code_format_number",this.hass.language)):"text"==e.code_format?Ai(pi("panels.codes.cards.codes.fields.code_format.code_format_text",this.hass.language)):this.hass.localize("state.default.unknown"),enabled:q` {e.stopPropagation()}} ?checked=${e.enabled} @change=${t=>this.toggleEnabled(t,e.user_id)} > `}));return q` - +
- ${mi("panels.codes.cards.user_management.description",this.hass.language)} + ${pi("panels.codes.cards.user_management.description",this.hass.language)}
{const t=String(e.detail.id);Pe(0,Ri("codes",{params:{edit_user:t}}),!0)}} + @row-click=${e=>{const t=String(e.detail.id);Pe(0,Ii("codes",{params:{edit_user:t}}),!0)}} > - ${mi("panels.codes.cards.user_management.no_items",this.hass.language)} + ${pi("panels.codes.cards.user_management.no_items",this.hass.language)}
- ${mi("panels.codes.cards.user_management.actions.new_user",this.hass.language)} + ${pi("panels.codes.cards.user_management.actions.new_user",this.hass.language)}
- `}addUserClick(){Pe(0,Ri("codes","new_user"),!0)}saveData(e){this.hass&&(this.data=Object.assign(Object.assign({},this.data),e),He(this.hass,this.data).catch(e=>Mi(e,this.shadowRoot.querySelector("ha-card"))).then())}toggleEnabled(e,t){const a=e.target.checked;Be(this.hass,{user_id:t,enabled:a}).catch(t=>Mi(t,e)).then()}};js.styles=Pi,t([oe()],js.prototype,"hass",void 0),t([oe()],js.prototype,"narrow",void 0),t([oe()],js.prototype,"path",void 0),t([oe()],js.prototype,"data",void 0),t([oe()],js.prototype,"users",void 0),js=t([ne("alarm-view-codes")],js);const Ss=(e,t)=>{switch(e){case yi.ArmedAway:return{value:yi.ArmedAway,name:mi("common.modes_short.armed_away",t.language),icon:pi.ArmedAway};case yi.ArmedHome:return{value:yi.ArmedHome,name:mi("common.modes_short.armed_home",t.language),icon:pi.ArmedHome};case yi.ArmedNight:return{value:yi.ArmedNight,name:mi("common.modes_short.armed_night",t.language),icon:pi.ArmedNight};case yi.ArmedCustom:return{value:yi.ArmedCustom,name:mi("common.modes_short.armed_custom_bypass",t.language),icon:pi.ArmedCustom};case yi.ArmedVacation:return{value:yi.ArmedVacation,name:mi("common.modes_short.armed_vacation",t.language),icon:pi.ArmedVacation}}},Cs=(e,t)=>{switch(e){case wi.Armed:return{value:wi.Armed,name:mi("panels.actions.cards.new_notification.fields.event.choose.armed.name",t.language),description:mi("panels.actions.cards.new_notification.fields.event.choose.armed.description",t.language),icon:"hass:shield-check-outline"};case wi.Disarmed:return{value:wi.Disarmed,name:mi("panels.actions.cards.new_notification.fields.event.choose.disarmed.name",t.language),description:mi("panels.actions.cards.new_notification.fields.event.choose.disarmed.description",t.language),icon:"hass:shield-off-outline"};case wi.Triggered:return{value:wi.Triggered,name:mi("panels.actions.cards.new_notification.fields.event.choose.triggered.name",t.language),description:mi("panels.actions.cards.new_notification.fields.event.choose.triggered.description",t.language),icon:"hass:bell-alert-outline"};case wi.ArmFailure:return{value:wi.ArmFailure,name:mi("panels.actions.cards.new_notification.fields.event.choose.arm_failure.name",t.language),description:mi("panels.actions.cards.new_notification.fields.event.choose.arm_failure.description",t.language),icon:"hass:alert-outline"};case wi.Arming:return{value:wi.Arming,name:mi("panels.actions.cards.new_notification.fields.event.choose.arming.name",t.language),description:mi("panels.actions.cards.new_notification.fields.event.choose.arming.description",t.language),icon:"hass:home-export-outline"};case wi.Pending:return{value:wi.Pending,name:mi("panels.actions.cards.new_notification.fields.event.choose.pending.name",t.language),description:mi("panels.actions.cards.new_notification.fields.event.choose.pending.description",t.language),icon:"hass:home-import-outline"}}},Ms=(e,t,a)=>0==e?{name:a.master.name,value:0}:Object.keys(t).includes(String(e))?{name:t[e].name,value:e}:{name:String(e),value:e},Ns=(e,...t)=>{const a=t.map(t=>{if(!t)return null;const a=Se(t),i=Ce(t);let s={value:t,name:i.replace(/_/g," ").split(" ").map(e=>e.substring(0,1).toUpperCase()+e.substring(1)).join(" "),icon:"hass:home",description:t};switch(a){case"notify":const t=e.states["device_tracker."+i.replace("mobile_app_","")];s=t?Object.assign(Object.assign({},s),{name:t.attributes.friendly_name||Ce(t.entity_id),icon:t.attributes.icon||"hass:cellphone-text"}):Object.assign(Object.assign({},s),{icon:"hass:comment-alert"});break;case"tts":s=Object.assign(Object.assign({},s),{icon:"hass:microphone"})}return s}).filter(ji);return a.sort(Li),a},Ds=(e,t)=>{let a=[];const i=Object.keys(e).filter(t=>Object.values(e[t].modes).some(e=>e.enabled));return t.master.enabled&&i.length>1&&(a=[...a,0]),a=[...a,...i],a},Ls=(e,t)=>{const a=e=>Object.keys(e.modes).filter(t=>e.modes[t].enabled);if(ji(e)&&Object.keys(t).includes(String(e)))return a(t[e]);{const e=Object.keys(t).map(e=>a(t[e]));return e[0].filter(t=>e.every(e=>e.includes(t)))}},Ps=(e,t)=>e.map(e=>({value:e,name:e in t.states?t.states[e].attributes.friendly_name||Ce(e):e,icon:e in t.states?t.states[e].attributes.icon||Le(Se(e)):void 0,description:e})),zs=e=>[...Object.keys(e.services.notify).map(e=>"notify."+e)],qs=(...e)=>{if(!e.length||!e.every(e=>e.length))return[];if(1==e.length&&e[0].length>1&&xi(e[0].map(Se)).length>1)return qs(...e[0].map(e=>Array(e)));let t=[...e[0]];return e.forEach(e=>{t=t.map(t=>e.includes(t)?t:"script"==Se(t)&&e.map(Se).includes("script")?"script.script":e.map(Ce).includes(Ce(t))?"homeassistant."+Ce(t):null).filter(ji)}),t},Rs=(e,t,a=1)=>{if(a>10)return[];if(Array.isArray(e)){const i=e.map(e=>Rs(e,t,a+1));return qs(...i)}if(!ji(e))return[];const i=Se(e);switch(i){case"light":case"switch":case"input_boolean":case"siren":return[i+".turn_on",i+".turn_off"];case"script":return[e];case"lock":return["lock.lock","lock.unlock"];case"group":const s=e in t.states?t.states[e]:void 0,n=(null==s?void 0:s.attributes.entity_id)||[];return Rs(n,t,a+1);default:return[]}},Is=(e,t)=>{let a=[...Object.keys(e.states).filter(t=>Rs(t,e).length)];return t&&t.length&&(a=[...a,...t.filter(e=>!a.includes(e))]),a.sort(Li),a},Us=e=>{let t=[{value:"{{arm_mode}}",name:e.translationMetadata.translations.en.nativeName}];return"en"!=e.language&&(t=[...t,{value:`{{arm_mode|lang=${e.language}}}`,name:e.translationMetadata.translations[e.language].nativeName}]),t},Gs=e=>"string"==typeof e&&e.trim().length,Fs=(e,t)=>Gs(e)&&t.services[Se(e)]&&t.services[Se(e)][Ce(e)],Vs=(e,t)=>Gs(e)&&t.states[e],Hs=e=>"object"==typeof e&&null!==e&&!Array.isArray(e),Ys=e=>"string"==typeof e;let Bs=class extends se{constructor(){super(...arguments),this.items=[],this.value=[],this.label="",this.invalid=!1}shouldUpdate(e){return e.get("items")&&(Si(this.items,e.get("items"))||this.firstUpdated()),!0}firstUpdated(){this.value.some(e=>!this.items.map(e=>e.value).includes(e))&&(this.value=this.value.filter(e=>this.items.map(e=>e.value).includes(e)),Ne(this,"value-changed",{value:this.value}))}render(){return q` + `}addUserClick(){Pe(0,Ii("codes","new_user"),!0)}saveData(e){this.hass&&(this.data=Object.assign(Object.assign({},this.data),e),Ye(this.hass,this.data).catch(e=>Ni(e,this.shadowRoot.querySelector("ha-card"))).then())}toggleEnabled(e,t){const a=e.target.checked;Ke(this.hass,{user_id:t,enabled:a}).catch(t=>Ni(t,e)).then()}};Ss.styles=zi,t([oe()],Ss.prototype,"hass",void 0),t([oe()],Ss.prototype,"narrow",void 0),t([oe()],Ss.prototype,"path",void 0),t([oe()],Ss.prototype,"data",void 0),t([oe()],Ss.prototype,"users",void 0),Ss=t([ne("alarm-view-codes")],Ss);const Cs=(e,t)=>{switch(e){case wi.ArmedAway:return{value:wi.ArmedAway,name:pi("common.modes_short.armed_away",t.language),icon:gi.ArmedAway};case wi.ArmedHome:return{value:wi.ArmedHome,name:pi("common.modes_short.armed_home",t.language),icon:gi.ArmedHome};case wi.ArmedNight:return{value:wi.ArmedNight,name:pi("common.modes_short.armed_night",t.language),icon:gi.ArmedNight};case wi.ArmedCustom:return{value:wi.ArmedCustom,name:pi("common.modes_short.armed_custom_bypass",t.language),icon:gi.ArmedCustom};case wi.ArmedVacation:return{value:wi.ArmedVacation,name:pi("common.modes_short.armed_vacation",t.language),icon:gi.ArmedVacation}}},Ms=(e,t)=>{switch(e){case ki.Armed:return{value:ki.Armed,name:pi("panels.actions.cards.new_notification.fields.event.choose.armed.name",t.language),description:pi("panels.actions.cards.new_notification.fields.event.choose.armed.description",t.language),icon:"hass:shield-check-outline"};case ki.Disarmed:return{value:ki.Disarmed,name:pi("panels.actions.cards.new_notification.fields.event.choose.disarmed.name",t.language),description:pi("panels.actions.cards.new_notification.fields.event.choose.disarmed.description",t.language),icon:"hass:shield-off-outline"};case ki.Triggered:return{value:ki.Triggered,name:pi("panels.actions.cards.new_notification.fields.event.choose.triggered.name",t.language),description:pi("panels.actions.cards.new_notification.fields.event.choose.triggered.description",t.language),icon:"hass:bell-alert-outline"};case ki.ArmFailure:return{value:ki.ArmFailure,name:pi("panels.actions.cards.new_notification.fields.event.choose.arm_failure.name",t.language),description:pi("panels.actions.cards.new_notification.fields.event.choose.arm_failure.description",t.language),icon:"hass:alert-outline"};case ki.Arming:return{value:ki.Arming,name:pi("panels.actions.cards.new_notification.fields.event.choose.arming.name",t.language),description:pi("panels.actions.cards.new_notification.fields.event.choose.arming.description",t.language),icon:"hass:home-export-outline"};case ki.Pending:return{value:ki.Pending,name:pi("panels.actions.cards.new_notification.fields.event.choose.pending.name",t.language),description:pi("panels.actions.cards.new_notification.fields.event.choose.pending.description",t.language),icon:"hass:home-import-outline"}}},Ns=(e,t,a)=>0==e?{name:a.master.name,value:0}:Object.keys(t).includes(String(e))?{name:t[e].name,value:e}:{name:String(e),value:e},Ds=(e,...t)=>{const a=t.map(t=>{if(!t)return null;const a=Se(t),i=Ce(t);let s={value:t,name:i.replace(/_/g," ").split(" ").map(e=>e.substring(0,1).toUpperCase()+e.substring(1)).join(" "),icon:"hass:home",description:t};switch(a){case"notify":const t=e.states["device_tracker."+i.replace("mobile_app_","")];s=t?Object.assign(Object.assign({},s),{name:t.attributes.friendly_name||Ce(t.entity_id),icon:t.attributes.icon||"hass:cellphone-text"}):Object.assign(Object.assign({},s),{icon:"hass:comment-alert"});break;case"tts":s=Object.assign(Object.assign({},s),{icon:"hass:microphone"})}return s}).filter(Si);return a.sort(Pi),a},Ls=(e,t)=>{let a=[];const i=Object.keys(e).filter(t=>Object.values(e[t].modes).some(e=>e.enabled));return t.master.enabled&&i.length>1&&(a=[...a,0]),a=[...a,...i],a},Ps=(e,t)=>{const a=e=>Object.keys(e.modes).filter(t=>e.modes[t].enabled);if(Si(e)&&Object.keys(t).includes(String(e)))return a(t[e]);{const e=Object.keys(t).map(e=>a(t[e]));return e[0].filter(t=>e.every(e=>e.includes(t)))}},zs=(e,t)=>e.map(e=>({value:e,name:e in t.states?t.states[e].attributes.friendly_name||Ce(e):e,icon:e in t.states?t.states[e].attributes.icon||Le(Se(e)):void 0,description:e})),qs=e=>[...Object.keys(e.services.notify).map(e=>"notify."+e)],Rs=(...e)=>{if(!e.length||!e.every(e=>e.length))return[];if(1==e.length&&e[0].length>1&&Ei(e[0].map(Se)).length>1)return Rs(...e[0].map(e=>Array(e)));let t=[...e[0]];return e.forEach(e=>{t=t.map(t=>e.includes(t)?t:"script"==Se(t)&&e.map(Se).includes("script")?"script.script":e.map(Ce).includes(Ce(t))?"homeassistant."+Ce(t):null).filter(Si)}),t},Is=(e,t,a=1)=>{if(a>10)return[];if(Array.isArray(e)){const i=e.map(e=>Is(e,t,a+1));return Rs(...i)}if(!Si(e))return[];const i=Se(e);switch(i){case"light":case"switch":case"input_boolean":case"siren":return[i+".turn_on",i+".turn_off"];case"script":return[e];case"lock":return["lock.lock","lock.unlock"];case"group":const s=e in t.states?t.states[e]:void 0,n=(null==s?void 0:s.attributes.entity_id)||[];return Is(n,t,a+1);default:return[]}},Us=(e,t)=>{let a=[...Object.keys(e.states).filter(t=>Is(t,e).length)];return t&&t.length&&(a=[...a,...t.filter(e=>!a.includes(e))]),a.sort(Pi),a},Gs=e=>{let t=[{value:"{{arm_mode}}",name:e.translationMetadata.translations.en.nativeName}];return"en"!=e.language&&(t=[...t,{value:`{{arm_mode|lang=${e.language}}}`,name:e.translationMetadata.translations[e.language].nativeName}]),t},Fs=e=>"string"==typeof e&&e.trim().length,Vs=(e,t)=>Fs(e)&&t.services[Se(e)]&&t.services[Se(e)][Ce(e)],Hs=(e,t)=>Fs(e)&&t.states[e],Ys=e=>"object"==typeof e&&null!==e&&!Array.isArray(e),Bs=e=>"string"==typeof e;let Ks=class extends se{constructor(){super(...arguments),this.items=[],this.value=[],this.label="",this.invalid=!1}shouldUpdate(e){return e.get("items")&&(Ci(this.items,e.get("items"))||this.firstUpdated()),!0}firstUpdated(){this.value.some(e=>!this.items.map(e=>e.value).includes(e))&&(this.value=this.value.filter(e=>this.items.map(e=>e.value).includes(e)),Ne(this,"value-changed",{value:this.value}))}render(){return q`
- ${this.value.length?this.value.map(e=>this.items.find(t=>t.value==e)).filter(ji).map(e=>q` + ${this.value.length?this.value.map(e=>this.items.find(t=>t.value==e)).filter(Si).map(e=>q`
@@ -2329,18 +2330,20 @@ class Ji extends class{constructor(e){}T(e,t,a){this.Σdt=e,this.M=t,this.Σct=a
`):""} - !this.value.includes(e.value))} - ?disabled=${this.value.length==this.items.length} - label=${this.label} - icons=${!0} - @value-changed=${this._addClick} - ?invalid=${this.invalid&&this.value.length!=this.items.length} - > -
+ !this.value.includes(e.value))} + ?disabled=${this.value.length==this.items.length} + label=${this.label} + icons=${!0} + @value-changed=${this._addClick} + ?invalid=${this.invalid&&this.value.length!=this.items.length} + > `}_removeClick(e){this.value=this.value.filter(t=>t!==e),Ne(this,"value-changed",{value:this.value})}_addClick(e){e.stopPropagation();const t=e.target,a=t.value;this.value.includes(a)||(this.value=[...this.value,a]),t.value="",Ne(this,"value-changed",{value:[...this.value]})}static get styles(){return o` + div.chip-set { + margin: 0px -4px; + } div.chip { height: 32px; border-radius: 16px; @@ -2352,7 +2355,7 @@ class Ji extends class{constructor(e){}T(e,t,a){this.Σdt=e,this.M=t,this.Σct=a display: inline-flex; align-items: center; box-sizing: border-box; - margin: 1px 0px; + margin: 4px; } .icon { vertical-align: middle; @@ -2383,29 +2386,29 @@ class Ji extends class{constructor(e){}T(e,t,a){this.Σdt=e,this.M=t,this.Σct=a align-items: center; margin-right: -6px !important; } - `}};var Ks;t([oe()],Bs.prototype,"hass",void 0),t([oe()],Bs.prototype,"items",void 0),t([oe({type:Array})],Bs.prototype,"value",void 0),t([oe()],Bs.prototype,"label",void 0),t([oe({type:Boolean})],Bs.prototype,"invalid",void 0),Bs=t([ne("alarmo-selector")],Bs),function(e){e[e.Yaml=0]="Yaml",e[e.UI=1]="UI"}(Ks||(Ks={}));let Qs=class extends se{constructor(){super(...arguments),this.config={type:bi.Notification,triggers:[{}],actions:[{}]},this.viewMode=Ks.UI,this.errors={}}async firstUpdated(){if(this.areas=await We(this.hass),this.alarmoConfig=await Ie(this.hass),this.item){let e=this.item.actions.map(e=>Ti(e,"entity_id"));this.config=Object.assign(Object.assign({},this.item),{actions:[e[0],...e.slice(1)]}),this.config.triggers.length>1&&(this.config=Object.assign(Object.assign({},this.config),{triggers:[this.config.triggers[0]]}));let t=this.config.triggers[0].area;ji(t)&&!Ds(this.areas,this.alarmoConfig).includes(t)?t=void 0:null===t&&(t=0),this._setArea(new CustomEvent("value-changed",{detail:{value:t}}))}if(!ji(this.config.triggers[0].area)){const e=Ds(this.areas,this.alarmoConfig);1==e.length?this._setArea(new CustomEvent("value-changed",{detail:{value:e[0]}})):e.includes(0)&&this._setArea(new CustomEvent("value-changed",{detail:{value:0}}))}}render(){var e,t,a;return this.hass&&this.areas&&this.alarmoConfig?q` + `}};var Qs;t([oe()],Ks.prototype,"hass",void 0),t([oe()],Ks.prototype,"items",void 0),t([oe({type:Array})],Ks.prototype,"value",void 0),t([oe()],Ks.prototype,"label",void 0),t([oe({type:Boolean})],Ks.prototype,"invalid",void 0),Ks=t([ne("alarmo-selector")],Ks),function(e){e[e.Yaml=0]="Yaml",e[e.UI=1]="UI"}(Qs||(Qs={}));let Ws=class extends se{constructor(){super(...arguments),this.config={type:yi.Notification,triggers:[{}],actions:[{}]},this.viewMode=Qs.UI,this.errors={}}async firstUpdated(){if(await Ie(),this.areas=await Xe(this.hass),this.alarmoConfig=await Ue(this.hass),this.item){let e=this.item.actions.map(e=>ji(e,"entity_id"));this.config=Object.assign(Object.assign({},this.item),{actions:[e[0],...e.slice(1)]}),this.config.triggers.length>1&&(this.config=Object.assign(Object.assign({},this.config),{triggers:[this.config.triggers[0]]}));let t=this.config.triggers[0].area;Si(t)&&!Ls(this.areas,this.alarmoConfig).includes(t)?t=void 0:null===t&&(t=0),this._setArea(new CustomEvent("value-changed",{detail:{value:t}}))}if(!Si(this.config.triggers[0].area)){const e=Ls(this.areas,this.alarmoConfig);1==e.length?this._setArea(new CustomEvent("value-changed",{detail:{value:e[0]}})):e.includes(0)&&this._setArea(new CustomEvent("value-changed",{detail:{value:0}}))}}render(){var e,t,a;return this.hass&&this.areas&&this.alarmoConfig?q`
- -
${mi("panels.actions.cards.new_notification.title",this.hass.language)}
+ +
${pi("panels.actions.cards.new_notification.title",this.hass.language)}
- ${mi("panels.actions.cards.new_notification.description",this.hass.language)} + ${pi("panels.actions.cards.new_notification.description",this.hass.language)}
-
${mi("panels.actions.cards.new_notification.trigger",this.hass.language)}
+
${pi("panels.actions.cards.new_notification.trigger",this.hass.language)}
- ${mi("panels.actions.cards.new_notification.fields.event.heading",this.hass.language)} + ${pi("panels.actions.cards.new_notification.fields.event.heading",this.hass.language)} - ${mi("panels.actions.cards.new_notification.fields.event.description",this.hass.language)} + ${pi("panels.actions.cards.new_notification.fields.event.description",this.hass.language)} Cs(e,this.hass))} - label=${mi("panels.actions.cards.new_action.fields.event.heading",this.hass.language)} + .items=${Object.values(ki).map(e=>Ms(e,this.hass))} + label=${pi("panels.actions.cards.new_action.fields.event.heading",this.hass.language)} icons=${!0} .value=${this.config.triggers[0].event} @value-changed=${this._setEvent} @@ -2416,17 +2419,17 @@ class Ji extends class{constructor(e){}T(e,t,a){this.Σdt=e,this.M=t,this.Σct=a ${Object.keys(this.areas).length>1?q` - ${mi("panels.actions.cards.new_action.fields.area.heading",this.hass.language)} + ${pi("panels.actions.cards.new_action.fields.area.heading",this.hass.language)} - ${mi("panels.actions.cards.new_action.fields.area.description",this.hass.language)} + ${pi("panels.actions.cards.new_action.fields.area.description",this.hass.language)} Ms(e,this.areas,this.alarmoConfig))} + .items=${Ls(this.areas,this.alarmoConfig).map(e=>Ns(e,this.areas,this.alarmoConfig))} clearable=${!0} - label=${mi("panels.actions.cards.new_action.fields.area.heading",this.hass.language)} + label=${pi("panels.actions.cards.new_action.fields.area.heading",this.hass.language)} .value=${this.config.triggers[0].area} @value-changed=${this._setArea} ?invalid=${this.errors.area||!this.config.triggers[0].area&&!this.alarmoConfig.master.enabled} @@ -2436,16 +2439,16 @@ class Ji extends class{constructor(e){}T(e,t,a){this.Σdt=e,this.M=t,this.Σct=a - ${mi("panels.actions.cards.new_notification.fields.mode.heading",this.hass.language)} + ${pi("panels.actions.cards.new_notification.fields.mode.heading",this.hass.language)} - ${mi("panels.actions.cards.new_notification.fields.mode.description",this.hass.language)} + ${pi("panels.actions.cards.new_notification.fields.mode.description",this.hass.language)} Ss(e,this.hass))} - label=${mi("panels.actions.cards.new_action.fields.mode.heading",this.hass.language)} + .items=${Ps(this.config.triggers[0].area,this.areas).map(e=>Cs(e,this.hass))} + label=${pi("panels.actions.cards.new_action.fields.mode.heading",this.hass.language)} .value=${this.config.triggers[0].modes||[]} @value-changed=${this._setModes} ?invalid=${this.errors.modes} @@ -2454,23 +2457,23 @@ class Ji extends class{constructor(e){}T(e,t,a){this.Σdt=e,this.M=t,this.Σct=a
-
${mi("panels.actions.cards.new_notification.action",this.hass.language)}
+
${pi("panels.actions.cards.new_notification.action",this.hass.language)}
- ${this.viewMode==Ks.UI?q` + ${this.viewMode==Qs.UI?q` - ${mi("panels.actions.cards.new_notification.fields.target.heading",this.hass.language)} + ${pi("panels.actions.cards.new_notification.fields.target.heading",this.hass.language)} - ${mi("panels.actions.cards.new_notification.fields.target.description",this.hass.language)} + ${pi("panels.actions.cards.new_notification.fields.target.description",this.hass.language)} - ${mi("panels.actions.cards.new_notification.fields.title.heading",this.hass.language)} + ${pi("panels.actions.cards.new_notification.fields.title.heading",this.hass.language)} - ${mi("panels.actions.cards.new_notification.fields.title.description",this.hass.language)} + ${pi("panels.actions.cards.new_notification.fields.title.description",this.hass.language)} - + > - ${mi("panels.actions.cards.new_notification.fields.message.heading",this.hass.language)} + ${pi("panels.actions.cards.new_notification.fields.message.heading",this.hass.language)} - ${mi("panels.actions.cards.new_notification.fields.message.description",this.hass.language)} + ${pi("panels.actions.cards.new_notification.fields.message.description",this.hass.language)} - this._setMessage(e.target.value)} ?invalid=${this.errors.message} - > + > ${this.config.triggers[0].event?q`
- ${mi("panels.actions.cards.new_notification.fields.message.insert_wildcard",this.hass.language)}: + ${pi("panels.actions.cards.new_notification.fields.message.insert_wildcard",this.hass.language)}: {let a=[];return a=[],e&&![wi.Pending,wi.Triggered,wi.ArmFailure].includes(e)||(a=[...a,{name:"Open Sensors",value:"{{open_sensors}}"}]),e&&![wi.Armed].includes(e)||(a=[...a,{name:"Bypassed Sensors",value:"{{bypassed_sensors}}"}]),(!e||(null==t?void 0:t.code_arm_required)&&[wi.Armed,wi.Arming,wi.ArmFailure].includes(e)||(null==t?void 0:t.code_disarm_required)&&[wi.Disarmed].includes(e))&&(a=[...a,{name:"Changed By",value:"{{changed_by}}"}]),e&&![wi.Armed,wi.Arming,wi.Pending,wi.Triggered,wi.ArmFailure].includes(e)||(a=[...a,{name:"Arm Mode",value:"{{arm_mode}}"}]),a})(this.config.triggers[0].event,this.alarmoConfig)} + .items=${((e,t)=>{let a=[];return a=[],e&&![ki.Pending,ki.Triggered,ki.ArmFailure].includes(e)||(a=[...a,{name:"Open Sensors",value:"{{open_sensors}}"}]),e&&![ki.Armed].includes(e)||(a=[...a,{name:"Bypassed Sensors",value:"{{bypassed_sensors}}"}]),(!e||(null==t?void 0:t.code_arm_required)&&[ki.Armed,ki.Arming,ki.ArmFailure].includes(e)||(null==t?void 0:t.code_disarm_required)&&[ki.Disarmed].includes(e))&&(a=[...a,{name:"Changed By",value:"{{changed_by}}"}]),e&&![ki.Armed,ki.Arming,ki.Pending,ki.Triggered,ki.ArmFailure].includes(e)||(a=[...a,{name:"Arm Mode",value:"{{arm_mode}}"}]),a})(this.config.triggers[0].event,this.alarmoConfig)} @value-changed=${e=>this._insertWildCard(e.detail)} >
@@ -2528,39 +2531,39 @@ class Ji extends class{constructor(e){}T(e,t,a){this.Σdt=e,this.M=t,this.Σct=a ${null!==this._getOpenSensorsFormat()?q` - ${mi("panels.actions.cards.new_notification.fields.open_sensors_format.heading",this.hass.language)} + ${pi("panels.actions.cards.new_notification.fields.open_sensors_format.heading",this.hass.language)} - ${mi("panels.actions.cards.new_notification.fields.open_sensors_format.description",this.hass.language)} + ${pi("panels.actions.cards.new_notification.fields.open_sensors_format.description",this.hass.language)} {let t=[];return t="en"!=e.language?[...t,{value:"{{open_sensors}}",name:`${mi("panels.actions.cards.new_notification.fields.open_sensors_format.options.default",e.language)} (${e.translationMetadata.translations.en.nativeName})`},{value:`{{open_sensors|lang=${e.language}}}`,name:`${mi("panels.actions.cards.new_notification.fields.open_sensors_format.options.default",e.language)} (${e.translationMetadata.translations[e.language].nativeName})`}]:[...t,{value:"{{open_sensors}}",name:mi("panels.actions.cards.new_notification.fields.open_sensors_format.options.default",e.language)}],t=[...t,{value:"{{open_sensors|format=short}}",name:mi("panels.actions.cards.new_notification.fields.open_sensors_format.options.short",e.language)}],t})(this.hass)} + .items=${(e=>{let t=[];return t="en"!=e.language?[...t,{value:"{{open_sensors}}",name:`${pi("panels.actions.cards.new_notification.fields.open_sensors_format.options.default",e.language)} (${e.translationMetadata.translations.en.nativeName})`},{value:`{{open_sensors|lang=${e.language}}}`,name:`${pi("panels.actions.cards.new_notification.fields.open_sensors_format.options.default",e.language)} (${e.translationMetadata.translations[e.language].nativeName})`}]:[...t,{value:"{{open_sensors}}",name:pi("panels.actions.cards.new_notification.fields.open_sensors_format.options.default",e.language)}],t=[...t,{value:"{{open_sensors|format=short}}",name:pi("panels.actions.cards.new_notification.fields.open_sensors_format.options.short",e.language)}],t})(this.hass)} .value=${this._getOpenSensorsFormat(!0)} @value-changed=${this._setOpenSensorsFormat} > `:""} - ${null!==this._getArmModeFormat()&&(Us(this.hass).length>1||1==Us(this.hass).length&&Us(this.hass)[0].value!=this._getArmModeFormat())?q` + ${null!==this._getArmModeFormat()&&(Gs(this.hass).length>1||1==Gs(this.hass).length&&Gs(this.hass)[0].value!=this._getArmModeFormat())?q` - ${mi("panels.actions.cards.new_notification.fields.arm_mode_format.heading",this.hass.language)} + ${pi("panels.actions.cards.new_notification.fields.arm_mode_format.heading",this.hass.language)} - ${mi("panels.actions.cards.new_notification.fields.arm_mode_format.description",this.hass.language)} + ${pi("panels.actions.cards.new_notification.fields.arm_mode_format.description",this.hass.language)} `:""} `:q` -

${mi("components.editor.edit_in_yaml",this.hass.language)}

+

${pi("components.editor.edit_in_yaml",this.hass.language)}

- ${this.viewMode==Ks.Yaml?mi("components.editor.ui_mode",this.hass.language):mi("components.editor.yaml_mode",this.hass.language)} + ${this.viewMode==Qs.Yaml?pi("components.editor.ui_mode",this.hass.language):pi("components.editor.yaml_mode",this.hass.language)}
- ${mi("panels.actions.cards.new_notification.actions.test",this.hass.language)} + ${pi("panels.actions.cards.new_notification.actions.test",this.hass.language)}
-
${mi("panels.actions.cards.new_notification.options",this.hass.language)}
+
${pi("panels.actions.cards.new_notification.options",this.hass.language)}
- ${mi("panels.actions.cards.new_notification.fields.name.heading",this.hass.language)} + ${pi("panels.actions.cards.new_notification.fields.name.heading",this.hass.language)} - ${mi("panels.actions.cards.new_notification.fields.name.description",this.hass.language)} + ${pi("panels.actions.cards.new_notification.fields.name.description",this.hass.language)} - + > ${(null===(a=this.item)||void 0===a?void 0:a.automation_id)?q` - ${mi("panels.actions.cards.new_notification.fields.delete.heading",this.hass.language)} + ${pi("panels.actions.cards.new_notification.fields.delete.heading",this.hass.language)} - ${mi("panels.actions.cards.new_notification.fields.delete.description",this.hass.language)} + ${pi("panels.actions.cards.new_notification.fields.delete.description",this.hass.language)}
@@ -2635,7 +2638,7 @@ class Ji extends class{constructor(e){}T(e,t,a){this.Σdt=e,this.M=t,this.Σct=a ${this.hass.localize("ui.common.save")}
- `:q``}_setEvent(e){e.stopPropagation();const t=e.detail.value;let a=this.config.triggers;Object.assign(a,{0:Object.assign(Object.assign({},a[0]),{event:t})}),this.config=Object.assign(Object.assign({},this.config),{triggers:a}),Object.keys(this.errors).includes("event")&&this._validateConfig()}_setArea(e){var t;e.stopPropagation();const a=e.detail.value;let i=this.config.triggers;Object.assign(i,{0:Object.assign(Object.assign({},i[0]),{area:a})});const s=Ls(a,this.areas);(null===(t=i[0].modes)||void 0===t?void 0:t.length)?this._setModes(new CustomEvent("value-changed",{detail:{value:i[0].modes.filter(e=>s.includes(e))}})):this._setModes(new CustomEvent("value-changed",{detail:{value:s}})),this.config=Object.assign(Object.assign({},this.config),{triggers:i}),Object.keys(this.errors).includes("area")&&this._validateConfig()}_setModes(e){e.stopPropagation();const t=e.detail.value;let a=this.config.triggers;Object.assign(a,{0:Object.assign(Object.assign({},a[0]),{modes:t})}),this.config=Object.assign(Object.assign({},this.config),{triggers:a}),Object.keys(this.errors).includes("modes")&&this._validateConfig()}_setService(e){e.stopPropagation();const t=String(e.detail.value);let a=this.config.actions;Object.assign(a,{0:Object.assign(Object.assign(Object.assign({},a[0]),{service:t}),Ti(a[0],"service"))}),this.config=Object.assign(Object.assign({},this.config),{actions:a}),Object.keys(this.errors).includes("service")&&this._validateConfig()}_setTitle(e){e.stopPropagation();const t=String(e.detail.value);let a=this.config.actions;Object.assign(a,{0:Object.assign(Object.assign({},a[0]),{service:a[0].service||"",service_data:Object.assign(Object.assign({},a[0].service_data||{}),{title:t})})}),this.config=Object.assign(Object.assign({},this.config),{actions:a}),Object.keys(this.errors).includes("title")&&this._validateConfig()}_setMessage(e){e.stopPropagation();const t=String(e.detail.value);let a=this.config.actions;Object.assign(a,{0:Object.assign(Object.assign({},a[0]),{service:a[0].service||"",service_data:Object.assign(Object.assign({},a[0].service_data||{}),{message:t})})}),this.config=Object.assign(Object.assign({},this.config),{actions:a}),Object.keys(this.errors).includes("message")&&this._validateConfig()}_setName(e){e.stopPropagation();const t=String(e.detail.value);this.config=Object.assign(Object.assign({},this.config),{name:t})}_setYaml(e){const t=e.detail.value;let a={};Ys(null==t?void 0:t.service)&&(a=Object.assign(Object.assign({},a),{service:String(t.service)})),Hs(null==t?void 0:t.service_data)&&(a=Object.assign(Object.assign({},a),{service_data:t.service_data})),Object.keys(a).length&&(this.config=Object.assign(Object.assign({},this.config),{actions:Object.assign(this.config.actions,{0:Object.assign(Object.assign({},this.config.actions[0]),a)})})),Object.keys(this.errors).some(e=>["service","message","title"].includes(e))&&this._validateConfig()}_validateConfig(){var e,t;this.errors={};const a=this._parseAutomation(),i=a.triggers[0];i.event&&Object.values(wi).includes(i.event)||(this.errors=Object.assign(Object.assign({},this.errors),{event:!0})),ji(i.area)&&Ds(this.areas,this.alarmoConfig).includes(i.area)||(this.errors=Object.assign(Object.assign({},this.errors),{area:!0})),(null===(e=i.modes)||void 0===e?void 0:e.every(e=>Ls(i.area,this.areas).includes(e)))||(this.errors=Object.assign(Object.assign({},this.errors),{modes:!0}));const s=a.actions[0];return s.service&&(zs(this.hass).includes(s.service)||"script"==Se(s.service))||(this.errors=Object.assign(Object.assign({},this.errors),{service:!0})),Gs(null===(t=s.service_data)||void 0===t?void 0:t.message)||(this.errors=Object.assign(Object.assign({},this.errors),{message:!0})),Gs(a.name)||(this.errors=Object.assign(Object.assign({},this.errors),{name:!0})),!Object.values(this.errors).length}_validAction(){var e;const t=this._parseAutomation().actions[0];return t.service&&("script"==Se(t.service)||zs(this.hass).includes(t.service))&&Gs(null===(e=t.service_data)||void 0===e?void 0:e.message)}_insertWildCard(e){var t;const a=this.shadowRoot.querySelector("#message");a&&a.focus();let i=(null===(t=this.config.actions[0].service_data)||void 0===t?void 0:t.message)||"";i=a&&null!==a.selectionStart&&null!==a.selectionEnd?i.substring(0,a.selectionStart)+e+i.substring(a.selectionEnd,i.length):i+e,this._setMessage(new CustomEvent("value-changed",{detail:{value:i}}))}_toggleYamlMode(){var e,t;this.viewMode=this.viewMode==Ks.UI?Ks.Yaml:Ks.UI,this.viewMode==Ks.Yaml&&(this.config=Object.assign(Object.assign({},this.config),{actions:Object.assign(this.config.actions,{0:Object.assign(Object.assign({},this.config.actions[0]),{service:this.config.actions[0].service||"",service_data:Object.assign(Object.assign({},this.config.actions[0].service_data||{}),{title:(null===(e=this.config.actions[0].service_data)||void 0===e?void 0:e.title)||"",message:(null===(t=this.config.actions[0].service_data)||void 0===t?void 0:t.message)||""})})})}))}_namePlaceholder(){const e=this.config.triggers[0].event,t=this.config.actions[0].service?Se(this.config.actions[0].service):null,a=Ns(this.hass,this.config.actions[0].service);return e&&"notify"==t&&a.length?mi("panels.actions.cards.new_notification.fields.name.placeholders."+e,this.hass.language,"{target}",a[0].name):""}_messagePlaceholder(){const e=this.config.triggers[0].event;return e?mi("panels.actions.cards.new_notification.fields.message.placeholders."+e,this.hass.language):""}_parseAutomation(){var e;let t=Object.assign({},this.config),a=t.actions[0];return!Gs(null===(e=a.service_data)||void 0===e?void 0:e.message)&&this.viewMode==Ks.UI&&this._messagePlaceholder()&&(a=Object.assign(Object.assign({},a),{service_data:Object.assign(Object.assign({},a.service_data),{message:this._messagePlaceholder()})}),Object.assign(t,{actions:Object.assign(t.actions,{0:a})})),!Gs(t.name)&&this._namePlaceholder()&&(t=Object.assign(Object.assign({},t),{name:this._namePlaceholder()})),t}_getOpenSensorsFormat(e=!1){var t;const a=((null===(t=this.config.actions[0].service_data)||void 0===t?void 0:t.message)||"").match(/{{open_sensors(\|[^}]+)?}}/);return null!==a?a[0]:e?"{{open_sensors}}":null}_setOpenSensorsFormat(e){var t;e.stopPropagation();const a=String(e.detail.value);let i=(null===(t=this.config.actions[0].service_data)||void 0===t?void 0:t.message)||"";i=i.replace(/{{open_sensors(\|[^}]+)?}}/,a);let s=this.config.actions;Object.assign(s,{0:Object.assign(Object.assign({},s[0]),{service:s[0].service||"",service_data:Object.assign(Object.assign({},s[0].service_data||{}),{message:i})})}),this.config=Object.assign(Object.assign({},this.config),{actions:s})}_getArmModeFormat(e=!1){var t;const a=((null===(t=this.config.actions[0].service_data)||void 0===t?void 0:t.message)||"").match(/{{arm_mode(\|[^}]+)?}}/);return null!==a?a[0]:e?"{{arm_mode}}":null}_setArmModeFormat(e){var t;e.stopPropagation();const a=String(e.detail.value);let i=(null===(t=this.config.actions[0].service_data)||void 0===t?void 0:t.message)||"";i=i.replace(/{{arm_mode(\|[^}]+)?}}/,a);let s=this.config.actions;Object.assign(s,{0:Object.assign(Object.assign({},s[0]),{service:s[0].service||"",service_data:Object.assign(Object.assign({},s[0].service_data||{}),{message:i})})}),this.config=Object.assign(Object.assign({},this.config),{actions:s})}_saveClick(e){if(!this._validateConfig())return;let t=this._parseAutomation();Ls(t.triggers[0].area,this.areas).every(e=>{var a;return null===(a=t.triggers[0].modes)||void 0===a?void 0:a.includes(e)})&&(t=Object.assign(Object.assign({},t),{triggers:Object.assign(t.triggers,{0:Object.assign(Object.assign({},t.triggers[0]),{modes:[]})})})),this.item&&(t=Object.assign(Object.assign({},t),{automation_id:this.item.automation_id})),Ke(this.hass,t).catch(t=>Mi(t,e)).then(()=>this._cancelClick())}_deleteClick(e){var t;(null===(t=this.item)||void 0===t?void 0:t.automation_id)&&Qe(this.hass,this.item.automation_id).catch(t=>Mi(t,e)).then(()=>this._cancelClick())}_testClick(e){const t=this._parseAutomation().actions[0],[a,i]=t.service.split(".");let s=t.service_data.message;s=s.replace("{{open_sensors|format=short}}","Some Example Sensor"),s=s.replace(/{{open_sensors(\|[^}]+)?}}/,"Some Example Sensor is open"),s=s.replace("{{bypassed_sensors}}","Some Bypassed Sensor"),s=s.replace(/{{arm_mode(\|[^}]+)?}}/,"Armed away"),s=s.replace("{{changed_by}}","Some Example User"),this.hass.callService(a,i,Object.assign(Object.assign({},t.service_data),{message:s})).then().catch(t=>{Ci(e,t.message)})}_cancelClick(){Pe(0,Ri("actions"),!0)}static get styles(){return o` + `:q``}_setEvent(e){e.stopPropagation();const t=e.detail.value;let a=this.config.triggers;Object.assign(a,{0:Object.assign(Object.assign({},a[0]),{event:t})}),this.config=Object.assign(Object.assign({},this.config),{triggers:a}),Object.keys(this.errors).includes("event")&&this._validateConfig()}_setArea(e){var t;e.stopPropagation();const a=e.detail.value;let i=this.config.triggers;Object.assign(i,{0:Object.assign(Object.assign({},i[0]),{area:a})});const s=Ps(a,this.areas);(null===(t=i[0].modes)||void 0===t?void 0:t.length)?this._setModes(new CustomEvent("value-changed",{detail:{value:i[0].modes.filter(e=>s.includes(e))}})):this._setModes(new CustomEvent("value-changed",{detail:{value:s}})),this.config=Object.assign(Object.assign({},this.config),{triggers:i}),Object.keys(this.errors).includes("area")&&this._validateConfig()}_setModes(e){e.stopPropagation();const t=e.detail.value;let a=this.config.triggers;Object.assign(a,{0:Object.assign(Object.assign({},a[0]),{modes:t})}),this.config=Object.assign(Object.assign({},this.config),{triggers:a}),Object.keys(this.errors).includes("modes")&&this._validateConfig()}_setService(e){e.stopPropagation();const t=String(e.detail.value);let a=this.config.actions;Object.assign(a,{0:Object.assign(Object.assign(Object.assign({},a[0]),{service:t}),ji(a[0],"service"))}),this.config=Object.assign(Object.assign({},this.config),{actions:a}),Object.keys(this.errors).includes("service")&&this._validateConfig()}_setTitle(e){e.stopPropagation();const t=e.target.value;let a=this.config.actions;Object.assign(a,{0:Object.assign(Object.assign({},a[0]),{service:a[0].service||"",service_data:Object.assign(Object.assign({},a[0].service_data||{}),{title:t})})}),this.config=Object.assign(Object.assign({},this.config),{actions:a}),Object.keys(this.errors).includes("title")&&this._validateConfig()}_setMessage(e){let t=this.config.actions;Object.assign(t,{0:Object.assign(Object.assign({},t[0]),{service:t[0].service||"",service_data:Object.assign(Object.assign({},t[0].service_data||{}),{message:e})})}),this.config=Object.assign(Object.assign({},this.config),{actions:t}),Object.keys(this.errors).includes("message")&&this._validateConfig()}_setName(e){e.stopPropagation();const t=e.target.value;this.config=Object.assign(Object.assign({},this.config),{name:t})}_setYaml(e){const t=e.detail.value;let a={};Bs(null==t?void 0:t.service)&&(a=Object.assign(Object.assign({},a),{service:String(t.service)})),Ys(null==t?void 0:t.service_data)&&(a=Object.assign(Object.assign({},a),{service_data:t.service_data})),Object.keys(a).length&&(this.config=Object.assign(Object.assign({},this.config),{actions:Object.assign(this.config.actions,{0:Object.assign(Object.assign({},this.config.actions[0]),a)})})),Object.keys(this.errors).some(e=>["service","message","title"].includes(e))&&this._validateConfig()}_validateConfig(){var e,t;this.errors={};const a=this._parseAutomation(),i=a.triggers[0];i.event&&Object.values(ki).includes(i.event)||(this.errors=Object.assign(Object.assign({},this.errors),{event:!0})),Si(i.area)&&Ls(this.areas,this.alarmoConfig).includes(i.area)||(this.errors=Object.assign(Object.assign({},this.errors),{area:!0})),(null===(e=i.modes)||void 0===e?void 0:e.every(e=>Ps(i.area,this.areas).includes(e)))||(this.errors=Object.assign(Object.assign({},this.errors),{modes:!0}));const s=a.actions[0];return s.service&&(qs(this.hass).includes(s.service)||"script"==Se(s.service))||(this.errors=Object.assign(Object.assign({},this.errors),{service:!0})),Fs(null===(t=s.service_data)||void 0===t?void 0:t.message)||(this.errors=Object.assign(Object.assign({},this.errors),{message:!0})),Fs(a.name)||(this.errors=Object.assign(Object.assign({},this.errors),{name:!0})),!Object.values(this.errors).length}_validAction(){var e;const t=this._parseAutomation().actions[0];return t.service&&("script"==Se(t.service)||qs(this.hass).includes(t.service))&&Fs(null===(e=t.service_data)||void 0===e?void 0:e.message)}_insertWildCard(e){var t;const a=this.shadowRoot.querySelector("#message");a&&a.focus();let i=(null===(t=this.config.actions[0].service_data)||void 0===t?void 0:t.message)||"";i=a&&null!==a.selectionStart&&null!==a.selectionEnd?i.substring(0,a.selectionStart)+e+i.substring(a.selectionEnd,i.length):i+e,this._setMessage(i)}_toggleYamlMode(){var e,t;this.viewMode=this.viewMode==Qs.UI?Qs.Yaml:Qs.UI,this.viewMode==Qs.Yaml&&(this.config=Object.assign(Object.assign({},this.config),{actions:Object.assign(this.config.actions,{0:Object.assign(Object.assign({},this.config.actions[0]),{service:this.config.actions[0].service||"",service_data:Object.assign(Object.assign({},this.config.actions[0].service_data||{}),{title:(null===(e=this.config.actions[0].service_data)||void 0===e?void 0:e.title)||"",message:(null===(t=this.config.actions[0].service_data)||void 0===t?void 0:t.message)||""})})})}))}_namePlaceholder(){const e=this.config.triggers[0].event,t=this.config.actions[0].service?Se(this.config.actions[0].service):null,a=Ds(this.hass,this.config.actions[0].service);return e&&"notify"==t&&a.length?pi("panels.actions.cards.new_notification.fields.name.placeholders."+e,this.hass.language,"{target}",a[0].name):""}_messagePlaceholder(){const e=this.config.triggers[0].event;return e?pi("panels.actions.cards.new_notification.fields.message.placeholders."+e,this.hass.language):""}_parseAutomation(){var e;let t=Object.assign({},this.config),a=t.actions[0];return!Fs(null===(e=a.service_data)||void 0===e?void 0:e.message)&&this.viewMode==Qs.UI&&this._messagePlaceholder()&&(a=Object.assign(Object.assign({},a),{service_data:Object.assign(Object.assign({},a.service_data),{message:this._messagePlaceholder()})}),Object.assign(t,{actions:Object.assign(t.actions,{0:a})})),!Fs(t.name)&&this._namePlaceholder()&&(t=Object.assign(Object.assign({},t),{name:this._namePlaceholder()})),t}_getOpenSensorsFormat(e=!1){var t;const a=((null===(t=this.config.actions[0].service_data)||void 0===t?void 0:t.message)||"").match(/{{open_sensors(\|[^}]+)?}}/);return null!==a?a[0]:e?"{{open_sensors}}":null}_setOpenSensorsFormat(e){var t;e.stopPropagation();const a=String(e.detail.value);let i=(null===(t=this.config.actions[0].service_data)||void 0===t?void 0:t.message)||"";i=i.replace(/{{open_sensors(\|[^}]+)?}}/,a);let s=this.config.actions;Object.assign(s,{0:Object.assign(Object.assign({},s[0]),{service:s[0].service||"",service_data:Object.assign(Object.assign({},s[0].service_data||{}),{message:i})})}),this.config=Object.assign(Object.assign({},this.config),{actions:s})}_getArmModeFormat(e=!1){var t;const a=((null===(t=this.config.actions[0].service_data)||void 0===t?void 0:t.message)||"").match(/{{arm_mode(\|[^}]+)?}}/);return null!==a?a[0]:e?"{{arm_mode}}":null}_setArmModeFormat(e){var t;e.stopPropagation();const a=String(e.detail.value);let i=(null===(t=this.config.actions[0].service_data)||void 0===t?void 0:t.message)||"";i=i.replace(/{{arm_mode(\|[^}]+)?}}/,a);let s=this.config.actions;Object.assign(s,{0:Object.assign(Object.assign({},s[0]),{service:s[0].service||"",service_data:Object.assign(Object.assign({},s[0].service_data||{}),{message:i})})}),this.config=Object.assign(Object.assign({},this.config),{actions:s})}_saveClick(e){if(!this._validateConfig())return;let t=this._parseAutomation();Ps(t.triggers[0].area,this.areas).every(e=>{var a;return null===(a=t.triggers[0].modes)||void 0===a?void 0:a.includes(e)})&&(t=Object.assign(Object.assign({},t),{triggers:Object.assign(t.triggers,{0:Object.assign(Object.assign({},t.triggers[0]),{modes:[]})})})),this.item&&(t=Object.assign(Object.assign({},t),{automation_id:this.item.automation_id})),Qe(this.hass,t).catch(t=>Ni(t,e)).then(()=>this._cancelClick())}_deleteClick(e){var t;(null===(t=this.item)||void 0===t?void 0:t.automation_id)&&We(this.hass,this.item.automation_id).catch(t=>Ni(t,e)).then(()=>this._cancelClick())}_testClick(e){const t=this._parseAutomation().actions[0],[a,i]=t.service.split(".");let s=t.service_data.message;s=s.replace("{{open_sensors|format=short}}","Some Example Sensor"),s=s.replace(/{{open_sensors(\|[^}]+)?}}/,"Some Example Sensor is open"),s=s.replace("{{bypassed_sensors}}","Some Bypassed Sensor"),s=s.replace(/{{arm_mode(\|[^}]+)?}}/,"Armed away"),s=s.replace("{{changed_by}}","Some Example User"),this.hass.callService(a,i,Object.assign(Object.assign({},t.service_data),{message:s})).then().catch(t=>{Mi(e,t.message)})}_cancelClick(){Pe(0,Ii("actions"),!0)}static get styles(){return o` div.content { padding: 28px 20px 0; max-width: 1040px; @@ -2644,21 +2647,17 @@ class Ji extends class{constructor(e){}T(e,t,a){this.Σdt=e,this.M=t,this.Σct=a flex-direction: column; } div.header { - font-family: var(--paper-font-headline_-_font-family); - -webkit-font-smoothing: var(--paper-font-headline_-_-webkit-font-smoothing); - font-size: var(--paper-font-headline_-_font-size); - font-weight: var(--paper-font-headline_-_font-weight); - letter-spacing: var(--paper-font-headline_-_letter-spacing); - line-height: var(--paper-font-headline_-_line-height); + font-size: 24px; + font-weight: 400; + letter-spacing: -0.012em; + line-height: 32px; opacity: var(--dark-primary-opacity); } div.section-header { - font-family: var(--paper-font-headline_-_font-family); - -webkit-font-smoothing: var(--paper-font-headline_-_-webkit-font-smoothing); font-size: 18px; - font-weight: var(--paper-font-headline_-_font-weight); - letter-spacing: var(--paper-font-headline_-_letter-spacing); - line-height: var(--paper-font-headline_-_line-height); + font-weight: 400; + letter-spacing: -0.012em; + line-height: 32px; opacity: var(--dark-primary-opacity); margin: 20px 0px 5px 10px; } @@ -2676,9 +2675,9 @@ class Ji extends class{constructor(e){}T(e,t,a){this.Σdt=e,this.M=t,this.Σct=a } h2 { margin-top: 10px; - font-size: var(--paper-font-headline_-_font-size); - font-weight: var(--paper-font-headline_-_font-weight); - letter-spacing: var(--paper-font-headline_-_letter-spacing); + font-size: 24px; + font-weight: 400; + letter-spacing: -0.012em; } span.error-message { color: var(--error-color); @@ -2707,27 +2706,27 @@ class Ji extends class{constructor(e){}T(e,t,a){this.Σdt=e,this.M=t,this.Σct=a div.heading .description { grid-area: description; } - `}};var Ws;t([oe({attribute:!1})],Qs.prototype,"hass",void 0),t([oe()],Qs.prototype,"narrow",void 0),t([oe()],Qs.prototype,"config",void 0),t([oe()],Qs.prototype,"item",void 0),t([oe()],Qs.prototype,"areas",void 0),t([oe()],Qs.prototype,"alarmoConfig",void 0),t([oe()],Qs.prototype,"viewMode",void 0),t([oe()],Qs.prototype,"errors",void 0),Qs=t([ne("notification-editor-card")],Qs),function(e){e[e.Yaml=0]="Yaml",e[e.UI=1]="UI"}(Ws||(Ws={}));let Xs=class extends se{constructor(){super(...arguments),this.config={type:bi.Action,triggers:[{}],actions:[{}]},this.viewMode=Ws.UI,this.errors={}}async firstUpdated(){if(this.areas=await We(this.hass),this.alarmoConfig=await Ie(this.hass),this.item){let e=this.item.actions.map(e=>e.entity_id?e:Ti(e,"entity_id"));this.config=Object.assign(Object.assign({},this.item),{actions:[e[0],...e.slice(1)]}),this.config.triggers.length>1&&(this.config=Object.assign(Object.assign({},this.config),{triggers:[this.config.triggers[0]]}));let t=this.config.triggers[0].area;ji(t)&&!Ds(this.areas,this.alarmoConfig).includes(t)?t=void 0:null===t&&(t=0),this._setArea(new CustomEvent("value-changed",{detail:{value:t}})),this._hasCustomEntities()&&(this.viewMode=Ws.Yaml)}if(!ji(this.config.triggers[0].area)){const e=Ds(this.areas,this.alarmoConfig);1==e.length?this._setArea(new CustomEvent("value-changed",{detail:{value:e[0]}})):e.includes(0)&&this._setArea(new CustomEvent("value-changed",{detail:{value:0}}))}!this.item||this.config.triggers[0].area||this.alarmoConfig.master.enabled||(this.errors=Object.assign(Object.assign({},this.errors),{area:!0}))}render(){var e;return this.hass&&this.areas&&this.alarmoConfig?q` + `}};var Xs;t([oe({attribute:!1})],Ws.prototype,"hass",void 0),t([oe()],Ws.prototype,"narrow",void 0),t([oe()],Ws.prototype,"config",void 0),t([oe()],Ws.prototype,"item",void 0),t([oe()],Ws.prototype,"areas",void 0),t([oe()],Ws.prototype,"alarmoConfig",void 0),t([oe()],Ws.prototype,"viewMode",void 0),t([oe()],Ws.prototype,"errors",void 0),Ws=t([ne("notification-editor-card")],Ws),function(e){e[e.Yaml=0]="Yaml",e[e.UI=1]="UI"}(Xs||(Xs={}));let Zs=class extends se{constructor(){super(...arguments),this.config={type:yi.Action,triggers:[{}],actions:[{}]},this.viewMode=Xs.UI,this.errors={}}async firstUpdated(){if(await Ie(),this.areas=await Xe(this.hass),this.alarmoConfig=await Ue(this.hass),this.item){let e=this.item.actions.map(e=>e.entity_id?e:ji(e,"entity_id"));this.config=Object.assign(Object.assign({},this.item),{actions:[e[0],...e.slice(1)]}),this.config.triggers.length>1&&(this.config=Object.assign(Object.assign({},this.config),{triggers:[this.config.triggers[0]]}));let t=this.config.triggers[0].area;Si(t)&&!Ls(this.areas,this.alarmoConfig).includes(t)?t=void 0:null===t&&(t=0),this._setArea(new CustomEvent("value-changed",{detail:{value:t}})),this._hasCustomEntities()&&(this.viewMode=Xs.Yaml)}if(!Si(this.config.triggers[0].area)){const e=Ls(this.areas,this.alarmoConfig);1==e.length?this._setArea(new CustomEvent("value-changed",{detail:{value:e[0]}})):e.includes(0)&&this._setArea(new CustomEvent("value-changed",{detail:{value:0}}))}!this.item||this.config.triggers[0].area||this.alarmoConfig.master.enabled||(this.errors=Object.assign(Object.assign({},this.errors),{area:!0}))}render(){var e;return this.hass&&this.areas&&this.alarmoConfig?q`
- -
${mi("panels.actions.cards.new_action.title",this.hass.language)}
-
${mi("panels.actions.cards.new_action.description",this.hass.language)}
+ +
${pi("panels.actions.cards.new_action.title",this.hass.language)}
+
${pi("panels.actions.cards.new_action.description",this.hass.language)}
-
${mi("panels.actions.cards.new_notification.trigger",this.hass.language)}
+
${pi("panels.actions.cards.new_notification.trigger",this.hass.language)}
- ${mi("panels.actions.cards.new_notification.fields.event.heading",this.hass.language)} + ${pi("panels.actions.cards.new_notification.fields.event.heading",this.hass.language)} - ${mi("panels.actions.cards.new_notification.fields.event.description",this.hass.language)} + ${pi("panels.actions.cards.new_notification.fields.event.description",this.hass.language)} Cs(e,this.hass))} - label=${mi("panels.actions.cards.new_action.fields.event.heading",this.hass.language)} + .items=${Object.values(ki).map(e=>Ms(e,this.hass))} + label=${pi("panels.actions.cards.new_action.fields.event.heading",this.hass.language)} icons=${!0} .value=${this.config.triggers[0].event} @value-changed=${this._setEvent} @@ -2738,17 +2737,17 @@ class Ji extends class{constructor(e){}T(e,t,a){this.Σdt=e,this.M=t,this.Σct=a ${Object.keys(this.areas).length>1?q` - ${mi("panels.actions.cards.new_action.fields.area.heading",this.hass.language)} + ${pi("panels.actions.cards.new_action.fields.area.heading",this.hass.language)} - ${mi("panels.actions.cards.new_action.fields.area.description",this.hass.language)} + ${pi("panels.actions.cards.new_action.fields.area.description",this.hass.language)} Ms(e,this.areas,this.alarmoConfig))} + .items=${Ls(this.areas,this.alarmoConfig).map(e=>Ns(e,this.areas,this.alarmoConfig))} clearable=${!0} - label=${mi("panels.actions.cards.new_action.fields.area.heading",this.hass.language)} + label=${pi("panels.actions.cards.new_action.fields.area.heading",this.hass.language)} .value=${this.config.triggers[0].area} @value-changed=${this._setArea} ?invalid=${this.errors.area} @@ -2758,16 +2757,16 @@ class Ji extends class{constructor(e){}T(e,t,a){this.Σdt=e,this.M=t,this.Σct=a - ${mi("panels.actions.cards.new_notification.fields.mode.heading",this.hass.language)} + ${pi("panels.actions.cards.new_notification.fields.mode.heading",this.hass.language)} - ${mi("panels.actions.cards.new_notification.fields.mode.description",this.hass.language)} + ${pi("panels.actions.cards.new_notification.fields.mode.description",this.hass.language)} Ss(e,this.hass))} - label=${mi("panels.actions.cards.new_action.fields.mode.heading",this.hass.language)} + .items=${Ps(this.config.triggers[0].area,this.areas).map(e=>Cs(e,this.hass))} + label=${pi("panels.actions.cards.new_action.fields.mode.heading",this.hass.language)} .value=${this.config.triggers[0].modes||[]} @value-changed=${this._setModes} ?invalid=${this.errors.modes} @@ -2776,23 +2775,23 @@ class Ji extends class{constructor(e){}T(e,t,a){this.Σdt=e,this.M=t,this.Σct=a
-
${mi("panels.actions.cards.new_notification.action",this.hass.language)}
+
${pi("panels.actions.cards.new_notification.action",this.hass.language)}
- ${this.viewMode==Ws.UI?q` + ${this.viewMode==Xs.UI?q` - ${mi("panels.actions.cards.new_action.fields.entity.heading",this.hass.language)} + ${pi("panels.actions.cards.new_action.fields.entity.heading",this.hass.language)} - ${mi("panels.actions.cards.new_action.fields.entity.description",this.hass.language)} + ${pi("panels.actions.cards.new_action.fields.entity.description",this.hass.language)} ${this.config.actions.map(e=>e.entity_id).length?q` - + - ${mi("panels.actions.cards.new_action.fields.action.heading",this.hass.language)} + ${pi("panels.actions.cards.new_action.fields.action.heading",this.hass.language)} - ${mi("panels.actions.cards.new_action.fields.action.description",this.hass.language)} + ${pi("panels.actions.cards.new_action.fields.action.description",this.hass.language)}
- ${this.renderActions()} + ${this.renderActions()||pi("panels.actions.cards.new_action.fields.action.no_common_actions",this.hass.language)}
`:""} `:q` -

${mi("components.editor.edit_in_yaml",this.hass.language)}

+

${pi("components.editor.edit_in_yaml",this.hass.language)}

- ${this.viewMode==Ws.Yaml?mi("components.editor.ui_mode",this.hass.language):mi("components.editor.yaml_mode",this.hass.language)} + ${this.viewMode==Xs.Yaml?pi("components.editor.ui_mode",this.hass.language):pi("components.editor.yaml_mode",this.hass.language)}
- ${mi("panels.actions.cards.new_notification.actions.test",this.hass.language)} + ${pi("panels.actions.cards.new_notification.actions.test",this.hass.language)}
-
${mi("panels.actions.cards.new_notification.options",this.hass.language)}
+
${pi("panels.actions.cards.new_notification.options",this.hass.language)}
- ${mi("panels.actions.cards.new_action.fields.name.heading",this.hass.language)} + ${pi("panels.actions.cards.new_action.fields.name.heading",this.hass.language)} - ${mi("panels.actions.cards.new_action.fields.name.description",this.hass.language)} + ${pi("panels.actions.cards.new_action.fields.name.description",this.hass.language)} - + > ${(null===(e=this.item)||void 0===e?void 0:e.automation_id)?q` - ${mi("panels.actions.cards.new_notification.fields.delete.heading",this.hass.language)} + ${pi("panels.actions.cards.new_notification.fields.delete.heading",this.hass.language)} - ${mi("panels.actions.cards.new_notification.fields.delete.description",this.hass.language)} + ${pi("panels.actions.cards.new_notification.fields.delete.description",this.hass.language)}
@@ -2889,15 +2888,15 @@ class Ji extends class{constructor(e){}T(e,t,a){this.Σdt=e,this.M=t,this.Σct=a ${this.hass.localize("ui.common.save")}
- `:q``}renderActions(){let e=this.config.actions.map(e=>e.entity_id),t=Rs(e,this.hass);if(!t.length)return mi("panels.actions.cards.new_action.fields.action.no_common_actions",this.hass.language);return t.map(e=>q` + `:q``}renderActions(){let e=this.config.actions.map(e=>e.entity_id),t=Is(e,this.hass);if(!t.length)return;return t.map(e=>q` this._setAction(e)} ?invalid=${this.errors.service} > ${((e,t)=>{let a=Ce(e);switch("script"==Se(e)&&(a="run"),a){case"turn_on":return t.localize("ui.card.media_player.turn_on");case"turn_off":return t.localize("ui.card.media_player.turn_off");case"lock":return t.localize("ui.card.lock.lock");case"unlock":return t.localize("ui.card.lock.unlock");case"run":return t.localize("ui.card.script.run");default:return a}})(e,this.hass)} - `)}_selectedAction(){let e=this.config.actions.map(e=>e.service);return e.every(ji)?(e=xi(qs(e.filter(ji))),1==e.length?e[0]:null):null}_setEvent(e){e.stopPropagation();const t=e.detail.value;let a=this.config.triggers;Object.assign(a,{0:Object.assign(Object.assign({},a[0]),{event:t})}),this.config=Object.assign(Object.assign({},this.config),{triggers:a}),Object.keys(this.errors).includes("event")&&this._validateConfig()}_setArea(e){var t;e.stopPropagation();const a=e.detail.value;let i=this.config.triggers;Object.assign(i,{0:Object.assign(Object.assign({},i[0]),{area:a})}),this.config=Object.assign(Object.assign({},this.config),{triggers:i}),(null===(t=this.config.triggers[0].modes)||void 0===t?void 0:t.length)||this._setModes(new CustomEvent("value-changed",{detail:{value:Ls(a,this.areas)}})),Object.keys(this.errors).includes("area")&&this._validateConfig()}_setModes(e){e.stopPropagation();const t=e.detail.value,a=this.config.triggers;Object.assign(a,{0:Object.assign(Object.assign({},a[0]),{modes:t})}),this.config=Object.assign(Object.assign({},this.config),{triggers:a}),Object.keys(this.errors).includes("service")&&this._validateConfig()}_setEntity(e){e.stopPropagation();const t=e.detail.value;let a=this.config.actions,i=null;if(t.length>a.length&&this._selectedAction()&&(i=this._selectedAction()),a.length>t.length){let e=a.findIndex(e=>!t.includes(e.entity_id||""));e<0&&(e=a.length-1),a.splice(e,1)}t.length||Object.assign(a,{0:Ti(a[0],"entity_id")}),t.forEach((e,t)=>{let i=a.length>t?Object.assign({},a[t]):{};i=i.entity_id==e?Object.assign({},i):{entity_id:e},Object.assign(a,{[t]:i})}),this.config=Object.assign(Object.assign({},this.config),{actions:a}),i&&this._setAction(i),Object.keys(this.errors).includes("entity_id")&&this._validateConfig()}_setAction(e){let t=this.config.actions,a=this.config.actions.map(e=>e.entity_id);Rs(a,this.hass).length&&(t.forEach((a,i)=>{let s=Rs(a.entity_id,this.hass),n=(r=e,s.find(e=>e==r||"turn_on"==Ce(r)&&"turn_on"==Ce(e)||"turn_off"==Ce(r)&&"turn_off"==Ce(e)||"script"==Se(r)&&"script"==Se(e)));var r;Object.assign(t,{[i]:Object.assign({service:n},Ti(a,"service"))})}),this.config=Object.assign(Object.assign({},this.config),{actions:t}))}_setName(e){e.stopPropagation();const t=String(e.detail.value);this.config=Object.assign(Object.assign({},this.config),{name:t})}_setYaml(e){let t=e.detail.value,a=[{}];var i;Hs(t)&&(t=[t]),"object"==typeof(i=t)&&null!==i&&Array.isArray(i)&&(t.forEach((e,t)=>{let i={};Hs(e)&&Ys(e.service)&&(i=Object.assign(Object.assign({},i),{service:e.service})),Hs(e)&&Ys(e.entity_id)&&(i=Object.assign(Object.assign({},i),{entity_id:e.entity_id})),Hs(e)&&Hs(e.service_data)&&(i=Object.assign(Object.assign({},i),{service_data:e.service_data})),Object.assign(a,{[t]:i})}),this.config=Object.assign(Object.assign({},this.config),{actions:a}))}_validateConfig(){var e;this.errors={};const t=this._parseAutomation(),a=t.triggers[0];a.event&&Object.values(wi).includes(a.event)||(this.errors=Object.assign(Object.assign({},this.errors),{event:!0})),ji(a.area)&&Ds(this.areas,this.alarmoConfig).includes(a.area)||(this.errors=Object.assign(Object.assign({},this.errors),{area:!0})),(null===(e=a.modes)||void 0===e?void 0:e.every(e=>Ls(a.area,this.areas).includes(e)))||(this.errors=Object.assign(Object.assign({},this.errors),{modes:!0}));let i=t.actions.map(e=>e.entity_id);this.viewMode==Ws.Yaml&&(i=i.filter(ji)),t.actions.length&&i.every(e=>Vs(e,this.hass))||(this.errors=Object.assign(Object.assign({},this.errors),{entity_id:!0}));const s=t.actions.map(e=>e.service);if(!s.length||!s.every(e=>Fs(e,this.hass))){this.errors=Object.assign(Object.assign({},this.errors),{service:!0}),Rs(i,this.hass).length||(this.viewMode=Ws.Yaml)}return Gs(t.name)||(this.errors=Object.assign(Object.assign({},this.errors),{name:!0})),!Object.values(this.errors).length}_validAction(){const e=this._parseAutomation(),t=e.actions.map(e=>e.service);let a=e.actions.map(e=>e.entity_id);return this.viewMode==Ws.Yaml&&(a=a.filter(ji)),t.length&&t.every(e=>Fs(e,this.hass))&&a.every(e=>Vs(e,this.hass))}_toggleYamlMode(){this.viewMode=this.viewMode==Ws.UI?Ws.Yaml:Ws.UI,this.viewMode==Ws.Yaml&&(this.config=Object.assign(Object.assign({},this.config),{actions:Object.assign(this.config.actions,{0:Object.assign(Object.assign({},this.config.actions[0]),{service:this.config.actions[0].service||"",service_data:Object.assign({},this.config.actions[0].service_data||{})})})}))}_namePlaceholder(){var e,t,a,i;if(!this._validAction)return"";const s=this.config.triggers[0].event,n=this.config.actions.map(e=>e.entity_id).filter(ji),r=Ps(n,this.hass).map(e=>e.name).join(", "),o=xi(this.config.actions.map(e=>e.service).filter(ji).map(e=>Ce(e)));let l=void 0;return 1==o.length&&(null===(e=o[0])||void 0===e?void 0:e.includes("turn_on"))&&(l=this.hass.localize("state.default.on")),1==o.length&&(null===(t=o[0])||void 0===t?void 0:t.includes("turn_off"))&&(l=this.hass.localize("state.default.off")),1==o.length&&(null===(a=o[0])||void 0===a?void 0:a.includes("lock"))&&(l=this.hass.localize("component.lock.state._.locked")),1==o.length&&(null===(i=o[0])||void 0===i?void 0:i.includes("unlock"))&&(l=this.hass.localize("component.lock.state._.unlocked")),s&&r&&l?mi("panels.actions.cards.new_action.fields.name.placeholders."+s,this.hass.language,"entity",r,"state",l):""}_getEntities(){return xi(this.config.actions.map(e=>e.entity_id).filter(ji))||[]}_hasCustomEntities(){return this._getEntities().some(e=>!Is(this.hass).includes(e))}_parseAutomation(){let e=Object.assign({},this.config);return!Gs(e.name)&&this._namePlaceholder()&&(e=Object.assign(Object.assign({},e),{name:this._namePlaceholder()})),e}_saveClick(e){if(!this._validateConfig())return;let t=this._parseAutomation();Ls(t.triggers[0].area,this.areas).every(e=>{var a;return null===(a=t.triggers[0].modes)||void 0===a?void 0:a.includes(e)})&&(t=Object.assign(Object.assign({},t),{triggers:Object.assign(t.triggers,{0:Object.assign(Object.assign({},t.triggers[0]),{modes:[]})})})),Ke(this.hass,t).catch(t=>Mi(t,e)).then(()=>this._cancelClick())}_deleteClick(e){var t;(null===(t=this.item)||void 0===t?void 0:t.automation_id)&&Qe(this.hass,this.item.automation_id).catch(t=>Mi(t,e)).then(()=>this._cancelClick())}_testClick(e){this._parseAutomation().actions.forEach(t=>{const[a,i]=t.service.split(".");let s=Object.assign({},t.service_data);t.entity_id&&(s=Object.assign(Object.assign({},s),{entity_id:t.entity_id})),this.hass.callService(a,i,s).then().catch(t=>{Ci(e,t.message)})})}_cancelClick(){Pe(0,Ri("actions"),!0)}static get styles(){return o` + `)}_selectedAction(){let e=this.config.actions.map(e=>e.service);return e.every(Si)?(e=Ei(Rs(e.filter(Si))),1==e.length?e[0]:null):null}_setEvent(e){e.stopPropagation();const t=e.detail.value;let a=this.config.triggers;Object.assign(a,{0:Object.assign(Object.assign({},a[0]),{event:t})}),this.config=Object.assign(Object.assign({},this.config),{triggers:a}),Object.keys(this.errors).includes("event")&&this._validateConfig()}_setArea(e){var t;e.stopPropagation();const a=e.detail.value;let i=this.config.triggers;Object.assign(i,{0:Object.assign(Object.assign({},i[0]),{area:a})}),this.config=Object.assign(Object.assign({},this.config),{triggers:i}),(null===(t=this.config.triggers[0].modes)||void 0===t?void 0:t.length)||this._setModes(new CustomEvent("value-changed",{detail:{value:Ps(a,this.areas)}})),Object.keys(this.errors).includes("area")&&this._validateConfig()}_setModes(e){e.stopPropagation();const t=e.detail.value,a=this.config.triggers;Object.assign(a,{0:Object.assign(Object.assign({},a[0]),{modes:t})}),this.config=Object.assign(Object.assign({},this.config),{triggers:a}),Object.keys(this.errors).includes("service")&&this._validateConfig()}_setEntity(e){e.stopPropagation();const t=e.detail.value;let a=this.config.actions,i=null;if(t.length>a.length&&this._selectedAction()&&(i=this._selectedAction()),a.length>t.length){let e=a.findIndex(e=>!t.includes(e.entity_id||""));e<0&&(e=a.length-1),a.splice(e,1)}t.length||Object.assign(a,{0:ji(a[0],"entity_id")}),t.forEach((e,t)=>{let i=a.length>t?Object.assign({},a[t]):{};i=i.entity_id==e?Object.assign({},i):{entity_id:e},Object.assign(a,{[t]:i})}),this.config=Object.assign(Object.assign({},this.config),{actions:a}),i&&this._setAction(i),Object.keys(this.errors).includes("entity_id")&&this._validateConfig()}_setAction(e){let t=this.config.actions,a=this.config.actions.map(e=>e.entity_id);Is(a,this.hass).length&&(t.forEach((a,i)=>{let s=Is(a.entity_id,this.hass),n=(r=e,s.find(e=>e==r||"turn_on"==Ce(r)&&"turn_on"==Ce(e)||"turn_off"==Ce(r)&&"turn_off"==Ce(e)||"script"==Se(r)&&"script"==Se(e)));var r;Object.assign(t,{[i]:Object.assign({service:n},ji(a,"service"))})}),this.config=Object.assign(Object.assign({},this.config),{actions:t}))}_setName(e){e.stopPropagation();const t=e.target.value;this.config=Object.assign(Object.assign({},this.config),{name:t})}_setYaml(e){let t=e.detail.value,a=[{}];var i;Ys(t)&&(t=[t]),"object"==typeof(i=t)&&null!==i&&Array.isArray(i)&&(t.forEach((e,t)=>{let i={};Ys(e)&&Bs(e.service)&&(i=Object.assign(Object.assign({},i),{service:e.service})),Ys(e)&&Bs(e.entity_id)&&(i=Object.assign(Object.assign({},i),{entity_id:e.entity_id})),Ys(e)&&Ys(e.service_data)&&(i=Object.assign(Object.assign({},i),{service_data:e.service_data})),Object.assign(a,{[t]:i})}),this.config=Object.assign(Object.assign({},this.config),{actions:a}))}_validateConfig(){var e;this.errors={};const t=this._parseAutomation(),a=t.triggers[0];a.event&&Object.values(ki).includes(a.event)||(this.errors=Object.assign(Object.assign({},this.errors),{event:!0})),Si(a.area)&&Ls(this.areas,this.alarmoConfig).includes(a.area)||(this.errors=Object.assign(Object.assign({},this.errors),{area:!0})),(null===(e=a.modes)||void 0===e?void 0:e.every(e=>Ps(a.area,this.areas).includes(e)))||(this.errors=Object.assign(Object.assign({},this.errors),{modes:!0}));let i=t.actions.map(e=>e.entity_id);this.viewMode==Xs.Yaml&&(i=i.filter(Si)),t.actions.length&&i.every(e=>Hs(e,this.hass))||(this.errors=Object.assign(Object.assign({},this.errors),{entity_id:!0}));const s=t.actions.map(e=>e.service);if(!s.length||!s.every(e=>Vs(e,this.hass))){this.errors=Object.assign(Object.assign({},this.errors),{service:!0}),Is(i,this.hass).length||(this.viewMode=Xs.Yaml)}return Fs(t.name)||(this.errors=Object.assign(Object.assign({},this.errors),{name:!0})),!Object.values(this.errors).length}_validAction(){const e=this._parseAutomation(),t=e.actions.map(e=>e.service);let a=e.actions.map(e=>e.entity_id);return this.viewMode==Xs.Yaml&&(a=a.filter(Si)),t.length&&t.every(e=>Vs(e,this.hass))&&a.every(e=>Hs(e,this.hass))}_toggleYamlMode(){this.viewMode=this.viewMode==Xs.UI?Xs.Yaml:Xs.UI,this.viewMode==Xs.Yaml&&(this.config=Object.assign(Object.assign({},this.config),{actions:Object.assign(this.config.actions,{0:Object.assign(Object.assign({},this.config.actions[0]),{service:this.config.actions[0].service||"",service_data:Object.assign({},this.config.actions[0].service_data||{})})})}))}_namePlaceholder(){var e,t,a,i;if(!this._validAction)return"";const s=this.config.triggers[0].event,n=this.config.actions.map(e=>e.entity_id).filter(Si),r=zs(n,this.hass).map(e=>e.name).join(", "),o=Ei(this.config.actions.map(e=>e.service).filter(Si).map(e=>Ce(e)));let l=void 0;return 1==o.length&&(null===(e=o[0])||void 0===e?void 0:e.includes("turn_on"))&&(l=this.hass.localize("state.default.on")),1==o.length&&(null===(t=o[0])||void 0===t?void 0:t.includes("turn_off"))&&(l=this.hass.localize("state.default.off")),1==o.length&&(null===(a=o[0])||void 0===a?void 0:a.includes("lock"))&&(l=this.hass.localize("component.lock.state._.locked")),1==o.length&&(null===(i=o[0])||void 0===i?void 0:i.includes("unlock"))&&(l=this.hass.localize("component.lock.state._.unlocked")),s&&r&&l?pi("panels.actions.cards.new_action.fields.name.placeholders."+s,this.hass.language,"entity",r,"state",l):""}_getEntities(){return Ei(this.config.actions.map(e=>e.entity_id).filter(Si))||[]}_hasCustomEntities(){return this._getEntities().some(e=>!Us(this.hass).includes(e))}_parseAutomation(){let e=Object.assign({},this.config);return!Fs(e.name)&&this._namePlaceholder()&&(e=Object.assign(Object.assign({},e),{name:this._namePlaceholder()})),e}_saveClick(e){if(!this._validateConfig())return;let t=this._parseAutomation();Ps(t.triggers[0].area,this.areas).every(e=>{var a;return null===(a=t.triggers[0].modes)||void 0===a?void 0:a.includes(e)})&&(t=Object.assign(Object.assign({},t),{triggers:Object.assign(t.triggers,{0:Object.assign(Object.assign({},t.triggers[0]),{modes:[]})})})),Qe(this.hass,t).catch(t=>Ni(t,e)).then(()=>this._cancelClick())}_deleteClick(e){var t;(null===(t=this.item)||void 0===t?void 0:t.automation_id)&&We(this.hass,this.item.automation_id).catch(t=>Ni(t,e)).then(()=>this._cancelClick())}_testClick(e){this._parseAutomation().actions.forEach(t=>{const[a,i]=t.service.split(".");let s=Object.assign({},t.service_data);t.entity_id&&(s=Object.assign(Object.assign({},s),{entity_id:t.entity_id})),this.hass.callService(a,i,s).then().catch(t=>{Mi(e,t.message)})})}_cancelClick(){Pe(0,Ii("actions"),!0)}static get styles(){return o` div.content { padding: 28px 20px 0; max-width: 1040px; @@ -2906,21 +2905,17 @@ class Ji extends class{constructor(e){}T(e,t,a){this.Σdt=e,this.M=t,this.Σct=a flex-direction: column; } div.header { - font-family: var(--paper-font-headline_-_font-family); - -webkit-font-smoothing: var(--paper-font-headline_-_-webkit-font-smoothing); - font-size: var(--paper-font-headline_-_font-size); - font-weight: var(--paper-font-headline_-_font-weight); - letter-spacing: var(--paper-font-headline_-_letter-spacing); - line-height: var(--paper-font-headline_-_line-height); + font-size: 24px; + font-weight: 400; + letter-spacing: -0.012em; + line-height: 32px; opacity: var(--dark-primary-opacity); } div.section-header { - font-family: var(--paper-font-headline_-_font-family); - -webkit-font-smoothing: var(--paper-font-headline_-_-webkit-font-smoothing); font-size: 18px; - font-weight: var(--paper-font-headline_-_font-weight); - letter-spacing: var(--paper-font-headline_-_letter-spacing); - line-height: var(--paper-font-headline_-_line-height); + font-weight: 400; + letter-spacing: -0.012em; + line-height: 32px; opacity: var(--dark-primary-opacity); margin: 20px 0px 5px 10px; } @@ -2938,9 +2933,9 @@ class Ji extends class{constructor(e){}T(e,t,a){this.Σdt=e,this.M=t,this.Σct=a } h2 { margin-top: 10px; - font-size: var(--paper-font-headline_-_font-size); - font-weight: var(--paper-font-headline_-_font-weight); - letter-spacing: var(--paper-font-headline_-_letter-spacing); + font-size: 24px; + font-weight: 400; + letter-spacing: -0.012em; } span.error-message { color: var(--error-color); @@ -2978,19 +2973,19 @@ class Ji extends class{constructor(e){}T(e,t,a){this.Σdt=e,this.M=t,this.Σct=a div.heading .description { grid-area: description; } - `}};t([oe({attribute:!1})],Xs.prototype,"hass",void 0),t([oe()],Xs.prototype,"narrow",void 0),t([oe()],Xs.prototype,"config",void 0),t([oe()],Xs.prototype,"item",void 0),t([oe()],Xs.prototype,"areas",void 0),t([oe()],Xs.prototype,"alarmoConfig",void 0),t([oe()],Xs.prototype,"viewMode",void 0),t([oe()],Xs.prototype,"errors",void 0),Xs=t([ne("automation-editor-card")],Xs);let Zs=class extends(Ze(se)){constructor(){super(...arguments),this.areas={},this.getAreaForAutomation=e=>{if(!this.config)return;const t=Ds(this.areas,this.config);let a=e.triggers[0].area;return ji(a)&&t.includes(a)?a:void 0}}hassSubscribe(){return this._fetchData(),[this.hass.connection.subscribeMessage(()=>this._fetchData(),{type:"alarmo_config_updated"})]}async _fetchData(){if(!this.hass)return;const e=await Fe(this.hass);this.automations=Object.values(e),this.areas=await We(this.hass),this.config=await Ie(this.hass)}firstUpdated(){var e;this.path.filter&&(this.selectedArea=null===(e=this.path.filter)||void 0===e?void 0:e.area),(async()=>{await Re()})()}render(){if(!this.hass||!this.automations||!this.config)return q``;if("new_notification"==this.path.subpage)return q` + `}};t([oe({attribute:!1})],Zs.prototype,"hass",void 0),t([oe()],Zs.prototype,"narrow",void 0),t([oe()],Zs.prototype,"config",void 0),t([oe()],Zs.prototype,"item",void 0),t([oe()],Zs.prototype,"areas",void 0),t([oe()],Zs.prototype,"alarmoConfig",void 0),t([oe()],Zs.prototype,"viewMode",void 0),t([oe()],Zs.prototype,"errors",void 0),Zs=t([ne("automation-editor-card")],Zs);let Js=class extends(Je(se)){constructor(){super(...arguments),this.areas={},this.getAreaForAutomation=e=>{if(!this.config)return;const t=Ls(this.areas,this.config);let a=e.triggers[0].area;return Si(a)&&t.includes(a)?a:void 0}}hassSubscribe(){return this._fetchData(),[this.hass.connection.subscribeMessage(()=>this._fetchData(),{type:"alarmo_config_updated"})]}async _fetchData(){if(!this.hass)return;const e=await Ve(this.hass);this.automations=Object.values(e),this.areas=await Xe(this.hass),this.config=await Ue(this.hass)}firstUpdated(){var e;this.path.filter&&(this.selectedArea=null===(e=this.path.filter)||void 0===e?void 0:e.area),(async()=>{await Re()})()}render(){if(!this.hass||!this.automations||!this.config)return q``;if("new_notification"==this.path.subpage)return q` - `;if(this.path.params.edit_notification){const e=this.automations.find(e=>e.automation_id==this.path.params.edit_notification&&e.type==bi.Notification);return q` + `;if(this.path.params.edit_notification){const e=this.automations.find(e=>e.automation_id==this.path.params.edit_notification&&e.type==yi.Notification);return q` `}if("new_action"==this.path.subpage)return q` - `;if(this.path.params.edit_action){const e=this.automations.find(e=>e.automation_id==this.path.params.edit_action&&e.type==bi.Action);return q` + `;if(this.path.params.edit_action){const e=this.automations.find(e=>e.automation_id==this.path.params.edit_action&&e.type==yi.Action);return q` `}{const e=()=>q` - ${mi("panels.actions.cards.notifications.table.no_area_warning",this.hass.language)} + ${pi("panels.actions.cards.notifications.table.no_area_warning",this.hass.language)} - `,t={type:{width:"40px",renderer:t=>"no_area"!=t.area||this.config.master.enabled?t.type==bi.Notification?q` + `,t={type:{width:"40px",renderer:t=>"no_area"!=t.area||this.config.master.enabled?t.type==yi.Notification?q` `:q` @@ -3000,15 +2995,15 @@ class Ji extends class{constructor(e){}T(e,t,a){this.Σdt=e,this.M=t,this.Σct=a `},name:{title:this.hass.localize("ui.components.area-picker.add_dialog.name"),renderer:t=>q` ${"no_area"!=t.area||this.config.master.enabled?"":e()} ${t.name} - `,width:"40%",grow:!0,text:!0},enabled:{title:mi("common.enabled",this.hass.language),width:"68px",align:"center",renderer:e=>q` + `,width:"40%",grow:!0,text:!0},enabled:{title:pi("common.enabled",this.hass.language),width:"68px",align:"center",renderer:e=>q` {t.stopPropagation(),this.toggleEnable(t,e.automation_id)}} > - `}},a=this.automations.filter(e=>e.type==bi.Notification).map(e=>Object(Object.assign(Object.assign({},e),{id:e.automation_id,warning:!this.config.master.enabled&&!this.getAreaForAutomation(e),area:this.getAreaForAutomation(e)||"no_area"}))),i=this.automations.filter(e=>e.type==bi.Action).map(e=>Object(Object.assign(Object.assign({},e),{id:e.automation_id,warning:!this.config.master.enabled&&!this.getAreaForAutomation(e),area:this.getAreaForAutomation(e)||"no_area"})));return q` - + `}},a=this.automations.filter(e=>e.type==yi.Notification).map(e=>Object(Object.assign(Object.assign({},e),{id:e.automation_id,warning:!this.config.master.enabled&&!this.getAreaForAutomation(e),area:this.getAreaForAutomation(e)||"no_area"}))),i=this.automations.filter(e=>e.type==yi.Action).map(e=>Object(Object.assign(Object.assign({},e),{id:e.automation_id,warning:!this.config.master.enabled&&!this.getAreaForAutomation(e),area:this.getAreaForAutomation(e)||"no_area"})));return q` +
- ${mi("panels.actions.cards.notifications.description",this.hass.language)} + ${pi("panels.actions.cards.notifications.description",this.hass.language)}
Pe(0,Ri("actions",{params:{edit_notification:e.detail.id}}),!0)} + @row-click=${e=>Pe(0,Ii("actions",{params:{edit_notification:e.detail.id}}),!0)} > - ${mi("panels.actions.cards.notifications.table.no_items",this.hass.language)} + ${pi("panels.actions.cards.notifications.table.no_items",this.hass.language)}
- ${mi("panels.actions.cards.notifications.actions.new_notification",this.hass.language)} + ${pi("panels.actions.cards.notifications.actions.new_notification",this.hass.language)}
- -
${mi("panels.actions.cards.actions.description",this.hass.language)}
+ +
${pi("panels.actions.cards.actions.description",this.hass.language)}
Pe(0,Ri("actions",{params:{edit_action:e.detail.id}}),!0)} + @row-click=${e=>Pe(0,Ii("actions",{params:{edit_action:e.detail.id}}),!0)} > - ${mi("panels.actions.cards.actions.table.no_items",this.hass.language)} + ${pi("panels.actions.cards.actions.table.no_items",this.hass.language)}
- ${mi("panels.actions.cards.actions.actions.new_action",this.hass.language)} + ${pi("panels.actions.cards.actions.actions.new_action",this.hass.language)}
- `}}toggleEnable(e,t){Ke(this.hass,{automation_id:t,enabled:!e.target.checked}).catch(t=>Mi(t,e)).then()}getTableFilterOptions(){if(!this.hass)return;let e=Object.values(this.areas).map(e=>Object({value:e.area_id,name:e.name,badge:t=>t.filter(t=>t.area==e.area_id).length})).sort(Li);Object.values(this.automations||[]).filter(e=>!this.getAreaForAutomation(e)).length&&(e=[{value:"no_area",name:this.config.master.enabled?this.config.master.name:this.hass.localize("state_attributes.climate.preset_mode.none"),badge:e=>e.filter(e=>"no_area"==e.area).length},...e]);return{area:{name:mi("components.table.filter.item",this.hass.language,"name",mi("panels.actions.cards.new_action.fields.area.heading",this.hass.language)),items:e,value:this.selectedArea?[this.selectedArea]:[]}}}addNotificationClick(){Pe(0,Ri("actions","new_notification"),!0)}addActionClick(){Pe(0,Ri("actions","new_action"),!0)}};Zs.styles=Pi,t([oe()],Zs.prototype,"hass",void 0),t([oe()],Zs.prototype,"narrow",void 0),t([oe()],Zs.prototype,"path",void 0),t([oe()],Zs.prototype,"alarmEntity",void 0),t([oe()],Zs.prototype,"automations",void 0),t([oe()],Zs.prototype,"areas",void 0),t([oe()],Zs.prototype,"config",void 0),t([oe()],Zs.prototype,"selectedArea",void 0),Zs=t([ne("alarm-view-actions")],Zs),e.MyAlarmPanel=class extends se{async firstUpdated(){window.addEventListener("location-changed",()=>{this.requestUpdate()}),await Re(),this.userConfig=await Ge(this.hass),this.requestUpdate()}render(){if(!customElements.get("ha-app-layout")||!this.userConfig)return q` + `}}toggleEnable(e,t){Qe(this.hass,{automation_id:t,enabled:!e.target.checked}).catch(t=>Ni(t,e)).then()}getTableFilterOptions(){if(!this.hass)return;let e=Object.values(this.areas).map(e=>Object({value:e.area_id,name:e.name,badge:t=>t.filter(t=>t.area==e.area_id).length})).sort(Pi);Object.values(this.automations||[]).filter(e=>!this.getAreaForAutomation(e)).length&&(e=[{value:"no_area",name:this.config.master.enabled?this.config.master.name:this.hass.localize("state_attributes.climate.preset_mode.none"),badge:e=>e.filter(e=>"no_area"==e.area).length},...e]);return{area:{name:pi("components.table.filter.item",this.hass.language,"name",pi("panels.actions.cards.new_action.fields.area.heading",this.hass.language)),items:e,value:this.selectedArea?[this.selectedArea]:[]}}}addNotificationClick(){Pe(0,Ii("actions","new_notification"),!0)}addActionClick(){Pe(0,Ii("actions","new_action"),!0)}};Js.styles=zi,t([oe()],Js.prototype,"hass",void 0),t([oe()],Js.prototype,"narrow",void 0),t([oe()],Js.prototype,"path",void 0),t([oe()],Js.prototype,"alarmEntity",void 0),t([oe()],Js.prototype,"automations",void 0),t([oe()],Js.prototype,"areas",void 0),t([oe()],Js.prototype,"config",void 0),t([oe()],Js.prototype,"selectedArea",void 0),Js=t([ne("alarm-view-actions")],Js),e.MyAlarmPanel=class extends se{async firstUpdated(){window.addEventListener("location-changed",()=>{this.requestUpdate()}),await Re(),this.userConfig=await Fe(this.hass),this.requestUpdate()}render(){if(!customElements.get("ha-app-layout")||!this.userConfig)return q` loading... - `;const e=qi();return q` + `;const e=Ri();return q`
- ${mi("title",this.hass.language)} + ${pi("title",this.hass.language)}
- v${"1.8.5"} + v${"1.8.6"}
- ${mi("panels.general.title",this.hass.language)} + ${pi("panels.general.title",this.hass.language)} - ${mi("panels.sensors.title",this.hass.language)} + ${pi("panels.sensors.title",this.hass.language)} - ${mi("panels.codes.title",this.hass.language)} + ${pi("panels.codes.title",this.hass.language)} - ${mi("panels.actions.title",this.hass.language)} + ${pi("panels.actions.title",this.hass.language)}
@@ -3101,8 +3096,8 @@ class Ji extends class{constructor(e){}T(e,t,a){this.Σdt=e,this.M=t,this.Σct=a The page you are trying to reach cannot be found. Please select a page from the menu above to continue.
- `}}handlePageSelected(e){const t=e.detail.item.getAttribute("page-name");t!==qi()?(Pe(0,Ri(t)),this.requestUpdate()):scrollTo(0,0)}static get styles(){return o` - ${Pi} :host { + `}}handlePageSelected(e){const t=e.detail.item.getAttribute("page-name");t!==Ri()?(Pe(0,Ii(t)),this.requestUpdate()):scrollTo(0,0)}static get styles(){return o` + ${zi} :host { color: var(--primary-text-color); --paper-card-header-color: var(--primary-text-color); } diff --git a/custom_components/alarmo/frontend/src/const.ts b/custom_components/alarmo/frontend/src/const.ts index 170d827..ad861bd 100755 --- a/custom_components/alarmo/frontend/src/const.ts +++ b/custom_components/alarmo/frontend/src/const.ts @@ -1,4 +1,4 @@ -export const VERSION = '1.8.5'; +export const VERSION = '1.8.6'; export const platform = 'alarmo'; export const editConfigService = 'edit_config'; diff --git a/hacs.json b/hacs.json index ac5ba8e..7044a49 100755 --- a/hacs.json +++ b/hacs.json @@ -9,5 +9,6 @@ ], "zip_release": true, "filename": "alarmo.zip", - "hide_default_branch": true + "hide_default_branch": true, + "homeassistant": "2022.3.0" } \ No newline at end of file