diff --git a/README.md b/README.md index 1af02a3d..f669da1b 100644 --- a/README.md +++ b/README.md @@ -151,24 +151,23 @@ color in your Home Assistant theme. Some conditions will default to whatever the value is of some other condition. For example, `fog` will default to whatever `cloudy` is. -| Key | Default | -|-----------------------|------------------------| -| `clear-night` | `#111` | -| `cloudy` | `#777` | -| `fog` | same as `cloudy` | -| `hail` | `#2b5174` | -| `lightning` | same as `rainy` | -| `lightning-rainy` | same as `rainy` | -| `partlycloudy` | `#b3dbff` | -| `night-partly-cloudy` | `#333` | -| `pouring` | same as `rainy` | -| `rainy` | `#44739d` | -| `snowy` | `#fff` | -| `snowy-rainy` | same as `partlycloudy` | -| `sunny` | `#90cbff` | -| `windy` | same as `sunny` | -| `windy-variant` | same as `sunny` | -| `exceptional` | `#ff9d00` | +| Key | Default | +|-------------------|------------------------| +| `clear-night` | `#000` | +| `cloudy` | `#777` | +| `fog` | same as `cloudy` | +| `hail` | `#2b5174` | +| `lightning` | same as `rainy` | +| `lightning-rainy` | same as `rainy` | +| `partlycloudy` | `#b3dbff` | +| `pouring` | same as `rainy` | +| `rainy` | `#44739d` | +| `snowy` | `#fff` | +| `snowy-rainy` | same as `partlycloudy` | +| `sunny` | `#90cbff` | +| `windy` | same as `sunny` | +| `windy-variant` | same as `sunny` | +| `exceptional` | `#ff9d00` | ### Sample colors configuration diff --git a/cypress/e2e/weather-bar.cy.ts b/cypress/e2e/weather-bar.cy.ts index 2b2f566b..3909d2c9 100644 --- a/cypress/e2e/weather-bar.cy.ts +++ b/cypress/e2e/weather-bar.cy.ts @@ -23,16 +23,15 @@ describe('Weather bar', () => { .find('div.axes') .should('exist'); }); - it('has the correct number of condition blocks', () => { + it('has the current number of condition blocks', () => { cy.get('weather-bar') .shadow() .find('div.bar > div') - .should('have.length', 5); + .should('have.length', 4); }); const expectedConditions = [ 'Cloudy', 'Partly cloudy', - 'Partly cloudy (night)', 'Sunny', 'Clear' ]; @@ -49,15 +48,13 @@ describe('Weather bar', () => { const expectedWidths = [ 6, - 2, - 4, + 6, 10, 2 ]; const expectedColors = [ 'rgb(119, 119, 119)', 'rgb(179, 219, 255)', - 'rgb(51, 51, 51)', 'rgb(144, 203, 255)', 'rgb(17, 17, 17)' ]; @@ -80,9 +77,8 @@ describe('Weather bar', () => { const expectedCustomColors = [ 'rgb(255, 0, 0)', 'rgb(0, 255, 0)', - 'rgb(0, 255, 255)', 'rgb(0, 0, 255)', - 'rgb(34, 34, 34)' + 'rgb(0, 255, 255)' ]; it('uses custom colors when specified', () => { @@ -91,8 +87,7 @@ describe('Weather bar', () => { cloudy: '#FF0000', partlycloudy: 'rgb(0, 255, 0)', sunny: 'hsl(240, 100%, 50%)', - "night-partly-cloudy": 'cyan', - "clear-night": '#222', + "clear-night": 'cyan' } }); cy.get('weather-bar') @@ -107,9 +102,8 @@ describe('Weather bar', () => { const expectedCustomObjectColors = [ { bg: 'rgb(18, 52, 86)', fg: 'rgb(0, 0, 0)' }, { bg: 'rgb(179, 219, 255)', fg: 'rgb(123, 45, 6)' }, - { bg: 'rgb(50, 205, 50)', fg: 'rgb(0, 0, 0)' }, { bg: 'rgb(0, 255, 0)', fg: 'rgb(255, 0, 255)' }, - { bg: 'rgb(34, 34, 34)', fg: 'rgb(255, 255, 255)' } + { bg: 'rgb(50, 205, 50)', fg: 'rgb(0, 0, 0)' } ]; it('uses custom colors when specified as color objects', () => { @@ -125,11 +119,7 @@ describe('Weather bar', () => { background: 'hsl(120, 100%, 50%)', foreground: 'magenta' }, - "night-partly-cloudy": 'limegreen', - "clear-night": { - background: '#222', - foreground: 'white' - } + "clear-night": 'limegreen' } }); cy.get('weather-bar') @@ -146,7 +136,7 @@ describe('Weather bar', () => { cy.get('weather-bar') .shadow() .find('div.bar > div > span.condition-label') - .should('have.length', 5) + .should('have.length', 4) .each((el, i) => { cy.wrap(el).should('have.text', expectedConditions[i]); }); @@ -166,7 +156,7 @@ describe('Weather bar', () => { cy.get('weather-bar') .shadow() .find('div.bar > div') - .its(3) + .its(2) .find('span.condition-label') .should(label => { const cs = window.getComputedStyle(label.get(0)); @@ -184,7 +174,6 @@ describe('Weather bar', () => { const expectedIcons = [ 'mdi:weather-cloudy', 'mdi:weather-partly-cloudy', - 'mdi:weather-night-partly-cloudy', 'mdi:weather-sunny', 'mdi:weather-night' ]; @@ -193,7 +182,7 @@ describe('Weather bar', () => { cy.get('weather-bar') .shadow() .find('div.bar > div > span.condition-icon') - .should('have.length', 5) + .should('have.length', 4) .find('ha-icon') .each((el, i) => { cy.wrap(el).invoke('attr', 'icon') @@ -205,7 +194,7 @@ describe('Weather bar', () => { cy.get('weather-bar') .shadow() .find('div.bar > div') - .its(1) + .its(3) .find('span.condition-icon') .should(icon => { const cs = window.getComputedStyle(icon.get(0)); diff --git a/cypress/fixtures/harness.html b/cypress/fixtures/harness.html index 891812ed..65d1d023 100644 --- a/cypress/fixtures/harness.html +++ b/cypress/fixtures/harness.html @@ -50,10 +50,6 @@ } }, }, - config: { - latitude: 51.48346270, - longitude: 0.05862020, - }, states: { 'weather.mock': { attributes: { diff --git a/package-lock.json b/package-lock.json index 3ff891cb..baf0c4a4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,7 +22,6 @@ "home-assistant-js-websocket": "^9.3.0", "is-valid-css-color": "^2.0.3", "lit": "^3.1.4", - "solar-calculator": "^0.3.0", "tippy.js": "^6.3.7" }, "devDependencies": { @@ -2839,12 +2838,12 @@ } }, "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "dev": true, "dependencies": { - "fill-range": "^7.1.1" + "fill-range": "^7.0.1" }, "engines": { "node": ">=8" @@ -4497,9 +4496,9 @@ } }, "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "dev": true, "dependencies": { "to-regex-range": "^5.0.1" @@ -4590,9 +4589,9 @@ } }, "node_modules/foreground-child": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.0.tgz", - "integrity": "sha512-CrWQNaEl1/6WeZoarcM9LHupTo3RpZO2Pdk1vktwzPiQTsJnAKJmm3TACKeG5UZbWDfaH2AbvYxzP96y0MT7fA==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.1.tgz", + "integrity": "sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==", "dev": true, "dependencies": { "cross-spawn": "^7.0.0", @@ -7515,11 +7514,6 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "node_modules/solar-calculator": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/solar-calculator/-/solar-calculator-0.3.0.tgz", - "integrity": "sha512-FCtJPJ8ElgSBjeLnbmFcWGhhaS0QmxtbJ4x6PLlz5X8crOJjtfIWci/YxoVtQNyCvs/g1RgGBgr06p4jrdOHBw==" - }, "node_modules/source-map": { "version": "0.7.4", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", diff --git a/package.json b/package.json index 1c71dde9..cdadc2be 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,6 @@ "home-assistant-js-websocket": "^9.3.0", "is-valid-css-color": "^2.0.3", "lit": "^3.1.4", - "solar-calculator": "^0.3.0", "tippy.js": "^6.3.7" }, "devDependencies": { diff --git a/src/conditions.ts b/src/conditions.ts index fd2c2d1e..66f232e5 100644 --- a/src/conditions.ts +++ b/src/conditions.ts @@ -6,7 +6,6 @@ export const LABELS = { 'lightning': 'conditions.thunderstorm', 'lightning-rainy': 'conditions.thunderstorm', 'partlycloudy': 'conditions.partlyCloudy', - 'night-partly-cloudy': 'conditions.partlyCloudyNight', 'pouring': 'conditions.heavyRain', 'rainy': 'conditions.rain', 'snowy': 'conditions.snow', @@ -23,7 +22,6 @@ export const ICONS = { 'hail': 'hail', 'lightning': 'lightning', 'lightning-rainy': 'lightning-rainy', - 'night-partly-cloudy': 'weather-night-partly-cloudy', 'partlycloudy': 'weather-partly-cloudy', 'pouring': 'pouring', 'rainy': 'rainy', diff --git a/src/hourly-weather.ts b/src/hourly-weather.ts index 88733f04..a1a6a041 100644 --- a/src/hourly-weather.ts +++ b/src/hourly-weather.ts @@ -16,7 +16,6 @@ import { formatDateShort, } from 'custom-card-helpers'; // This is a community maintained npm module with common helper functions/types. https://github.com/custom-cards/custom-card-helpers import { isValidColorName, isValidHSL, isValidRGB } from 'is-valid-css-color'; -import { rise as sunrise, set as sunset } from 'solar-calculator'; import type { ColorConfig, @@ -414,11 +413,11 @@ export class HourlyWeatherCard extends LitElement { } private getConditionListFromForecast(forecast: ForecastSegment[], numSegments: number, offset: number): ConditionSpan[] { - let lastCond: string = this.getAdjustedConditionForForecastSegment(forecast[offset]); + let lastCond: string = forecast[offset].condition; let j = 0; const res: ConditionSpan[] = [[lastCond, 1]]; for (let i = offset + 1; i < numSegments + offset; i++) { - const cond: string = this.getAdjustedConditionForForecastSegment(forecast[i]); + const cond: string = forecast[i].condition; if (cond === lastCond) { res[j][1]++; } else { @@ -430,20 +429,6 @@ export class HourlyWeatherCard extends LitElement { return res; } - private getAdjustedConditionForForecastSegment(fs: ForecastSegment): string { - const when = new Date(fs.datetime); - const { latitude, longitude } = this.hass.config; - const noonUTCOnDay = new Date(when.toLocaleDateString()); - noonUTCOnDay.setUTCHours(12, 0, 0, 0); - const rise = sunrise(noonUTCOnDay, latitude, longitude); - const set = sunset(noonUTCOnDay, latitude, longitude); - const isDay = when >= rise && when <= set; - if (!isDay && fs.condition === 'partlycloudy') { - return 'night-partly-cloudy'; - } - return fs.condition; - } - private getTemperatures(forecast: ForecastSegment[], numSegments: number, offset: number): SegmentTemperature[] { const temperatures: SegmentTemperature[] = []; for (let i = offset; i < numSegments + offset; i++) { diff --git a/src/localize/languages/cs.json b/src/localize/languages/cs.json index 8c5d42ee..63b3191d 100644 --- a/src/localize/languages/cs.json +++ b/src/localize/languages/cs.json @@ -1,78 +1,78 @@ { - "common": { - "version": "Verze", - "title": "Hodinnová předpověď", - "title_card": "Karta Hodinnová předpověď", - "description": "Karta zobrazující hodinovou předpověď v řádku.", - "invalid_configuration": "Neplatná konfigurace" - }, - "editor": { - "entity": "Entita (Povinné)", - "name": "Název (Nepovinné)", - "segments_to_show": "Počet dílků předpovědi k vykreslení (Nepovinné)", - "offset": "Počet dílků, které se přeskočí před začátkem (Nepovinné)", - "icons": "Zobrazit ikony namísto textových popisků", - "label_spacing": "Po kolika dílcích se vykreslí čas a teplota (Nepovinné)", - "show_wind": "Zobrazit rychlost a směr větru", - "show_date": "Zobrazit datumy", - "show_precipitation_amounts": "Zobrazit množství srážek", - "show_precipitation_probability": "Zobrazit pravdědpodobnost srážek", - "none": "Žádné", - "speed_and_direction": "Rychlost a směr", - "speed_only": "Jen rychlost", - "direction_only": "Jen směr", - "barb": "Jako šipku větru", - "barb_and_speed": "Jako šipku větru a rychlost", - "barb_and_direction": "Jako šipku větru a směr", - "barb_speed_and_direction": "Jako šipku větru, rychlost a směr", - "all": "Všechny", - "on_day_boundaries": "Při změně dne" - }, - "errors": { - "missing_entity": "Hodnota 'entity' nebyla zadána", - "too_many_segments_requested": "Je nastaveno příliš mnoho dílků předpovědi v 'num_segments'. Hodnota musí být <= počtu hodnot v zadané entitě.", - "must_be_int": "Hodnota musí být kladné sudé celé číslo", - "invalid_colors": "Následující hodnoty v konfiguraci jsou neplatné:", - "must_be_positive_int": "Hodnota musí být kladné celé číslo", - "offset_must_be_positive_int": "Hodnota 'offset' musí být kladné celé číslo", - "forecast_not_available": "Předpověď není dostupná", - "check_entity": "Zkontrolujte zadanou entity předpovědi.", - "no_wind_barbs_with_string_bearing": "Šipky větru nejsou podporovány, pokud entita počasí používá světové směry pro směr větru." - }, - "conditions": { - "clear": "Jasno", - "cloudy": "Oblačno", - "fog": "Mlha", - "hail": "Kroupy", - "thunderstorm": "Bouřka", - "partlyCloudy": "Polojasno", - "heavyRain": "Silný déšť", - "rain": "Déšť", - "snow": "Sníh", - "mixedPrecip": "Smíšené srážky", - "sunny": "Slunečno", - "windy": "Větrno", - "partlyCloudyNight": "Částečně oblačno (noc)" - }, - "direction": { - "n": "S", - "nne": "SSV", - "ne": "SV", - "ene": "VSV", - "e": "V", - "ese": "VJV", - "se": "JV", - "sse": "JJV", - "s": "J", - "ssw": "JJZ", - "sw": "JZ", - "wsw": "ZJZ", - "w": "Z", - "wnw": "ZSZ", - "nw": "SZ", - "nnw": "SSZ" - }, - "card": { - "chance_of_precipitation": "{0}% šance srážek" + "common": { + "version": "Verze", + "title": "Hodinnová předpověď", + "title_card": "Karta Hodinnová předpověď", + "description": "Karta zobrazující hodinovou předpověď v řádku.", + "invalid_configuration": "Neplatná konfigurace" + }, + "editor": { + "entity": "Entita (Povinné)", + "name": "Název (Nepovinné)", + "segments_to_show": "Počet dílků předpovědi k vykreslení (Nepovinné)", + "offset": "Počet dílků, které se přeskočí před začátkem (Nepovinné)", + "icons": "Zobrazit ikony namísto textových popisků", + "label_spacing": "Po kolika dílcích se vykreslí čas a teplota (Nepovinné)", + "show_wind": "Zobrazit rychlost a směr větru", + "show_date": "Zobrazit datumy", + "show_precipitation_amounts": "Zobrazit množství srážek", + "show_precipitation_probability": "Zobrazit pravdědpodobnost srážek", + "none": "Žádné", + "speed_and_direction": "Rychlost a směr", + "speed_only": "Jen rychlost", + "direction_only": "Jen směr", + "barb": "Jako šipku větru", + "barb_and_speed": "Jako šipku větru a rychlost", + "barb_and_direction": "Jako šipku větru a směr", + "barb_speed_and_direction": "Jako šipku větru, rychlost a směr", + "all": "Všechny", + "on_day_boundaries": "Při změně dne" + }, + "errors": { + "missing_entity": "Hodnota 'entity' nebyla zadána", + "too_many_segments_requested": "Je nastaveno příliš mnoho dílků předpovědi v 'num_segments'. Hodnota musí být <= počtu hodnot v zadané entitě.", + "must_be_int": "Hodnota musí být kladné sudé celé číslo", + "invalid_colors": "Následující hodnoty v konfiguraci jsou neplatné:", + "must_be_positive_int": "Hodnota musí být kladné celé číslo", + "offset_must_be_positive_int": "Hodnota 'offset' musí být kladné celé číslo", + "forecast_not_available": "Předpověď není dostupná", + "check_entity": "Zkontrolujte zadanou entity předpovědi.", + "no_wind_barbs_with_string_bearing": "Šipky větru nejsou podporovány, pokud entita počasí používá světové směry pro směr větru." + }, + "conditions": { + "clear": "Jasno", + "cloudy": "Oblačno", + "fog": "Mlha", + "hail": "Kroupy", + "thunderstorm": "Bouřka", + "partlyCloudy": "Polojasno", + "heavyRain": "Silný déšť", + "rain": "Déšť", + "snow": "Sníh", + "mixedPrecip": "Smíšené srážky", + "sunny": "Slunečno", + "windy": "Větrno" + }, + "direction": { + "n": "S", + "nne": "SSV", + "ne": "SV", + "ene": "VSV", + "e": "V", + "ese": "VJV", + "se": "JV", + "sse": "JJV", + "s": "J", + "ssw": "JJZ", + "sw": "JZ", + "wsw": "ZJZ", + "w": "Z", + "wnw": "ZSZ", + "nw": "SZ", + "nnw": "SSZ" + }, + "card": { + "chance_of_precipitation": "{0}% šance srážek" + } } -} \ No newline at end of file + \ No newline at end of file diff --git a/src/localize/languages/da.json b/src/localize/languages/da.json index ed2a4bff..f1122bfb 100644 --- a/src/localize/languages/da.json +++ b/src/localize/languages/da.json @@ -51,8 +51,7 @@ "snow": "Sne", "mixedPrecip": "Blandet nedbør", "sunny": "Sol", - "windy": "Blæsende", - "partlyCloudyNight": "Delvist overskyet (nat)" + "windy": "Blæsende" }, "direction": { "n": "N", diff --git a/src/localize/languages/de.json b/src/localize/languages/de.json index 862e2bf3..3d2923a5 100644 --- a/src/localize/languages/de.json +++ b/src/localize/languages/de.json @@ -51,8 +51,7 @@ "snow": "Schnee", "mixedPrecip": "Gemischter Niederschlag", "sunny": "Sonnig", - "windy": "Windig", - "partlyCloudyNight": "Teilweise bewölkt (Nacht)" + "windy": "Windig" }, "direction": { "n": "N", diff --git a/src/localize/languages/en.json b/src/localize/languages/en.json index e189df6c..887c4186 100644 --- a/src/localize/languages/en.json +++ b/src/localize/languages/en.json @@ -46,7 +46,6 @@ "hail": "Hail", "thunderstorm": "Thunderstorm", "partlyCloudy": "Partly cloudy", - "partlyCloudyNight": "Partly cloudy (night)", "heavyRain": "Heavy rain", "rain": "Rain", "snow": "Snow", diff --git a/src/localize/languages/es.json b/src/localize/languages/es.json index 5576678c..39d8a842 100644 --- a/src/localize/languages/es.json +++ b/src/localize/languages/es.json @@ -51,8 +51,7 @@ "snow": "Nieve", "mixedPrecip": "Chaparrones dispersos", "sunny": "Soleado", - "windy": "Ventoso", - "partlyCloudyNight": "Parcialmente nublado (noche)" + "windy": "Ventoso" }, "direction": { "n": "N", diff --git a/src/localize/languages/fr.json b/src/localize/languages/fr.json index 62eaee0a..4675fa9c 100644 --- a/src/localize/languages/fr.json +++ b/src/localize/languages/fr.json @@ -51,8 +51,7 @@ "snow": "Neige", "mixedPrecip": "Neigeux, pluvieux", "sunny": "Ensoleillé", - "windy": "Venteux", - "partlyCloudyNight": "Partiellement nuageux (nuit)" + "windy": "Venteux" }, "direction": { "n": "N", diff --git a/src/localize/languages/hu.json b/src/localize/languages/hu.json index d1fe2344..ea827e31 100644 --- a/src/localize/languages/hu.json +++ b/src/localize/languages/hu.json @@ -51,8 +51,7 @@ "snow": "Havazás", "mixedPrecip": "Havas eső", "sunny": "Napos", - "windy": "Szeles", - "partlyCloudyNight": "Részben felhős (éjszaka)" + "windy": "Szeles" }, "direction": { "n": "É", diff --git a/src/localize/languages/it.json b/src/localize/languages/it.json index 3267fd29..fa3b3b8d 100644 --- a/src/localize/languages/it.json +++ b/src/localize/languages/it.json @@ -51,8 +51,7 @@ "snow": "Neve", "mixedPrecip": "Precipitazioni Miste", "sunny": "Soleggiato", - "windy": "Ventoso", - "partlyCloudyNight": "Parzialmente nuvoloso (notte)" + "windy": "Ventoso" }, "direction": { "n": "N", diff --git a/src/localize/languages/nb.json b/src/localize/languages/nb.json index 2a7b0f61..2cbc4a23 100644 --- a/src/localize/languages/nb.json +++ b/src/localize/languages/nb.json @@ -51,8 +51,7 @@ "snow": "Snø", "mixedPrecip": "Blandet nedbør", "sunny": "Solfylt", - "windy": "Vindfullt", - "partlyCloudyNight": "Delvis skyet (natt)" + "windy": "Vindfullt" }, "direction": { "n": "N", diff --git a/src/localize/languages/nl.json b/src/localize/languages/nl.json index 33f2d9a9..f37e6535 100644 --- a/src/localize/languages/nl.json +++ b/src/localize/languages/nl.json @@ -51,8 +51,7 @@ "snow": "Sneeuw", "mixedPrecip": "Gemengde neerslag", "sunny": "Zonnig", - "windy": "Winderig", - "partlyCloudyNight": "Gedeeltelijk bewolkt (nacht)" + "windy": "Winderig" }, "direction": { "n": "N", diff --git a/src/localize/languages/nn-NO.json b/src/localize/languages/nn-NO.json index e8c9df44..b2a8d75b 100644 --- a/src/localize/languages/nn-NO.json +++ b/src/localize/languages/nn-NO.json @@ -53,8 +53,7 @@ "snow": "Snø", "mixedPrecip": "Blanda nedbør", "sunny": "Sol", - "windy": "Vindfullt", - "partlyCloudyNight": "Delvis skyet (natt)" + "windy": "Vindfullt" }, "direction": { "n": "N", diff --git a/src/localize/languages/pl.json b/src/localize/languages/pl.json index 12f03e1b..b036d8e4 100644 --- a/src/localize/languages/pl.json +++ b/src/localize/languages/pl.json @@ -51,8 +51,7 @@ "snow": "Śnieg", "mixedPrecip": "Mieszane opady", "sunny": "Słonecznie", - "windy": "Wietrznie", - "partlyCloudyNight": "Częściowe zachmurzenie (noc)" + "windy": "Wietrznie" }, "direction": { "n": "P", diff --git a/src/localize/languages/pt-BR.json b/src/localize/languages/pt-BR.json index 54ca8f8f..3beadd5b 100644 --- a/src/localize/languages/pt-BR.json +++ b/src/localize/languages/pt-BR.json @@ -53,8 +53,7 @@ "snow": "Neve", "mixedPrecip": "Precipitação mista", "sunny": "Ensolarado", - "windy": "Ventania", - "partlyCloudyNight": "Parcialmente nublado (noite)" + "windy": "Ventania" }, "direction": { "n": "N", diff --git a/src/localize/languages/pt.json b/src/localize/languages/pt.json index 73b98c04..5dd710fc 100644 --- a/src/localize/languages/pt.json +++ b/src/localize/languages/pt.json @@ -51,8 +51,7 @@ "snow": "Neve", "mixedPrecip": "Precipitação mista", "sunny": "Sol", - "windy": "Vento", - "partlyCloudyNight": "Parcialmente nublado (noite)" + "windy": "Vento" }, "direction": { "n": "N", diff --git a/src/localize/languages/ru.json b/src/localize/languages/ru.json index 78ee9aea..547cfc17 100644 --- a/src/localize/languages/ru.json +++ b/src/localize/languages/ru.json @@ -51,8 +51,7 @@ "snow": "Снег", "mixedPrecip": "Смешанные осадки", "sunny": "Солнечно", - "windy": "Ветрено", - "partlyCloudyNight": "Небольшая облачность (ночь)" + "windy": "Ветрено" }, "direction": { "n": "С", @@ -75,4 +74,4 @@ "card": { "chance_of_precipitation": "Вероятность осадков: {0}%" } -} \ No newline at end of file +} diff --git a/src/localize/languages/sk.json b/src/localize/languages/sk.json index f7b3c250..5ba60827 100644 --- a/src/localize/languages/sk.json +++ b/src/localize/languages/sk.json @@ -51,8 +51,7 @@ "snow": "Sneh", "mixedPrecip": "Zmiešené", "sunny": "Slnečno", - "windy": "Veterno", - "partlyCloudyNight": "Čiastočne oblačno (noc)" + "windy": "Veterno" }, "direction": { "n": "S", diff --git a/src/localize/languages/zh.json b/src/localize/languages/zh.json index e70cd274..ec0c28a9 100644 --- a/src/localize/languages/zh.json +++ b/src/localize/languages/zh.json @@ -51,8 +51,7 @@ "snow": "雪", "mixedPrecip": "雨夹雪", "sunny": "晴天", - "windy": "有风", - "partlyCloudyNight": "部分多云(夜间)" + "windy": "有风" }, "direction": { "n": "北", diff --git a/src/solar-calculator.d.ts b/src/solar-calculator.d.ts deleted file mode 100644 index addd84fc..00000000 --- a/src/solar-calculator.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -declare module 'solar-calculator' { - export function rise(date: Date, latitude: number, longitude: number): Date; - export function set(date: Date, latitude: number, longitude: number): Date; -} diff --git a/src/types.ts b/src/types.ts index 39129106..5b6ace36 100644 --- a/src/types.ts +++ b/src/types.ts @@ -52,7 +52,6 @@ export interface ColorConfig { 'lightning'?: ColorDefinition; 'lightning-rainy'?: ColorDefinition; 'partlycloudy'?: ColorDefinition; - 'night-partly-cloudy'?: ColorDefinition; 'pouring'?: ColorDefinition; 'rainy'?: ColorDefinition; 'snowy'?: ColorDefinition; diff --git a/src/weather-bar.ts b/src/weather-bar.ts index ae1ab6ee..f1959b49 100644 --- a/src/weather-bar.ts +++ b/src/weather-bar.ts @@ -198,13 +198,12 @@ export class WeatherBar extends LitElement { static styles = [unsafeCSS(tippyStyles), css` .main { --color-clear-night: #111; - --color-cloudy: #777; + --color-cloudy: #777777; --color-fog: var(--color-cloudy); --color-hail: #2b5174; --color-lightning: var(--color-rainy); --color-lightning-rainy: var(--color-rainy); --color-partlycloudy: #b3dbff; - --color-night-partly-cloudy: #333; --color-pouring: var(--color-rainy); --color-rainy: #44739d; --color-snowy: white; @@ -277,10 +276,6 @@ export class WeatherBar extends LitElement { background-color: var(--color-partlycloudy); color: var(--color-partlycloudy-foreground, var(--primary-text-color)); } - .night-partly-cloudy { - background-color: var(--color-night-partly-cloudy); - color: var(--color-night-partly-cloudy-foreground, var(--primary-text-color)); - } .pouring { background-color: var(--color-pouring); color: var(--color-pouring-foreground, var(--primary-text-color));