${this.renderName(e)}
@@ -1371,18 +1371,18 @@ function(e){return class extends e{createRenderRoot(){const e=this.constructor,{
- `}renderName(e){return this.config.show_name?N`
${this.config.name||e.attributes.friendly_name}
`:N``}renderState(e){if(!this.config.show_states)return N``;const t=this.hass.states[this.config.entity],i=e&&e.key in t.attributes,o=e&&e.key in t,a=i?t.attributes[e.key]:o?t[e.key]:this.hass.localize("state.default.unavailable"),n=Hn(a,this.hass.locale),r=N`
+ `}renderName(e){return this.config.show_name?N`
${this.config.name||e.attributes.friendly_name}
`:N``}renderState(e){if(!this.config.show_states)return N``;const t=this.hass.states[this.config.entity],i=e&&e.key in t.attributes,o=e&&e.key in t,a=i?t.attributes[e.key]:o?t[e.key]:this.hass.localize("state.default.unavailable"),n=Zn(a,this.hass.locale),r=N`
${e.icon&&this.renderIcon(e)}
- ${(e.label||"")+(Ri(`states.${a}`)||n)+(e.unit||"")}
+ ${(e.label||"")+(Hi(`states.${a}`)||n)+(e.unit||"")}
-
`;return`${e.key}_list`in t.attributes&&(i||o)?this.renderDropdown(r,e.key,e.service):r}renderAttribute(e){if(!this.config.show_attributes)return N``;const t=this.hass.states[this.config.entity],i=e.compute||(e=>e),o=e&&e.key in t.attributes,a=e&&e.key in t,n=o?i(t.attributes[e.key]):a?i(t[e.key]):this.hass.localize("state.default.unavailable"),r=Hn(n,this.hass.locale),d=N`
- ${e.icon&&this.renderIcon(e)}${(e.label||"")+(Ri(`attributes_value.${n}`)||r)+(e.unit||"")}
-
`;return`${e.key}_list`in t.attributes&&(o||a)?this.renderDropdown(d,e.key,e.service):d}renderBody(e){if(!this.config.show_body)return N``;const t=this.hass.states[this.config.entity],i=e.compute||(e=>e),o=e&&e.key in t.attributes,a=e&&e.key in t,n=o?i(t.attributes[e.key]):a?i(t[e.key]):this.hass.localize("state.default.unavailable"),r=Hn(n,this.hass.locale);let d=30;e.height&&(d=e.height);let l,s,c,m,p,h,u,f,g="stretch",b="0px 0px 0px 13px",_="right",v="row",y="left",x="height: 100%; width: 2px;";switch(e.direction){case"right":_="right",y="left";break;case"up":b="0px",_="top",v="column-reverse",y="bottom",x="height: 2px; width: 100%;"}switch(e.positions.icon){case"outside":l=N`
${e.icon&&this.renderIconbody(e)} `;break;case"inside":s=N`
${e.icon&&this.renderIconbody(e)} `,b="0px";break;case"off":b="0px"}switch(e.positions.name){case"outside":c=N`
+
`;return`${e.key}_list`in t.attributes&&(i||o)?this.renderDropdown(r,e.key,e.service):r}renderAttribute(e){if(!this.config.show_attributes)return N``;const t=this.hass.states[this.config.entity],i=e.compute||(e=>e),o=e&&e.key in t.attributes,a=e&&e.key in t,n=o?i(t.attributes[e.key]):a?i(t[e.key]):this.hass.localize("state.default.unavailable"),r=Zn(n,this.hass.locale),d=N`
+ ${e.icon&&this.renderIcon(e)}${(e.label||"")+(Hi(`attributes_value.${n}`)||r)+(e.unit||"")}
+
`;return`${e.key}_list`in t.attributes&&(o||a)?this.renderDropdown(d,e.key,e.service):d}renderBody(e){if(!this.config.show_body)return N``;const t=this.hass.states[this.config.entity],i=e.compute||(e=>e),o=e&&e.key in t.attributes,a=e&&e.key in t,n=o?i(t.attributes[e.key]):a?i(t[e.key]):this.hass.localize("state.default.unavailable"),r=Zn(n,this.hass.locale);let d=30;e.height&&(d=e.height);let l,s,c,m,p,h,u,f,g="stretch",b="0px 0px 0px 13px",_="right",v="row",y="left",x="height: 100%; width: 2px;";switch(e.direction){case"right":_="right",y="left";break;case"up":b="0px",_="top",v="column-reverse",y="bottom",x="height: 2px; width: 100%;"}switch(e.positions.icon){case"outside":l=N`
${e.icon&&this.renderIconbody(e)} `;break;case"inside":s=N`
${e.icon&&this.renderIconbody(e)} `,b="0px";break;case"off":b="0px"}switch(e.positions.name){case"outside":c=N`
${e.label||""} ${e.max+(e.unit||"")}
`}switch(e.positions.value){case"outside":u=N`
${(Ri(`body_value.${n}`)||r)+(e.unit||"")}${(Hi(`body_value.${n}`)||r)+(e.unit||"")}
`;break;case"inside":f=N`
${(Ri(`body_value.${n}`)||r)+(e.unit||"")}${(Hi(`body_value.${n}`)||r)+(e.unit||"")}
`;break;case"off":b="0px"}const w=this._computeBarColor(e,Number(n)),E=this._computePercent(e,Number(n)),I=this._computePercent(e,e.target);let A=E,k=this._computePercent(e,e.target);k
@@ -1444,7 +1444,7 @@ function(e){return class extends e{createRenderRoot(){const e=this.constructor,{
@@ -1463,4 +1463,4 @@ function(e){return class extends e{createRenderRoot(){const e=this.constructor,{
corner="BOTTOM_START">
${o.map((e=>N`${e}`))}
-
`}toggleMenu(e){const t=this.shadowRoot.querySelector(`#bmc-menu-${e}`);t.open=!t.open}static get styles(){return Bn}_computeBarColor(e,t){let i;return i=e.severity?this._computeSeverityColor(e,t):"unavailable"==e?`var(--score-card-disabled-color, ${e.color})`:e.color,i}_computeSeverityColor(e,t){const i=e.severity;let o;return isNaN(t)?i.forEach((t=>{e==t.text&&(o=t.color)})):i.forEach((e=>{t>=e.from&&t<=e.to&&(o=e.color)})),null==o&&(o=e.color),o}_computePercent(e,t){if("unavailable"==e)return 0;if(isNaN(t))return 100;switch(e.direction){case"right-reverse":case"left-reverse":case"up-reverse":case"down-reverse":return 100-100*(t-e.min)/(e.max-e.min);default:return 100*(t-e.min)/(e.max-e.min)}}_moreInfo(){be(this,"hass-more-info",{entityId:this.config.entity})}};o([re({attribute:!1})],Un.prototype,"hass",void 0),o([de()],Un.prototype,"config",void 0),o([de()],Un.prototype,"_configArray",void 0),o([de()],Un.prototype,"open",void 0),Un=o([ae("body-miscale-card")],Un);export{Un as BodyMiScaleCard};
+ `}toggleMenu(e){const t=this.shadowRoot.querySelector(`#bmc-menu-${e}`);t.open=!t.open}static get styles(){return Xn}_computeBarColor(e,t){let i;return i=e.severity?this._computeSeverityColor(e,t):"unavailable"==e?`var(--score-card-disabled-color, ${e.color})`:e.color,i}_computeSeverityColor(e,t){const i=e.severity;let o;return isNaN(t)?i.forEach((t=>{e==t.text&&(o=t.color)})):i.forEach((e=>{t>=e.from&&t<=e.to&&(o=e.color)})),null==o&&(o=e.color),o}_computePercent(e,t){if("unavailable"==e)return 0;if(isNaN(t))return 100;switch(e.direction){case"right-reverse":case"left-reverse":case"up-reverse":case"down-reverse":return 100-100*(t-e.min)/(e.max-e.min);default:return 100*(t-e.min)/(e.max-e.min)}}_moreInfo(){be(this,"hass-more-info",{entityId:this.config.entity})}};o([re({attribute:!1})],Jn.prototype,"hass",void 0),o([de()],Jn.prototype,"config",void 0),o([de()],Jn.prototype,"_configArray",void 0),o([de()],Jn.prototype,"open",void 0),Jn=o([ae("body-miscale-card")],Jn);export{Jn as BodyMiScaleCard};
diff --git a/src/const.ts b/src/const.ts
index 9e9c7fb..086a9f4 100644
--- a/src/const.ts
+++ b/src/const.ts
@@ -1,6 +1,6 @@
import { localize } from './localize/localize';
-export const CARD_VERSION = '5.9.1';
+export const CARD_VERSION = '5.9.2';
export const states = {
status: {
diff --git a/src/localize/languages/pl.json b/src/localize/languages/pl.json
new file mode 100644
index 0000000..c4646ca
--- /dev/null
+++ b/src/localize/languages/pl.json
@@ -0,0 +1,116 @@
+{
+ "common": {
+ "version": "Wersja",
+ "name": "Karta BodyMiScale",
+ "description": "Karta BodyMiScale pokazuje Twoją wagę oraz parametry ciała.",
+ "not_available": "BodyMiScale jest niedostępna",
+ "toggle_power": "Więcej szczegółów jak BMI kCal - pokaż / ukryj"
+ },
+ "states": {
+ "ok": "POMIAR: OK",
+ "unknown": "STATUS: nieznany",
+ "problem": "Problem",
+ "none": "Brak",
+ "weight unavailable": "Waga niedostępna",
+ "impedance unavailable": "Impedancja niedostępna",
+ "weight unavailable, impedance unavailable": "Waga i impedancja niedostępne",
+ "weight low": "Niska waga",
+ "impedance low": "Niska impedancja",
+ "weight low, impedance low": "Waga i impedancja niskie",
+ "weight high": "Waga wysoka",
+ "impedance high": "Impedancja wysoka",
+ "weight high, impedance high": "Waga i impedancja wysoka",
+ "weight high, impedance low": "Waga wysoka a impedancja niska",
+ "weight low, impedance high": "Waga nizska a impedancja wysoka"
+ },
+ "attributes": {
+ "weight: ": "Waga: ",
+ "impedance: ": "Impedancja: ",
+ "height: ": "Wzrost: ",
+ "age: ": "Wiek: ",
+ "gender: ": "Płeć: "
+ },
+ "attributes_value": {
+ "male": "męska",
+ "female": "żeńska",
+ "unavailable": "niedstępna"
+ },
+ "body": {
+ "bmi": "BMI",
+ "bmi_label": "BMI label",
+ "visceral_fat": "Visceral fat",
+ "body_fat": "Body fat",
+ "protein": "Protein",
+ "water": "Water",
+ "muscle_mass": "Muscle mass",
+ "bone_mass": "Bone mass",
+ "weight": "Waga",
+ "ideal": "Ideal",
+ "basal_metabolism": "Basal metabolism",
+ "body_type": "Typ sylwetki",
+ "metabolic_age": "Wiek metaboliczny"
+ },
+ "body_value": {
+ "Skinny": "Skinny",
+ "Balanced-skinny": "Balanced-skinny",
+ "Skinny-muscular": "Skinny-muscular",
+ "Balanced": "Balanced",
+ "Balanced-muscular": "Balanced-muscular",
+ "Lack-exercise": "Lack-exercise",
+ "Thick-set": "Thick-set",
+ "Obese": "Obese",
+ "Overweight": "Overweight",
+ "Underweight": "Underweight",
+ "Normal or Healthy Weight": "Normal or Healthy Weight",
+ "Slight overweight": "Slight overweight",
+ "Moderate obesity": "Moderate obesity",
+ "Severe obesity": "Severe obesity",
+ "Massive obesity": "Massive obesity",
+ "unavailable": "niedostępny"
+ },
+ "unit": {
+ " years": " lat"
+ },
+ "error": {
+ "missing_entity": "Proszę zdefiniuj encje.",
+ "missing_entity_bodymiscale": "Proszę zdefiniuj encję bodymiscale."
+ },
+ "editor": {
+ "entity": "Proszę wybierz konto na wadze (wymagane)!",
+ "image": "Obraz tła (opcjonalne)",
+ "model": "ACTIVATE if the scale has 4 grey circles of 5 cm Ø on top",
+ "model1": "( = model 181B)!",
+ "model_aria_label_on": "Włącz opcję impedancji",
+ "model_aria_label_off": "Wyłącz opcję impedancji",
+ "unit": "Zamień kg na lbs",
+ "unit_aria_label_on": "Włącz opcję konwersji",
+ "unit_aria_label_off": "Włącz opcję konwersji",
+ "theme": "Wybierz rodza motywu.",
+ "theme_aria_label_on": "Włącz jasny motyw",
+ "theme_aria_label_off": "Włącz ciemny motyw",
+ "show_name": "Użyć imienia jako tytułu karty?",
+ "show_name_aria_label_on": "Włącz opcję imienia jako tytułu",
+ "show_name_aria_label_off": "Wyłącz opcję imienia jako tytułu",
+ "show_states": "Wyświetlić stan?",
+ "show_states_aria_label_on": "Włącz wyświetlanie stanu",
+ "show_states_aria_label_off": "Wyłącz wyświetlanie stanu",
+ "show_attributes": "Show personal master data (gora po prawej)?",
+ "show_attributes_aria_label_on": "Toggle display attributes on",
+ "show_attributes_aria_label_off": "Toggle display attributes off",
+ "show_toolbar": "Pokazać zaawansowane opcje?",
+ "show_toolbar_aria_label_on": "Włącz zaawansowane opcje",
+ "show_toolbar_aria_label_off": "Wyłącz zaawansowane opcje",
+ "show_body": "Offer further measurement details",
+ "show_body1": "(lower half - icon chevron down will show those)?",
+ "show_body_aria_label_on": "Toggle display body score on",
+ "show_body_aria_label_off": "Toggle display body score off",
+ "show_buttons": "Allow account switch?",
+ "show_buttons_aria_label_on": "Toggle display buttons on",
+ "show_buttons_aria_label_off": "Toggle display buttons off",
+ "code_information": "CHANGES WILL ONLY APPEAR AFTER THEY HAVE BEEN SAVED.",
+ "header_options": "1. Card header options",
+ "body_options": "2. More card options",
+ "warning": "UWAGA:",
+ "code_only_note": "Dodatkowe opcje dostępne są tylko poprzez edycje kodu."
+ }
+ }
\ No newline at end of file
diff --git a/src/localize/localize.ts b/src/localize/localize.ts
index c340d1a..f1fdf2d 100644
--- a/src/localize/localize.ts
+++ b/src/localize/localize.ts
@@ -5,6 +5,7 @@ import * as es from './languages/es.json';
import * as fr from './languages/fr.json';
import * as it from './languages/it.json';
import * as nl from './languages/nl.json';
+import * as pl from './languages/pl.json';
import * as pt from './languages/pt.json';
import * as pt_BR from './languages/pt-BR.json';
import * as ro from './languages/ro.json';
@@ -20,6 +21,7 @@ const languages: any = {
fr: fr,
it: it,
nl: nl,
+ pl: pl,
pt: pt,
pt_BR: pt_BR,
ro: ro,
diff --git a/tracker.json b/tracker.json
index 2674d50..1cba37f 100644
--- a/tracker.json
+++ b/tracker.json
@@ -1,7 +1,7 @@
{
"body-miscale-card": {
- "updated_at": "2022-07-24",
- "version": "v5.9.1",
+ "updated_at": "2022-08-15",
+ "version": "v5.9.2",
"remote_location": "https://raw.githubusercontent.com/dckiller51/lovelace-body-miscale-card/master/dist/body-miscale-card.js",
"visit_repo": "https://github.com/dckiller51/lovelace-body-miscale-card",
"changelog": "https://github.com/dckiller51/lovelace-body-miscale-card/blob/master/CHANGELOG.md"