Comments (6)
about the template jinja change: this wont impact here.
It has all been about the change in HA 115 that made templates find the states much better than before, and hence the need for the 'entity_id:' line which was used for these cases is no linger required. If anything, the template sensors update far too frequently now (especially when using jinja like {{states|...} which would cause listeners for all states....).
because of that the new PRs are made to bring those down a bit. Any case, the template sensors for Powerwheel card didn't need the entity_id line at all, and are updating nicely, so no worries there for this card.
from power-wheel-card.
Confirming your change did indeed resolve the issue and the card is now rendering.
from power-wheel-card.
Thx Chris, for your early report. I'm not sure yet, but I think the card isn't acting well on implementing this architectural change in HA 0.116. Something to do with templates that update too often. Since power-wheel-card listens to many input sensors, it is a candidate to update too often. I tried to prevent that in 2019 by decreasing the amount of updates:
_sensorChangeDetected(oldValue) {
return this.sensors.reduce((change, sensor) => {
return change || this.hass.states[sensor].state !== oldValue.states[sensor].state;
}, false);
}
shouldUpdate(changedProperties) {
// Don't update when there is a new value for a hass property that's not a registered sensor.
// Update in all other cases, e.g. when there is a change of config or old values are undefined.
let update = true;
Array.from(changedProperties.keys()).some((propName) => {
const oldValue = changedProperties.get(propName);
if (propName === "hass" && oldValue) {
update = update && this._sensorChangeDetected(oldValue);
}
return !update;
});
return update;
}
But in 0.116.0b1 I guess that's not working. I saw there were some fixes to the architectural change already in 0.116.0b2. I'm only running my production 0.115.x. Could you, by any change, check again in 0.116.0b2 for me?
I'll try to look for documentation how custom cards should cope with this architectural change in the mean time.
from power-wheel-card.
New hypothesis, because I was misreading the architectural change in HA a bit.
It's about a breaking change on template sensors. I found a pull request for that that's labeled with 'breaking change' for next release (0.116.0).
If users of the power-wheel-card will use template sensors as input and they are impacted by this breaking change, then their template sensors won't update as usual. If their template sensors won't update, the card won't detect and re-render.
(It's still a hypothesis though... but) could you check your template sensors? One use case that would have impact would be a template sensor that uses now()
.
from power-wheel-card.
Or: could be this announced breaking change for custom cards. Unfortunately the suggested solution to use hui-masonry-view
doesn't work for me.
from power-wheel-card.
I released a new version of power-wheel-card: 0.1.3. I did a small fix to prevent impact by the breaking change for custom cards mentioned in my last message. It's not fixed like the blog suggests, because that didn't work. But I looked in other custom cards how it currently was done to get LitElement.
@firstof9 Chris, could you check if the new release does fix anything for you? If not, is there any error shown in HA or in the console?
from power-wheel-card.
Related Issues (20)
- Off-Grid: Home shows as powering solar panels when values are equal HOT 2
- feature request ... change grid icon when running on generator
- No Auto Toggle HOT 3
- Feature Request: Money view show if money is being spend or made with + and - symbols and colors
- The arrow is always "on" even though I don't buy electricity HOT 2
- HACS install no card type found HOT 6
- Order of value and direction of arrows is wrong after upgrade to 2021.5 HOT 3
- Add a 2nd Solar unit into the Card HOT 4
- FR: Solar percentage entity
- House Power consumption calculation is wrong HOT 1
- Battery Icon display is duplicated. HOT 2
- Changing text colour of the text by the arrows HOT 1
- Attribute Support Help HOT 1
- Unknown custom card in cast
- Unit not being displayed in power card UI
- Home power usage sensor
- Add support for energy consumption rate entity HOT 1
- Custom Card selectable HOT 1
- Yearly - energy/cost reset
- Add offset multiplier to a source
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 power-wheel-card.