Add ability to expand groups dynamically. Fix thomasloven/lovelace-auto-entities#18
This commit is contained in:
		
							parent
							
								
									44c666e421
								
							
						
					
					
						commit
						e3f585601f
					
				
							
								
								
									
										17
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										17
									
								
								README.md
									
									
									
									
									
								
							| @ -130,5 +130,22 @@ card: | |||||||
| 
 | 
 | ||||||
|  |  | ||||||
| 
 | 
 | ||||||
|  | - If `entity` (not `entities`) is set and is a group, it will be expanded | ||||||
|  | 
 | ||||||
|  | ```yaml | ||||||
|  | type: custom:auto-entities | ||||||
|  | card: | ||||||
|  |   type: entities | ||||||
|  |   title: All groups | ||||||
|  | filter: | ||||||
|  |   include: | ||||||
|  |     - domain: group | ||||||
|  |       options: | ||||||
|  |         type: custom:fold-entity-row | ||||||
|  | ``` | ||||||
|  | 
 | ||||||
|  |  | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| --- | --- | ||||||
| <a href="https://www.buymeacoffee.com/uqD6KHCdJ" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/white_img.png" alt="Buy Me A Coffee" style="height: auto !important;width: auto !important;" ></a> | <a href="https://www.buymeacoffee.com/uqD6KHCdJ" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/white_img.png" alt="Buy Me A Coffee" style="height: auto !important;width: auto !important;" ></a> | ||||||
|  | |||||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @ -24,6 +24,8 @@ class FoldEntityRow extends LitElement { | |||||||
|     this.open = this.open || this._config.open; |     this.open = this.open || this._config.open; | ||||||
| 
 | 
 | ||||||
|     this.head = this._config.head; |     this.head = this._config.head; | ||||||
|  |     if (this._config.entity) | ||||||
|  |       this.head = this._config.entity; | ||||||
|     if (typeof this.head === "string") |     if (typeof this.head === "string") | ||||||
|       this.head = {entity: this.head}; |       this.head = {entity: this.head}; | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user