Home Assistant 101: Conditional Cards and Managing Dashboards

Поделиться
HTML-код
  • Опубликовано: 28 дек 2024

Комментарии • 43

  • @ResinChemTech
    @ResinChemTech  Год назад

    As mentioned in the video, the ability to use a numeric value for a condition in the conditional card has been a long-standing request. Well, starting with release 2023.11 of Home Assistant, numeric values can now be used as a condition for showing or hiding other cards. In addition, conditions based on screen size and user have also been added. You can see the updated documentation here: www.home-assistant.io/dashboards/conditional/

  • @bobdurk5180
    @bobdurk5180 18 дней назад +1

    Another great tutorial; I wondered how you did some of the dashboard selections in other videos. I can see that there are many more videos to watch and learn from.. Thank you!

    • @ResinChemTech
      @ResinChemTech  18 дней назад

      You are welcome. While I have a number of videos on DIY electronics and LEDs, I also have a full playlists of "Home Assistant 101" videos if you haven't stumbled across that yet: ruclips.net/p/PLqjDNeOVHOkflCfZDY2vJnVHud0m3n0Vz&si=htOzrkdzeV2U5m4Y
      As always, thanks for the kind words and comment!

  • @rodneysmith1750
    @rodneysmith1750 Год назад +4

    You do a great job of building attractive and functional dashboards, not something I am able to accomplish at least not yet. Thanks for sharing the video, I wanted to say your time and efforts are much appreciated!

    • @ResinChemTech
      @ResinChemTech  Год назад +1

      Well as I mentioned, I've spent a lot of time tweaking, remaking and overhauling my dashboards. And you learn a lot of little tricks along the way. I think the vertical stack, horizontal stack and newer grid card are key for trying to get things arranged and aligned. And of course the custom button card I covered in another video adds tons of versatility.
      As always, I greatly appreciate your comment!

    • @rodneysmith1750
      @rodneysmith1750 Год назад

      @@ResinChemTechmy introduction to dashboards was "mostlychris" and his explanation of grid cards, but I think I may also want to have a look-see at the stack cards as well. Another great video though!

    • @Kiloptero
      @Kiloptero 8 месяцев назад

      how you exclude the other button are on when you turn on other?

  • @ramdisk00
    @ramdisk00 11 месяцев назад +1

    Love your dashboard, would like to see a video on how it was created. I know that would a long video for sure.

    • @ResinChemTech
      @ResinChemTech  11 месяцев назад +1

      Thanks! Yeah... that would probably be a pretty long video. Mine are currently a bit of a hodge-podge mess of various dashboards, but there is one primary dashboard that gets the most use on tablets/PCs and one that gets used on mobile. Much of the rest are old versions... or new works-in-progress. Maybe I can think about going through creation of a full dashboard from scratch as part of a live stream. I'll throw it on the list of potential future topics. Thanks for the idea!

  • @fins5150
    @fins5150 Год назад

    Thanks for sharing some tips and ideas I hadn't figured out.. just subscribed

    • @ResinChemTech
      @ResinChemTech  Год назад

      Glad you found the tips helpful. I have a few more Home Assistant 101 videos planned.
      Thanks for taking time to comment and welcome to the channel!

  • @Whereisddk
    @Whereisddk 2 месяца назад

    I love your video and your dashboard. Ive been puzzeling on how to get the switches to turn on/off when selection changes. Is this something you can share your config on or make a video about on how to configure it?

    • @ResinChemTech
      @ResinChemTech  2 месяца назад

      I think what you are looking for, if I understand you correctly, is covered in my video on creating and using virtual switches in Home Assistant: ruclips.net/video/mj2CIKqrQlc/видео.html , or the one on using the Custom Button card: ruclips.net/video/5Pi21pqfbxA/видео.html (which is what I'm using in this video) If you check the descriptions for these videos as well, they will include links to some written examples.
      If that's not what you were asking, let me know and I'll try to help out if I can.

    • @Whereisddk
      @Whereisddk 2 месяца назад

      I saw those videos. They're great too and really explaining the visual switches. What I'm looking for is an example of the dashboard that your showing at 11:24 in this video. The way you use the switches on the left to switch between content on the right

    • @ResinChemTech
      @ResinChemTech  2 месяца назад

      You can see the YAML for that exact dashboard here: github.com/Resinchem/LED-Matrix-Clock_WS2812b/tree/main/homeassistant
      But the buttons are basically virtual switches... created in YAML and the 'on' state is set to a particular value that matches a mode for the clock. For example, the 'Clock' button is on when the mode is 0... the 'Countdown' button is on when the mode is 1, etc. In the above Github, you can see this in the 'switches.yaml' file and the actual dashboard itself is shown in the 'lovelace.yaml' file.

  • @silvarod
    @silvarod Год назад

    Oh boy, thanks for this video, insightful

    • @ResinChemTech
      @ResinChemTech  Год назад

      You are welcome. Hope you found it useful.
      Thanks for watching

  • @MicheIIePucca
    @MicheIIePucca Год назад

    I would really like to see a video on creating colored backgrounds and transparent content within the cards. This subject is really hard to find.

  • @mrhajom1133
    @mrhajom1133 11 месяцев назад

    Hi another great video. Thank you for sharing. Do you have the code for the Input Boolean mutually exclussive? Thanks in advance. BR /Toni

    • @ResinChemTech
      @ResinChemTech  11 месяцев назад

      Input boolean mutually exclusive? If you are talking about the mutually exclusive modes that I show in the matrix clock example, those are MQTT switches (not input_booleans) and their state is tied to the MQTT state of the clock. Since the clock can only have one mode at a time, only one of those switches will match that mode and be "on"... all others will be off.
      To create mutually exclusive input booleans, you'd have to do that either via automation (turning off other input_booleans when one was turned on), or create templated entities that return true or false based on conditions of other entities. If I'm missing something, please let me know. But the mutually exclusive buttons I show in this video are tied to switches based on the MQTT mode reported by the clock and not via input_boolean helpers. Let me know if you have any other questions.

    • @mrhajom1133
      @mrhajom1133 11 месяцев назад

      @@ResinChemTech Hi, You Menton this at aprox 12:50 when you explain conditional card. Best regards Toni

  • @alexvanhoboken
    @alexvanhoboken Год назад

    I just discovered your channel, thanks for all the great work!! I really love the way you have setup your dashboards, how do you create those titles on top of each section? I can't get it like that with the Markdown card, what do you use for that?

    • @ResinChemTech
      @ResinChemTech  Год назад +2

      Thanks, I appreciate it. For the section titles, I'm using a custom HACS card called Text Divider Row. Note however that the most recent version resulted in a semi-transparent box around the text. The developer has not addressed it in over a year, so I had to drop back to the prior version. So what I am using (and what you see in this video) is version 1.4.0, instead of the most current 1.4.1.
      If you want to install it, you should have an option to pick a version, so I would recommend that you use the .0 and not the .1 version.
      Let me know if you have any follow up questions... and thanks for watching!

    • @pokeysplace
      @pokeysplace Год назад

      It would be nice to see the installation as I've been trying to get text-divider-row installed since your video posted without luck. @@ResinChemTech

  • @OGKenG
    @OGKenG 4 месяца назад

    I'm looking to get into updating my simple dashboard and watched your video. My question is when I'm using the sidebar view type, I was able to put a "menu" of my rooms on the right side but when I tap on the room, I want the link to open on the left side of that card - sort of like how frames on websites used to be. Is there a way to do it?

    • @ResinChemTech
      @ResinChemTech  4 месяца назад

      I'm not 100% sure that I follow exactly what you are trying to do, as I'm a bit confused by the 'sidebar view type' on the right side. But if I *think* I understand, you could create a vertical stack on the right that would be the room buttons. These would need to be tied to either an input_boolean or some type of switch (e.g virtual switch)... something with an on/off state. Then another vertical stack on the left would contain your individual room detail cards. So when one of the room buttons was clicked, that room's controls conditional card would show. If you only want one room to be displayed at a time, then you'd probably have to use an automation or other process to turn off all the other input_booleans/switches when one was turned on... that way only one "room" would be active at any given time.
      That may or may not be what you are looking for. You might also check out HACS (Home Assistant Community Store) as you may find a custom card that someone else designed that might meet your needs. You can find just about anything in there!

    • @OGKenG
      @OGKenG 4 месяца назад

      @@ResinChemTech
      Let me clarify...
      When you start a new view on a dashboard, you have the choice to select which type of view it will be:
      Masonry
      *Sidebar*
      Panel (1 card)
      Sections (experimental)
      I chose sidebar. It then splits the screen to about 70/30 and you can choose where to put the cards with an arrow selector at the bottom of each card you create.

    • @ResinChemTech
      @ResinChemTech  4 месяца назад

      Ah... I see now! I actually had never used "sidebar" before but I just created one to see how it works. Sorry for the confusion on my part... but I understand now. However, I think the same methodology would apply. You'd create some sort of buttons, toggles, switches, etc. that have a binary state for each room in the right column. You'd then use the state of each of those to determine which conditional card is shown on the left. Remember that conditional cards can contain other cards... so you can build out the individual room cards on the left as much as you want. Whenever one of the rooms was selected on the right and it's state was set to "true", you can use that as the condition to show the appropriate conditional room detail card on the left (again, assuring through automation or something like virtual switches that only one "room switch" on the right can be on or true at a time).

    • @OGKenG
      @OGKenG 4 месяца назад

      @@ResinChemTech
      The problem I'm having is that when I tap on the icon on the right side, it loads a whole different page. I'm looking to have it load ONLY the left side so that the icons on the right side stay visible like frames on a website.

    • @ResinChemTech
      @ResinChemTech  4 месяца назад

      You need to make sure the conditional cards are only include the cards in the left hand side. This is basically exactly what I did in the video, starting around 11:22. In my case, the left hand side is staying static and just the right hand side is changing (based on the button click on the left). This is, I believe, what you want to do... except you want to use the side bar view, so the right side would be static (not within a conditional card), while the cards on the left side would be within conditional cards. You might review the section of the video I listed above.

  • @marrs3312
    @marrs3312 6 месяцев назад

    What are the switches?

  • @williammartin587
    @williammartin587 9 месяцев назад

    Is it possible to use the virtual switches to control dashboard views without the switch actually changing the state of a device? How would you program the switches so that only one switch is on at a time?

    • @ResinChemTech
      @ResinChemTech  9 месяцев назад

      For a switch to show as off/on, it has to be tied to the state of "something". This could be something like an input_boolean helper so it doesn't have to be a physical device, but it does have to be an entity that has a state that can be represented as "on" or "off". You could certainly create something that functions like a button that when you click it, it runs a script to change a dashboard view or could be used like a navigation link to go to a difference dashboard or view. But that button would always be shown a "off" unless it is tied to the state of an entity that also changes when you click the button or switch.
      There are many ways to make multiple switches mutually exclusive so that only one can be on at a time. They can all be tied to the same entity that has multiple states, but only one state is active at a time so that only one switch will be on at any given time. I show an example of this in my video on virtual switches: ruclips.net/video/mj2CIKqrQlc/видео.html Alternatively, the automation or script that runs for one switch when it is turned on could toggle the state of all other switches to off. But again, all the switches have to be tied to the state of some type of entity to truly show a state or off/on.

  • @ninnaogtommyfrederiksen2266
    @ninnaogtommyfrederiksen2266 Год назад

    how did you make det buttons time, text, score board etc.?

    • @ResinChemTech
      @ResinChemTech  Год назад

      Those are tied to MQTT switches that show the current mode or state of the clock. They are being displayed on the dashboard using the custom button card add-on. I have another video that shows how I use this custom button card, including tying it to a switch just as I've done here: ruclips.net/video/5Pi21pqfbxA/видео.html
      The rest of the conditional cards are shown or hidden based on the state of those switches. If switch "clock" is one, it shows one conditional card, if switch "scoreboard" is on, it shows a different conditional card. But the video above will show you how those mode buttons are created and tied to the switch entities.

    • @ninnaogtommyfrederiksen2266
      @ninnaogtommyfrederiksen2266 Год назад

      @@ResinChemTech thanks fore your answer

    • @ninnaogtommyfrederiksen2266
      @ninnaogtommyfrederiksen2266 Год назад

      @@ResinChemTech yes, but when switch between the buttons only one is Active at a Time Do you have some automation for that or do you know something else

    • @ResinChemTech
      @ResinChemTech  Год назад

      That is how the LED matrix clock that is used in this example is designed. It has a "mode" (clock, countdown, scoreboard, text) and only one of those modes can be active at a time. This is reported as the current active mode via MQTT. Each of those switches is an MQTT switch. The switch is "on" when the clock mode matches the value of the switch. All other switches are then off by default because their mode no longer matches. Think of it like this... each button has a "number" 0-3. The clock reports its current mode as a number (0 = clock, 1 = countdown, 2 = scoreboard, 3 = text). The MQTT switches are defined as "on" when the mode matches. So, the countdown switch is 'on' when the reported mode is 2. It is off when the mode is anything other than 2. Same with the rest of the switches. They are really just switches with an on/off state... but that state is based on the current active mode of the matrix clock (based on the MQTT switch defined state_topic). There is no automation involved... from the front end dashboard, they are just like any other switch, but when you turn on one, you change the mode of the clock and therefore all the other switches automatically turn off.
      The switches really have nothing to do with the conditional card (other than showing a particular card when a switch is on). The switches are just how they are defined via MQTT and how the matrix clock is designed. Maybe it would help if you saw or understood how the clock works:
      Blog Article: resinchemtech.blogspot.com/2021/04/ws2812b-led-matrix-clock-scoreboard-and.html
      Github Wiki: github.com/Resinchem/LED-Matrix-Clock_WS2812b/wiki
      RUclips Video: ruclips.net/video/uV_HQpqIp2I/видео.html

    • @ninnaogtommyfrederiksen2266
      @ninnaogtommyfrederiksen2266 Год назад

      @@ResinChemTech ohh that makes sens, thanks

  • @singaporepastor
    @singaporepastor 9 месяцев назад

    How do you make the switches mutually exclusive?

    • @ResinChemTech
      @ResinChemTech  8 месяцев назад

      By tying those switches to the state of an entity. The entity can only have one state at a time, therefore only one switch can match that state and be "on" at any given time. For example, if you have four buttons for preset brightness levels of a light (say 25%, 50%, 75% and 100%), the light can only have one brightness value at a time. When the light is at 50% brightness, only the 50% switch will be "on" and all the others will be off. If you set the brightness to 75%, then that switch will come on and the 50% switch will turn off, since it no longer matches the brightness. The light can never have two brightness levels, therefore there will never be more than one switch on at a time.