Skip to content

Commit

Permalink
clean: remove deprecated disableOffShadow from code
Browse files Browse the repository at this point in the history
  • Loading branch information
Gh61 committed Nov 22, 2023
1 parent b213809 commit 7120c95
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 17 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ Also this card will detect these icons installed and will use them prior to HA i
<td><s><code>disableOffShadow</code></s></td>
<td>boolean</td>
<td>no</td>
<td><i>deprecated in 1.3.0</i></td>
<td><i>removed in 1.6.0</i></td>
<td><code>false</code></td>
<td><s>If turned on, the card will not have inner shadow, when all lights are off.</s></td>
</tr>
Expand Down
13 changes: 1 addition & 12 deletions src/types/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,7 @@ export class HueLikeLightCardConfig implements HueLikeLightCardConfigInterface {
this.offColor = plainConfig.offColor || Consts.OffColor;
this.wasOffColorSet = !!plainConfig.offColor;
this.hueScreenBgColor = plainConfig.hueScreenBgColor || Consts.DialogBgColor;

if (plainConfig.disableOffShadow != null) {
console.warn("[HueLikeLightCard] Use 'offShadow' (with inverted value) property instead of deprecated 'disableOffShadow'");
}

this.offShadow = HueLikeLightCardConfig.getBoolean(plainConfig.offShadow, !HueLikeLightCardConfig.getBoolean(plainConfig.disableOffShadow, false));
this.offShadow = HueLikeLightCardConfig.getBoolean(plainConfig.offShadow, true);
this.hueBorders = HueLikeLightCardConfig.getBoolean(plainConfig.hueBorders, true);

this.style = plainConfig.style;
Expand Down Expand Up @@ -196,12 +191,6 @@ export class HueLikeLightCardConfig implements HueLikeLightCardConfigInterface {
public readonly offColor: string;
public readonly hueScreenBgColor: string;
public readonly offShadow: boolean;
/**
* @deprecated Use offShadow instead.
*/
public get disableOffShadow() {
return !this.offShadow;
}
public readonly hueBorders: boolean;

/** Support for card-mod styling */
Expand Down
4 changes: 0 additions & 4 deletions src/types/types-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,6 @@ export interface HueLikeLightCardConfigInterface extends ConfigEntityInterface {
readonly offColor?: string;
readonly hueScreenBgColor?: string;
readonly offShadow?: boolean;
/**
* @deprecated Use offShadow instead.
*/
readonly disableOffShadow?: boolean;
readonly hueBorders?: boolean;

/** Support for card-mod styling */
Expand Down

0 comments on commit 7120c95

Please sign in to comment.