File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/components/target-picker Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -705,7 +705,7 @@ export class HaTargetPickerSelector extends LitElement {
705705 ) as EntityComboBoxItem [ ] ;
706706 }
707707
708- if ( ! filterType ) {
708+ if ( ! filterType && entities . length ) {
709709 // show group title
710710 items . push (
711711 this . hass . localize ( "ui.components.target-picker.type.entities" )
@@ -733,7 +733,7 @@ export class HaTargetPickerSelector extends LitElement {
733733 devices = this . _filterGroup ( "device" , devices ) ;
734734 }
735735
736- if ( ! filterType ) {
736+ if ( ! filterType && devices . length ) {
737737 // show group title
738738 items . push (
739739 this . hass . localize ( "ui.components.target-picker.type.devices" )
@@ -769,7 +769,7 @@ export class HaTargetPickerSelector extends LitElement {
769769 ) as FloorComboBoxItem [ ] ;
770770 }
771771
772- if ( ! filterType ) {
772+ if ( ! filterType && areasAndFloors . length ) {
773773 // show group title
774774 items . push (
775775 this . hass . localize ( "ui.components.target-picker.type.areas" )
@@ -811,7 +811,7 @@ export class HaTargetPickerSelector extends LitElement {
811811 labels = this . _filterGroup ( "label" , labels ) ;
812812 }
813813
814- if ( ! filterType ) {
814+ if ( ! filterType && labels . length ) {
815815 // show group title
816816 items . push (
817817 this . hass . localize ( "ui.components.target-picker.type.labels" )
You can’t perform that action at this time.
0 commit comments