Only show header toggle for entities card if title (#7525)

This commit is contained in:
Paulus Schoutsen 2020-10-29 21:28:34 +01:00 committed by GitHub
parent 630d8c3bb6
commit 76a088e177
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -115,7 +115,7 @@ class HuiEntitiesCard extends LitElement implements LovelaceCard {
this._config = config;
this._configEntities = entities;
if (config.show_header_toggle === undefined) {
if (config.title !== undefined && config.show_header_toggle === undefined) {
// Default value is show toggle if we can at least toggle 2 entities.
let toggleable = 0;
for (const rowConf of entities) {