thanks for this great card! It works well and I would like to explore it even more.
However, I am struggling with two issues which you might be able to help me out with.
I wanted to use two switches, one to e.g. select a floor which then gives me different options for rooms, which is then the second switch. E.g. I want to select ground floor and showing first an Overview page, then I want to select living room which shows me the entities in that room. Any idea how I could solve this?
Once I put state-switch, my slide-card is not working anymore. Anyone know how I can use both?
Hi,
Thanks for another great card!
I was wondering if you might have an idea how to implement something I try to do.
I have view which shows lights buttons, but only the lights that are currently on. This one is easy. Even with regular conditional card.
However I would like that while I am on that view and I am turning off one of the lights, the button will still remain on the view, until I close the view and open again, then it will disappear, and not right when I click on it.
Or at least to stay on the view for some timeā¦ to allow me turn it back on, in case I turned it off by mistake.
Using vertical-stack is rather important for meā¦
Registered an issue on GitHub:
Update:
I managed to bypass the issue with switching off the transition: transition: flip - need to comment this string.
Then the card started working as expected.
Just out of curiosity: is it in some way possible to define a ā< 5ā state? (less than 5)
i.e. a less-than / greater-than state?
And possibly even a ā! textā (does not contain ātextā)
Hi, I would like to use the state-switch card with a template like thisā¦
type: custom:state-switch
entity: "{% if is_state('switch.night_mode', 'on') and now().weekday() < 5 %} day {% else %} night {% endif %}"
states:
day:
type: markdown
content: Where do you want to go today?
night:
type: markdown
content: Sleep tight!
ā¦ but based on the deviceID (browser-mod), but I dont know how to handle the deviceID in the template. I have tried several option but none workā¦
entity: "{% if (deviceID = "xxxxxxxx") or (deviceID = "aaaaaaa") %} day {% else %} night {% endif %}"
or
entity: "{% if (sensor.deviceID = "xxxxxxxx") or (sensor.deviceID = "aaaaaaa") %} day {% else %} night {% endif %}"
Is it possible, and if yes how ?
Thanks in advance.
At first, I thought there was some divider or border, but several inspections revealed nothing. I then started playing with card-mod, margins and padding, and then noticed that it is actually the other 3 remotes (sets of buttons) that are overlaid and hidden. I could see this quite clearly when assigning e.g. 100px to the bottom margin or padding. No matter which input I select, the other 3 sets always causes this same issue.
The top row of buttons in the screenshot is what sets the selector (not included in the config below).
I can kind of work around this by inserting a phantom row. The faint grey lines still show, but at least the shadows arenāt cut off.
I couldnāt find anything related to this on the forum or the cardās issue tracker. I also considered it being related to the vertical stack card, but couldnāt find anything along those lines either. I tried various things by editing and adding styles in various places in the DOM tree.
Am I the only person to have seen this? Is there anything else I could try?
Thanks @Ildar_Gabdullin ā I actually came across this issue while going through the logged issue, but had no idea it was related. Iāve subscribed to the issue and will wait for a fix.
I have a card with some Broadlink IR control buttons and I want to show this card only if the user is home. So for example, I have two users: Tom and Chris.
If Tom is home and Chris is away: ā Show card to Tom, hide card from Chris
If Tom is away and Chris is home: ā Hide card from Tom, show card to Chris
Both are away: ā Hide card from both
Both are home ā Show card to both
So this is not only dependent on the current logged in user but also on the users state (home / away).
I donāt know how to do this. Can someone help me please.
Can this card use inside picture element? Currently Iām using conditional card but it giving lot of 0.0 error from time to time. I need a replacement option.
Hey guys,
I have a custom-buton-card that shows my tabletsā battery percentage. When I open the FullyKiosk on either of them or even on my computer, that button-card goes missing. When I go to another HA page and go back to the desired one, it appears and stays there. It looks that custom-state-switch can not figure out which user is active for the first time we open the HA in browser. - or Iām doing somthing wrong. Please take a look at my code below and tell where Iām wrong.
Actually at first I tried with deviceID and got the same behaviour. Then I created a user for each tablet and yet the same.
I have an issue with hash state-switch not working when inside custom:grid-layout. I can get it to work by manually typing in the #state in the URL, but only if I first use the state that is not assigned as default. Here is my code:
Further explanation of the issue:
When selecting the dashboard in lovelace or entering the dashboard URL into the browser, nothing loads in the state-switch area. When adding #rooms to the URL, again nothing loads. When adding #devices to the URL, the devices state will load. From there, I can then select the button created for #rooms and #media and those entities will load. I have also tested this by changing the default: state, which confirmed that the default will not load, even when initially manually putting the # in the URL. Iām not sure if itās a problem with my code or a problem with the state-switch card.
Hi! Is there an easy way to make the entity-buttons highlighted depending on the currently selected state?? I couldnāt find the answer here. In the readme, the animation shows exactly how I would want it to be (blue background of the selected state), but in the text (for hash), there is just some kind of dummy light switch entity for each of the buttonsā¦ that doesnāt work. These are then just normal buttons. Should we create a numeric input and somehow check for the value and then highlight the appropriate entity-button? Itās doable, not sure if thatās the prettiest solution. Thanks.
Iāve created radio buttons from multiple switches following this post:
ā¦and so pressing a button (the type has to be custom:button-card) the corresponding switch is turned on, all the rest of the buttons are turned off. The tap action should be something like this:
I think thatās still not the best solution. Thereās no way to dynamically set the default state value from eg. the current input_select option. Perhaps at least thereās a way to run a script on load which would toggle the switch of the selected default state right after the buttons card is loaded.
Even then that still wonāt be a perfect solution. For example, if someone else uses the HA simultaneously switching between the states it causes highlighting different buttons in your view even when no button is being pressed.
Is it possible to have multiple state-switch entities nested within each other? Currently Iām getting the second set of state-switch both showing the on and off state cards (so 2 cards per ui edit).