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

Integration with other cards #3

Closed
ghost opened this issue Oct 4, 2018 · 4 comments
Closed

Integration with other cards #3

ghost opened this issue Oct 4, 2018 · 4 comments
Labels
bug Something isn't working

Comments

@ghost
Copy link

ghost commented Oct 4, 2018

Unsure if this error is related to the vertical-card-stack custom card or this one or how they interact. Getting the following error when the view is refereshed.

https://duck.duckdns.org/local/custom_ui/vertical-stack-in-card.js?v=0.0.2:61:74 Uncaught TypeError: Cannot read property 'style' of null

The card also doesn't appear to integrate cleanly like other cards do into the vertical-card-stack. See imugr link. https://imgur.com/Vuer2xp (note the borders around the graph cards)

Relevant parts of my config:

resources:
  #https://github.com/thomasloven/lovelace-slider-entity-row
  - url: /local/custom_ui/slider-entity-row.js
    type: js
  #https://github.com/kalkih/mini-graph-card
  - url: /local/custom_ui/mini-graph-card.js?v=0.0.1
    type: module
  #https://github.com/custom-cards/vertical-stack-in-card
  - url: /local/custom_ui/vertical-stack-in-card.js?v=0.0.2
    type: js

title: Home
views:
  - title: Rooms
    icon: mdi:home
    cards:
      - type: custom:vertical-stack-in-card
        cards:
          - type: entities
            title: HVAC Status
            entities:
              - entity: climate.downstairs
                name: Nest Thermostat
          - type: glance
            entities:
              - entity: binary_sensor.downstairs_thermostat_fan
                name: Fan
              - entity: sensor.downstairs_thermostat_hvac_state
                name: State
                icon: mdi:thermostat
              - entity: sensor.downstairs_thermostat_operation_mode
                name: Mode
                icon: mdi:information-outline
              - entity: sensor.downstairs_thermostat_target
                name: Target
                icon: mdi:thermometer-lines
              - entity: sensor.downstairs_away_mode
                name: Away
                icon: mdi:home-outline
           - type: horizontal-stack
             title: Nest Graphs
             cards:
               - type: "custom:mini-graph-card"
                 entity: sensor.downstairs_thermostat_temperature
                 name: Temperature
                 line_color: '#e74c3c'
                 line_width: 8
                 more_info: false
                 accuracy: 25
               - type: "custom:mini-graph-card"
                 entity: sensor.downstairs_thermostat_humidity
                 name: Humidity
                 line_color: '#3498db'
                 line_width: 8
                 more_info: false
                 accuracy: 25
@ghost
Copy link
Author

ghost commented Oct 4, 2018

Posted to the vertical-stack repo also:
ofekashery/vertical-stack-in-card#23

@kalkih kalkih added the bug Something isn't working label Oct 4, 2018
@ofekashery
Copy link

I checked it, it's a problem with this card.
You have to build the ha-card already in setConfig, and then change it when the data arrives.
It will also solve the problem at first appears "Custom element doesn't exist: mini-graph-card" for a few seconds:
image

@kalkih
Copy link
Owner

kalkih commented Oct 6, 2018

You can't really expect custom cards to play nice with each other, however I've made some adjustments in 3d48bb5 which should solve some of the issues with using this card together with vertical-stack-in-card. There are still issues when nesting this card in a horizontal-stack inside a vertical-stack-in-card.

I checked it, it's a problem with this card.
You have to build the ha-card already in setConfig, and then change it when the data arrives.
It will also solve the problem at first appears "Custom element doesn't exist: mini-graph-card" for a few seconds:

To claim that the problem lies in this card is a bit of a stretch.
You'll see some of the same compatibility issues with custom cards like the button-card.
I don't know why I would start building the card in the setConfig function, that's not the intended use of the function..

@kalkih
Copy link
Owner

kalkih commented Nov 10, 2018

You can now use the official Sensor Card if you are having this issues like this.
It should integrate and work better with custom cards.

@kalkih kalkih closed this as completed Nov 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants