Yevgenium / weather-chart-card

Custom weather card with charts
MIT License
277 stars 80 forks source link

Forecast chart follows user profile theme, not the view theme #108

Open Slalamander opened 2 years ago

Slalamander commented 2 years ago

When placing the card in a view, the forecast chart follows the theme set by the user in the settings, instead of that applied to the view through the ui editor. As can be seen in the image, the text on other cards, as well as the header and attributes are white, as specified in the theme set by the view. However, the chart follows the system white theme (ie. corresponding to the header colors).

image

The theme applied to the view page:

view_theme:
  card-mod-theme: chromecast-header
  ha-card-background: none
  ha-card-box-shadow: none
  ha-label-badge-size: 100px
  primary-text-color: '#FFFFFF'                                                   
  text-primary-color: 'var(--primary-text-color)'                                 
  secondary-text-color: 'var(--primary-text-color)'  
  modes:
    dark:

The theme applied system wide:

user_theme:
  ha-card-background: steelblue
  label-badge-red: teal
  ha-label-badge-border: 0px solid teal
  light-primary-color: red
  dark-primary-color: '#0288d1'
  text-light-primary-color: red
  primary-text-color: red
  secondary-text-color: red
  text-primary-color: red
  text-light-primary-color: red
  disabled-text-color: red
  modes:
    dark:

The yaml of the card:

type: custom:weather-chart-card
entity: weather.city_hourly
show_attributes: true
show_main: true
forecast:
  temperature1_color: rgba(181, 52, 58, 1)

I have so far tried using card mod, both in the view theme and in the card code itself, but haven't been able to get the css code for that right either.