mirror of
https://github.com/DigiLive/mushroom-strategy.git
synced 2025-09-25 21:00:55 +02:00
Apply fd1a09c
The branch is rebased onto `main` branch. At `main`, badges where still called chips. Changes to `SwitchChip.ts` are applies to `SwitchBadge.ts` in this commit.
This commit is contained in:
@@ -4,6 +4,7 @@ import { Registry } from '../Registry';
|
||||
import RegistryFilter from '../utilities/RegistryFilter';
|
||||
import AbstractBadge from './AbstractBadge';
|
||||
import { LovelaceBadgeConfig } from '../types/homeassistant/data/lovelace/config/badge';
|
||||
import { localize } from '../utilities/localize';
|
||||
|
||||
/**
|
||||
* Switch Badge class.
|
||||
@@ -31,6 +32,9 @@ class SwitchBadge extends AbstractBadge {
|
||||
content: Registry.getCountTemplate('switch', 'eq', 'on'),
|
||||
tap_action: {
|
||||
action: 'perform-action',
|
||||
confirmation: {
|
||||
text: localize('switch.chip_confirmation'),
|
||||
},
|
||||
perform_action: 'switch.turn_off',
|
||||
target: {
|
||||
entity_id: new RegistryFilter(Registry.entities)
|
||||
|
Reference in New Issue
Block a user