pacemaker82 / PredBat-Table-Card

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

Can't see some old skool text in dark mode #13

Closed gcoan closed 4 months ago

gcoan commented 4 months ago

In dark mode the Idle Eco or Idle battery empty, you can't see the arrows in black on black/grey background

image

Also, if it is possible to detect the screen size I'd like the idea of truncating the Charging Discharging statii on narrow screens such as mobile. Would get more on the screen and reduce having to scroll horizontally

pacemaker82 commented 4 months ago

Version 1.4.5 is out that should tackle these issues. Cant go much thinner unless I consider truncating all strings in "phone" mode...

Screenshot 2024-03-10 at 08 53 30
pacemaker82 commented 4 months ago

Managed to shave a bit more off. It actually wont make a difference to truncate the other strings, this is the smallest I can go with the two truncated strings side by side with the icons.

Will push this in the next release.

Screenshot 2024-03-10 at 09 10 19
gcoan commented 4 months ago

On 1.4.5 the non truncated text is looking great. Possibly because the agile rates are rubbish tonight and tomorrow so there's no planned discharge at all and it fits very nicely on one line

Arrows show up fine now in dark mode

image

pacemaker82 commented 4 months ago

Yeah - there's only so much I can do in terms of phone width and the amount of data the table shows. At the end of the day the user is going to have to make a choice around more info more side scrolling or less info and less side scrolling.

Potentially could consider only showing certain columns for mobile (being a YAML configuration item), but even that isn't a guarantee it'll all fit unfortunately. But I do like the idea that I see all columns on my big screen and maybe only the critical on mobile... At the moment my choices have a good mix that just about fits but it does look a bit empty on PC screen

pacemaker82 commented 4 months ago

I just pushed 1.4.6 which shaves off a bit more of the state column width on mobile, as well as fixes some colour issues with the forced idle/charge/discharge now colouring correctly (upside down F scenario)

pacemaker82 commented 4 months ago

@gcoan actually you can do this with the conditional card (switch between mobile/bigger):

type: vertical-stack
cards:
  - type: conditional
    conditions:
      - condition: screen
        media_query: '(min-width: 0px) and (max-width: 767px)'
    card:
      type: custom:predbat-table-card
      entity: predbat.plan_html
      columns:
        - time-column
        - soc-column
        - state-column
        - limit-column
        - total-column
      odd_row_colour: '#181f2a'
      even_row_colour: '#2a3240'
      fill_empty_cells: true
      stack_pills: false
      old_skool_columns:
        - soc-column
        - state-column
  - type: conditional
    conditions:
      - condition: screen
        media_query: '(min-width: 768px)'
    card:
      type: custom:predbat-table-card
      entity: predbat.plan_html
      columns:
        - time-column
        - import-column
        - state-column
        - limit-column
        - soc-column
        - pv-column
        - load-column
        - car-column
        - cost-column
        - total-column
      odd_row_colour: '#181f2a'
      even_row_colour: '#2a3240'
      fill_empty_cells: true
      stack_pills: false
      old_skool_columns:
        - soc-column
        - state-column

IMG_D1EF0A21CA2E-1

Screenshot 2024-03-11 at 09 51 40
gcoan commented 4 months ago

Ooh, conditional dashboard cards, never done that. Clever.

I don't see any change with the latest version, 1.4.5 image

1.4.6 image

But TBH these are fine as they are on my mobile phone

pacemaker82 commented 4 months ago

Am only setting a minimal width when the charge/discharge appears in same column (to stop bad things happening). Otherwise it should be dynamic. So you might not notice anything if they arent in the column like this

Screenshot 2024-03-10 at 09 10 19
gcoan commented 4 months ago

Makes sense. Brilliant addition

At the moment the agile rates look to be flat tomorrow as well so no discharge planned

pacemaker82 commented 4 months ago

gonna close this thread as looks like we've concluded on all issues.