Comments (9)
the ha-card element styling is the issue.
top highlighted section is a working standalone gauge card. Bottom is part of the stack.
When the element style is edited manually the card shows up.
I edited my file for a temporary fix, but I doubt this is the solution the developer is going to want to implement.
Replaced:
// line 80
element.shadowRoot.querySelector('ha-card').style.boxShadow = 'none';
With:
// line 80-84
if (element.tagName == 'HUI-GAUGE-CARD') {
element.shadowRoot.querySelector('ha-card').setAttribute('style', '--base-unit: 50px; box-shadow: none;');
} else {
element.shadowRoot.querySelector('ha-card').style.boxShadow = 'none';
}
from vertical-stack-in-card.
I have the same issue. Gauge card doesn't show and no errors in log.
- type: custom:vertical-stack-in-card
title: 'UPS'
cards:
- type: entities
show_header_toggle: false
entities:
- sensor.ups_status
- sensor.ups_battery_charge
- type: gauge
title: 'Obciążenie'
entity: sensor.ups_load
severity:
green: 0
yellow: 40
red: 70
from vertical-stack-in-card.
Can confirm that this (temporary) solution works, after deleting the cache of my browser and hitting ctrl+F5 a few times.
from vertical-stack-in-card.
FYI @Ernst79: You can add a ?v=1
to your includes in ui-lovelace.yaml, and then increment that number when you make an update to force your browser to reload the file.
resources:
- url: /local/vertical-stack-in-card.js?v=7
type: js
from vertical-stack-in-card.
Can anyone help me understand why the base-unit
becomes 0?
from vertical-stack-in-card.
Your commit has a typo, 'hui-gaugg-card' should be 'hui-gauge-card'.
I'll see if I can do some experimenting tonight.
from vertical-stack-in-card.
I still have issues. It does show up correctly now, with the modified code, but as soon as the value of the sensor changes, it disappears.
from vertical-stack-in-card.
I haven't tested it, but I would guess this also affects the light
and thermostat
cards, right?
The problem is that those cards rely on their width to determine the size of certain elements, and the width is checked at the moment of their creation. A bug in the light
, thermostat
and gauge
cards that's being looked at currently.
You're creating those cards inside your own (in the setConfig
function), but that that point your card doesn't quite exist yet, so anything inside it has no width.
As a workaround until the cards are fixed, you could defer the creation of the cards to a timeout.
I.e. move the config.cards.forEach(...
stuff into
setConfig(config) {
...
setTimeout(() => {
config.cards.forEach(...
}, 10);
}
10 ms of delay seems to be enough for my layout-card, while not being long enough for the user to notice.
from vertical-stack-in-card.
Fixed in the new version(0.1.1)
from vertical-stack-in-card.
Related Issues (20)
- Cannot upgrade von v0.4.2 to v0.4.4
- Upgrade to 0.4.4, seems not to be loaded HOT 3
- Card border shown when conditional card is used HOT 12
- Alignment and formatting problems. HOT 2
- Nested card now show borders HOT 1
- Title FontSize
- Card "Not loaded in lovelace" but works anyways ? HOT 2
- Background shoudn't be inherrited in cards HOT 1
- e is undefined HOT 1
- Cannot read properties HOT 2
- Card sometimes gets visually messed up HOT 2
- Vertical stack with mushroom select card HOT 1
- Sometimes card border shown, sometimes it doesn't HOT 19
- Custom element doesn't exist: vertical-stack-in-card. HOT 4
- This._configElement.setConfig missing HOT 2
- Vertical Stack in card is down HOT 1
- Shadow card appearance HOT 1
- Something changed? HOT 4
- set stacks width HOT 1
- Integration with sections HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vertical-stack-in-card.