artem-sedykh / mini-climate-card

Minimalistic climate card for Home Assistant Lovelace UI
MIT License
262 stars 19 forks source link

Still shows border when embedded #122

Closed igorsantos07 closed 4 months ago

igorsantos07 commented 1 year ago

I'm not sure when this started, but I guess it was together with the Lovelace border/radius changes last year. I never reported because, well, I thought it would be noticed and fixed, but it seems #106 didn't fix it. I'm already on v2.6.0.

image

As far as I can see, my dashboard's theme is Backend-selected (which defaults to HA's dark theme), and the card above has no custom theming either. On the inspector, the border seems to come from div.mc__bg (1.25px on each side) when in the default theme.

regevbr commented 1 year ago

image

igorsantos07 commented 1 year ago

lol I didn't recall that setting, but you know what? It was already present.

image

regevbr commented 1 year ago

So what is causing the shadow render?

igorsantos07 commented 1 year ago

That's exactly why I opened a bug report :))

From the screenshot you sent, you can see this is already active because the up arrow is almost crossing the top border (what's caused by the lack of padding). I've just set it to false and I see the difference, there's a lot more spacing and extra shadows, indeed.

I think we should noticed that this group option doesn't seem to touch on borders, which is what's going on and I mentioned in the original report - not shadows, as you stated. Other than saying this, I don't know much else to fiddle / search :sweat_smile:

Should group: true disable shadows on div.mc__bg?

EDIT: oh, right, the other issue I reported indeed mentions shadow, but I think that's related to that theme's configurations, not this card exactly. Given this assumption above, I don't think fixing what I see here in the default theme will affect what I see using that other theme.

regevbr commented 1 year ago

Please provide which css class causes it

igorsantos07 commented 1 year ago

On the inspector, the border seems to come from div.mc__bg (1.25px on each side) when in the default theme.

regevbr commented 1 year ago

what css property that you will manually put will disable it?

regevbr commented 1 year ago

fixed in #123 and released ini 2.6.1 can you please confirm?

igorsantos07 commented 1 year ago

image As pretty as it could get. Thank you so much, @regevbr!

theOrakle commented 1 year ago

Seems like this has creeped back in...

Hass Version: 2023.6.2 Mini-Climate Version: 2.6.2

regevbr commented 1 year ago

screenshot please

regevbr commented 1 year ago

For me it works... Top one has group set to true, bottom one has group set to false image

theOrakle commented 1 year ago
image

the code:

- type: entities
  style: |
    div#states.card-content {
      padding-top: 0px;
    }
  entities:
  - type: custom:mini-climate
    entity: climate.p
    name: Temperature
    icon: mdi:thermometer
    swap_temperatures: true
    group: true
    hvac_mode:
      hide: true
    toggle:
      hide: true
    temperature:
      unit: '°F'
    secondary_info:
      type: hvac-action
      icon: 'mdi:fan'
regevbr commented 1 year ago

Just tried your code and it doesn't appear to me... image I can help if you can let me know from where the CSS that causes the border comes from

theOrakle commented 1 year ago

Well then I must have something going on... Thanks for looking at it and sorry to be necromancer.

regevbr commented 1 year ago

I would love to help if you can figure out which CSS property is causing it, something like that:

image

jossiee commented 4 months ago

looks like i got this problem... has this ever been fixed?

in the inspect screen it still appears to come from mc__bg image

type: custom:stack-in-card
title: Slaapkamer achter
cards:
  - type: custom:mini-climate
    entity: climate.slaapkamer_achter
    icon: mdi:thermostat
    group: true
    hide_current_temperature: true
    hvac_mode:
      hide: true
    fan_mode:
      hide: true
    secondary_info:
      type: hvac-action
      source:
        heating:
          icon: mdi:radiator
          name: ''
        idle:
          icon: mdi:radiator-off
          name: ''
    indicators:
      humidity:
        icon: mdi:water
        source:
          entity: sensor.slaapkamer_achter_rv
        unit: '%'
      temperature:
        icon: mdi:thermometer
        source:
          entity: sensor.slaapkamer_achter_temp
        unit: °C
    card-mod:
      style:
        ha-card: |
          div {
            box-shadow: none !important;
          }
  - type: custom:mini-graph-card
    animate: true
    entities:
      - entity: climate.slaapkamer_achter
        show_fill: false
        color: '#0000ff'
        show_state: false
        attribute: temperature
      - entity: climate.slaapkamer_achter
        show_fill: true
        color: '#00ff00'
        show_state: false
        attribute: current_temperature
      - color: gray
        entity: sensor.omdag_aan_uit
        name: Night
        show_line: false
        show_points: false
        show_legend: false
        y_axis: secondary
    points_per_hour: 4
    hours_to_show: 168
    line_width: 2
    decimals: 0
    upper_bound_secondary: 0.9
    lower_bound_secondary: 0.1
    show:
      icon: false
      name: false
      points: false
      labels: true
      state: false
      labels_secondary: false
      legend: false

This is my configuration

and this is what is looks like. image

Please let me know if there is anything i can check or test!

regevbr commented 4 months ago

it seems that your theme configures the ha-card-box-shadow variable, which causes it. It is the same shadow applied to the main card in the picture you sent. I will create a PR later that allows you to define a new variable that will overide it. If you change manually the value to none it solves it for you?

jossiee commented 4 months ago

Yes if i edit in the inspect screen it is gone

Thanks for the quick reply!

Op do 22 feb 2024 om 16:15 schreef Regev Brody @.***>

it seems that your theme configures the ha-card-box-shadow variable, which causes it. It is the same shadow applied to the main card in the picture you sent. I will create a PR later that allows you to define a new variable that will overide it. If you change manually the value to none it solves it for you?

— Reply to this email directly, view it on GitHub https://github.com/artem-sedykh/mini-climate-card/issues/122#issuecomment-1959663856, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACDJFC3M3T5ROATP6VYCFFLYU5OKLAVCNFSM6AAAAAAYCSZNW6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJZGY3DGOBVGY . You are receiving this because you commented.Message ID: @.***>

regevbr commented 4 months ago

released in 2.7.1 See https://github.com/artem-sedykh/mini-climate-card/pull/148/files for the relevant changes