mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-21 16:26:43 +00:00
commit
316fed953a
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="20190618.0",
|
version="20190619.0",
|
||||||
description="The Home Assistant frontend",
|
description="The Home Assistant frontend",
|
||||||
url="https://github.com/home-assistant/home-assistant-polymer",
|
url="https://github.com/home-assistant/home-assistant-polymer",
|
||||||
author="The Home Assistant Authors",
|
author="The Home Assistant Authors",
|
||||||
|
@ -216,9 +216,11 @@ class HaWeatherCard extends LocalizeMixin(EventsMixin(PolymerElement)) {
|
|||||||
></ha-icon>
|
></ha-icon>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<div class="temp">
|
<template is="dom-if" if="[[_showValue(item.temperature)]]">
|
||||||
[[item.temperature]] [[getUnit('temperature')]]
|
<div class="temp">
|
||||||
</div>
|
[[item.temperature]] [[getUnit('temperature')]]
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
<template is="dom-if" if="[[_showValue(item.templow)]]">
|
<template is="dom-if" if="[[_showValue(item.templow)]]">
|
||||||
<div class="templow">
|
<div class="templow">
|
||||||
[[item.templow]] [[getUnit('temperature')]]
|
[[item.templow]] [[getUnit('temperature')]]
|
||||||
|
@ -42,6 +42,7 @@ const fixedIcons = {
|
|||||||
updater: "hass:cloud-upload",
|
updater: "hass:cloud-upload",
|
||||||
vacuum: "hass:robot-vacuum",
|
vacuum: "hass:robot-vacuum",
|
||||||
water_heater: "hass:thermometer",
|
water_heater: "hass:thermometer",
|
||||||
|
weather: "hass:weather-cloudy",
|
||||||
weblink: "hass:open-in-new",
|
weblink: "hass:open-in-new",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -8,3 +8,6 @@ export interface AlexaEntity {
|
|||||||
|
|
||||||
export const fetchCloudAlexaEntities = (hass: HomeAssistant) =>
|
export const fetchCloudAlexaEntities = (hass: HomeAssistant) =>
|
||||||
hass.callWS<AlexaEntity[]>({ type: "cloud/alexa/entities" });
|
hass.callWS<AlexaEntity[]>({ type: "cloud/alexa/entities" });
|
||||||
|
|
||||||
|
export const syncCloudAlexaEntities = (hass: HomeAssistant) =>
|
||||||
|
hass.callWS({ type: "cloud/alexa/sync" });
|
||||||
|
@ -151,7 +151,10 @@ class OnboardingIntegrations extends LitElement {
|
|||||||
getConfigEntries(this.hass!),
|
getConfigEntries(this.hass!),
|
||||||
]);
|
]);
|
||||||
this._discovered = discovered;
|
this._discovered = discovered;
|
||||||
this._entries = entries;
|
// We filter out the config entry for the local weather.
|
||||||
|
// It is one that we create automatically and it will confuse the user
|
||||||
|
// if it starts showing up during onboarding.
|
||||||
|
this._entries = entries.filter((entry) => entry.domain !== "met");
|
||||||
}
|
}
|
||||||
|
|
||||||
private async _finish() {
|
private async _finish() {
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import {
|
import {
|
||||||
html,
|
html,
|
||||||
LitElement,
|
LitElement,
|
||||||
PropertyDeclarations,
|
|
||||||
TemplateResult,
|
TemplateResult,
|
||||||
CSSResult,
|
CSSResult,
|
||||||
css,
|
css,
|
||||||
|
property,
|
||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
import "@material/mwc-button";
|
import "@material/mwc-button";
|
||||||
import "@polymer/paper-toggle-button/paper-toggle-button";
|
import "@polymer/paper-toggle-button/paper-toggle-button";
|
||||||
@ -16,17 +16,12 @@ import "../../../../components/ha-card";
|
|||||||
import { fireEvent } from "../../../../common/dom/fire_event";
|
import { fireEvent } from "../../../../common/dom/fire_event";
|
||||||
import { HomeAssistant } from "../../../../types";
|
import { HomeAssistant } from "../../../../types";
|
||||||
import { CloudStatusLoggedIn, updateCloudPref } from "../../../../data/cloud";
|
import { CloudStatusLoggedIn, updateCloudPref } from "../../../../data/cloud";
|
||||||
|
import { syncCloudAlexaEntities } from "../../../../data/alexa";
|
||||||
|
|
||||||
export class CloudAlexaPref extends LitElement {
|
export class CloudAlexaPref extends LitElement {
|
||||||
public hass?: HomeAssistant;
|
@property() public hass?: HomeAssistant;
|
||||||
public cloudStatus?: CloudStatusLoggedIn;
|
@property() public cloudStatus?: CloudStatusLoggedIn;
|
||||||
|
@property() private _syncing = false;
|
||||||
static get properties(): PropertyDeclarations {
|
|
||||||
return {
|
|
||||||
hass: {},
|
|
||||||
cloudStatus: {},
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
protected render(): TemplateResult | void {
|
protected render(): TemplateResult | void {
|
||||||
if (!this.cloudStatus) {
|
if (!this.cloudStatus) {
|
||||||
@ -79,6 +74,9 @@ export class CloudAlexaPref extends LitElement {
|
|||||||
: ""}
|
: ""}
|
||||||
</div>
|
</div>
|
||||||
<div class="card-actions">
|
<div class="card-actions">
|
||||||
|
<mwc-button @click=${this._handleSync} .disabled=${this._syncing}>
|
||||||
|
Sync Entities
|
||||||
|
</mwc-button>
|
||||||
<div class="spacer"></div>
|
<div class="spacer"></div>
|
||||||
<a href="/config/cloud/alexa">
|
<a href="/config/cloud/alexa">
|
||||||
<mwc-button>Manage Entities</mwc-button>
|
<mwc-button>Manage Entities</mwc-button>
|
||||||
@ -88,6 +86,17 @@ export class CloudAlexaPref extends LitElement {
|
|||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private async _handleSync() {
|
||||||
|
this._syncing = true;
|
||||||
|
try {
|
||||||
|
await syncCloudAlexaEntities(this.hass!);
|
||||||
|
} catch (err) {
|
||||||
|
alert(`Failed to sync entities: ${err.body.message}`);
|
||||||
|
} finally {
|
||||||
|
this._syncing = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private async _enabledToggleChanged(ev) {
|
private async _enabledToggleChanged(ev) {
|
||||||
const toggle = ev.target as PaperToggleButtonElement;
|
const toggle = ev.target as PaperToggleButtonElement;
|
||||||
try {
|
try {
|
||||||
|
@ -619,7 +619,8 @@
|
|||||||
"firmware": "Firmware: {version}",
|
"firmware": "Firmware: {version}",
|
||||||
"device_unavailable": "Gerät nicht verfügbar",
|
"device_unavailable": "Gerät nicht verfügbar",
|
||||||
"entity_unavailable": "Entität nicht verfügbar",
|
"entity_unavailable": "Entität nicht verfügbar",
|
||||||
"no_area": "Kein Bereich"
|
"no_area": "Kein Bereich",
|
||||||
|
"hub": "Verbunden über"
|
||||||
},
|
},
|
||||||
"config_flow": {
|
"config_flow": {
|
||||||
"external_step": {
|
"external_step": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user