![]() The Conditional card allows to only show a card depending on the state of an entity. I would like to cover this card in more detail on a separate tutorial so if you guys are interested, let me know via social media or in the comments for the video above. This type of card allows to set up an image of a floor plan and add icons, text, and services in different parts of the image. There is another picture card that I’m not covering on this tutorial, and it’s the Picture Elements card. Now the switch and the light would work as a toggle, and the 2 scripts would show the more-info-dialog pop-up which would allow us to execute the scripts. Lastly, I added the image that I want to display on the card. ![]() 1 switch, which is actually connected to a floor lamp, an actual light that is on my desk, and 2 scripts to turn on my TV and soundbar. On the example above, that I set up for my living room, I added 4 entities. The Picture Glance card is excellent when you want to associate multiple entities to an image. Now, when you click on the image, it would toggle the light on and off, and the image would change to represent the specific state. Lastly, I defined the 2 images for the on and off state using the state_image variable. I defined the card type as a picture-entity, for the entity, I added the desk light, then, I set up the tap_action and I set the action to toggle so instead of getting the more info pop up when clicking on the image, it would just toggle the light on and off.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |