UNPKG

iobroker.lovelace

Version:

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

1 lines 1.36 kB
export const __rspack_esm_id=78279;export const __rspack_esm_ids=[78279];export const __webpack_modules__={47351(e,s,o){o.d(s,{PS:()=>t,Tv:()=>i,VR:()=>r,lE:()=>p});o(74423),o(17642),o(58004),o(33853),o(45876),o(32475),o(15024),o(31698);const t=e=>e.data,r=e=>"object"==typeof e?"object"==typeof e.body?e.body.message||"Unknown error, see supervisor logs":e.body||e.message||"Unknown error, see supervisor logs":e,a=new Set([502,503,504]),i=e=>!!(e&&e.status_code&&a.has(e.status_code))||!(!e||!e.message||!e.message.includes("ERR_CONNECTION_CLOSED")&&!e.message.includes("ERR_CONNECTION_RESET")),p=async(e,s)=>e({type:"supervisor/api",endpoint:`/${s}/stats`,method:"get"})},35541(e,s,o){o.d(s,{X:()=>a});var t=o(62384),r=o(47351);const a=async(e,s,o)=>(0,t.v)(e.config.version,2021,2,4)?e.callWS({type:"supervisor/api",endpoint:s,method:o?.method||"get",timeout:o?.timeout??null,data:o?.data}):(0,r.PS)(await e.callApi((o.method||"get").toUpperCase(),`hassio${s}`,o?.data))},81562(e,s,o){o.r(s),o.d(s,{addStoreRepository:()=>i,fetchStoreRepositories:()=>a,fetchSupervisorStore:()=>r,removeStoreRepository:()=>p});var t=o(35541);const r=async e=>(0,t.X)(e,"/store"),a=async e=>(0,t.X)(e,"/store/repositories"),i=async(e,s)=>(0,t.X)(e,"/store/repositories",{method:"post",data:{repository:s}}),p=async(e,s)=>(0,t.X)(e,`/store/repositories/${s}`,{method:"delete"})}};