pacemaker82 / PredBat-Table-Card

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

Light/Dark scheme Switching #11

Closed Dave-Parry closed 5 months ago

Dave-Parry commented 7 months ago

My HA scheme is set to dark but the card is staying on light scheme. Have tried reloading the card As requested here is my yaml for my card.

type: custom:predbat-table-card entity: predbat.plan_html columns:

pacemaker82 commented 7 months ago

Thanks - Would you add the following YAML config:

light_mode: auto

or

light_mode: dark

It should work without it, but want to see if that at least works. Can you also tell me what your profile is set to (goto your username, then scroll down, it will be set to auto, light or dark). thanks

Dave-Parry commented 7 months ago

Tried both and neither worked, but have found out its my profile theme setting. I had it set to a theme called “darkish”. Changing this to default cured the problem. I use the darkish theme because I wanted the background to be Black with no borders, and couldn’t find the setting to achieve this in the default theme. Will have another poke around to see if I can find the setting to change background colour in the default theme config.

Regards Dave. P. @.***

On 4 Mar 2024, at 07:51, pacemaker82 @.***> wrote:

Thanks - Would you add the following YAML config:

light_mode: auto

or

light_mode: dark

It should work without it, but want to see if that at least works. Can you also tell me what your profile is set to (goto your username, then scroll down, it will be set to auto, light or dark). thanks

— Reply to this email directly, view it on GitHub https://github.com/pacemaker82/PredBat-Table-Card/issues/11#issuecomment-1975920641, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACKNXXH3AVF3NSLCKSW5FKTYWQRXHAVCNFSM6AAAAABEEGMEBWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZVHEZDANRUGE. You are receiving this because you authored the thread.

pacemaker82 commented 7 months ago

ah ok - yeah my code is looking to see if dark mode is enabled in the hass object (hass.theme.darkMode) - so presume the theme you are using doesnt have that variable so my code is breaking. I will see how I can work around that (if not present, take the card YAML explicitly)

pacemaker82 commented 7 months ago

I just triple checked my code against your use case and it should strictly prioritise the card YAML if you have set it correctly.

light_mode: dark

Just want to triple check you set it correctly before I keep digging.

Dave-Parry commented 7 months ago

Yes that’s right, no radio buttons for light/dark. Have looked at mushroom themes but haven’t got the time at the minuit to see if I can change them to what I want. Re your code I put it at the end of the config, but also tried it further up but no different. It does work with default theme, as I tried changing it to light and the table changed ok. So your right its those that don’t have the buttons that don’t work. Have to go to work now but will look into this later.

Regards Dave. P. @.***

On 4 Mar 2024, at 07:51, pacemaker82 @.***> wrote:

Thanks - Would you add the following YAML config:

light_mode: auto

or

light_mode: dark

It should work without it, but want to see if that at least works. Can you also tell me what your profile is set to (goto your username, then scroll down, it will be set to auto, light or dark). thanks

— Reply to this email directly, view it on GitHub https://github.com/pacemaker82/PredBat-Table-Card/issues/11#issuecomment-1975920641, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACKNXXH3AVF3NSLCKSW5FKTYWQRXHAVCNFSM6AAAAABEEGMEBWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZVHEZDANRUGE. You are receiving this because you authored the thread.

pacemaker82 commented 5 months ago

going to close this out as without any more info I am not sure what else to do. please re-open if you have something else to add - many thnaks