+
+
+
+
+
+
+
${stateObj.state}
+
${this._config.name ? html` ${this._config.name}` : html`${this.hass.config.location_name}`}
+
+
+
${this.getUnit("temperature") == "°F"
? Math.round(stateObj.attributes.temperature)
- : stateObj.attributes.temperature}
- ${this.getUnit("temperature")}
-
+ : stateObj.attributes.temperature} ${this.getUnit("temperature")}
+ ${this._config.feels_like ? html `
Feels like ${apparent_temperature.state} ${this.getUnit("temperature")}
`: ""}
+
+
`;
}
- renderDetails(stateObj, lang) {
+ renderDetails(stateObj) {
const sun = this.hass.states["sun.sun"];
let next_rising;
let next_setting;
if (sun) {
- next_rising = new Date(sun.attributes.next_rising).toLocaleTimeString(lang, {
- hour: "2-digit",
- minute: "2-digit",
- });
- next_setting = new Date(sun.attributes.next_setting).toLocaleTimeString(lang, {
- hour: "2-digit",
- minute: "2-digit",
- });
+ next_rising = new Date(sun.attributes.next_rising);
+ next_setting = new Date(sun.attributes.next_setting);
}
this.numberElements++;
@@ -233,7 +231,7 @@ class WeatherCard extends LitElement {
? html`
@@ -379,7 +379,15 @@ class WeatherCard extends LitElement {
position: absolute;
left: 3em;
font-weight: 300;
- font-size: 3em;
+ font-size: 2em;
+ color: var(--primary-text-color);
+ }
+
+ .subtitle {
+ position: absolute;
+ left: 3em;
+ font-weight: 300;
+ font-size: 1em;
color: var(--primary-text-color);
}
@@ -390,7 +398,16 @@ class WeatherCard extends LitElement {
position: absolute;
right: 1em;
}
-
+
+ .tempf {
+ font-weight: 300;
+ font-size: 1em;
+ color: var(--primary-text-color);
+ position: absolute;
+ right: 3.5em;
+ top: 7em;
+ }
+
.tempc {
font-weight: 300;
font-size: 1.5em;
@@ -401,6 +418,85 @@ class WeatherCard extends LitElement {
margin-top: -14px;
margin-right: 7px;
}
+
+ .tempfc {
+ font-weight: 300;
+ font-size: 1em;
+ vertical-align: super;
+ color: var(--primary-text-color);
+ position: absolute;
+ right: 2.15em;
+ top: 7em;
+ }
+
+ .content {
+ display: flex;
+ flex-wrap: nowrap;
+ justify-content: space-between;
+ align-items: center;
+ margin-bottom: 1.5em;
+ margin-top: 0.75em;
+ }
+
+ .icon-image {
+ display: flex;
+ align-items: center;
+ min-width: 90px; /* 64px default */
+ /* margin-right: 16px; */
+ }
+
+ .info {
+ display: flex;
+ justify-content: space-between;
+ flex-grow: 1;
+ overflow: hidden;
+ }
+
+ .name-state {
+ overflow: hidden;
+ padding-right: 12px;
+ width: 100%;
+ }
+
+ .temp-attribute {
+ text-align: right;
+ }
+ .temp-attribute .attribute {
+ right: 2em;
+ position: relative;
+ }
+
+ .name, .state {
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+
+ .state, .temp-attribute .temp {
+ font-size: 28px;
+ line-height: 1.2;
+ text-transform: capitalize;
+ }
+
+ .name, .attribute {
+ font-size: 14px;
+ line-height: 1;
+ }
+
+ .temp-attribute .temp {
+ position: relative;
+ /* margin-right: 24px; */
+ }
+
+ .name, .attribute {
+ font-size: 14px;
+ line-height: 1;
+ }
+ .temp-attribute .temp span {
+ position: absolute;
+ font-size: 24px;
+ top: 1px;
+ }
@media (max-width: 460px) {
.title {
@@ -416,7 +512,7 @@ class WeatherCard extends LitElement {
}
.current {
- padding: 1.2em 0;
+ padding: 2em 0;
margin-bottom: 3.5em;
}
@@ -499,9 +595,9 @@ class WeatherCard extends LitElement {
}
.icon.bigger {
- width: 10em;
- height: 10em;
- margin-top: -4em;
+ width: 8em;
+ height: 8em;
+ /* margin-top: -2em; */
position: absolute;
left: 0em;
}