thomasloven / lovelace-state-switch

🔹Dynamically replace lovelace cards depending on occasion
MIT License
382 stars 27 forks source link

Gauge card does not work #1

Closed PierreScerri closed 5 years ago

PierreScerri commented 5 years ago

Hi

Awesome set of plugins.

I was unable to get the gauge card to work with the state switch.

I have the following config:

    - type: 'custom:state-switch'
       entity: sensor.energy_flow
       states:
         Import:
           type: gauge
           entity: sensor.grid_power
           name: Import
         Export:
           type: gauge
           entity: sensor.grid_power
           name: Export

Nothing is displayed. It works if I change the type from gauge to sensor. I tried this because the conditional card also behaves this way. Just hoping it would work.

What am I doing wrong?

Thanks

thomasloven commented 5 years ago

I suppose you're on Home Assistant version 0.85.1 or earlier? There's a problem with gauge card which should be fixed in the next version (scheduled for release on Wednesday, I believe).

PierreScerri commented 5 years ago

Thanks for the heads up. I will wait patiently.

PierreScerri commented 5 years ago

Got it working now.

However the size is bigger than the size of the card it displays (gauge) This upsets my display as shown in the screen grab below:

screen shot 2019-01-28 at 16 53 56

Using Safari on Mac and iOS app on iPhone for home assistant (Hassio 0.86.3). This behaviour is random. Sometimes everything is aligned.

BTW the card displayed is a vertical-stack containing a markdown at the top and 2 vertical stacks in a horizontal-stack, if that is of any use.