#frontend-archived
1 messages Β· Page 73 of 1
Ian you where useful for once
you posted awhile back about paper-card stuff π
--paper-card-background-color: none
--paper-material-elevation-1_-_box-shadow: none
--shadow-elevation-2dp_-_box-shadow: none
that
finally had some use for it
so tnx for that π
Jeaves?
mines called Bob - my wife loves Bob more than me π’
or just fallen asleep on his keyboard
Β―_(γ)_/Β―
Okay, need some input. For a new card I'm working on, I want to take in a simplified version of a jinja template (much like how @polar kelp did useful-markdown-card) but I also want to be able to apply regex on any of the sensor values. Does any know of a way that I could define such a standard that would be clean? I'm no jinja expert so maybe there is already a standard way they do it that would work?
e.g.
entity.title = "New Show 01x03"
template: [entity.title]
will give me: "01x03"
does that look good or not?
Most people recognize slashes as regex delimiters [[entity.title]]/[0-9]{1,2}[xX][0-9]{1,2}/
just seen @polar kelp card based on your comment - that's perfect for what I need
use \d instead of 0-9
But I'd suggest some kind of jinja filter-like syntax
I don't care about my actual regex being valid or not, but the syntax
[[entity.title | substr(regex_goes_here) ]]
going to use it for a text based notification on where last motion was detected based on a sensor I wrote - thanks @polar kelp
You're welcome! Send me a picture when you got it done.
will do π
substr isn't a good name for the function, though.
so no matching for S01E09 etc ?
I think I'll do / as that is what I'm familiar with as well and will be easy to extract and apply
[Ss][0-9]{2,3}[Ee][0-9]{2,3}
@buoyant skiff it was just a quick example. It's more about the templates ability to handle regex
not the regex itself
The idea is that a user could put any regex they want for the particular attribute
This is going to be for my upcoming tv show card, specifically
But could be applied elsewhere
The current list-card has an option for regex
Would probably be a good thing to add to the useful-markdown-card as well
monster card on steroids
@polar kelp - thought about joining us over at https://github.com/custom-cards ?
the tracker is already tracking his cards
we are just missing an entry on
.awesome
Awesome Home Assistant - A curated list of amazingly awesome Home Assistant resources. https://www.awesome-ha.com/
hmm, my updater thingy stopped working ages ago - need to look into that.. thanks for the reminder
update it π
actually if i press update
and it updates
but if i check again
it resets the card
to 0
might be worth checking in on some other day π
yeah think that's what it's doing... will look into it
@buoyant skiff I tried that now, and it does the eepected thing for me, enable debug logs, and try again and give me the output if it still fails
sure but not today π
@polar kelp cards dont works with custom updater cards, would be nice if it worked also π
ahh cool nice job @wheat current
Generating json for lovelace-column-card
Generating json for lovelace-fullykiosk
Generating json for lovelace-player
Generating json for lovelace-slider-entity-row
so its all there
along with the useful markdown card
ya cool
All his repos starting with lovelace- should be there and working now
I am not a fan of the hashes for versions, personally
not that we are keeping great changelogs, but makes it a bit harder to follow
Nice list π
the aparment summary is taking shape π
gonna swap out the weather summary for useful-markdown also
but the greeter card is nearing completation
that top font is killer
loving how that cards adapted even further..
thinking off a magic mirror right now using that card actually. thoughts?
Just get a black BG and that should work
Hi guys! I'm trying to make a sensor-only dashboard, some kind of overview of all the sensors in the house including weather predictions etc.
I could use some inspiration π
Overview of all sensors will not be pretty
I disagree
I keep a monster-card with all sensors in my "debug"-view.
Nothing special, just a normal entities card.
do you have a screenshot of what it looks like?
That would look something like this https://image.ibb.co/b98WTK/image.png
They might work as a lot of squares in different colors on a dashboard
Just takes effort into making it look good
Like gradient backgrounds
So a pure sensor dashboard is possible to make pretty
that is nowhere remotely close to what I want to achieve @wheat current
Go for it
Well.. you asked for a screenshot of the "debug" view with moster-card
also, quick question, how do I add mdi icons to a sensor entity in lovelace?
yes, but you're not showing sensors @wheat current
Those are definitely sensors
@vapid field unless you get a different img then me when you click it, all of those are sensors
sorry I meant environmental sensors π
Still, a list is still a list
I'm out
What are you expecting to be different? There's names and values.
sigh, nevermind
He doesn't want a boring list he wants a dashboard
Haha
I'm I the only one that gets that
Haha
He asked what my list looked like. That's it.
Meh back to the movie
ask for help/screenshots. shit on what is provided
well tbh, it looked like shit
lol, it doesn't have to look awful
the refresh button in top right side in lovelace, what service would be that to be able to do a button?
F5?
Can you put pretty much anything under a picture element?
not anything, just the elements listed here https://www.home-assistant.io/lovelace/picture/#configuration-variables
Any core or custom (that you have added) can be added to picture-elements
Their behavior may varry from element to element
Like I guess what I;m asking is the cards listed under lovelace can be used in a picture-element?
I'm trying to get spotify to show up
That would be a media-controll-card
for that you need
- type: custom:hui-media-control-card
it's a part of the core, but you have to add it to a picture-elements like that (same for all core cards)
type: custom:hui-CARDNAME-card
- type: picture-elements
image: /local/empty.png?v=1
elements:
- type: custom:hui-media-control-card
entity: media_player.spotify
style:
top: 10%
left: 50%
width: 50%
height: 50%
give me:
- type: custom:hui-media-control-card
entity: media_player.spotify
For elements in piture elements, yes
ok got it. that makes more sense
I missed that
Thanks!
Now I'm getting somewhere π
Nice π
took me like 2 hours to make some svg files and get this going last night: https://gyazo.com/2ddaca61d0cac2086891f1d0b83f5b48
seems like once you get the hang of it makes more sense and goes quicker! π
SVG for the icons? Trying to understand the benefit of using SVG... Can we not just use PNG images?
@raven nacelle You can use PNG, but SVG is more funner.
Spending two hours for those icons does not sound like lot of fun π
Well maybe not to you!
Fair enough
He mustβve typed them by hand. π
I just want to make sure I'm not missing anything
Well, SVG is animatable, and can be styled with CSS.
Like, literally, you could have the legs of the guy running instead of being static in place.
Yup.
Oh that would be cool
π
See I knew I was missing something
Animated SVGs are a whole βnother animal.
Look up the SVG <animate> tag
Thatβs what I used to build the fading image gallery the other day.
I found the Svg of a floor plan that I want to modify and use
Where I can show door opening
Lights on/off etc
Thatβs another thing β in situations like a floor plan, you can scale it to βunitsβ
Meaning?
Got it
Or, better yet, 12px = 1ft
1px = 1in
Since they are vectors, it doesnβt matter π
I need to explore this further
SVG is fun, but also super easy to fudge up if youβre not careful.
Look up some animated SVG examples. Your mind will be blown.
Thanks for the explanation...I need to start somewhere π
Indeed, sir!
SVG is just not your βaverageβ graphic, itβs much more advanced than that.
Itβs the first of its kind (that I know of) that is cross-browser compatible and is generated from markup.
I'll start with simple stuff
Then start with a rectangle π
Then start with a rectangle π
A triangle?! Are you mad?! Start with a line!
@raven nacelle Try this:
<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" version="1.1">
<line stroke="#000000" stroke-width="5" x1="10" x2="90" y1="10" y2="90"/>
</svg>
You can view live changes here: https://www.rapidtables.com/web/tools/svg-viewer-editor.html (click the magnifying glass after changing the code)
Or you can use an online SVG editor, like here: https://svg-edit.github.io/svgedit/releases/svg-edit-2.8.1/svg-editor.html
those are some cool utilities
π
What would a weather sensor entity go under?
How can I include groups defined in packages in entities cards?
I only see the title of the cards not all the items the group contains
@meager grotto One of the main goals of Lovelace is to get rid of groups π
To "mimic" a group in Lovelace, use an Entities card.
@empty heath I know but I'm using a package someone shared on the community and it contains groups, which are create at run time
testing out circle-sensor-card card
I want the group contens to be displayed on lovelace
~monster-card Sounds like a good use case for the monster card!
Monster card is a magical type of card. Because it's dynamic if you're smart about it, you can have one card that adapts and that you don't need to touch when adding new entities & sensors to your setup. Supports both inclusion and exclusion filters with wildcard for entity_id: https://github.com/ciotlosm/custom-lovelace/tree/master/monster-card
@meager grotto Simply put, it's not easy. Here is how the group stacks up against Lovelace: https://hastebin.com/losicoqaxo.css
morning
@empty heath I'll just copy the entites from the package group to lovelace and see to use the monster card to list all the battery values
I am honestly not sure of a better way, unfortunately π¦
where should I put the custom lovelace cards?
inv your local folder
in <config dir>/www/monster-card.js
And then add them to ui-lovelace.yaml like so:
title: Home
resources:
- url: /local/monster-card.js
type: js
views:
...
@empty heath Thanks! Monster card saved the day
Hello everyone! I have a noob question that I can't figure out for myself - I'm on 0.76.2 and I want to convert my current config to Lovelace. I'm running a standalone (virtualenv) HA setup. Where can I find a conversion/migration tool?
@vapid field https://github.com/dale3h/python-lovelace β you can run this to migrate your config.
Omfg, it just dawned on me that I could write a script that uses the new auth to get config for conversion to Lovelace. Iβll have to study that front end that balloob wrote the other day!
moaaar coffee
hmm got a stupid idea to change icon when on night to moon sensor π
need to create an even more complex template sensor
hehe
thanks dale3h!
@empty heath: your migration script worked just fine, thanks. However, some noob questions - I noticed that elements inside groups have lost their ordering - wasn't it supposed to be preserved? Also, groups that were collapsed are now expanded (group within group) - I suppose I need to see how to collapse them again, right?
Morning!
I'm trying to use the tracker card, but can't get it to work. Get the following error in the log "http://hassio.local:8123/local/lovelace/tracker-card.js?1535014573.5867672:101:83 TypeError: undefined is not an object (evaluating 'domain.replace')"
open a issue on github instead if its issues with a custom card
on the tracker card
hi, is there a way to turn switches into pushbuttons on the interface? i have a broadlink ir remote and have setup all the switches i want in the config with command_on and command_off for the same ir codes because all i have are pushbuttons on the actual remote
The absolutely easiest way is to make it a picture or picture-entity. With horizontal-stack you can make them smaller than an entire card width.
Another, more flexible option is to use picture-elements.
Or, reading your question again, I think what you want is a template switch.
switch:
- platform: template
switches:
my_switch:
value_template: {{True}}
turn_on:
turn_off:
- service: whatever.turn_on
data: {entity_id: my.thing, option: more_stuff }
Then you can use a glance card to make "buttons" from them.
thanks, ill try that out
man i really need to look into templating, every time i stumble over it im overwhelmed
Here's a good summary: http://jinja.pocoo.org/docs/2.10/templates/
The hardest thing is figuring out where you can and cannot use it...
@vapid field You could also try the following: https://hastebin.com/akicajuney.coffeescript It's a glance card with icons only. I use it as a remote for my tv.
cool ill give it a try, thank you
thx @empty heath for the help, switched over to lovelace for default
@vapid field I had not thought of entity order previously, nor had I considered that some people may have wanted some of their groups to stay collapsed! Currently, the only way that I know to collapse them is to change them back to group.xxxxxxxx inside of an entities or glances card (instead of them being their own entities card).
@meager grotto now you need to make it look pretty
@meager grotto Indeed, sir!
for now it's looks pretty good
does anyone have a link to that website that has lovelace examples where you could toggle the ha code
~sharethelove
A place for LoveLace Config https://sharethelove.io/
This is a good thing to check the stickied messages for.
It's the first one... and now the last too...
πππ
Looks like I need more coffee π
is there a custom card you can set text on and make a service call without it being a picture elements or picture?
A button card?
@wheat current sure
without the picture. seems like width is decided by the picture, i want width to be decided by how much text is there, single line
Create a nice looking button (with text) in MS paint and use this to display is ?
https://www.home-assistant.io/lovelace/picture/
Why paint? :-))
dont knock paint its l33t as fuck
I had that open π
Any picture editor will work
@wheat current pretty sure i uninstalled it when i reinstalled windows, it's one of the first things to go. Don't want that filth anywhere near me π
Anyone remember paintbrush? With the single-color eraser.
@polar kelp single color you say π±
Yeah. It would erase the currently selected foreground color ONLY. Leaving all others.
@empty heath So https://www.dropbox.com/s/nkou2s2tolms696/20170615-Floor-plan.zip?dl=0&file_subpath=%2FFloor-plan.svg the svg of a floor plan that I have in mind. I am still not sure how can we have it open/close door, for example, based on state changes
Can I change the icon on a glance card based of the state, I want to do this on a input_boolean. I set the value using automation and I only want to see the title and the icon not the state it self.
@raven nacelle I will have to look into it and see how to trigger SVG animations.
Cool....thanks!
ugh, why is the refresh button at the bottom of the
? annoying
hehe
added a small lights on counter to the summary
its all starting to come together
Hi all. I'm trying to get the battery level from IKEA TrΓ₯dfri motion detector to show up in a monster card
I have tried this to get everything, but its just empty
- type: custom:monster-card
card:
title: Batteritest
filter:
include:
- entity_id: '*battery*'
I can get the value from the dev-template by using:
"{{ states.binary_sensor.tradfri_motion_sensor.attributes.battery_level }}"
So how can I get to show up on the monster card?
Not like that since the entity_id is binary_sensor.tradfri_motion_sensor
- type: custom:monster-card
card:
type: glance
title: Monster
filter:
include:
- domain: binary_sensor
attributes:
battery: '< 100'
might work
Nope, didn't work :(. Still show up empty
@proven flint sorry about that, updated the example
With a few changes the sensor showed up.
attributes:
battery_level: '<= 100'
When it show up Is it possible to show the actual battery value instead of the state of the sensor (on/off)?
@proven flint for that look into this card https://github.com/ciotlosm/custom-lovelace/tree/master/entity-attributes-card
@wheat current That worked great! Thank you
I need the image used in sharethelove.io about kodi remote card. His name is "empty_long_placeholder.png".
Can someone share ?
@buoyant skiff u fix?
isnt it there already ?
nope it wasnt
but @foggy tendon its just an empty transperant card
so use whatever you feel like to replace it
@buoyant skiff hmmm... too difficult for me.. i'd like to have it... π
π
π π
I am trying to use custom weather-card and getting this error. weather-card.js:34:79 Uncaught TypeError: Cannot read property 'state' of undefined
from where did you get the card?
that error often inicate that the entity you have used are invalid
dont think that card is completed yet
And the card config?
I got it, I was missing sun component in my configuration.yaml π¦
It is complete
here's the card config
- type: "custom:weather-card"
entity_weather: weather.yweather
entity_sun: sun.sun
animated
screenshot pls
Ya its working
animated one
thanks @raven nacelle
ahh that one
was pondering if it was the one im waiting for
was kinda perplexed there for awhile
Marius was working on it
https://github.com/ciotlosm/custom-lovelace/tree/cartoon_weather/cartoon-weather-card @buoyant skiff this is the one you wanted π
@buoyant skiff do you have a repo with your config. I'd like to do a notification summary like that
nope 0 repo of my personal config
booo
A place for LoveLace Config https://sharethelove.io/
not a fan of posting all my configs online
and that way you guys get to cherrypick instead
and im working on my summery at the moment
that floor plan overlay is sick
will post the new greeter card when im done
yeah it is
so far the only floorplan im contemplating of adding to my setup
is?
the one you pointed out on that site π
Is that a monster card
really need to rework the weather summary
be sweet if you could have a live background
like here is a camera of my garden with stats overlayed
guessing that's possible
setting a camera as a background isnt hard π
on a side note what cameras are you using
I want to do wyze but don't want to be running firmware I can't verify.. I'm probably going to go with ubnt cams
oh lol
goti t
I have a shit ton todo but I want to make a love lace card that aggregates all the fire alarms
and only show the one status
The cover love lace card to me needs lots of work
been working on this card alone for the last month
I was confused on if my garage doors were up or down, be sweet if there were known cover types for cards like doors vs windows vs screens
yeah
this weekend is super exciting
getting a metric shit ton of smart devices installed throughout the house
which means more love lace work todo π
How do I force my duckdns domain to redirect to lovelace file?
You cant, that is not how DNS works
You can set it on the client
https://www.home-assistant.io/lovelace#setting-lovelace-as-the-default-ui
@wheat current Bingo! That was easy. Thank you
@pallid flame it is a per device setting. It doesnβt automatically change to Lovelace in all devices. You have to explicitly set it on each device for now.
Is it possible to nest a markdown and entity card under a conditional card?, it seems to only process the last card in the list if you put both in so I'm kind of assuming not π¦
Vertical-stack-card is your friend
ta sir, I did notice that in one of the examples but didn't think it'd matter - one to crack on with tomorrow π
Finally got around to setting up lovelace. Didn't do anything crazy, but I'm loving how it turned out and how intuituve it was to setup compared to before. Great jobs to all the devs who helped create this.
OK. Hoping for some help understanding here. This would be my first venture into Lovelace territory, and I'm interested in using the alarm card as a frontend for an alarm panel. In order to do this I already need to have something like manual alarm configured, is that correct?
you need the alarm control panel component setup
thanks for confirming. HA + Lovelace is complex but powerful and super flexible
slowly gaining ground
all i all trying to do a image for when people are home and when they are away , i can get one to work but i cant get more than one to work
views:
- title: Home
cards:- type: picture-entity
entity: device_tracker.daddy
state_image:
"home": /local/dADDY_home.jpg
"Away": /local/dADDY_away.jpg
entity: device_tracker.mummy
state_image:
"home": /local/Mummy_home.jpg
"Away": /local/Mummy_away.jp
- type: picture-entity
or is there a better way to do this
think ive found a bug with lovelace and would like to know where the best place to report it is please?
also just to double check its a bug... if you define an icon for an entity under customise.yaml the icon changes color as the state changes as expected, but if the icon is defined in un-lovelace.yaml for an entity the icon does not change (the state still does)
specifically, entity-filter card, set to glance and tap to toggle action
ok i got that working π i just need to know if i can change the size of the images in Picture Entity Cardon the fly
Good evening all, Does anyone know if it possible to rotate an image in the "state_image" card? I need to rotate the image 90 degrees. Thanks in advance.
@gentle garnet that is a bug, but it was already reported and fixed in https://github.com/home-assistant/home-assistant-polymer/pull/1587. The fix should be in the next release
For future reference though, Lovelace bugs should be reported in https://github.com/home-assistant/ui-schema
@tender wasp ahhh great thanks!
@plain torrent There is no state_image card in lovelace. Are you referring to picture-entity?
@half cradle picture-entity adapts to the aspect ratio of the provided image. You would need to edit the images to the desired size outside of home assistant
No issues thanks @tender wasp
mmm just resized the images and the size in HA didnt change
I'm not sure what you are after exactly. The card will fit the width of the image to the width of the card, then expand to whatever height is necessary to maintain the aspect ratio of the image. Are you trying to make the entire card smaller?
crash how are you trying to to resize the picture ? mind showing us a snipplet of what your trying to do
@buoyant skiff just trying to make the image look smaller and fix across the screen
title: Home
views:
- title: Home
- type: horizontal-stack
cards:
- type: picture-entity
entity: device_tracker.daddy
state_image:
"home": /local/dADDY_home.jpg
"not_home": /local/dADDY_away.jpg
- type: picture-entity
entity: device_tracker.mummy
state_image:
"home": /local/Mummy_home.jpg
"not_home": /local/Mummy_away.jpg
.format
To format your text as code, enter three backticks on the first line, press Enter for a new line, paste your code, press Enter again for another new line, and lastly three more backticks. Here's an example:
```
code here
```
Click on the link to learn how to format: https://raw.githubusercontent.com/skalavala/HassBot/master/format.gif
hold on i will do it on a share place
~share
Please use https://www.hastebin.com to share code.
Did someone say the other day they had a good way to display fan speed?
Β―_(γ)_/Β―
there are various ways to do that
just depends on what you want
can use a circle senor
or gauge
or bignumber
or just plain boring state label
hmm I'm trying to do something like this https://gyazo.com/3f4a2feaab2b90ce781cc69f016aabb6
and have each circle be like a different seting
Someone suggested a slider with steps, but I don't think that exists in the paper material design entity set...
or what looks the coolest
lol
ah slider would be cool, I think I just need good old buttons for now?
maybe I could just make each button it's own image?
π€
That's probably an easy and robust way.
Can that be used as input too, though?
again i suggest you check the pinned messages in this channel
Yeah or is it just displaying info?
sorry what question did i ask that is answered in th epin posts?
I don't mean to break any rules
didnt break any rules
@half cradle A picture will always fill the available horizontal space. If you want it smaller, you can put two or more beside each other using horizontal-stack.
just giving you a good way to check before asking
@polar kelp matee i tried that and all i get is a unknown view
@half cradle posted a message that is more than 15 lines. It is now available at: https://hastebin.com/juruqoqeve
That's because you're trying to make the horizontal stack a view, not a card
At 16 lines we can get away with a π€¦ and Please don't do it again π
You need
cards:
- type: horizontal-stack
cards:
- other cards```
cards:
- type: horizontal-stack
cards:
- type: picture-entity
entity: device_tracker.daddy
state_image:
"home": /local/dADDY_home.jpg
"not_home": /local/dADDY_away.jpg
- type: picture-entity
entity: device_tracker.mummy
state_image:
"home": /local/Mummy_home.jpg
"not_home": /local/Mummy_away.jpg
Please use code formating. I can't tell if your indentation is correct. Or rather yet, use hastebin!
What you have there is an empty horizontal-stack card followed by two picture-entity cards
In yaml, everything that starts to the right of something above is inside that above thing.
If it starts on the same column, it's "beside" it
mmm ok mmm
and summary is done, tnx for the useful markdown card @polar kelp
@polar kelp ok i dont get it i have been trying to get this to work all afternoon
have it matching the example and no i just get a unnamed view added and no line up
You're so close
https://www.hastebin.com/lericasofu.bash edit: sorry, forgot a colon
I think you can see how the cards for "blocks" there, and how the picture-entity cards are "inside" the cards property of the horizontal-stack card, which in turn is "inside" the cards property of the home view, "inside" the overall views.
Ping @half cradle, just in case you're gone.
thanks mate looks good so when i want something out of the type: horizontal-stack i just start a new card ??
Yeah. So the dash of the new something should line up with the dash before type: horizontal-stack.
how can i use a variable from set hass(hass) in set config(config)? would I use hass.myvariable? or ${hass.myVariable}? neither of those worked. Second question, hass updates frequently, how infrequently does set config update?
You can't. setConfig is run before hass is asigned
setConfig is run once, when the card is built. hass updates whenever something happens in homeassistant
There's probably some other way of doing whatever it is you want, though.
Ahh ty. Hmm. I have a temperature variable in Hass that updates frequently, I have another variable that decides the output based on the temperature variable, I don't want it to update as often as the temperature variable is updated, but maybe whenever there user changes from another view on the UI to the view this custom card will be on, or just every couple of minutes.
@buoyant skiff in your greater card information how you making the text brake to the next line?
i was testing but text dont brakes to next line, keeps going to the side and is hide
you got any exemple at hands?
awsome job you been doing on this greater cards
just get state elements
k
hmm never used that where i find info about it?
or do you have any hastebin code exemple for i can see a exemple?
later kinda bust atm
sounds good mate
@prime umbra https://hastebin.com/etuwomoseb.css
very nice @buoyant skiff just not getting how to set the display: block
is the breaks done in the sensor template ?
defined by the width
yes that i get it but then each line you would need to do a template sensor for it?
so all be with same with but in diferent lines
it easier to start with what you got planned to be used
like is it a sensor ?
that has a along sentence
or is it something else ?
if you want a summary like i did
then i suggest useful markdown card
ahhh good idea
by the way your time of day sensor
Good Morning, user
i replace the user with the card username-element
then he knows what user is on, seems to work
the thing is you have to put under the good morning sense the names will change etc....
@dense roost You probably figured it out already, but you could set a flag variable.
setConfig(config) { this.variableSet = false;}
set hass(hass) {
if(!this.variableSet) {
do_stuff_once();
this.variableSet = true;
}
do_stuff_on_update();
}```
why might some media players (for example) not display in lovelace?
and could it have something to do with the following errors?
2018-08-24 20:39:35 ERROR (MainThread) [frontend.js.latest.201808040] http://hassio-vm:8123/frontend_latest/app-c65b4028.js:445:3536 Uncaught TypeError: Cannot read property '_stateDisplay' of null
2018-08-24 20:39:35 ERROR (MainThread) [frontend.js.latest.201808040] http://hassio-vm:8123/frontend_latest/app-c65b4028.js:2833:1495 Uncaught TypeError: Cannot read property 'primaryTitle' of undefined
2018-08-24 20:39:36 ERROR (MainThread) [frontend.js.latest.201808040] http://hassio-vm:8123/frontend_latest/app-c65b4028.js:445:3536 Uncaught TypeError: Cannot read property '_stateDisplay' of null
2018-08-24 20:39:36 ERROR (MainThread) [frontend.js.latest.201808040] http://hassio-vm:8123/frontend_latest/app-c65b4028.js:445:3536 Uncaught TypeError: Cannot read property '_stateDisplay' of null
So it seems to have a state
shows in the states view
also in lovelace you can see the entity
just does not work as a media player card
so now that you covered that it works every where but lovelace
then take peak at the lovelace entry
and see if you did a mistake
- type: custom:monster-card
card:
type: entities
filter:
include:
- domain: media_player
shows all the other media players
is your whole interface built on just monster card or something ?
at the moment probably half of it.. but it's mainly for testing of setting up a new hassio instance
How can I change the color of icons depending on state i lovelace?
and is it possible to change the state default text? Instead of for example on/off
@proven flint - this is how I do mine.
entity: switch.office_led_lights
tap_action: toggle
image: /local/images/ledstrip1.png
state_image:
'on': /local/images/ledstrip1.png
state_filter:
'on': brightness(850%) saturate(3.5) drop-shadow(0px 0px 20px red)
'off': brightness(400%) saturate(0.8) drop-shadow(0px 0px 10px gray)
style:
top: 13%
left: 59%
width: 10%```
@tender wasp - this is what I had.. - type: image entity: switch.office_led_lights tap_action: toggle image: /local/images/ledstrip1.png state_image: 'on': /local/images/ledstrip1.png state_filter: 'on': brightness(850%) saturate(3.5) drop-shadow(0px 0px 20px red) 'off': brightness(400%) saturate(0.8) drop-shadow(0px 0px 10px gray) style: top: 13% left: 59% width: 10%
I just edited the image in photoshop and we are good. Thank you for asking.
@proven flint If you want to change those things you currently have to do it with templates in the regular config. There's nothing in lovelace for it (yet?).
really quiet in here today π
Shut up
respect my authority
Nah, Appdaemon gets my attention tonight π
hehe okey π
@subtle rune thank you. Trying to get my head around the templates now.
@mild veldt automations. Trying to move my current yaml ones over to ad
Is it even allowed to mention appdaemon d*shb**rds in #frontend-archived?
I think there is a law against it, but can't find it now
π
lovelace, panel:true, picture-elements, image:/local/floorplan.png
Is there any chance to control size of floorplan image? now it is everytime stretched to fill page width
thanks
well its designed to do that
but
if you make a smaller floor plan you can add that as a layer
thats one way to get it to the size you want
@buoyant skiff can you explain it on some example? because even if i have 700x469px image it is still stretched all ove my whole screen
first make a transperant image
@buoyant skiff FullHD screen
have that with panel true
that makes it use the full screen
now take your defined sized image
add that as an image
style it with width and height
and set it to where you want it
it all in the docs
thats how i would have done it
a little layer action
- type: picture-elements
image: /local/empty_placeholder.png
elements:
- type: image
image: /local/myfloorplan.png
style:
add style stuff here
does that make sense ? @raw sky
@buoyant skiff yep, thanks! I'll try
np
~thoughts @buoyant skiff
@buoyant skiff Please don't use the support channel to think out aloud. Go through the basic troubleshooting steps and then highlight the specific problem that you are facing. We don't have access to your system and it is hard for people to imagine what may be going on.
That snippet wasn't what I thought it was, lol. I thought it was more along the lines of "please try to combine your words into fewer messages instead of spreading them out over tons of messages."
@buoyant skiff any idea how we could use the greeter card to everyday display new image random automatic?
https://github.com/custom-components/camera.unsplash
Set interval to 1440
hmm
.away
Usage: ~afk <message> or ~away <message> or ~seen <username>
@buoyant skiff use #botspam or a PM to @kind shell for that π
@wheat current on unsplash you have to create a app?
yes
on Redirect URI & Permissions what you have to check in?
or, you have to pretend you are creating an app
this is what I have
no other boxes
ya cool is what i have set
then where you set the pics you want for your slide show?
You go to the non dev part of their site and create a collection
Then your collection will have an ID (in the URL)
Like these:
2467205
2465889
When you open your collection it's in the url https://unsplash.com/collections/2467206/wide
is there now but not showing as a cam, is like a badge
- type: picture-entity
title: Unsplash
entity: camera.unsplash
camera_image: camera.unsplash
collection_id : 24723
interval: 370
somehow you manage to mix platform (configuration.yaml) and lovelace (ui-lovelace.yaml) configurations π€·
lol
@wheat current that's a felony!
got it to work but for some reason is getting is showing pic that isnt in my collection lol π
It only do that if you are not supplying an id
making some progress on my horizontal-list-card
might be not making it generic enough and really trying to bend it to my will to get this upcoming shows list to look exactly how i want
Everything can't be generic, that is boring
I mean, generic in the sense of working for different forms of data besides my tv show lsit
list-card works pretty decent with my new Personal Capital card: https://imgur.com/a/ATj4kXj
man you have a lot of accounts π
And a dedicated "joint" account, I need to get me one of those π
@mild veldt Did the session close for you too?
@raven nacelle no, but I've restarted a few times today while playing around with component changes
ok
i don't think it's a practical component until the ability to load/store/refresh a session is possible
Yeah.....the sessions need to be resolved
I'll have @wheat current , who can't even use the service, solve it for us. Thanks, @wheat current !
LOL π
He can create an account for us π
I think I have a great start to an awesome component and hopefully I can find time to invest in understanding how it handles sessions better
if we can get rid of the 2fa, then we can just reestablish the session
and the user will not know
@wheat current got it to work now my question is how can i put the greater card on top of it for the info, would that need some type of transparent layer?
how would you go about it
Addong z-index: 1 to the camera and z-index:2 on the rest, and setting the camera element as the first in the list
It looks like you only would have to store the session data in a file
But for me to help make/debug this would be almost imposible due to their restrictions
what restrictions?
Need to be US citizen
not a citizen...resident
Even worse π
@wheat current that's the library I'm using. Session restoration is currently broken
:/ Then I sugest you open an issue at that repo π
trakt: https://imgur.com/a/uJydrqk vs my horizontal-list-card: https://imgur.com/a/9Gfkq4u
you know it π
That's really cool
God I have no clue how I'm going to find all this awesome stuff
lol
the list of projects just keeps getting longer
yes it does π
the tracker card should allow you to install new cards/components soon, though
i think i'm going to start working on a proper trakt using their api rather than just an rss feed
will allow people to mark shows as watched and what not
yeah! share the love is awesome
I just can't keep up wiht it all
I spent like 4 hours making fan controller last night
I'm just trying to get somethign basic going first lol
it's the start of something totally new, so lots of ramp up
I know and I want it all
lol, same
Anyone have any idea about the status of groups in Lovelace? I have several automations that work of of a interior light group. Makes sense that views go away but, hoping groups stay i some form.
groups?
You can still use the same groups from HA
depending on what you are doing
@tame dove Light Group and Group are different things. Light Group is going no where
I never could figure out how to setup light groups.
So this returns true even though the state is off....Any ideas?
"{{ is_state_attr('fan.bedroom_fan', 'speed', 'high') }}"
yeah still shows true
I am very much still learning but this works for me in templates.
{% if is_state('alarm_control_panel.alarmcom', 'armed_away') %}
yeah see I need to capture the entity attribute
weird thing is I thought it was working :/
but that was also at 3am
π
Yes but I think taking the 'speed' out
is there more to what you posted? Usually if you have an if statement you should have an else or endif
this convo is better suited for #330944238910963714
So here is a template with attributes
{% elif states.switch.kettle.attributes.kwh|float < 1000 %}
@mild veldt ,you are correct sir
morning
Good night?
Morning
you guys UK?
Even easter...er
No clue π€
Iβm Swedish
Nice. I'm Western US
also swedish
Must be something in the water over there, all the knowledge comes out during these hours π
Homeassistant seems to be unproportionally popular in Europe, for some reason. Just my impression.
Interesting, they should take a poll!
Thinking of doiing a material design for system info
Good morning!
As in Using the normal elements? Paper is Material Design, isnβt it?
yeah but taking it a bit further
not just having it dull and one color
with panel: true i should have relative control inside the element
Sounds nice
something to ponder on today while im drinking beer and playing pinball
I was actually scrolling througt the Mdi guidelines yesterday. I love the bad examples.
Like this: https://material.io/design/environment/surfaces.html#properties search for βgelβ. Itβd be awesome to see a card do that.
nice
should be frameworks for css available
makes it easier to breakdown what i actually need
urgh gotta go to the liqour store when they open up
I would like to have a particular switch view with the ON & OFF settings visible together (used to be a lightning shape type switch)
can I have that in Lovelace ?
homeassistant:
customize:
switch.my_switch:
assumed_state: true```
in your homeassistant config should do it.
Then you'll get the two lightning bolts thing...
Looking to get this going https://github.com/thomasloven/homeassistant-lovelace-gen but I am getting an error code when running the shell script. Running hass.io - 2018-08-25 17:56:10 ERROR (MainThread) [homeassistant.components.shell_command] Error running command: python /config/lovelace-gen.py, return code: 2
NoneType: None
That means lovelace/main.yaml doesn't exist (/config/lovelace/main.yaml for hass.io I think)
As stated on te page you linked
but running the shell command should have made it no?
sorry lovelace/main.yaml does exist
command creates ui_lovelace.yaml
Hey guys, I have a simple question here: I have a timer into glance that only show when he is hdle or active, do you know a way to make it displaying the time left when he is running ? I tried to make a custom sensor with a template but it doesn't refresh every seconds
Hm, is there a simple way to have lovelace Picture-Glance switch on a light-group? When I add it as an entity and tap it it brings up the group members rather than just.. switching them all on
@next rivet not currently but I would imagine that it will support tap_action per entity before long
Ah, shame
Burp
Damn it is quiet in here
i'm busy doing yard work π¦
@subtle rune not spending time with appdeamon today also?
@mild veldt nobody asked u !
π
@buoyant skiff I'm spending time with my hubby π
hey all, i have whats probably an extremely simple question, but cannot find a definitive answer anywhere.... im trying to play around with lovelace and set a background, but cannot find where to put the background image to make it available
some say to use /config/www and refer to it as /local/ but that didnt work
ah never mind, im an idiot - just needed to restart it after making the folder...... my bad
Any tips on device tracker? In legacy UI - I had it setup to track my immediate family all the time using life360 and update their location but also to show visitors when they are at the house via the Meraki API. This was done by setting the βhide if awayβ flag - Lovelace doesnβt appear to honor this setting and the glance card example filters only based on location from what I can see.
doesnt honor the away flag?
have you try the state_filter?
state_filter:
- 'home'
@obsidian jacinth try not_home
@glossy birch did you mean that for @swift violet ?
@obsidian jacinth ah!, yes π
all good, i forgot to tag them, so now they might see it at least haha
hi all spending some time building some cards in LL i am trying to build some image cards to change the tv channels i have given a few things a go and still go good i am sure its only something smasll
- title: TV Controls
cards:- type: horizontal-stack
cards:- type: picture
image: /local/10.jpg
service: media_player.play_media
service_data:
entity_id: media_player.maintv
media_content_id: 10
media_content_type: "channel"
- type: picture
- type: horizontal-stack
@half cradle use formating
shit sorry
.format
To format your text as code, enter three backticks on the first line, press Enter for a new line, paste your code, press Enter again for another new line, and lastly three more backticks. Here's an example:
```
code here
```
Click on the link to learn how to format: https://raw.githubusercontent.com/skalavala/HassBot/master/format.gif
ok got it works π
I am trying to get this to work off a clean install and it does not work - https://github.com/thomasloven/homeassistant-lovelace-gen
does anyone here run this setup? I am using hassio
π© π«
Five minutes from "I need help" to "I can't take it any more" - that's a new record π
I just got out of the hospital yesterday from surgery so feeling a bit over it sorry
It's ok, we're getting used to the instant gratification crowd π
More seriously, I hope you're doing ok
Should this be in the main.yaml ? - https://github.com/thomasloven/homeassistant-lovelace-gen/blob/master/lovelace-gen.py
no, that should be a seperate file
am I instant gratification crowd?
lol
Well I plan on being here for awhile so get used to me π
The link you pasted, put the content of that in a new file you put here /config/lovelace-gen.py
and oxycodone is helping the pain right now haha but not the hassio patients
but running the shell script should have made that file?
I can just manually created with that data?
You need to create that first
Okay but am I missing it somewhere where it says I need to do that here? - https://github.com/thomasloven/homeassistant-lovelace-gen/blob/master/README.md
nope, it's not in there, but it's still needed, you can't run something you dont have
agree but it says
Restart Home Assistant. Then run the service shell_command.lovelace_gen, preferably from <hass_ip_address:port>/dev-service.
This will create the file ui_lovelace.yaml
"This will create the file ui_lovelace.yaml" - is pretty confusing then
ui_lovelace.yaml will be created
but not lovelace-gen.py it is lovelace-gen.py that creates ui_lovelace.yaml
worked
Is it weird that the instructions don't say to make that file or should I have assumed this?
The creator certainly did, and there are many users of it that has it working π€·
Add a PR in that repo with some additional info?
Waiting more than a few minutes before complaining that nobody's helping you?
haha
Seriously, sometimes the people that know may not be around for hours, or days. If you don't get responses here then trying again at a different time of day, then taking it to the forum if you still have no luck
We're seeing more and more new folks arriving who're like 2 year olds (you're not in that crowd) with the "help me NOOOOOOW" attitude
Oh, and if you've not already read the bot's output for ~question and ~ask - worth doing that in #botspam
yeah I can see that being frustrating
So many questions people ask are covered in the docs - not even hidden away, but in the page some people claim to have just read π€¦
(or you point somebody at the docs, and they keep asking questions, eventually admitting they couldn't be bothered reading the docs)
I could rant for hours on how hard some people make it to help them π
not everyone is a doc learner, I am more of a reverse engineer
I read that last doc and failed lol
Which is fine, but admitting that you've tried and didn't get it is waaay better than the alternatives
true
Pretending you read it, or pretending you understood, makes life hard for those helping
I did some self awareness stuff on learning styles many years back, and totally get that everybody is different. Our biggest problem here is that the docs are the only thing that stays current, and it's our "force multiplier". There ain't enough of us to help everybody
my washing machine doesnt fill up with water completly
Get a hose π
is it the docs ?
can you help me now.... i gotta go to work
I thought we were updating the hoses?? Im confused again
@undone egret Does introduce confusion well π
hey! β€ you too
π
you should hear the voices i do
Given I also spread chaos and panic everywhere I go, I'm find with a little added confusion π
is there a reason input_number doesnt play nice in lovelace?
or is it mentioned in the docs that i havent bothered to read π
Define "doesn't play nice"
when you click and drag the slider it cuts off the little bubble with the number in it
I'm guessing it's a bug that nobody's reported yet
you not using it in your config anywhere?
I do, but I don't really use the UI much
I might open it once a day or so if I want to check something, but that's about it
yea i dont use them much either but i have noticed it. does it do it on yours too or is it just me?
It does it on mine, hence why I suspect it's a bug
excellent. im not being an idiot then
is that specifically for lovelace
yeah
If you were to look at the top of the repo (https://github.com/home-assistant/ui-schema) you'd see it says the repo is for Lovelace π
Hi all is there a way to use a picture for a toggle
for example i have a device tracker using a picture-entity i have some automatic tracking on them but would like to be able to click on the images to set there state
I can't get the custom cards to load. Have tried to follow instructions, but end up with "Custom element doesn't exist: ***"
I have placed the .js files locally in \config\www\
I'm not sure how to link to this in the yaml file
Have tried many combinations in the ui-lovelace.yaml
resources:
- url: /config/www/gauge-card.js?v=1
type: js
I'm using Hass.io on docker
- url: /local/gauge-card.js?v=1 *
So now I have this on top of ui-lovelace.yaml:
resources:
- url: /local/gauge-card.js?v=1
type: js
Still "Custom element doesn't exist: gauge-card
If you just created the www dir you need to restart HA
Restartet lot of times
What's the first line of that js file?
Nothing. Line 7 is <!DOCTYPE html>
That is wrong
Woops. Could I have made it wrong?
yes
https://raw.githubusercontent.com/ciotlosm/custom-lovelace/master/gauge-card/gauge-card.js should be the content of that file
Haha, I just downloaded it without even opening it.
I right-clicked on the file on web and selected save as. Does it change the file then?
it's still using the old file due to cache.
change to this in config:
- url: /local/gauge-card.js?v=2 then refresh the browser
Is there a way to use custom icons for the view tabs, not ones from mdi icons.
@buoyant skiff That is not a kiosk mode
@wheat current OK
never really used it
and i dont keep tabs on shit i dont use
but the theory is correct
so give the user a link instead of just saying that i was wrong
no, not at all...
Read the README of that repo ;)
I have not the correct link at hand
@buoyant skiff i see that your greeter cards you referring you using the useful-markdown-card
i was giving a try but unfortunately wasn't able to use value templates there
I guess it was the things at the top of the old UI
I didn't use it very long before I went to lovelace
Sorry, your question made it sound like you'd actually read the Lovelace docs and wanted to know if the badges were different
They exist, they work, they're in the documentation π
I did, actually.
Then it'll show up if you did it right
views:
- title: Overview
id: overview
icon: mdi:home
badges:
- alarm_control_panel.ha_alarm```
That's on mine, I have a badge
Like this
interesting, how are we supposed to know you don't put entity_id in front of it or anything lol
meant to say entity
by reading the documentation
its not really guess work its all there in plain english
It says List of entities IDs to display as badge
@split granite I donβt think you have enough views π
I go for "everything should fit on one screen"
Four of those are for automations alone π€·
I only really use one of them anyway π
π
My views are super clean now :D
@split granite would it be enough to have the default set per device?
I'd probably want to tie it to the new auth stuff, so that everybody else gets the minimal default, and I get the world view
Yeah, that will absolutely be a key thing with the new auth stuff
Looking forward to that
struggling with coming up with a nice system info display
dont want it to be just boring gauges and stats
Goes back to what do you need rather than what can I display
That's why still my "display" is most likely to be Floorplan giving a whole house overview
# frontend: <--- is all you need π
Thats the view I use mostly - I have a 3d render of my home using picture elements
For us it's 99% about the doors and lights. The rest of it is far less important
I dont have door sensors/locks yet, basically lights and a few media players
No smart locks here, but door sensors on all the exterior doors
Windows are still to be done, but that's gonna be expensive π
money is holding me back too - building up piece by piece over time...
https://imgur.com/a/Z3C0itl <-- Here is the picture elements card
If you tap on a room it switches the light on/off
Is there any way to set the width of columns in lovelace or HA themes?
I used the opacity setting for black shapes you hlped me with so if a light is on, it seems like the room is illuminated.
i'm unable to find anything definitive or examples. Is it possible to use a different tap_action for a picture_entity card than just more-info or toggle? I have my google cast group on a card and I want the tap action to call media_player.media_play_pause but I can't seem to make it work, it just keeps defaulting to more-info if it's any other value than toggle
afternoon everyone. Is the lovelace picture-element method full-featured enough to replace HA-floorplan? I am about to embark on making a floorplan and im trying to decide if I should use HA-floorplan or go straight to Lovelace. Anyone implemented the lovelace method that can provide feedback on potential shortcomings? or outline the benefits? I would be very grateful for freedback!
Depends on what you want. It's worth looking at share the love (see the pins) for examples of what some people have done.
I want to replace what I've done in Floorplan, and it doesn't cut it yet
Is it possible to round numbers from sensors? i.e. power measurements
You'd want to round them at the sensor end - with a template for example
@split granite i saw that, which is what gave me pause and made me think I should consider the lovelace option. What is is that lovelace doesnt do for you yet? trying to figure out the limitation so I dont spend a bunch of time doing lovelace just to have to move to floorplan later
Floorplan lets me do https://github.com/DubhAd/Home-AssistantConfig/wiki/View-Floorplan
I can't do anything that neat in Lovelace
Hmm that would be a great thing for the "to do"-list for lovelace
Yeah, but I've got things like individual doors lighting up, and so on
and thats stll quite rough ... didnt spend much time on it for testing
The TVs light up if they're on, and go dark if they're off. Same for media players etc
thats doable in lovelace
But massively non-trivial. I burned an evening trying to make it work well, and gave up
If I was starting from scratch, maybe it'd be ok. But I've seen it work really well with HA Floorplan, and Lovelace ain't there yet
well you make your plan then add the TV in as a state image - with on/off done
Yup, did that. It looked like dog poo π
anyone got a good source for custom lovelace cards?
so is the issue the lack of a css layer to make the pretty happen?
@mossy otter Did you see the pins π
I use this for my lamps as most are built as groups and groups dont have a state colour icon ... works a treat .. but just wanted to mention its actually pretty nice and quick do get a result
@trim haven For me, yes. I can make something functional, but not something pretty
nope, but looking now, thanks!
@split granite gotcha, that makes sense. Unfortunately the only pretty thing ive ever been able to make is my kid...
Well, that's more than some folks manage π
haha
I think for me the "problem" is that I've currently got something that maps well to the real house, and I can't translate that to Lovelace. I'd really need to start fresh.
ya, i get that
im just afraid that im going to spend 1000 hours on floorplan and it will be abandoned because lovelace does all the things and then i have to spend another 1000 hours to move it over. Trying to only do it once i guess.
It's worth looking at the floorplans folks have done with Lovelace (like @hot gyro posted, and are on Share The Love), and compare to the ones on the Floorplan threads on the forum. Decide which style suits you best.
ya, the floorplan designs are way ahead, but lovelace is new so i was trying to figure out if thats from a lack of time, or a lack of features
my config is on github
My gut feel is that it's a bit of both. I get the feeling that there's not quite the same flexibility with Lovelace currently
With Floorplan I can create an SVG entity and control it directly. Doing that with Lovelace isn't possible
Floorplan also allows for animated SVG entities. Don't know if you can do that in Lovelace yet
ok, thats good feedback. I guess I will go with floorplan, ive already got the svg done and had started a little bit of the leg work a few months ago so maybe its best to just keep going
@split granite what do you mean by animated svg ?
On Floorplan when a door opens, it can pivot open. Fans can spin, etc etc
hmm I guess if you'd chose animated gifs it would ...
but then animated gif is usually not transparent
I suspect that Lovelace will be ideal for "simple" floorplans, and Floorplan will remain the choice for those who want something else
ya, that sounds probable
Does lovelace only put cards in a single column and the only way to get multiple columns is using horizontal card?
No. Lovelace puts cards in a number of columns based on your screen width. Up to four or five I think.
Each column is 300 to 500 pixels wide IIRC.
Hmmm. Odd. I just getting one very long column.
Somewhere around two full screen heights.
Are you using any custom cards or just defaukt?
It should break when the column is more than five βunitsβ tall where one βunitβ is e.g. one row in an entity card. Some custom cards donβt report their height correctly, though.
how do I turn on show_empty?
- type: entity-filter
show_empty:
- "false"
entities:
- entity: light.living_room_fireplace
state_filter:
- "on"
I wish they gave examples for everything
that doesn't work
anyone
hmmm
Can I nest types? For example, place an entity filter within a glance card but only effect some devices?
programming!
@polar kelp Custom cards. Ahhhh. Using two types monster and alarm_control_panel. Both report 1. Thanks!
Is there a way to more explicitly control card placement in lovelace?
@swift violet horizontal and vertical stack, otherwise it would require a custom card, but that's beyond my skill.
So do I nest the cards in order to accomplish that stack?
nm I think I found it
hmm . . . can't seem to get it fucntioning - this cleared the errors but isn't stacking horizontal
- type: horizontal-stack
title: default_view
icon: mdi:home
cards:
- type: custom:thermostat-card
title: Thermostat
entity: climate.custom_thermostat
ambient_temperature: sensor.main_multisensor_temp
- type: custom:weather-card
entity_weather: weather.yweather
entity_sun: sun.sun
the -type: horizontal-stack goes after the cards:
and then the ones under that get indented further
@swift violet https://hastebin.com/juqutososi.css
that should work
Thanks @cloud escarp
no problem
hmm - doesn't seem to be working in that syntax I'm getting a mapping values are not allowed here on the line with the custom thermostat
ah - I needed one more cards line in there
end result is very weird though lol
@odd light show_empty: false should work