mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-20 07:46:37 +00:00
commit
316fed953a
2
setup.py
2
setup.py
@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
||||
|
||||
setup(
|
||||
name="home-assistant-frontend",
|
||||
version="20190618.0",
|
||||
version="20190619.0",
|
||||
description="The Home Assistant frontend",
|
||||
url="https://github.com/home-assistant/home-assistant-polymer",
|
||||
author="The Home Assistant Authors",
|
||||
|
@ -216,9 +216,11 @@ class HaWeatherCard extends LocalizeMixin(EventsMixin(PolymerElement)) {
|
||||
></ha-icon>
|
||||
</div>
|
||||
</template>
|
||||
<template is="dom-if" if="[[_showValue(item.temperature)]]">
|
||||
<div class="temp">
|
||||
[[item.temperature]] [[getUnit('temperature')]]
|
||||
</div>
|
||||
</template>
|
||||
<template is="dom-if" if="[[_showValue(item.templow)]]">
|
||||
<div class="templow">
|
||||
[[item.templow]] [[getUnit('temperature')]]
|
||||
|
@ -42,6 +42,7 @@ const fixedIcons = {
|
||||
updater: "hass:cloud-upload",
|
||||
vacuum: "hass:robot-vacuum",
|
||||
water_heater: "hass:thermometer",
|
||||
weather: "hass:weather-cloudy",
|
||||
weblink: "hass:open-in-new",
|
||||
};
|
||||
|
||||
|
@ -8,3 +8,6 @@ export interface AlexaEntity {
|
||||
|
||||
export const fetchCloudAlexaEntities = (hass: HomeAssistant) =>
|
||||
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!),
|
||||
]);
|
||||
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() {
|
||||
|
@ -1,10 +1,10 @@
|
||||
import {
|
||||
html,
|
||||
LitElement,
|
||||
PropertyDeclarations,
|
||||
TemplateResult,
|
||||
CSSResult,
|
||||
css,
|
||||
property,
|
||||
} from "lit-element";
|
||||
import "@material/mwc-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 { HomeAssistant } from "../../../../types";
|
||||
import { CloudStatusLoggedIn, updateCloudPref } from "../../../../data/cloud";
|
||||
import { syncCloudAlexaEntities } from "../../../../data/alexa";
|
||||
|
||||
export class CloudAlexaPref extends LitElement {
|
||||
public hass?: HomeAssistant;
|
||||
public cloudStatus?: CloudStatusLoggedIn;
|
||||
|
||||
static get properties(): PropertyDeclarations {
|
||||
return {
|
||||
hass: {},
|
||||
cloudStatus: {},
|
||||
};
|
||||
}
|
||||
@property() public hass?: HomeAssistant;
|
||||
@property() public cloudStatus?: CloudStatusLoggedIn;
|
||||
@property() private _syncing = false;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
if (!this.cloudStatus) {
|
||||
@ -79,6 +74,9 @@ export class CloudAlexaPref extends LitElement {
|
||||
: ""}
|
||||
</div>
|
||||
<div class="card-actions">
|
||||
<mwc-button @click=${this._handleSync} .disabled=${this._syncing}>
|
||||
Sync Entities
|
||||
</mwc-button>
|
||||
<div class="spacer"></div>
|
||||
<a href="/config/cloud/alexa">
|
||||
<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) {
|
||||
const toggle = ev.target as PaperToggleButtonElement;
|
||||
try {
|
||||
|
@ -619,7 +619,8 @@
|
||||
"firmware": "Firmware: {version}",
|
||||
"device_unavailable": "Gerät nicht verfügbar",
|
||||
"entity_unavailable": "Entität nicht verfügbar",
|
||||
"no_area": "Kein Bereich"
|
||||
"no_area": "Kein Bereich",
|
||||
"hub": "Verbunden über"
|
||||
},
|
||||
"config_flow": {
|
||||
"external_step": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user