mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-08 18:06:36 +00:00
commit
d3ce4af541
2
setup.py
2
setup.py
@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="home-assistant-frontend",
|
name="home-assistant-frontend",
|
||||||
version="20210804.0",
|
version="20210809.0",
|
||||||
description="The Home Assistant frontend",
|
description="The Home Assistant frontend",
|
||||||
url="https://github.com/home-assistant/frontend",
|
url="https://github.com/home-assistant/frontend",
|
||||||
author="The Home Assistant Authors",
|
author="The Home Assistant Authors",
|
||||||
|
@ -56,7 +56,11 @@ export class CloudRemotePref extends LitElement {
|
|||||||
<div class="connection-status">
|
<div class="connection-status">
|
||||||
${this.hass.localize(
|
${this.hass.localize(
|
||||||
`ui.panel.config.cloud.account.remote.${
|
`ui.panel.config.cloud.account.remote.${
|
||||||
remote_connected ? "connected" : "not_connected"
|
remote_connected
|
||||||
|
? "connected"
|
||||||
|
: remote_enabled
|
||||||
|
? "connecting"
|
||||||
|
: "not_connected"
|
||||||
}`
|
}`
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
@ -123,8 +123,8 @@ class HuiEnergyGridGaugeCard
|
|||||||
></ha-gauge>
|
></ha-gauge>
|
||||||
<div class="name">
|
<div class="name">
|
||||||
${returnedToGrid! >= consumedFromGrid!
|
${returnedToGrid! >= consumedFromGrid!
|
||||||
? "Returned to the grid"
|
? "Netto returned to the grid"
|
||||||
: "Consumed from the grid"}
|
: "Netto consumed from the grid"}
|
||||||
</div>`
|
</div>`
|
||||||
: "Grid neutrality could not be calculated"}
|
: "Grid neutrality could not be calculated"}
|
||||||
</ha-card>
|
</ha-card>
|
||||||
|
@ -276,21 +276,26 @@ export class HuiEnergySolarGraphCard
|
|||||||
|
|
||||||
// Process solar forecast data.
|
// Process solar forecast data.
|
||||||
if (forecasts && source.config_entry_solar_forecast) {
|
if (forecasts && source.config_entry_solar_forecast) {
|
||||||
let forecastsData: Record<string, number> | undefined;
|
const forecastsData: Record<string, number> | undefined = {};
|
||||||
source.config_entry_solar_forecast.forEach((configEntryId) => {
|
source.config_entry_solar_forecast.forEach((configEntryId) => {
|
||||||
if (!forecastsData) {
|
|
||||||
forecastsData = forecasts![configEntryId]?.wh_hours;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!forecasts![configEntryId]) {
|
if (!forecasts![configEntryId]) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Object.entries(forecasts![configEntryId].wh_hours).forEach(
|
Object.entries(forecasts![configEntryId].wh_hours).forEach(
|
||||||
([date, value]) => {
|
([date, value]) => {
|
||||||
if (date in forecastsData!) {
|
const dateObj = new Date(date);
|
||||||
forecastsData![date] += value;
|
if (
|
||||||
|
dateObj < energyData.start ||
|
||||||
|
(energyData.end && dateObj > energyData.end)
|
||||||
|
) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
dateObj.setMinutes(0, 0, 0);
|
||||||
|
const time = dateObj.getTime();
|
||||||
|
if (time in forecastsData) {
|
||||||
|
forecastsData[time] += value;
|
||||||
} else {
|
} else {
|
||||||
forecastsData![date] = value;
|
forecastsData[time] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@ -298,16 +303,9 @@ export class HuiEnergySolarGraphCard
|
|||||||
|
|
||||||
if (forecastsData) {
|
if (forecastsData) {
|
||||||
const solarForecastData: ScatterDataPoint[] = [];
|
const solarForecastData: ScatterDataPoint[] = [];
|
||||||
for (const [date, value] of Object.entries(forecastsData)) {
|
for (const [time, value] of Object.entries(forecastsData)) {
|
||||||
const dateObj = new Date(date);
|
|
||||||
if (
|
|
||||||
dateObj < energyData.start ||
|
|
||||||
(energyData.end && dateObj > energyData.end)
|
|
||||||
) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
solarForecastData.push({
|
solarForecastData.push({
|
||||||
x: dateObj.getTime(),
|
x: Number(time),
|
||||||
y: value / 1000,
|
y: value / 1000,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -355,7 +355,7 @@ export class HuiEnergyUsageGraphCard
|
|||||||
data.push({
|
data.push({
|
||||||
label:
|
label:
|
||||||
type === "used_solar"
|
type === "used_solar"
|
||||||
? "Solar"
|
? "Consumed solar"
|
||||||
: entity
|
: entity
|
||||||
? computeStateName(entity)
|
? computeStateName(entity)
|
||||||
: statId,
|
: statId,
|
||||||
|
@ -1902,6 +1902,7 @@
|
|||||||
"title": "Remote Control",
|
"title": "Remote Control",
|
||||||
"connected": "Connected",
|
"connected": "Connected",
|
||||||
"not_connected": "Not Connected",
|
"not_connected": "Not Connected",
|
||||||
|
"reconnecting": "Reconnecting",
|
||||||
"access_is_being_prepared": "Remote control is being prepared. We will notify you when it's ready.",
|
"access_is_being_prepared": "Remote control is being prepared. We will notify you when it's ready.",
|
||||||
"info": "Home Assistant Cloud provides a secure remote connection to your instance while away from home.",
|
"info": "Home Assistant Cloud provides a secure remote connection to your instance while away from home.",
|
||||||
"instance_is_available": "Your instance is available at",
|
"instance_is_available": "Your instance is available at",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user