Skip to content

Commit

Permalink
fix: excludeItemsInEntitiesList should default to false
Browse files Browse the repository at this point in the history
  • Loading branch information
punxaphil committed Jan 4, 2024
1 parent e515efb commit f8eb88a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/components/player-controls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class PlayerControls extends LitElement {
this.activePlayer = this.store.activePlayer;
this.mediaControlService = this.store.mediaControlService;

const noUpDown = this.config.showVolumeUpAndDownButtons && nothing;
const noUpDown = !!this.config.showVolumeUpAndDownButtons && nothing;
return html`
<div class="main" id="mediaControls">
${when(
Expand Down
2 changes: 1 addition & 1 deletion src/model/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export default class Store {
.filter(getGroupPlayerIds)
.filter((hassEntity) => {
const includesEntity = configEntities.includes(hassEntity.entity_id);
return !configEntities.length || this.config.excludeItemsInEntitiesList !== includesEntity;
return !configEntities.length || !!this.config.excludeItemsInEntitiesList !== includesEntity;
})
.sort((a, b) => a.entity_id.localeCompare(b.entity_id));
}
Expand Down
2 changes: 1 addition & 1 deletion src/sections/volumes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class Volumes extends LitElement {
: player.name;
const volDown = async () => await this.mediaControlService.volumeDown(player, updateMembers);
const volUp = async () => await this.mediaControlService.volumeUp(player, updateMembers);
const noUpDown = this.config.showVolumeUpAndDownButtons && nothing;
const noUpDown = !!this.config.showVolumeUpAndDownButtons && nothing;
const hideSwitches = updateMembers || !this.showSwitches[player.id];
return html` <div class="row">
<div class="volume-name">
Expand Down
10 changes: 5 additions & 5 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ export type ConfigPredefinedGroupPlayer = PredefinedGroupPlayer<string>;
export type ConfigPredefinedGroup = PredefinedGroup<string | ConfigPredefinedGroupPlayer>;
export interface CardConfig extends LovelaceCardConfig {
sections?: Section[];
showVolumeUpAndDownButtons: boolean;
showVolumeUpAndDownButtons?: boolean;
entities?: string[];
excludeItemsInEntitiesList: boolean;
excludeItemsInEntitiesList?: boolean;
predefinedGroups?: ConfigPredefinedGroup[];
title?: string;
labelWhenNoMediaIsSelected?: string;
Expand All @@ -32,14 +32,14 @@ export interface CardConfig extends LovelaceCardConfig {
artworkHostname?: string;
widthPercentage?: number;
heightPercentage?: number;
hideGroupCurrentTrack: boolean;
dynamicVolumeSlider: boolean;
hideGroupCurrentTrack?: boolean;
dynamicVolumeSlider?: boolean;
mediaArtworkOverrides?: MediaArtworkOverride[];
customSources?: CustomSources;
customThumbnail?: CustomThumbnails;
customThumbnailIfMissing?: CustomThumbnails;
mediaBrowserTitlesToIgnore?: string[];
mediaBrowserItemsPerRow: number;
mediaBrowserItemsPerRow?: number;
mediaBrowserShowTitleForThumbnailIcons?: boolean;
topFavorites?: string[];
numberOfFavoritesToShow?: number;
Expand Down

0 comments on commit f8eb88a

Please sign in to comment.