@shauder Try this instead, card-loader by thomas loven. It makes sure the cards get loaded. I have had this problem on my swipe-cards as well. This seems to have fixed that problem.
I will try this thank you
Changes (22/07/2019)
Breaking Change:
I am terribly sorry for everyone that just adapted my setup, but honestly (and I have mentioned it before) my last setup was experimental and so it was prone to change. In this update there is a major change that changes the way how the frontpage gets loaded for each person. I have decluttered all the double entries as a result of last updates state-switch/multi-user setup. Now every user will load the settings of a single template instead of having multiple configs per user. This makes managing the menu’s a lot easier and the biggest benefit of this is that adding a user will only require you to setup additional input_booleans. (in this case I suffixed every input_boolean for a specific user with _username
, just copy the input_booleans in your setup and change the name to add another user. Easy as it could be and it saves some 6000 lines of code (as this was the case after the experimental setup). If you have adopted the latest release you might have noticed that the performance of it went down and that it wasn’t nearly as fast as of what you were used to in this setup. That was mostly due to the fact that code was duplicated for multiple users, as this is no longer the case you will find that performance is back on par with what you were used to in older configurations of this setup.
Changes:
- Massive overhaul to the way this setup handles multiple users. It is super easy to add another user to your setup!
- Added a card-loader mod on this setup, this will fix the problem where cards would not always be loaded until a refresh. This will make the config wait for those cards to be loaded before showing them in lovelace. You will probably not notice a difference in performance. You can find the link to card-loader below in the addons section of the docs.
Edit:
In the meantime I am sorry for the long wait for some themes. Trust me this is coming, but personal matters have come between all the work. But to give you a preview of what is to come, I have figured out a way to change the border-radius globally which makes me able to change the button styles with just a few clicks.
Rounded Corners (as already used in my setup)
Or with even more rounded corners
Square Corners (as it would be default)
This way you can choose your own preference. This is not yet released, have some patience please.
I am struggling to get notification so work with icons and adding states from entities. I am using your notification_card
decluttering template and this card
card:
type: custom:decluttering-card
template: notification_card
variables:
- color: rgba(255, 255, 0, 0.5)
- icon: home-assistant
- content: Home Assistant version [[ sensor.sensor.ha_latest_version.state ]] now available
But I get this result,
What have I missed, it Thera nothing els making the icon and state to work in the text?
Do you have markdown-mod installed?
No I had missed that one, now it works! Thanks
Try now, I had it set wrong.
Works fine now. Thanks for giving me this opportunity to learn more.
Björne
Thanks for publishing your amazing setup, since it gives us mortals a chance to see what can be done and learn a lot from it. I’ve tried a few of your tricks and ran into problem when I wanted to increase the right-margin of the switch-template and I could not see what could be the problem so I tried a lot of things without success. But finally I found the problem (I think, at least it solved my problems). You’ve used a dash - instead of an underscore _ in two of the tags - margin-right: 60px and - margin-left: 0px. When those were changed to underscore instead everything run as it should and the icon moved to the left. I am so happy, but wanted to let you know in case you run into the same problem (all other tags I use are using underscore). No problem with dash as long as you don’t want to change it from a card.
Regards
Bjorne
Hm it works fine for me the way it is setup now. But honestly I don’t remember all the tags I made by heart. The switch template has so much options that I have decluttered it a lot in the upcoming update. I have changed a lot in tonights update so keep an eye on this thread if you want to know what awesome stuff I have coming up, it will probably be up within an hour or so.
And ty for the compliments btw!
How do you remove the very bottom bar in the iOS HA Companion app or are you not using that app to display the ui?
I use the 2.0 version of the app which is in beta for a few months now. The 1.5.1 version of the app will be replaced by this soon. I actually do not know if it is still possible to join the beta. You can safely update to this if you so wish as it is almost ready to release as far as I know.
Thanks so much for your quick reply.
Whilst I have you, which component do I use to make sure there is a margin left and right of the cards?
Right now they are touching the edge of my iPhone.
You need to add an empty button-card in a horizontal stack.
Visually it would look like this:
- type: vertical-stack
cards:
- type: horizontal-stack
cards:
- empty button card here (see my config for examples)
- your first button here
- your second button here
- your third button here
- empty button card here (see my config for examples)
I hope this will help you. The least cluttered file to find an example for is here: https://github.com/jimz011/homeassistant/blob/5538a01006596d1908bd659bec6bfef9ecdfe928/lovelace/views/lights.yaml
If you are looking for the official 2.0 version of the ios app look here (you will need to open this on an ios device): https://testflight.apple.com/join/TUL8eu8N
Thank you so much! Incredible work, Jim.
Changes (24/07/2019)
Breaking Change:
Yet another major release and for some the release you have been eager to see. Unfortunately this comes with some breaking changes to the setup. I have added a lot of detail to the main menu (watch the renewed video in the introduction section for the full review), but to do this I did not want to duplicate all the code, nor did I want to rewrite it as a decluttering template. So instead of using a decluttering card I used a lot of !includes. This is to have the same page load on different views without the need of adding extra code, with the added benefit: change it on one page = change it on all. Most items that were previously only accessible via the homescreen will now be available in the main menu as well (the homescreen remains unchanged). This change has only added a few lines of code which is great :P.
Themes:
Finally I have gotten around at theming. Well not exactly the entire instance of HA, but just the parts we actually use every day (which is lovelace ofcourse). So to get me started much faster than I could have I have used a global theme named slate thanks to @SneakyPie. I have modified it slightly so that the header would be black (this is necessary for iphone users to have it look nice when switching themes). Unfortunately it comes with a readability downside of the HA interface (which is still easily readable but not the most pleasing). Unfortunately I do not know a way to make the header black without having some other colors change as well (which is the reason it is less readable). No worries, we only need that panel for configuration right? I have thought about this and some of the basic functions can be found in the new main menu (like restarting HA).
So what have I themed then you might ask? Well simple, I have themed everything else in Lovelace what you can actually see (and what our spouses will use every day). And I think you might like it. The idea was to have a close relation with Apple’s Homekit and having seen Homekit in iOS 13 with the new dark mode inspired me to do the same to my lovelace setup. So in this setup I have tried many different configurations but I thought to make it a lot simpler for me.
Dark Mode:
Yes with this theming stuff it means I can now set themes globally (and I mean just the lovelace frontend) and it is super easy to edit them. All configuration that was required is now set in all the templates/files and the result will look something like the video below. And it can be even better! Dark mode will automatically enable when the sun sets, light mode will be re-enabled when the sun rises again. Just like iOS 13 would do it and just as Homekit would show it to you. Click on the link to see the supporting video!
Summary:
- Added a lot of new menu items and shortcuts
- Added dynamic themes
- Optimized a lot of code
- Minor bugfixes
Screenshots:
Added more menu items:
Light Theme:
Dark Theme:
Videos:
Themes Preview:
Full Preview:
Yet another awesome release, thanks for the inspiration! I can’t find the folder themes on your GitHub, is that anything you would like to share as well?
Finally got around to migrating to this custom card you suggested and now my errors are gone, thanks!
Hi, yes I am terribly sorry I totally forgot this . It is uploaded now and should be available on GitHub.