mirror of
https://github.com/home-assistant/frontend.git
synced 2026-02-05 15:58:08 +00:00
Compare commits
2 Commits
protocol-b
...
light_dash
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0cbf0ca08c | ||
|
|
130cbb3309 |
@@ -222,7 +222,6 @@ export class BluetoothAdvertisementMonitorPanel extends LitElement {
|
||||
filter=${this.address || ""}
|
||||
clickable
|
||||
.tabs=${bluetoothTabs}
|
||||
back-path="/config"
|
||||
></hass-tabs-subpage-data-table>
|
||||
`;
|
||||
}
|
||||
|
||||
@@ -161,7 +161,6 @@ export class BluetoothConfigDashboard extends LitElement {
|
||||
.hass=${this.hass}
|
||||
.route=${this.route}
|
||||
.tabs=${bluetoothTabs}
|
||||
back-path="/config"
|
||||
>
|
||||
<div class="content">
|
||||
<ha-card
|
||||
|
||||
@@ -225,7 +225,6 @@ export class BluetoothConnectionMonitorPanel extends LitElement {
|
||||
)}
|
||||
@grouping-changed=${this._handleGroupingChanged}
|
||||
@collapsed-changed=${this._handleCollapseChanged}
|
||||
back-path="/config"
|
||||
></hass-tabs-subpage-data-table>
|
||||
`;
|
||||
}
|
||||
|
||||
@@ -124,7 +124,6 @@ export class BluetoothNetworkVisualization extends LitElement {
|
||||
.narrow=${this.narrow}
|
||||
.route=${this.route}
|
||||
.tabs=${bluetoothTabs}
|
||||
back-path="/config"
|
||||
>
|
||||
<ha-network-graph
|
||||
.hass=${this.hass}
|
||||
|
||||
@@ -111,7 +111,6 @@ class ZHAConfigDashboard extends LitElement {
|
||||
.narrow=${this.narrow}
|
||||
.route=${this.route}
|
||||
.tabs=${zhaTabs}
|
||||
back-path="/config"
|
||||
has-fab
|
||||
>
|
||||
<div class="container">
|
||||
|
||||
@@ -101,7 +101,6 @@ export class ZHAGroupsDashboard extends LitElement {
|
||||
return html`
|
||||
<hass-tabs-subpage-data-table
|
||||
.tabs=${zhaTabs}
|
||||
back-path="/config"
|
||||
.hass=${this.hass}
|
||||
.narrow=${this.narrow}
|
||||
.route=${this.route}
|
||||
|
||||
@@ -54,7 +54,6 @@ export class ZHANetworkVisualizationPage extends LitElement {
|
||||
return html`
|
||||
<hass-tabs-subpage
|
||||
.tabs=${zhaTabs}
|
||||
back-path="/config"
|
||||
.hass=${this.hass}
|
||||
.narrow=${this.narrow}
|
||||
.isWide=${this.isWide}
|
||||
|
||||
@@ -151,7 +151,6 @@ class ZWaveJSConfigDashboard extends SubscribeMixin(LitElement) {
|
||||
.narrow=${this.narrow}
|
||||
.route=${this.route}
|
||||
.tabs=${configTabs}
|
||||
back-path="/config"
|
||||
has-fab
|
||||
>
|
||||
<ha-icon-button
|
||||
|
||||
@@ -67,7 +67,6 @@ class ZWaveJSLogs extends SubscribeMixin(LitElement) {
|
||||
.narrow=${this.narrow}
|
||||
.route=${this.route}
|
||||
.tabs=${configTabs}
|
||||
back-path="/config"
|
||||
>
|
||||
<div class="container">
|
||||
<ha-card>
|
||||
|
||||
@@ -77,7 +77,6 @@ export class ZWaveJSNetworkVisualization extends SubscribeMixin(LitElement) {
|
||||
.narrow=${this.narrow}
|
||||
.route=${this.route}
|
||||
.tabs=${configTabs}
|
||||
back-path="/config"
|
||||
>
|
||||
<ha-network-graph
|
||||
.hass=${this.hass}
|
||||
|
||||
@@ -45,6 +45,16 @@ const processAreasForLight = (
|
||||
}
|
||||
|
||||
if (areaCards.length > 0) {
|
||||
// Visibility condition: any light is on
|
||||
const anyOnCondition = {
|
||||
condition: "or" as const,
|
||||
conditions: areaLights.map((entityId) => ({
|
||||
condition: "state" as const,
|
||||
entity: entityId,
|
||||
state: "on",
|
||||
})),
|
||||
};
|
||||
|
||||
cards.push({
|
||||
heading_style: "subtitle",
|
||||
type: "heading",
|
||||
@@ -53,6 +63,38 @@ const processAreasForLight = (
|
||||
action: "navigate",
|
||||
navigation_path: `/home/areas-${area.area_id}`,
|
||||
},
|
||||
badges: [
|
||||
{
|
||||
type: "button",
|
||||
icon: "mdi:power",
|
||||
tap_action: {
|
||||
action: "perform-action",
|
||||
perform_action: "light.turn_on",
|
||||
target: {
|
||||
area_id: area.area_id,
|
||||
},
|
||||
},
|
||||
visibility: [
|
||||
{
|
||||
condition: "not",
|
||||
conditions: [anyOnCondition],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "button",
|
||||
icon: "mdi:power",
|
||||
color: "orange",
|
||||
tap_action: {
|
||||
action: "perform-action",
|
||||
perform_action: "light.turn_off",
|
||||
target: {
|
||||
area_id: area.area_id,
|
||||
},
|
||||
},
|
||||
visibility: [anyOnCondition],
|
||||
},
|
||||
] satisfies LovelaceCardConfig[],
|
||||
});
|
||||
cards.push(...areaCards);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user