UNPKG

iobroker.lovelace

Version:

With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI

1 lines 24.4 kB
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[58709],{16629:function(e,t,n){n.d(t,{E7:function(){return d},Mn:function(){return o},P9:function(){return s},lf:function(){return m}});n(18111),n(61701),n(62953);var a=n(63004);const o=e=>{const t=e/100;return[Math.round(i(t)),Math.round(r(t)),Math.round(c(t))]},i=e=>{if(e<=66)return 255;const t=329.698727446*(e-60)**-.1332047592;return(0,a.q)(t,0,255)},r=e=>{let t;return t=e<=66?99.4708025861*Math.log(e)-161.1195681661:288.1221695283*(e-60)**-.0755148492,(0,a.q)(t,0,255)},c=e=>{if(e>=66)return 255;if(e<=19)return 0;const t=138.5177312231*Math.log(e-10)-305.0447927307;return(0,a.q)(t,0,255)},u=(e,t)=>{const n=Math.max(...e),a=Math.max(...t);let o;return o=0===a?0:n/a,t.map(e=>Math.round(e*o))},s=e=>0===e?1e6:Math.floor(1e6/e),l=e=>0===e?1e6:Math.floor(1e6/e),m=(e,t,n)=>{const[a,i,r,c,m]=e,d=l(null!=t?t:2700),h=l(null!=n?n:6500),g=d-h;let f;try{f=m/(c+m)}catch(C){f=.5}const y=h+f*g,_=y?s(y):0,[p,v,L]=o(_),w=Math.max(c,m)/255;return u([a,i,r,c,m],[a+p*w,i+v*w,r+L*w])},d=e=>{const[t,n,a,o]=e;return u([t,n,a,o],[t+o,n+o,a+o])}},80785:function(e,t,n){function a(e){return!!e&&(e instanceof Date&&!isNaN(e.valueOf()))}n.d(t,{A:function(){return a}})},380:function(e,t,n){n.a(e,async function(e,a){try{n.d(t,{D:function(){return l},P:function(){return s}});n(74423);var o=n(74487),i=n(27734),r=n(46927),c=n(96029),u=e([o]);o=(u.then?(await u)():u)[0];const s=e=>e.first_weekday===r.zt.language?"weekInfo"in Intl.Locale.prototype?new Intl.Locale(e.language).weekInfo.firstDay%7:(0,i.S)(e.language)%7:c.Z.includes(e.first_weekday)?c.Z.indexOf(e.first_weekday):1,l=e=>{const t=s(e);return c.Z[t]};a()}catch(s){a(s)}})},72487:function(e,t,n){n.a(e,async function(e,a){try{n.d(t,{CA:function(){return T},Mi:function(){return j},Pm:function(){return A},Wq:function(){return v},Yq:function(){return s},bl:function(){return k},c2:function(){return w},fr:function(){return _},gu:function(){return D},kz:function(){return m},m9:function(){return O},sl:function(){return f},ur:function(){return Z},zB:function(){return h}});n(18111),n(20116);var o=n(74487),i=n(22786),r=n(46927),c=n(8480),u=e([o,c]);[o,c]=u.then?(await u)():u;(0,i.A)((e,t)=>new Intl.DateTimeFormat(e.language,{weekday:"long",month:"long",day:"numeric",timeZone:(0,c.wj)(e.time_zone,t)}));const s=(e,t,n)=>l(t,n.time_zone).format(e),l=(0,i.A)((e,t)=>new Intl.DateTimeFormat(e.language,{year:"numeric",month:"long",day:"numeric",timeZone:(0,c.wj)(e.time_zone,t)})),m=(e,t,n)=>d(t,n.time_zone).format(e),d=(0,i.A)((e,t)=>new Intl.DateTimeFormat(e.language,{year:"numeric",month:"short",day:"numeric",timeZone:(0,c.wj)(e.time_zone,t)})),h=(e,t,n)=>{var a,o,i,c;const u=g(t,n.time_zone);if(t.date_format===r.ow.language||t.date_format===r.ow.system)return u.format(e);const s=u.formatToParts(e),l=null===(a=s.find(e=>"literal"===e.type))||void 0===a?void 0:a.value,m=null===(o=s.find(e=>"day"===e.type))||void 0===o?void 0:o.value,d=null===(i=s.find(e=>"month"===e.type))||void 0===i?void 0:i.value,h=null===(c=s.find(e=>"year"===e.type))||void 0===c?void 0:c.value,f=s[s.length-1];let y="literal"===(null==f?void 0:f.type)?null==f?void 0:f.value:"";"bg"===t.language&&t.date_format===r.ow.YMD&&(y="");return{[r.ow.DMY]:`${m}${l}${d}${l}${h}${y}`,[r.ow.MDY]:`${d}${l}${m}${l}${h}${y}`,[r.ow.YMD]:`${h}${l}${d}${l}${m}${y}`}[t.date_format]},g=(0,i.A)((e,t)=>{const n=e.date_format===r.ow.system?void 0:e.language;return e.date_format===r.ow.language||(e.date_format,r.ow.system),new Intl.DateTimeFormat(n,{year:"numeric",month:"numeric",day:"numeric",timeZone:(0,c.wj)(e.time_zone,t)})}),f=(e,t,n)=>y(t,n.time_zone).format(e),y=(0,i.A)((e,t)=>new Intl.DateTimeFormat(e.language,{day:"numeric",month:"short",timeZone:(0,c.wj)(e.time_zone,t)})),_=(e,t,n)=>p(t,n.time_zone).format(e),p=(0,i.A)((e,t)=>new Intl.DateTimeFormat(e.language,{month:"long",year:"numeric",timeZone:(0,c.wj)(e.time_zone,t)})),v=(e,t,n)=>L(t,n.time_zone).format(e),L=(0,i.A)((e,t)=>new Intl.DateTimeFormat(e.language,{month:"long",timeZone:(0,c.wj)(e.time_zone,t)})),w=(e,t,n)=>C(t,n.time_zone).format(e),C=(0,i.A)((e,t)=>new Intl.DateTimeFormat(e.language,{month:"short",timeZone:(0,c.wj)(e.time_zone,t)})),A=(e,t,n)=>z(t,n.time_zone).format(e),z=(0,i.A)((e,t)=>new Intl.DateTimeFormat(e.language,{year:"numeric",timeZone:(0,c.wj)(e.time_zone,t)})),T=(e,t,n)=>M(t,n.time_zone).format(e),M=(0,i.A)((e,t)=>new Intl.DateTimeFormat(e.language,{weekday:"long",timeZone:(0,c.wj)(e.time_zone,t)})),D=(e,t,n)=>b(t,n.time_zone).format(e),b=(0,i.A)((e,t)=>new Intl.DateTimeFormat(e.language,{weekday:"short",timeZone:(0,c.wj)(e.time_zone,t)})),j=(e,t,n)=>I(t,n.time_zone).format(e),I=(0,i.A)((e,t)=>new Intl.DateTimeFormat(e.language,{weekday:"short",month:"short",day:"numeric",timeZone:(0,c.wj)(e.time_zone,t)})),Z=(e,t,n)=>E(t,n.time_zone).format(e),E=(0,i.A)((e,t)=>new Intl.DateTimeFormat(e.language,{weekday:"short",month:"short",day:"numeric",year:"numeric",timeZone:(0,c.wj)(e.time_zone,t)})),k=(e,t,n)=>{const a=(0,c.wj)(t.time_zone,n.time_zone);return new Intl.DateTimeFormat("en-CA",{year:"numeric",month:"2-digit",day:"2-digit",timeZone:a}).format(e)},O=(e,t,n,a)=>`${k(e,n,a)}/${k(t,n,a)}`;a()}catch(s){a(s)}})},95747:function(e,t,n){n.a(e,async function(e,a){try{n.d(t,{CL:function(){return v},GH:function(){return C},Rl:function(){return h},ZS:function(){return _},aQ:function(){return f},r6:function(){return m},yg:function(){return L}});var o=n(74487),i=n(22786),r=n(72487),c=n(30162),u=n(8480),s=n(69543),l=e([o,u,r,c]);[o,u,r,c]=l.then?(await l)():l;const m=(e,t,n)=>d(t,n.time_zone).format(e),d=(0,i.A)((e,t)=>new Intl.DateTimeFormat(e.language,{year:"numeric",month:"long",day:"numeric",hour:(0,s.J)(e)?"numeric":"2-digit",minute:"2-digit",hourCycle:(0,s.J)(e)?"h12":"h23",timeZone:(0,u.wj)(e.time_zone,t)})),h=e=>g().format(e),g=(0,i.A)(()=>new Intl.DateTimeFormat(void 0,{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"})),f=(e,t,n)=>y(t,n.time_zone).format(e),y=(0,i.A)((e,t)=>new Intl.DateTimeFormat(e.language,{year:"numeric",month:"short",day:"numeric",hour:(0,s.J)(e)?"numeric":"2-digit",minute:"2-digit",hourCycle:(0,s.J)(e)?"h12":"h23",timeZone:(0,u.wj)(e.time_zone,t)})),_=(e,t,n)=>p(t,n.time_zone).format(e),p=(0,i.A)((e,t)=>new Intl.DateTimeFormat(e.language,{month:"short",day:"numeric",hour:(0,s.J)(e)?"numeric":"2-digit",minute:"2-digit",hourCycle:(0,s.J)(e)?"h12":"h23",timeZone:(0,u.wj)(e.time_zone,t)})),v=(e,t,n)=>(new Date).getFullYear()===e.getFullYear()?_(e,t,n):f(e,t,n),L=(e,t,n)=>w(t,n.time_zone).format(e),w=(0,i.A)((e,t)=>new Intl.DateTimeFormat(e.language,{year:"numeric",month:"long",day:"numeric",hour:(0,s.J)(e)?"numeric":"2-digit",minute:"2-digit",second:"2-digit",hourCycle:(0,s.J)(e)?"h12":"h23",timeZone:(0,u.wj)(e.time_zone,t)})),C=(e,t,n)=>`${(0,r.zB)(e,t,n)}, ${(0,c.fU)(e,t,n)}`;a()}catch(m){a(m)}})},30162:function(e,t,n){n.a(e,async function(e,a){try{n.d(t,{LW:function(){return f},Xs:function(){return h},fU:function(){return s},ie:function(){return m}});var o=n(74487),i=n(22786),r=n(8480),c=n(69543),u=e([o,r]);[o,r]=u.then?(await u)():u;const s=(e,t,n)=>l(t,n.time_zone).format(e),l=(0,i.A)((e,t)=>new Intl.DateTimeFormat(e.language,{hour:"numeric",minute:"2-digit",hourCycle:(0,c.J)(e)?"h12":"h23",timeZone:(0,r.wj)(e.time_zone,t)})),m=(e,t,n)=>d(t,n.time_zone).format(e),d=(0,i.A)((e,t)=>new Intl.DateTimeFormat(e.language,{hour:(0,c.J)(e)?"numeric":"2-digit",minute:"2-digit",second:"2-digit",hourCycle:(0,c.J)(e)?"h12":"h23",timeZone:(0,r.wj)(e.time_zone,t)})),h=(e,t,n)=>g(t,n.time_zone).format(e),g=(0,i.A)((e,t)=>new Intl.DateTimeFormat(e.language,{weekday:"long",hour:(0,c.J)(e)?"numeric":"2-digit",minute:"2-digit",hourCycle:(0,c.J)(e)?"h12":"h23",timeZone:(0,r.wj)(e.time_zone,t)})),f=(e,t,n)=>y(t,n.time_zone).format(e),y=(0,i.A)((e,t)=>new Intl.DateTimeFormat("en-GB",{hour:"numeric",minute:"2-digit",hour12:!1,timeZone:(0,r.wj)(e.time_zone,t)}));a()}catch(s){a(s)}})},8480:function(e,t,n){n.a(e,async function(e,a){try{n.d(t,{fL:function(){return h},n2:function(){return g},wj:function(){return f}});var o,i,r,c=n(74487),u=n(29079),s=n(46927),l=e([c]);c=(l.then?(await l)():l)[0];const m=null===(o=Intl.DateTimeFormat)||void 0===o||null===(i=(r=o.call(Intl)).resolvedOptions)||void 0===i?void 0:i.call(r).timeZone,d=m&&("UTC"===m||"Etc/UTC"===m||m in u)?m:void 0,h=14881==n.j?void 0!==d:null,g=null!=d?d:"UTC",f=(e,t)=>e===s.Wj.local&&d?g:t;a()}catch(m){a(m)}})},69543:function(e,t,n){n.d(t,{J:function(){return i}});n(74423);var a=n(22786),o=n(46927);const i=(0,a.A)(e=>{if(e.time_format===o.Hg.language||e.time_format===o.Hg.system){const t=e.time_format===o.Hg.language?e.language:void 0;return new Date("January 1, 2023 22:00:00").toLocaleString(t).includes("10")}return e.time_format===o.Hg.am_pm})},96029:function(e,t,n){n.d(t,{Tq:function(){return r},Z:function(){return o},ZV:function(){return a},sj:function(){return i}});const a=["sun","mon","tue","wed","thu","fri","sat"],o=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],i={0:"sun",1:"mon",2:"tue",3:"wed",4:"thu",5:"fri",6:"sat"},r={sun:"sunday",mon:"monday",tue:"tuesday",wed:"wednesday",thu:"thursday",fri:"friday",sat:"saturday"}},69093:function(e,t,n){n.d(t,{t:function(){return o}});var a=n(71727);const o=e=>(0,a.m)(e.entity_id)},4423:function(e,t,n){n.d(t,{B:function(){return u},r:function(){return c}});n(44114),n(18111),n(13579),n(17642),n(58004),n(33853),n(45876),n(32475),n(15024),n(31698),n(62953);var a=n(44537),o=n(71727),i=n(28455);const r=e=>{if(void 0!==e)return null===e?new Set([null]):new Set((0,a.e)(e))},c=(e,t)=>{const n=t.domain?new Set((0,a.e)(t.domain)):void 0,c=t.hidden_domains?new Set((0,a.e)(t.hidden_domains)):void 0,u=t.device_class?new Set((0,a.e)(t.device_class)):void 0,s=r(t.floor),l=r(t.area),m=r(t.device),d=t.entity_category?new Set((0,a.e)(t.entity_category)):void 0,h=t.label?new Set((0,a.e)(t.label)):void 0,g=t.hidden_platform?new Set((0,a.e)(t.hidden_platform)):void 0;return t=>{const a=e.states[t];if(!a)return!1;if(n||c){const e=(0,o.m)(t);if(n&&!n.has(e))return!1;if(c&&c.has(e))return!1}if(u){const e=a.attributes.device_class||"none";if(!u.has(e))return!1}const{area:r,floor:f,device:y,entity:_}=(0,i.ln)(a,e.entities,e.devices,e.areas,e.floors);if(_&&_.hidden)return!1;if(s){var p;const e=null!==(p=null==f?void 0:f.floor_id)&&void 0!==p?p:null;if(!s.has(e))return!1}if(l){var v;const e=null!==(v=null==r?void 0:r.area_id)&&void 0!==v?v:null;if(!l.has(e))return!1}if(m){var L;const e=null!==(L=null==y?void 0:y.id)&&void 0!==L?L:null;if(!m.has(e))return!1}if(h){if(!_)return!1;if(!_.labels.some(e=>h.has(e)))return!1}if(d){const e=(null==_?void 0:_.entity_category)||"none";if(!d.has(e))return!1}if(g){if(!_)return!1;if(_.platform&&g.has(_.platform))return!1}return!0}},u=(e,t)=>{const n=new Set,a=[];for(const o of t)for(const t of e)o(t)&&!n.has(t)&&(n.add(t),a.push(t));return a}},82286:function(e,t,n){n.d(t,{$:function(){return a}});const a=(e,t)=>o(e.attributes,t),o=(e,t)=>0!==(e.supported_features&t)},52943:function(e,t,n){n.d(t,{Z:function(){return a}});const a=e=>e.charAt(0).toUpperCase()+e.slice(1)},22682:function(e,t,n){n.d(t,{$:function(){return r}});n(84864),n(57465),n(27495);const a="^\\d{4}-(0[1-9]|1[0-2])-([12]\\d|0[1-9]|3[01])",o=new RegExp(a+"$"),i=new RegExp(a),r=(e,t=!1)=>t?i.test(e):o.test(e)},6940:function(e,t,n){n.d(t,{F:function(){return o}});n(27495);const a=/^\d{4}-(0[1-9]|1[0-2])-([12]\d|0[1-9]|3[01])[T| ](((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([.,]\d+(?!:))?)(\8[0-5]\d([.,]\d+)?)?([zZ]|([+-])([01]\d|2[0-3]):?([0-5]\d)?)?)$/,o=e=>a.test(e)},38279:function(e,t,n){n.d(t,{$2:function(){return a},VV:function(){return i},on:function(){return u},sx:function(){return r}});n(72712);var a=function(e){return e[e.TARGET_TEMPERATURE=1]="TARGET_TEMPERATURE",e[e.TARGET_TEMPERATURE_RANGE=2]="TARGET_TEMPERATURE_RANGE",e[e.TARGET_HUMIDITY=4]="TARGET_HUMIDITY",e[e.FAN_MODE=8]="FAN_MODE",e[e.PRESET_MODE=16]="PRESET_MODE",e[e.SWING_MODE=32]="SWING_MODE",e[e.AUX_HEAT=64]="AUX_HEAT",e[e.TURN_OFF=128]="TURN_OFF",e[e.TURN_ON=256]="TURN_ON",e[e.SWING_HORIZONTAL_MODE=512]="SWING_HORIZONTAL_MODE",e}({});const o=["auto","heat_cool","heat","cool","dry","fan_only","off"].reduce((e,t,n)=>(e[t]=n,e),{}),i=(e,t)=>o[e]-o[t],r={cooling:"cool",defrosting:"heat",drying:"dry",fan:"fan_only",heating:"heat",idle:"off",off:"off",preheating:"heat"},c={cool:"M20.79,13.95L18.46,14.57L16.46,13.44V10.56L18.46,9.43L20.79,10.05L21.31,8.12L19.54,7.65L20,5.88L18.07,5.36L17.45,7.69L15.45,8.82L13,7.38V5.12L14.71,3.41L13.29,2L12,3.29L10.71,2L9.29,3.41L11,5.12V7.38L8.5,8.82L6.5,7.69L5.92,5.36L4,5.88L4.47,7.65L2.7,8.12L3.22,10.05L5.55,9.43L7.55,10.56V13.45L5.55,14.58L3.22,13.96L2.7,15.89L4.47,16.36L4,18.12L5.93,18.64L6.55,16.31L8.55,15.18L11,16.62V18.88L9.29,20.59L10.71,22L12,20.71L13.29,22L14.7,20.59L13,18.88V16.62L15.5,15.17L17.5,16.3L18.12,18.63L20,18.12L19.53,16.35L21.3,15.88L20.79,13.95M9.5,10.56L12,9.11L14.5,10.56V13.44L12,14.89L9.5,13.44V10.56Z",dry:"M12,3.25C12,3.25 6,10 6,14C6,17.32 8.69,20 12,20A6,6 0 0,0 18,14C18,10 12,3.25 12,3.25M14.47,9.97L15.53,11.03L9.53,17.03L8.47,15.97M9.75,10A1.25,1.25 0 0,1 11,11.25A1.25,1.25 0 0,1 9.75,12.5A1.25,1.25 0 0,1 8.5,11.25A1.25,1.25 0 0,1 9.75,10M14.25,14.5A1.25,1.25 0 0,1 15.5,15.75A1.25,1.25 0 0,1 14.25,17A1.25,1.25 0 0,1 13,15.75A1.25,1.25 0 0,1 14.25,14.5Z",fan_only:"M12,11A1,1 0 0,0 11,12A1,1 0 0,0 12,13A1,1 0 0,0 13,12A1,1 0 0,0 12,11M12.5,2C17,2 17.11,5.57 14.75,6.75C13.76,7.24 13.32,8.29 13.13,9.22C13.61,9.42 14.03,9.73 14.35,10.13C18.05,8.13 22.03,8.92 22.03,12.5C22.03,17 18.46,17.1 17.28,14.73C16.78,13.74 15.72,13.3 14.79,13.11C14.59,13.59 14.28,14 13.88,14.34C15.87,18.03 15.08,22 11.5,22C7,22 6.91,18.42 9.27,17.24C10.25,16.75 10.69,15.71 10.89,14.79C10.4,14.59 9.97,14.27 9.65,13.87C5.96,15.85 2,15.07 2,11.5C2,7 5.56,6.89 6.74,9.26C7.24,10.25 8.29,10.68 9.22,10.87C9.41,10.39 9.73,9.97 10.14,9.65C8.15,5.96 8.94,2 12.5,2Z",auto:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22C12.4 22 12.7 22 13.1 21.9L15.4 15.3L14.8 14.7C15.5 14 16 13 16 11.9C16 11.2 15.8 10.5 15.4 9.9L17.6 7.7C18.5 9 19 10.4 19 12H20C20.3 12 20.6 12.1 20.8 12.2C20.8 12.2 20.9 12.2 20.9 12.3C21.3 12.5 21.7 12.9 21.9 13.4C22 12.9 22 12.5 22 12C22 6.5 17.5 2 12 2M14 8.6C13.4 8.2 12.7 8 12 8C9.8 8 8 9.8 8 12C8 13.1 8.4 14.1 9.2 14.8L7.1 16.9C5.8 15.7 5 13.9 5 12C5 8.1 8.1 5 12 5C13.6 5 15 5.5 16.2 6.4L14 8.6M20 14H18L14.8 23H16.7L17.4 21H20.6L21.3 23H23.2L20 14M17.8 19.7L19 16L20.2 19.7H17.8Z",heat:"M17.66 11.2C17.43 10.9 17.15 10.64 16.89 10.38C16.22 9.78 15.46 9.35 14.82 8.72C13.33 7.26 13 4.85 13.95 3C13 3.23 12.17 3.75 11.46 4.32C8.87 6.4 7.85 10.07 9.07 13.22C9.11 13.32 9.15 13.42 9.15 13.55C9.15 13.77 9 13.97 8.8 14.05C8.57 14.15 8.33 14.09 8.14 13.93C8.08 13.88 8.04 13.83 8 13.76C6.87 12.33 6.69 10.28 7.45 8.64C5.78 10 4.87 12.3 5 14.47C5.06 14.97 5.12 15.47 5.29 15.97C5.43 16.57 5.7 17.17 6 17.7C7.08 19.43 8.95 20.67 10.96 20.92C13.1 21.19 15.39 20.8 17.03 19.32C18.86 17.66 19.5 15 18.56 12.72L18.43 12.46C18.22 12 17.66 11.2 17.66 11.2M14.5 17.5C14.22 17.74 13.76 18 13.4 18.1C12.28 18.5 11.16 17.94 10.5 17.28C11.69 17 12.4 16.12 12.61 15.23C12.78 14.43 12.46 13.77 12.33 13C12.21 12.26 12.23 11.63 12.5 10.94C12.69 11.32 12.89 11.7 13.13 12C13.9 13 15.11 13.44 15.37 14.8C15.41 14.94 15.43 15.08 15.43 15.23C15.46 16.05 15.1 16.95 14.5 17.5H14.5Z",off:"M16.56,5.44L15.11,6.89C16.84,7.94 18,9.83 18,12A6,6 0 0,1 12,18A6,6 0 0,1 6,12C6,9.83 7.16,7.94 8.88,6.88L7.44,5.44C5.36,6.88 4,9.28 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12C20,9.28 18.64,6.88 16.56,5.44M13,3H11V13H13",heat_cool:"M12.92 1.58L11.18 2.58L12.39 4.67L11.8 6.85L9 7.6L7.38 6L7.42 3.59L5.43 3.59L5.43 5.42L3.59 5.42L3.6 7.42L6 7.42L7.65 9.03L6.9 11.82L4.68 12.4L2.59 11.2L1.59 12.93L3.17 13.84L2.26 15.42L4 16.42L5.19 14.33L7.42 13.75L7.92 14.26L9.32 12.86L8.78 12.32L9.53 9.54L12.32 8.78L12.85 9.32L14.26 7.91L13.73 7.37L14.32 5.19L16.41 4L15.41 2.25L13.83 3.16L12.92 1.58M20.72 4L4 20.72L5.27 22L10.16 17.11C10.63 17.43 11.15 17.68 11.71 17.83C14.38 18.55 17.12 16.96 17.83 14.29C18.22 12.86 17.93 11.36 17.11 10.16L22 5.27L20.72 4M18.74 9C19.18 9.63 19.53 10.38 19.75 11.19C19.97 12 20.03 12.81 19.96 13.61L22.65 10.41L18.74 9M19.32 15.95C19 16.67 18.5 17.35 17.93 17.94C17.34 18.53 16.66 19 15.96 19.34L20.05 20.06L19.32 15.95M9 18.71L10.41 22.66L13.59 19.95C12.81 20 12 19.97 11.19 19.76C10.36 19.54 9.62 19.17 9 18.71Z"},u=e=>c[e]||"M16.95,16.95L14.83,14.83C15.55,14.1 16,13.1 16,12C16,11.26 15.79,10.57 15.43,10L17.6,7.81C18.5,9 19,10.43 19,12C19,13.93 18.22,15.68 16.95,16.95M12,5C13.57,5 15,5.5 16.19,6.4L14,8.56C13.43,8.21 12.74,8 12,8A4,4 0 0,0 8,12C8,13.1 8.45,14.1 9.17,14.83L7.05,16.95C5.78,15.68 5,13.93 5,12A7,7 0 0,1 12,5M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,6.47 17.5,2 12,2Z"},28949:function(e,t,n){n.d(t,{r:function(){return i}});n(44114),n(17642),n(58004),n(33853),n(45876),n(32475),n(15024),n(31698),n(62953);const a=["light","climate","security","media_players","maintenance","weather","energy"],o=new Set(a);function i(e){const t=[],n=new Set;for(const a of e||[]){if("summary"===a.type){if(!o.has(a.key))continue;if(n.has(a.key))continue;n.add(a.key)}t.push(a)}for(const o of a)n.has(o)||t.push({type:"summary",key:o});return t}},48927:function(e,t,n){n.d(t,{H:function(){return o}});n(3362),n(62953);var a=n(1087);const o=(e,t)=>new Promise(o=>{const i=t.cancel,r=t.submit;(0,a.r)(e,"show-dialog",{dialogTag:"dialog-enter-code",dialogImport:()=>n.e(29130).then(n.bind(n,24561)),dialogParams:Object.assign(Object.assign({},t),{},{cancel:()=>{o(null),i&&i()},submit:e=>{o(e),r&&r(e)}})})})},48441:function(e,t,n){n.d(t,{B:function(){return a}});n(62953);const a=[{area:null,hidden_platform:["automation","script","hassio","backup","mobile_app","zone","person"],hidden_domains:["ai_task","automation","configurator","device_tracker","event","geo_location","notify","persistent_notification","script","sun","tag","todo","zone",...n(46190).gt]}]},8892:function(e,t,n){n.a(e,async function(e,a){try{n.r(t),n.d(t,{HomeOverviewViewStrategy:function(){return p}});n(44114),n(26910),n(18111),n(22489),n(61701),n(13579),n(3362),n(62953);var o=n(40445),i=n(5124),r=n(67576),c=n(66639),u=n(36312),s=n(4423),l=n(18198),m=n(38114),d=n(28949),h=n(7723),g=n(8537),f=n(48441),y=e([g,m]);[g,m]=y.then?(await y)():y;const _=(e,t)=>{const n=t.areas[e],a=`areas-${e}`,o=[];return null!=n&&n.temperature_entity_id&&o.push("temperature"),{type:"area",area:e,display_type:"compact",sensor_classes:o,tap_action:{action:"navigate",navigation_path:a},vertical:!0,grid_options:{rows:2,columns:4}}};class p extends i.mN{static async generate(e,t){var n;const a=Object.values(t.areas),o=Object.values(t.floors),i=(0,c.cs)(o,a),r=i.floors.length+(i.areas.length?1:0),y=Object.keys(t.states),p=f.B.map(e=>(0,s.r)(t,e)),v=(0,s.B)(y,p),L=[];for(const c of i.floors){const e=c.id,n=c.areas,a=t.floors[e],o=[];for(const i of n)o.push(_(i,t));o.length&&L.push({type:"grid",column_span:3,cards:[{type:"heading",heading:r>1?a.name:t.localize("ui.panel.lovelace.strategy.home.areas"),heading_style:"title",icon:a.icon||(0,l.Dc)(a)},...o]})}if(i.areas.length>0||v.length>0){const e=[];for(const r of i.areas)e.push(_(r,t));v.length>0&&e.push({type:"tile",entity:"zone.home",vertical:!0,name:t.localize("ui.panel.lovelace.strategy.home.devices"),icon:"mdi:devices",hide_state:!0,tap_action:{action:"navigate",navigation_path:"other-devices"},grid_options:{rows:2,columns:4}});const n=0===i.areas.length,a=0===i.floors.length;let o;o=a&&n?void 0:a?t.localize("ui.panel.lovelace.strategy.home.areas"):n?t.localize("ui.panel.lovelace.strategy.home.devices"):t.localize("ui.panel.lovelace.strategy.home.other_areas"),L.push({type:"grid",column_span:3,cards:[...o?[{type:"heading",heading:o,heading_style:"title"}]:[],...e]})}const w=(e.favorite_entities||[]).filter(e=>void 0!==t.states[e]),C=Math.max(8,w.length),A={type:"heading",heading:t.localize("ui.panel.lovelace.strategy.home.favorites"),heading_style:"title",visibility:[h.r],grid_options:{rows:"auto"}};let z;e.hide_suggested_entities?w.length>0&&(z={type:"grid",column_span:3,cards:[A,...w.map(e=>({type:"tile",entity:e,state_content:["state","area_name"],show_entity_picture:!0}))]}):z={strategy:{type:"common-controls",limit:C,include_entities:w,hide_empty:!0,heading:A},column_span:3};const T=g.vV.media_players.map(e=>(0,s.r)(t,e)),M=g.vV.light.map(e=>(0,s.r)(t,e)),D=g.vV.climate.map(e=>(0,s.r)(t,e)),b=g.vV.security.map(e=>(0,s.r)(t,e)),j=g.vV.maintenance.map(e=>(0,s.r)(t,e)),I=t.panels.light&&(0,s.B)(y,M).length>0,Z=(0,s.B)(y,T).length>0,E=t.panels.climate&&(0,s.B)(y,D).length>0,k=t.panels.security&&(0,s.B)(y,b).length>0,O=t.panels.maintenance&&(0,s.B)(y,j).length>0,F=(0,s.r)(t,{domain:"weather",entity_category:"none"}),$=Object.keys(t.states).filter(F).sort()[0],R=(0,u.x)(t.config,"energy")?await(0,m.bs)(t).catch(()=>{}):void 0,B=t.panels.energy&&null!==(n=null==R?void 0:R.energy_sources.some(e=>"grid"===e.type&&!!e.stat_energy_from))&&void 0!==n&&n,H={light:()=>I?{type:"home-summary",summary:"light",tap_action:{action:"navigate",navigation_path:"/light?historyBack=1"}}:void 0,climate:()=>E?{type:"home-summary",summary:"climate",tap_action:{action:"navigate",navigation_path:"/climate?historyBack=1"}}:void 0,security:()=>k?{type:"home-summary",summary:"security",tap_action:{action:"navigate",navigation_path:"/security?historyBack=1"}}:void 0,media_players:()=>Z?{type:"home-summary",summary:"media_players",tap_action:{action:"navigate",navigation_path:"media-players"}}:void 0,maintenance:()=>O?{type:"home-summary",summary:"maintenance",tap_action:{action:"navigate",navigation_path:e.home_panel?"/maintenance?historyBack=1&backPath=/home":"/maintenance?historyBack=1"}}:void 0,weather:()=>$?{type:"tile",entity:$,name:t.localize("ui.panel.lovelace.strategy.home.summary_list.weather"),state_content:["temperature","state"]}:void 0,energy:()=>B?{type:"home-summary",summary:"energy",tap_action:{action:"navigate",navigation_path:e.home_panel?"/energy?historyBack=1&backPath=/home":"/energy?historyBack=1"}}:void 0},S=[{type:"repairs",hide_empty:!0,tap_action:{action:"navigate",navigation_path:"/config/repairs?historyBack=1"}},{type:"updates",hide_empty:!0,tap_action:{action:"navigate",navigation_path:"/config/updates?historyBack=1"}},{type:"discovered-devices",hide_empty:!0}];for(const c of(0,d.r)(e.shortcuts))if("summary"===c.type){var N;if(c.hidden)continue;const e=null===(N=H[c.key])||void 0===N?void 0:N.call(H);e&&S.push(e)}else S.push({type:"shortcut",label:c.label,icon:c.icon,color:c.color,tap_action:{action:"navigate",navigation_path:c.path}});const U=S.map(e=>Object.assign(Object.assign({},e),{},{grid_options:{columns:12}})),V=[...S.map(e=>Object.assign(Object.assign({},e),{},{grid_options:{columns:6}}))],J={type:"heading",heading:t.localize("ui.panel.lovelace.strategy.home.summaries"),heading_style:"title"},x=V.length>0?{type:"grid",column_span:3,visibility:[h.B],cards:[J,...V]}:void 0,G=U.length>0?{type:"grid",cards:[Object.assign(Object.assign({},J),{},{grid_options:{rows:"auto"}}),...U]}:void 0;var P;if(0===L.length)return{type:"panel",cards:[Object.assign({type:"empty-state",icon:"mdi:home-assistant",icon_color:"primary",content_only:!0,title:t.localize("ui.panel.lovelace.strategy.home.welcome_title"),content:t.localize("ui.panel.lovelace.strategy.home.welcome_content")},e.home_panel&&null!==(P=t.user)&&void 0!==P&&P.is_admin?{buttons:[{icon:"mdi:plus",text:t.localize("ui.panel.lovelace.strategy.home.welcome_add_device"),appearance:"filled",variant:"brand",tap_action:{action:"fire-dom-event",home_panel:{type:"add_integration"}}},{icon:"mdi:home-edit",text:t.localize("ui.panel.lovelace.strategy.home.welcome_edit_areas"),appearance:"plain",variant:"brand",tap_action:{action:"navigate",navigation_path:"/config/areas/dashboard"}}]}:{})]};const Y=[z,x,...L].filter(Boolean);return Object.assign(Object.assign({type:"sections",max_columns:3,sections:Y},!e.hide_welcome_message&&{header:{layout:"responsive",card:{type:"markdown",text_only:!0,content:`## ${t.localize("ui.panel.lovelace.strategy.home.welcome_user",{user:"{{ user }}"})}`}}}),G&&{sidebar:{sections:[G],content_label:t.localize("ui.panel.lovelace.strategy.home.home"),sidebar_label:t.localize("ui.panel.lovelace.strategy.home.summaries"),visibility:[h.r]}})}}p=(0,o.Cg)([(0,r.EM)("home-overview-view-strategy")],p),a()}catch(_){a(_)}})}}]);