{"id":2148,"date":"2023-01-23T06:58:07","date_gmt":"2023-01-23T12:58:07","guid":{"rendered":"https:\/\/lab.rapternet.us\/?p=2148"},"modified":"2022-12-04T18:59:12","modified_gmt":"2022-12-05T00:59:12","slug":"adding-wled-previews-to-home-assistant-dashboards","status":"publish","type":"post","link":"https:\/\/lab.rapternet.us\/?p=2148","title":{"rendered":"Adding WLED Previews to Home Assistant Dashboards"},"content":{"rendered":"\n<p>I found out recently about the webpage card in home assistant and how it can be used to add a WLED live view to your home assistant dashboard. Not only that, but its pretty simple to do as well!<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>We need to start out with the URL to the WLED control page. This can be grabbed from home assistant if you don&#8217;t know it off hand. The device page for WLED devices has a link to visit the control page.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lab.rapternet.us\/wp-content\/uploads\/2022\/11\/image-13.png\" alt=\"\" class=\"wp-image-2154\" width=\"411\" height=\"261\" srcset=\"https:\/\/lab.rapternet.us\/wp-content\/uploads\/2022\/11\/image-13.png 553w, https:\/\/lab.rapternet.us\/wp-content\/uploads\/2022\/11\/image-13-300x190.png 300w\" sizes=\"auto, (max-width: 411px) 100vw, 411px\" \/><figcaption class=\"wp-element-caption\">Device Links<\/figcaption><\/figure>\n\n\n\n<p>With the URL in hand, we go to add our webpage element to the home assistant UI.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lab.rapternet.us\/wp-content\/uploads\/2022\/11\/image-12.png\" alt=\"\" class=\"wp-image-2153\" width=\"576\" height=\"385\" srcset=\"https:\/\/lab.rapternet.us\/wp-content\/uploads\/2022\/11\/image-12.png 885w, https:\/\/lab.rapternet.us\/wp-content\/uploads\/2022\/11\/image-12-300x201.png 300w, https:\/\/lab.rapternet.us\/wp-content\/uploads\/2022\/11\/image-12-768x515.png 768w\" sizes=\"auto, (max-width: 576px) 100vw, 576px\" \/><figcaption class=\"wp-element-caption\">Webpage Card for the Preview<\/figcaption><\/figure>\n\n\n\n<p>With the card selected, we drop in our URL to the settings and add &#8220;\/liveview&#8221; to it. With that the preview will show up in the webpage card. The aspect ratio can be adjusted to your preference to make it thinner and more reasonable in the UI.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lab.rapternet.us\/wp-content\/uploads\/2022\/11\/image-11.png\" alt=\"\" class=\"wp-image-2151\" width=\"621\" height=\"205\" srcset=\"https:\/\/lab.rapternet.us\/wp-content\/uploads\/2022\/11\/image-11.png 910w, https:\/\/lab.rapternet.us\/wp-content\/uploads\/2022\/11\/image-11-300x100.png 300w, https:\/\/lab.rapternet.us\/wp-content\/uploads\/2022\/11\/image-11-768x255.png 768w\" sizes=\"auto, (max-width: 621px) 100vw, 621px\" \/><figcaption class=\"wp-element-caption\">Preview Card Configuration<\/figcaption><\/figure>\n\n\n\n<p>That&#8217;s all that&#8217;s needed to make a card showing the preview.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lab.rapternet.us\/wp-content\/uploads\/2022\/11\/image-14.png\" alt=\"\" class=\"wp-image-2156\" width=\"426\" height=\"111\" srcset=\"https:\/\/lab.rapternet.us\/wp-content\/uploads\/2022\/11\/image-14.png 598w, https:\/\/lab.rapternet.us\/wp-content\/uploads\/2022\/11\/image-14-300x78.png 300w\" sizes=\"auto, (max-width: 426px) 100vw, 426px\" \/><figcaption class=\"wp-element-caption\">Preview Card Active<\/figcaption><\/figure>\n\n\n\n<p>Note, this doesn&#8217;t work remotely, even over VPN. This also isn&#8217;t working through WallPanel for wall tablet controls.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>I think this is a great way to add a bit of WLED flair to any control panels for it. It makes it easy to see whats currently going on across devices and strands. Not only that, but its simple to add to a Home Assistant dashboard as well!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Resources<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/smarthomepursuits.com\/wled-peek-added-to-home-assistant\/\">How to add the WLED Peek Feature to Home Assistant<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Bonus! Advanced Cards!<\/h2>\n\n\n\n<p>As a little bonus, let&#8217;s use some of the more interesting cards. We&#8217;ll be using a vertical stack card and conditional card to have a WLED control and preview element <\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lab.rapternet.us\/wp-content\/uploads\/2022\/11\/image-15.png\" alt=\"\" class=\"wp-image-2162\" width=\"596\" height=\"552\" srcset=\"https:\/\/lab.rapternet.us\/wp-content\/uploads\/2022\/11\/image-15.png 894w, https:\/\/lab.rapternet.us\/wp-content\/uploads\/2022\/11\/image-15-300x278.png 300w, https:\/\/lab.rapternet.us\/wp-content\/uploads\/2022\/11\/image-15-768x712.png 768w\" sizes=\"auto, (max-width: 596px) 100vw, 596px\" \/><figcaption class=\"wp-element-caption\">Vertical Stack Card<\/figcaption><\/figure>\n\n\n\n<p>Once we have our vertical stack card, we add the light card on top for controlling WLED.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lab.rapternet.us\/wp-content\/uploads\/2022\/11\/image-16.png\" alt=\"\" class=\"wp-image-2164\" width=\"541\" height=\"375\" srcset=\"https:\/\/lab.rapternet.us\/wp-content\/uploads\/2022\/11\/image-16.png 854w, https:\/\/lab.rapternet.us\/wp-content\/uploads\/2022\/11\/image-16-300x208.png 300w, https:\/\/lab.rapternet.us\/wp-content\/uploads\/2022\/11\/image-16-768x532.png 768w\" sizes=\"auto, (max-width: 541px) 100vw, 541px\" \/><figcaption class=\"wp-element-caption\">Vertical Stack Card Configuration<\/figcaption><\/figure>\n\n\n\n<p>With the lighting card on top, we now add a conditional card. That card will have a condition on the light strip being on. The card to activate will then be our preview card from above.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lab.rapternet.us\/wp-content\/uploads\/2022\/11\/image-18.png\" alt=\"\" class=\"wp-image-2166\" width=\"357\" height=\"362\" srcset=\"https:\/\/lab.rapternet.us\/wp-content\/uploads\/2022\/11\/image-18.png 475w, https:\/\/lab.rapternet.us\/wp-content\/uploads\/2022\/11\/image-18-296x300.png 296w, https:\/\/lab.rapternet.us\/wp-content\/uploads\/2022\/11\/image-18-100x100.png 100w\" sizes=\"auto, (max-width: 357px) 100vw, 357px\" \/><figcaption class=\"wp-element-caption\">Conditional Card as Card 2 in the Stack<\/figcaption><\/figure>\n\n\n\n<p>The webpage card for the preview is setup the same as before.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lab.rapternet.us\/wp-content\/uploads\/2022\/11\/image-17.png\" alt=\"\" class=\"wp-image-2165\" width=\"403\" height=\"372\" srcset=\"https:\/\/lab.rapternet.us\/wp-content\/uploads\/2022\/11\/image-17.png 495w, https:\/\/lab.rapternet.us\/wp-content\/uploads\/2022\/11\/image-17-300x277.png 300w\" sizes=\"auto, (max-width: 403px) 100vw, 403px\" \/><figcaption class=\"wp-element-caption\">Webpage Card in the Conditional<\/figcaption><\/figure>\n\n\n\n<p>We can now checkout the card in the UI. With the lights off, we have no preview.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lab.rapternet.us\/wp-content\/uploads\/2022\/11\/image-20.png\" alt=\"\" class=\"wp-image-2169\" width=\"371\" height=\"241\" srcset=\"https:\/\/lab.rapternet.us\/wp-content\/uploads\/2022\/11\/image-20.png 476w, https:\/\/lab.rapternet.us\/wp-content\/uploads\/2022\/11\/image-20-300x195.png 300w\" sizes=\"auto, (max-width: 371px) 100vw, 371px\" \/><figcaption class=\"wp-element-caption\">Lights Off, Preview Off<\/figcaption><\/figure>\n\n\n\n<p>With the lights on, we have the preview of the current effect.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lab.rapternet.us\/wp-content\/uploads\/2022\/11\/image-19.png\" alt=\"\" class=\"wp-image-2168\" width=\"367\" height=\"227\" srcset=\"https:\/\/lab.rapternet.us\/wp-content\/uploads\/2022\/11\/image-19.png 448w, https:\/\/lab.rapternet.us\/wp-content\/uploads\/2022\/11\/image-19-300x185.png 300w\" sizes=\"auto, (max-width: 367px) 100vw, 367px\" \/><figcaption class=\"wp-element-caption\">Lights On, Preview On<\/figcaption><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>I found out recently about the webpage card in home assistant and how it can be used to add a WLED live view to your home assistant dashboard. Not only that, but its pretty simple to do as well!<\/p>\n","protected":false},"author":1,"featured_media":2168,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[39,14,49,58],"class_list":["post-2148","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-how-to","tag-home-assistant","tag-quick-bites","tag-smart-home","tag-wled"],"_links":{"self":[{"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=\/wp\/v2\/posts\/2148","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2148"}],"version-history":[{"count":12,"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=\/wp\/v2\/posts\/2148\/revisions"}],"predecessor-version":[{"id":2193,"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=\/wp\/v2\/posts\/2148\/revisions\/2193"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=\/wp\/v2\/media\/2168"}],"wp:attachment":[{"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2148"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2148"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2148"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}