Home Assistant 101: Conditional Cards and Managing Dashboards

Поділитися
Вставка
  • Опубліковано 23 чер 2024
  • In this video, I'll provide some tips and tricks for managing your Home Assistant dashboards. Then I'll show the Condition Card, including how to use it along with a couple of examples.
    This information is targeted for those that are newer to Home Assistant, but might have a few tidbits for those with a bit more experience as well.
    Chapter Links:
    =============
    00:00 Introduction
    01:45 Managing Dashboards
    07:53 The Conditional Card
    14:09 Wrap Up
    If you'd like to help support this channel, or just say thanks, you can consider buying me a cup of coffee:
    www.buymeacoffee.com/resinche...
    #homeassistant #dashboard
  • Наука та технологія

КОМЕНТАРІ • 28

  • @ResinChemTech
    @ResinChemTech  7 місяців тому

    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/

  • @rodneysmith1750
    @rodneysmith1750 9 місяців тому +3

    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  9 місяців тому +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 9 місяців тому

      @@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 2 місяці тому

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

  • @silvarod
    @silvarod 9 місяців тому

    Oh boy, thanks for this video, insightful

    • @ResinChemTech
      @ResinChemTech  9 місяців тому

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

  • @fins5150
    @fins5150 8 місяців тому

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

    • @ResinChemTech
      @ResinChemTech  8 місяців тому

      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!

  • @ramdisk00
    @ramdisk00 5 місяців тому

    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  5 місяців тому +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!

  • @alexvanhoboken
    @alexvanhoboken 9 місяців тому

    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  9 місяців тому +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 7 місяців тому

      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

  • @MicheIIePucca
    @MicheIIePucca 6 місяців тому

    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 5 місяців тому

    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  5 місяців тому

      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 5 місяців тому

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

  • @williammartin587
    @williammartin587 3 місяці тому

    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  3 місяці тому

      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: ua-cam.com/video/mj2CIKqrQlc/v-deo.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.

  • @singaporepastor
    @singaporepastor 2 місяці тому

    How do you make the switches mutually exclusive?

    • @ResinChemTech
      @ResinChemTech  2 місяці тому

      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.

  • @ninnaogtommyfrederiksen2266
    @ninnaogtommyfrederiksen2266 8 місяців тому

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

    • @ResinChemTech
      @ResinChemTech  8 місяців тому

      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: ua-cam.com/video/5Pi21pqfbxA/v-deo.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 8 місяців тому

      @@ResinChemTech thanks fore your answer

    • @ninnaogtommyfrederiksen2266
      @ninnaogtommyfrederiksen2266 8 місяців тому

      @@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  8 місяців тому

      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
      UA-cam Video: ua-cam.com/video/uV_HQpqIp2I/v-deo.html

    • @ninnaogtommyfrederiksen2266
      @ninnaogtommyfrederiksen2266 8 місяців тому

      @@ResinChemTech ohh that makes sens, thanks