Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple history graph cards not showing #41

Open
clau-bucur opened this issue Nov 8, 2020 · 5 comments
Open

Multiple history graph cards not showing #41

clau-bucur opened this issue Nov 8, 2020 · 5 comments

Comments

@clau-bucur
Copy link

I have two states and in each I define a History Graph Card, but the graph shows only in the first state.

I found a similar issue described in the HA community thread, where they said that adding a transition, fixes the problem.
Indeed, that fixes it, but I don't want to use transitions.

First state:
image

Second state, where graph not visible:
image

The code:

- type: custom:state-switch
  entity: hash
  default: scheduler_living
  states:
    scheduler_living:
      type: vertical-stack
      style: "ha-card { height: 100%; }"
      cards:
        - type: horizontal-stack
          cards:
            - type: custom:button-card
              layout: icon_name
              name: Living
              icon: mdi:sofa
              tap_action:
                action: navigate
                navigation_path: '#scheduler_living'
              styles:
                card:
                  - --mdc-ripple-color: var(--accent-color)
                  - --mdc-ripple-press-opacity: 0.5
                icon:
                  - height: 25px
                name:
                  - color: var(--accent-color)

            - type: custom:button-card
              layout: icon_name
              name: Dormitor
              icon: mdi:bed
              styles:
                icon:
                  - height: 25px
                card:
                  - --mdc-ripple-color: var(--accent-color)
                  - --mdc-ripple-press-opacity: 0.5
              tap_action:
                action: navigate
                navigation_path: '#scheduler_bedroom'

        - type: custom:stack-in-card
          cards:
            - type: horizontal-stack
              cards:
                - type: custom:decluttering-card
                  template: climate_template
                  variables:
                    - label: Living
                    - climate_entity: climate.living
                    - temperature_entity: sensor.mi_temperature_living
                    - humidity_entity: sensor.mi_humidity_living
                    - extra_entity1: sensor.heat_pump_energy_power
                    - extra_entity1_icon: mdi:pump

                - type: custom:stack-in-card
                  cards:
                    - type: entities
                      show_header_toggle: false
                      entities:
                        - entity: switch.central_heating
                          name: Centrala termică
                          secondary_info: last-changed
                        - entity: switch.heat_pump
                          name: Încălzire pardoseală
                          secondary_info: last-changed

                    - type: custom:scheduler-card
                      title: false
                      time_step: 1
                      discover_existing: false
                      include:
                        - climate.living
                      display_options:
                        primary_info:
                          - "{entity}: {action} {relative-time}"
                        secondary_info:
                          - "{days} {time}"
                          - additional-tasks

            - type: history-graph
              entities:
                - sensor.mi_temperature_living
              hours_to_show: 48
              refresh_interval: 60

    scheduler_bedroom:
      type: vertical-stack
      style: "ha-card { height: 100%; }"
      cards:
        - type: horizontal-stack
          cards:
            - type: custom:button-card
              layout: icon_name
              name: Living
              icon: mdi:sofa
              tap_action:
                action: navigate
                navigation_path: '#scheduler_living'
              styles:
                card:
                  - --mdc-ripple-color: var(--accent-color)
                  - --mdc-ripple-press-opacity: 0.5
                icon:
                  - height: 25px

            - type: custom:button-card
              layout: icon_name
              name: Dormitor
              icon: mdi:bed
              styles:
                icon:
                  - height: 25px
                card:
                  - --mdc-ripple-color: var(--accent-color)
                  - --mdc-ripple-press-opacity: 0.5
                name:
                  - color: var(--accent-color)
              tap_action:
                action: navigate
                navigation_path: '#scheduler_bedroom'

        - type: custom:stack-in-card
          cards:
            - type: horizontal-stack
              cards:
                - type: custom:decluttering-card
                  template: climate_template
                  variables:
                    - label: Bedroom
                    - climate_entity: climate.bedroom
                    - temperature_entity: sensor.mi_temperature_bedroom
                    - humidity_entity: sensor.mi_humidity_bedroom
                    - toggle_entity: input_boolean.climate_master_bedroom

                - type: custom:stack-in-card
                  cards:
                    - type: entities
                      show_header_toggle: false
                      entities:
                        - entity: switch.central_heating
                          name: Centrala termică
                          secondary_info: last-changed
                        - entity: switch.upstairs_heating_circuit
                          name: Încălzire etaj
                          secondary_info: last-changed

                    - type: custom:scheduler-card
                      title: false
                      time_step: 1
                      discover_existing: false
                      include:
                        - climate.bedroom
                      display_options:
                        primary_info:
                          - "{entity}: {action} {relative-time}"
                        secondary_info:
                          - "{days} {time}"
                          - additional-tasks

            - type: history-graph
              entities:
                - sensor.mi_temperature_bedroom
              hours_to_show: 48
              refresh_interval: 60

@bcutter
Copy link

bcutter commented May 15, 2021

Copy that. Same problem, only with history-graph. Won´t show up at all after being not shown. Doesn´t matter if it´s
[1]
grafik
or
[2]
grafik

Workaround to use a transition seems to work though.

Update 1: It´s not... not reliably. So this is a real issue without any sufficient workaround :-(

Update 2: Using a transition works for history-graph type [2] but not for type [1]...!

Update 3: Using a transition works for history-graph type [2] only if switch-card is directly applied to the history-graph (and this might result in a malformed mobile view, see #52 !), it doesn´t work for a group of history-graphs (e. g. 3) stacked in a 'custom:vertical-stack-in-card'.

** Update 4: Added new side effect/issue #52.**

@thomasloven
Copy link
Owner

Please try release 1.9.0

@bcutter
Copy link

bcutter commented Oct 26, 2021

Please try release 1.9.0

I tested and referring to #41 (comment) I can say:

@thomasloven
Copy link
Owner

Please try release 1.9.3

@bcutter
Copy link

bcutter commented Mar 1, 2022

For me v1.9.3 fixed the remaining issue (using a group of history-cards inside a vertical-stack-in-card inside a state-switch-card).
What about yours @clau-bucur ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants