Files
mushroom-strategy/src/cards/LockCard.js
2023-09-05 18:57:19 -04:00

40 lines
802 B
JavaScript

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};