forked from DigiLive/mushroom-strategy
2
dist/mushroom-strategy.js
vendored
2
dist/mushroom-strategy.js
vendored
File diff suppressed because one or more lines are too long
39
src/cards/LockCard.js
Normal file
39
src/cards/LockCard.js
Normal file
@@ -0,0 +1,39 @@
|
||||
import {AbstractCard} from "./AbstractCard";
|
||||
|
||||
/**
|
||||
* Lock Card Class
|
||||
*
|
||||
* Used to create a card for controlling an entity of the lock domain.
|
||||
*
|
||||
* @class
|
||||
* @extends AbstractCard
|
||||
*/
|
||||
class LockCard extends AbstractCard {
|
||||
/**
|
||||
* Default options of the card.
|
||||
*
|
||||
* @type {lockCardOptions}
|
||||
* @private
|
||||
*/
|
||||
#defaultOptions = {
|
||||
type: "custom:mushroom-lock-card",
|
||||
icon: undefined,
|
||||
};
|
||||
|
||||
/**
|
||||
* Class constructor.
|
||||
*
|
||||
* @param {hassEntity} entity The hass entity to create a card for.
|
||||
* @param {lockCardOptions} [options={}] Options for the card.
|
||||
* @throws {Error} If the Helper module isn't initialized.
|
||||
*/
|
||||
constructor(entity, options = {}) {
|
||||
super(entity);
|
||||
this.mergeOptions(
|
||||
this.#defaultOptions,
|
||||
options,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export {LockCard};
|
@@ -17,6 +17,7 @@ class MediaPlayerCard extends AbstractCard {
|
||||
*/
|
||||
#defaultOptions = {
|
||||
type: "custom:mushroom-media-player-card",
|
||||
icon: undefined,
|
||||
use_media_info: true,
|
||||
media_controls: [
|
||||
"on_off",
|
||||
|
@@ -86,6 +86,11 @@ export const optionDefaults = {
|
||||
showControls: false,
|
||||
hidden: false,
|
||||
},
|
||||
lock: {
|
||||
title: "Locks",
|
||||
showControls: false,
|
||||
hidden: false,
|
||||
},
|
||||
climate: {
|
||||
title: "Climates",
|
||||
showControls: false,
|
||||
|
Reference in New Issue
Block a user