Skip to content

Commit 110891f

Browse files
tomasz75tomasz75
authored andcommitted
Merge branch 'home-assistant-master' into beta
2 parents 6d038bb + 69fa457 commit 110891f

File tree

6 files changed

+25
-22
lines changed

6 files changed

+25
-22
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
setup(
44
name="ais-dom-frontend",
5-
version="20210804.0",
5+
version="20210809.0",
66
description="AIS dom frontend",
77
url="https://ai-speaker.com",
88
author="The Authors of the AI-Speaker.com project",

src/panels/config/cloud/account/cloud-remote-pref.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,11 @@ export class CloudRemotePref extends LitElement {
5656
<div class="connection-status">
5757
${this.hass.localize(
5858
`ui.panel.config.cloud.account.remote.${
59-
remote_connected ? "connected" : "not_connected"
59+
remote_connected
60+
? "connected"
61+
: remote_enabled
62+
? "connecting"
63+
: "not_connected"
6064
}`
6165
)}
6266
</div>

src/panels/lovelace/cards/energy/hui-energy-grid-neutrality-gauge-card.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ class HuiEnergyGridGaugeCard
123123
></ha-gauge>
124124
<div class="name">
125125
${returnedToGrid! >= consumedFromGrid!
126-
? "Returned to the grid"
127-
: "Consumed from the grid"}
126+
? "Netto returned to the grid"
127+
: "Netto consumed from the grid"}
128128
</div>`
129129
: "Grid neutrality could not be calculated"}
130130
</ha-card>

src/panels/lovelace/cards/energy/hui-energy-solar-graph-card.ts

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -276,38 +276,36 @@ export class HuiEnergySolarGraphCard
276276

277277
// Process solar forecast data.
278278
if (forecasts && source.config_entry_solar_forecast) {
279-
let forecastsData: Record<string, number> | undefined;
279+
const forecastsData: Record<string, number> | undefined = {};
280280
source.config_entry_solar_forecast.forEach((configEntryId) => {
281-
if (!forecastsData) {
282-
forecastsData = forecasts![configEntryId]?.wh_hours;
283-
return;
284-
}
285281
if (!forecasts![configEntryId]) {
286282
return;
287283
}
288284
Object.entries(forecasts![configEntryId].wh_hours).forEach(
289285
([date, value]) => {
290-
if (date in forecastsData!) {
291-
forecastsData![date] += value;
286+
const dateObj = new Date(date);
287+
if (
288+
dateObj < energyData.start ||
289+
(energyData.end && dateObj > energyData.end)
290+
) {
291+
return;
292+
}
293+
dateObj.setMinutes(0, 0, 0);
294+
const time = dateObj.getTime();
295+
if (time in forecastsData) {
296+
forecastsData[time] += value;
292297
} else {
293-
forecastsData![date] = value;
298+
forecastsData[time] = value;
294299
}
295300
}
296301
);
297302
});
298303

299304
if (forecastsData) {
300305
const solarForecastData: ScatterDataPoint[] = [];
301-
for (const [date, value] of Object.entries(forecastsData)) {
302-
const dateObj = new Date(date);
303-
if (
304-
dateObj < energyData.start ||
305-
(energyData.end && dateObj > energyData.end)
306-
) {
307-
continue;
308-
}
306+
for (const [time, value] of Object.entries(forecastsData)) {
309307
solarForecastData.push({
310-
x: dateObj.getTime(),
308+
x: Number(time),
311309
y: value / 1000,
312310
});
313311
}

src/panels/lovelace/cards/energy/hui-energy-usage-graph-card.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ export class HuiEnergyUsageGraphCard
355355
data.push({
356356
label:
357357
type === "used_solar"
358-
? "Solar"
358+
? "Consumed solar"
359359
: entity
360360
? computeStateName(entity)
361361
: statId,

src/translations/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1902,6 +1902,7 @@
19021902
"title": "Remote Control",
19031903
"connected": "Connected",
19041904
"not_connected": "Not Connected",
1905+
"reconnecting": "Reconnecting",
19051906
"access_is_being_prepared": "Remote control is being prepared. We will notify you when it's ready.",
19061907
"info": "Home Assistant Cloud provides a secure remote connection to your instance while away from home.",
19071908
"instance_is_available": "Your instance is available at",

0 commit comments

Comments
 (0)