AnthonMS / my-cards

Bundle of my custom Lovelace cards for Home Assistant. Includes: my-slider, my-slider-v2, my-button
Other
104 stars 27 forks source link

[Bug]: my-button with fan entity #42

Open deadlypantsd opened 1 year ago

deadlypantsd commented 1 year ago

Current Behavior

"Entity has to be one of the following: light, cover"

Expected Behavior

working button according to readme and documentation

Steps To Reproduce

    cards:
      - type: custom:my-button
        entity: fan.living_room_fan
        label: "Fan"
        layout: horizontal
        step: "11"
        minBar: 0
        maxBar: 33
        icon:
          icon: mdi:fan
          show: true
          tap_action:
            action: toggle
        styles:
          card:
            - height: "165px"
            - background: rgba(230, 230, 230, 0.3)
          icon:
            - color: |
                [[[
                  if (entity.state == "off") return "rgba(86, 86, 86, 0.5)";
                  else return "rgba(253, 216, 53, 1)";
                ]]]
          label:
            - color: rgba(0, 0, 0, 0.75)
        tap_action:
          action: toggle

Environment

- OS: HAOS 9.3
- Browser: Chromium (linux)
- Version: latest deb
- Hassio: 2022.11.5

Anything else?

No response

AnthonMS commented 1 year ago

I'm sorry, I didn't think anybody would be trying to use the button cards yet. They are still very much in development and the readme has been pretty much copy pasted from the other readmes.

If I remember correctly, the button card only really works for light and cover entities. That is the only entities I use it for at the moment anyway.

I'm sorry for the inconvenience.

AnthonMS commented 10 months ago

What are the config keys you provide supposed to do and where did you get them from?

    step: "11"
    minBar: 0
    maxBar: 33

I have updated the readme a bit now. Please take a look at that if you wish to use it. I still haven't added fan support though.