Since update my bar-card changed. It seems I am not able to change it back to the original bars.
Anyone knows what is wrong?
Since update my bar-card changed. It seems I am not able to change it back to the original bars.
There is nothing wrong. Change your width to 100% and it will be as before.
Some of this might be screwed up since Iāve reworked the CSS to flexbox. Iām currently working another big update that will allow for multiple entities instead of a single entity per card. Iāll add a fix to that release.
Release 0.1.2 adds the option to define a list of entities to display. This also works with auto-entities if you want to populate the list dynamically.
entities
config option, displays multiple bars based on entities listcolumns
config option@Plexat You should also be able to fix your alignment problems with these config options.
title_style:
text-align: left
bar_style:
align-items: flex-start
- type: custom:auto-entities
card:
type: custom:bar-card
severity:
- value: 50
hue: '0'
- value: 75
hue: '40'
- value: 100
hue: '120'
title_position: inside
columns: 3
padding: 2px
title_style:
text-align: left
font-size: 16px
bar_style:
align-items: flex-start
font-size: 8px
filter:
include:
- entity_id: "*_battery"
- type: custom:auto-entities
card:
type: custom:bar-card
attribute: battery
unit_of_measurement: "%"
severity:
- value: 50
hue: '0'
- value: 75
hue: '40'
- value: 100
hue: '120'
title_position: inside
padding: 2px
columns: 2
filter:
include:
- attributes:
battery: "<=100"
exclude:
- entity_id: "*_humidity"
- entity_id: "*_pressure"
- entity_id: "*_battery"
- type: custom:bar-card
attribute: temperature
unit_of_measurement: "Ā°C"
title_position: inside
columns: 5
height: 200px
min: 15
max: 32
target: 22.5
width: 100%
padding: 2px
direction: up
entities:
- binary_sensor.motion_hallway
- binary_sensor.motion_living_room
- binary_sensor.motion_kitchen
- binary_sensor.motion_bathroom
- binary_sensor.motion_toilet
Hi,
I am trying to get this going and have the bar graphs displaying correctly; but they are not named; just show the % free. Any trick to get the friendly name displayed? I checked and the devices being displayed all have friendly_names assigned.
Code below:
- type: custom:auto-entities
show_empty: false
card:
type: custom:bar-card
attribute: battery_level
unit_of_measurement: "%"
severity:
- value: 60
hue: '0'
- value: 80
hue: '40'
- value: 100
hue: '120'
title_position: inside
padding: 2px
filter:
include:
- domain: zwave
attributes:
battery_level: "<= 100"
Ahhh! It seems that if the bar graph itself is in the foreground on top of the title; so it gets obscured.
This seems to be new in the latest release; and on all the bar components.
Update: Seems to be a Mac Safari issue. On iOS Safari it is rendered fine; and also on Chrome on Mac itās fine.
Wowā¦you have been busy with quite a few updates I seeā¦thanks so much for making this all possible.
Iāll post a screenshot once I have the bar card up and running.
Cheers Steve Wells
Can I make a feature request?
Would it be possible to show an icon instead of the title?
EDIT: Also, I am not a CSS expert, in fact Iām not even a CSS anything, but I canāt get card-style
to change the background.
Iād like it to be transparent so that when I include a bar-card
in an entity
card it doesnāt āstand outā.
Iāve tried allsorts of combinations (and colours) like this:
Any chance you could give an example?
Unless of course I have completely misundersttod the use of card-style
card-style:
# paper-card-background-color: 'rgba(0,255,255,0.2)'
background-color: 'rgba(201, 76, 76,0.5)'
# ha-card-background-color: 'rgba(67, 73, 84, 0.6)' # Card background colour
Icon support is coming shortly. Could you show me the problem you are having with the transparency?
@Gluwc Please see below. The top is from Safari on a Mac and you can see the titles are not shown; they are there but behind the bar. (see the 48% bar in the Mac top screenshot)
The second is from IOS Safari and all is ok.
Thanks
Ok, I may be asking for something not possible but when I embed a bar into an entities card I would like the bar to appear as an entity, i.e. āflatā in the entity card (and preferably - although I am sure this isnāt possible - the same size as it is when placed outside an entity card.
I hope this makes senseā¦
Release 0.1.3 adds icon support and the ability to align items inside the bar.
show_icon
config optionicon
config optionalign
config optionoff
option to title_position
configbar_style
config optionindicator_style
config optionicon_style
config optionvalue_style
config option@jwelter Iām not entirely sure whatās causing the title issue and I donāt have access to a mac to test safari. I did make some changes to the element layout so itās possible this issue is fixed in 0.1.3. Please let me know and Iāll see what I can do if itās still not working correctly.
@klogg It could be possible using it in an entity card the CSS wonāt work for the background. Can you try setting the card_style
outside of the entity card and see if it still doesnāt work? This example shows a custom card background.
@Gluwc I quickly tried in Safari Mac again and same issues. Both IOS and Chrome are still okā¦
I also tried iOS safari on an iPad and it is also wrong, perhaps itās a screen size thing?
What is interesting is the % shows fine; itās just the title that gets obscured.
Is the style or logic for displaying the % versus title different?
Sorry Iām not a JS guy; Assembler, C, C++, and Python only
@Gluwc 0.1.3 is a great update. It looks perfect with the icon and split title and I no longer want to do any further CSS styling!
Thanks!
Thanks for the fix! Appreciate it!
Iām not sure, afaik a card doesnāt need to support template-card? If it does I can have a look at whatās required to implement.
Itās more the template card lets you use attributesā¦ so instead of having to create template sensors, you can instead use the attribute in the same way. Itās pretty coolā¦
Thanks for considering this.
Ah yes of course this is what was sort of bothering me about using the template-card, I couldnāt use it as the entity value since most cards expect an entity_id there. I could add a value
config option so you can set a straight up value (template) instead of an entity.