pacemaker82 / PredBat-Table-Card

A custom Predbat table card that allows flexible column management and styling
7 stars 1 forks source link

Different Idle Slot Appearance #28

Closed charlie-chester closed 1 week ago

charlie-chester commented 2 months ago

Sorry to open this up again but why is this image from my Laptop not showing the little chg when the one on my iphone is?

Overview_–_Home_Assistant

Screenshot 2024-05-13 at 22 49 04

Originally posted by @charlie-chester in https://github.com/pacemaker82/PredBat-Table-Card/issues/27#issuecomment-2108695470

charlie-chester commented 2 months ago

Also today I see one slot has colour but the other doesn't.

image

pacemaker82 commented 1 month ago

The lack of colour means that predbat is not doing anything, its charging or discharging as normal (aka "idle" mode). The "bug" here is that is says "Chg" which suggests it is predbat doing some charging - but its not, it should just be an arrow.

Also today I see one slot has colour but the other doesn't.

image

pacemaker82 commented 1 month ago

I see what you mean though, there is grey and white "Chg" cells... I will look into that one

pacemaker82 commented 1 month ago

This should be resolved in https://github.com/pacemaker82/PredBat-Table-Card/releases/tag/v1.5.3.7 which I just pushed out.

Screenshot 2024-05-29 at 10 37 30

Also today I see one slot has colour but the other doesn't.

image

charlie-chester commented 1 month ago

I've just installed this and cleared the cache as advised. I now don't see any colour just white but I still see the Chg when the screen is narrow!

I've got this set up as per your notes for using on my iPhone with less columns when it's in portrait and more if in landscape. this works really well but when I view in portrait I see the Chg but in landscape it shows without.

IMG_3159

IMG_3160

pacemaker82 commented 1 month ago

yes the wording hasnt been removed yet on mobile. Yet to find the culprit to that.

charlie-chester commented 1 month ago

OK cool. Great work there mate. I'm on Intel Flux at the moment so this is an every day thing so can test for you if needed just give me a shout.

pacemaker82 commented 1 month ago

@charlie-chester please give https://github.com/pacemaker82/PredBat-Table-Card/releases/tag/v1.5.3.8 a go.

charlie-chester commented 1 month ago

Thats got rid of the Chg but it's messed with the line size. It won't for on the screen like it did the width won't shrink down enough. I've had this before when flipping between screens but a refresh normally sorts it but not today.

IMG_3161

pacemaker82 commented 1 month ago

ah sorry about that, can you try https://github.com/pacemaker82/PredBat-Table-Card/releases/tag/v1.5.3.9

charlie-chester commented 1 month ago

That's better thanks.

Nice work there again. Really impressed with this little gem you've made.

I've just started to lean to code. I can only dream about creating something like this.

charlie-chester commented 1 month ago

I hate to tell you this but the Chg is back!

And today's slots are a lot wider than tomorrow's.

image

image

pacemaker82 commented 1 month ago

Are you clearing your cache on the iphone app? This looks like you have an old javascript being run...

Goto Home Assistant Settings, there is a menu for "Companion App" (you need to be on the device to see this)

"Debugging" > "Reset Frontend Cache" - then go back to your dashboard and refresh.

Here's latest running on my iPhone: IMG_702DBECB0AD4-1

charlie-chester commented 1 month ago

I do that every update to be honest.

https://share.icloud.com/photos/00cVcV9wAp5J5THd-TCw8uNoA

pacemaker82 commented 1 month ago

OK - can you copy paste your card config so that I am running the same thing? I thought I had replicated it but maybe not.

charlie-chester commented 1 month ago

type: vertical-stack cards:

charlie-chester commented 1 month ago

https://gist.github.com/charlie-chester/c987e8045c291a3f79f147d724541633

charlie-chester commented 1 month ago

I can also see this happening in Chrome on my Mac if I drag the window size very small.

pacemaker82 commented 1 month ago

are there any other cards on that dashboard page? Its really strange as its working fine here with your card config.

charlie-chester commented 1 month ago

No it's set 1 panel. If you want to share screen I'll show you in on the Mac.

pacemaker82 commented 1 month ago

Could you send me a screenshot of the original predbat plan showing the affected rows? Want to make sure there's nothing odd there in the source

charlie-chester commented 1 month ago

IMG_3165

pacemaker82 commented 1 month ago

whats enabled there to create those last two columns?

charlie-chester commented 1 month ago

It's the kerning on the text I think just pushing it very slightly to make Thu go on a different line. Or maybe the word Discharge in a split slot pushing stuff over

Different_Idle_Slot_Appearance_·_Issue__28_·_pacemaker82_PredBat-Table-Card

Yesterday when I thought it was OK it wasn't a split slot.

charlie-chester commented 1 month ago

whats enabled there to create those last two columns?

It's the Carbon. Don't use it in your card.

charlie-chester commented 1 month ago

I'm on a iPhone 13 Pro. Maybe my screen is a few pixels smaller than your so mine won't display on same line.

If I take a column out it's OK apart from still showing the Chg.

I have had this working though every day of the week.

IMG_3166

pacemaker82 commented 1 month ago

i can only think that your HA has downloaded an old js file and you're running it out of date (or its got mixed up somehow) because the code to show Chg with up arrow just isnt there anymore in latest. Maybe try through HACS to redownload the JS?

Meaning this display is impossible with the latest code:

Screenshot 2024-05-30 at 15 28 11

I installed the carbon stuff to see if that was affecting it but its not.

I'm going to have to rewrite this part of code, just need a couple of days to figure it out

charlie-chester commented 1 month ago

I've just removed Table Card. Restarted Home Assistant cleared the Cache and then put it back on.

It's still the same so don't know why.

Tomorrows 4pm slot has just come into view and thats normal sized lines so its the Thu thats messing with today as it's very slightly bigger. (never had trouble others Thursdays though)

Tomorrow is interesting as the Chg that you said the code isn't there is showing again!

IMG_3167

IMG_3168

charlie-chester commented 1 month ago

This is tomorrow on the original plan. It's showing as idle but going up. Does that make any difference? Does you plan interpret that as charge?

Overview_–_Home_Assistant
charlie-chester commented 1 month ago

Just had another look and it seems to be back to normal today with normal thin lines.

I wonder if it's eventually cleared that rogue file from the cache!

I'll keep an eye out the next couple of days and report back.

Thanks again for a great bit of kit.

charlie-chester commented 1 month ago

Morning mate. I hope you don't mind me bombarding you with this I'm just trying to help you out as I know you can't repeat it.

I appreciate all the hard work you put in.

Anyway. Today's Chg is back and tomorrow had wide lines again.

I really don't know what to do. I've removed the add on and restarted a million times.

Just for info.

image

pacemaker82 commented 1 month ago

thanks - I am going to try look at this this week.

In the meantime, you could override the specific columns rather than use the old_skool setting, as that seems more stable.

E.g.:

      old_skool_columns:
        - soc-column
        - state-column
charlie-chester commented 1 month ago

Cheers mate. Just for info thats sorted my height error but not the Chg.

Nice work mate very much appreciated.

pacemaker82 commented 1 week ago

@charlie-chester I think this should now be fixed and available in 1.5.5.5 - not 100% sure but please have a go and let me know.

charlie-chester commented 1 week ago

On first view mate it all looks brilliant. I will monitor over the next few days to see as some different day names made a differnce to the column width.

Just like to add how brilliant this card is and how well youve made it and kept on top of slight errors and people like me!!!

Cheers.

pacemaker82 commented 1 week ago

Thanks @charlie-chester - will close this ticket for now, please re-open if same issue occurs.