Code Monkey home page Code Monkey logo

homekit-panel-card's People

Contributors

caseyjhol avatar dbuit avatar dtterastar avatar gerard33 avatar iantrich avatar imgbotapp avatar ktibow avatar rob-mccann avatar wtrbuit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

homekit-panel-card's Issues

Last changed state on more devices than sensors

If I'm not misstaken there's as of now not possible to show last_changed state on other devices than sensors. A nice addon would be to be able to show last_changed state for every device that supports it.

Example below:

entities:
  - entity: person.xxxxxxx
    popup:
      type: map
      default_zoom: 16
      dark_mode: true
      entities:
        - person.xxxxx
    state: last_changed
    icon: mdi:human-female
    name: Linn
    offStates:
      - "Borta"
      - "not_home"
      - "paused"

Request: State-based icons?

Just got this working, and love it, thank you for the effort here! Question, can the icon be customized based on the entity state? So, for a lock, show mdi:lock when locked and mdi:lock-open-variant when unlocked, or for a garage cover, mdi:garage / mdi:garage-open, etc. Right now, it changes the icon color like a light for unlocked/open.

[idea] Person card

I would like to contribute to a more immersive experience when the card is a person. It could be something similar to the weather card. I would like to display the person and devices states.

dark variant

I know I can adapt the styles with css, but a setting for one additional dark style would be nice for easier configuration.

Also, I noticed: titles should have more space to the first row of cards.

popupExtend not working when custom:light-pop-up-card is used on single entity

The popup works fine with the config below, but popupExtend is ignored.

Example config:

- entity: group.all_belysning
  name: Kväll
  icon: mdi:weather-night
  popup:
    type: custom:light-popup-card
    entity: group.all_belysning
    scenesInARow: 4
    actionsInARow: 4
    brightnessWidth: 100px
    brightnessHeight: 300px
    switchWidth: 100px
    switchHeight: 300px
    supportedFeaturesTreshold: -1
  popupExtend:
    actions:
      - service: scene.turn_on
        service_data:
          entity_id: scene.ontspannen
        color: "#FDCA64"
        name: ontspannen
      - service: scene.turn_on
        service_data:
          entity_id: scene.helder
        color: "#FFE7C0"
        name: helder
      - service: scene.turn_on
        service_data:
          entity_id: scene.concentreren
        color: "#BBEEF3"
        name: concentreren
      - service: scene.turn_on
        service_data:
          entity_id: scene.energie
        color: "#8BCBDD"
        name: energie

Outdated Installation instructions for HACS

If I am not mistaken, your current Installation instructions for a HACS install now requires adding the following URL to the resources ('configuration.yaml' or the resource editor ''/config/lovelace/resources'')

/hacsfiles/Homekit-panel-card/homekit-panel-card.js

Using lovelace_gen not possible?

I love your plugin. To minimize repeats in the yaml code, I tried to use the custom lovelace_gen integration https://github.com/thomasloven/hass-lovelace_gen. However this seems to clash with the rules segment in your card. I guess it is related to your rules also using {% / %}. I tried to put the rules within quotes, this removes the lovelace_gen error, but also doesn't show the rules anymore.

Do you know how this can be avoided?

Text overflow in rules/templating

When a long text string is presented in the companion app the overflow wrecks the width. See image.

Is it possible to have a automatic line break or truncating?
IMG_E8F91912B1F9-1

Request: Status value top right corner

I'm trying to rebuild my dashboard so it matches something like this:

However, it uses a picture-elements-card and on+off pictures for each entity making it less practical to use. It also doesn't scale properly on multiple devices.

Either way, what I do like of this interface is the status in the top-right corner (with the circular percentage). Is this something that could be added to this plugin?

Not displaying anything from lights?

I copied this straight from the example and used my own lights, why doesn't it work? Nothing is displaying icons


- title: Lights
  path: lights_path
  cards:
    - type: "custom:homekit-card"
      enableColumns: true
      statePositionTop: true
      rows:
        - row: 1
          columns:
            - column: 1
              tileOnRow: 4
              entities:
                - title: Living Room
                  entities: 
                    - entity: light.tv_light_1  
                    - entity: light.tv_light_2
                    - entity: light.living_room_light
                    - entity: light.living_room_light_r
            - column: 2  
              tileOnRow: 3
              entities:
                - title: Kitchen
                  entities:
                    - entity: light.beganegrond  
        - row: 2
          columns:
            - column: 1
              tileOnRow: 4
              entities:
                - title: Upstairs
                  entities:
                    - entity: binary_sensor.wasmachine_status
                    - entity: weather.weersverwachting
        - row: 3
          columns:
            - column: 1
              entities:
                - title: Bedroom
                  entities:
                    - entity: switch.doorbell_chime_active

Homekit-panel-card/index.m.js.map' but it does not exist and the new slider is invisible

Got the following error in the console. And the new light slider on the tile does not show. It works but the slider "handle" does not show, just but the mouse pointer changes as I hover over the invisible slider...

As seen below the error is for all your components @DBuit. No other custom cards throw the same error.

DevTools failed to load SourceMap: Could not load content for http://192.168.1.10:8123/hacsfiles/light-popup-card/index.m.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://192.168.1.10:8123/hacsfiles/Homekit-panel-card/index.m.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load SourceMap: Could not load content for http://192.168.1.10:8123/hacsfiles/cover-popup-card/index.m.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE

Besides the slider everything seams to work fine, including the popup-cards.

I've tried reinstalling (via HACS), empty all caches but still the same errors.

Support for conditional tiles

I’d like to know if it is possible to display some tiles depending on certain conditions?

For example, I have a garden irrigation system that is connected to a water tank. If the water level of the water tank is ok, I just want to have a switch tile in the frontend to turn the watering on and off. But if the water level is too low, I want the switch to be hidden and get a tile with a warning in its place.

Or another example. I use the integrated media-control card for the tiles of my media players and really like the look of it. But I just like that the media-control cards to be displayed when the media players play. When the media-players are off, I want to show something else for it

I couldn’t find anything regarding this question in the documentation.

Wrong css style for unit of measurement in graph tiles

Currently graph tiles are looking clean but the unit of measurement has a different format then the unit itself.

image

The state__uom class should have the same css attributes as state__value to look clean. Otherwise great looking integration :)

[request] Weather card

Hi, i dont know if its meant to work but i wanted to add the "weather card" or "simple weather card" to the homekit panel config but it doesnt seem to work.

thanks in advance

code

              - column: 2
                entities:
                  - entities:
                      - entity: weather.breucq
                      - card: 'custom:weather-card'
                        cardOptions:
                          entities:
                            - entity: 'weather.breucq'
                        noPadding: true
                      - card: 'custom:simple-weather-card'
                        cardOptions:
                          entities:
                            - entity: 'weather.breucq'
                        noPadding: true
                      - card: 'custom:mini-graph-card'
                        cardOptions:
                          entities:
                            - sensor.temp_zithoek
                          update_interval: 1
                        noPadding: true
                      - card: 'custom:mini-graph-card'
                        cardOptions:
                          entities:
                            - sensor.temp_leefruimte
                          update_interval: 1
                        noPadding: true
                    title: Temperatuur
                tileOnRow: 3

result
afbeelding

Circle and temperature display in the new climate tile are not centered

Hello Dbuit,
I have just installed version 0.2 of the Homekit-panel-card and I really like the new tiles for climate entities.
Sadly the Circle and temperature display in the new climate tile are not centered for me.
The circles have an elliptical shape and the text is too far down.:
climatenannt

Request: faster popup menu

I don't suppose there is anyway to open the popup menu while holding the button. At the minute you have to press and hold then let go before the tile opens. Would it be possible to open the popup menu while the tile was being pressed so you knew when to let go?

Request: brightness slider

I've got a new feature request: brightness slider on the card. The popup card is nice, but having the slider right inside the tile would be HUGE. This would be especially helpful with wider cards. I made this mockup:
1

If wanted, this could also show the color (not so nice with my current theme, but you get the idea):
2

What do you think?

[ request ] show picture in card

I added pictures to the person entity but it doesnt show in the card

    cards:
      - enableColumns: true
        rows:
          - columns:
              - column: 1
                entities:
                  - entities:
                      - entity: person.toulouse
                      - entity: person.babette
                tileOnRow: 3
            row: 1
        type: 'custom:homekit-card'

result:
afbeelding
should be:
afbeelding

Request: Support for hold_action / double_tap_action

Right now only tap_action (single click) is implemented. However I'd like also like to be able to "hold" an element to call another service (e.g. browser_mod.popup). Right now it simply opens the "more-info" dialog of HASS. Also might be nice to have double_tap_action too.

Could these be added?

Update docs to show result for each example in the readme

It would be awesome if you had paired each code example with a screenshot of the results. Personally I find it helpful when code examples are paired with an illustration so I know exactly what the sample does... just a suggestion. thanks for your awesome work btw, this card is great

markdown as rules?

Is there a way to add the markdown coding into the rules attribute?
Something like:

        rules: >
          <li>{% if now().hour  < 5
          %} Good Night {{'\U0001F634'}}
              {% elif now().hour < 12 %} Good Morning {{'\u2615\uFE0F'}}
              {% elif now().hour < 18 %} Good Afternoon {{'\U0001F44B\U0001F3FB'}}
              {% else %} Good Evening {{'\U0001F44B\U0001F3FB'}}
              {% endif %}</li>
          {% if "not_home" in states('person.saulo') %} <li>Saulo is out.</li>
          {% endif %} {% if "not_home" in states('person.olga') %} <li>Olga is
          out</li> {% endif %}

          {% if states('sensor.current_lights_on') | float > 0 %}
          <li>{{states('sensor.current_lights_on')}} lights on</li> {% endif %}

          {% if states('sensor.current_media_players_on') | float > 0 %}
          <li>{{states('sensor.current_media_players_on')}} speakers on</li> {%
          endif %}

{request} Conditional background colr

I think you've done a fine piece of work. And I also have the impression that you like it when people come up with sugessties. Since a madman can think of more than a programmer can handle, I have 3 wishes.

  1. It would be great if you could work with thresholds. I mean that the backside of a tile gets a different colour when a certain value is reached. You can then see at a glance on your screen that something is going on. Think of the processor temperature above a certain value after which the background of the tile automatically turns red.
  2. What would also be very nice in that context is that the background could blink. Think for example of a rain sensor. At actual precipitation, the background of the tile flashes blue.
  3. With the popup card, it would be nice if you could also choose the colour of a circle with all the colours on it. Although there is already such a custom card from another developer, it doesn't really work well with your homekit-card. The popup works and you can choose any colour but you can't get back to the previous screen without restarting the system.

Request: popup on tap_action

Feature Request: have the possibility to call the custom popup on tap_action. Hold action is often to difficult for end users and it would be handy to call the custom popup on the tap_action. I know this might(?) be possible via the browser_mod, but it's interesting to not have this platform wide and only within the card.

Homekit-Card overlapping other cards.

For some reason my homekit-card overlaps other existing cards. Either removes them, or just lies on top. Which elements gets overlappend/removed depends on the order of cards. If i move the media card above the homekit-card, the graph card gets removed/overlapped.

Any help? Unsure if it's a bug or my mistake.

cards:
  # Lights
  - type: "custom:homekit-card"
    statePositionTop: true
    tileHoldAnimation: true
    entities:
      - title: Bedroom
        popup:
          type: custom:light-popup-card
        entities:
          - entity: light.rgb_magnus
            name: Magnus
            popupExtend:
              actions:
                - service: light.turn_on
                  service_data:
                    entity_id: light.rgb_magnus
                    rgb_color: [253,202,100]
                    transition: 0.8
                  color: "#FDCA64"
                - service: light.turn_on
                  service_data:
                    entity_id: light.rgb_magnus
                    rgb_color: [187,238,243]
                    transition: 0.8
                  color: "#BBEEF3"

          - entity: light.rgb_hilde
            name: Hilde
            popupExtend:
              actions:
                - service: light.turn_on
                  service_data:
                    entity_id: light.rgb_hilde
                    rgb_color: [253,202,100]
                    transition: 0.8
                  color: "#FDCA64"

                - service: light.turn_on
                  service_data:
                    entity_id: light.rgb_hilde
                    rgb_color: [187,238,243]
                    transition: 0.8
                  color: "#BBEEF3"

          - entity: switch.on_off_plug_in
            icon: mdi:fire
            color: "#FDCA64"
            name: Heater

  # Sonos
  - type: custom:mini-media-player
    entity: media_player.sonos_living_room
    artwork: cover
    hide:
      progress: true
      volume: true
      source: true
      controls: false
      shuffle: false
      info: false
      icon: false
      power: true

Screenshot:
Overlapping

iOS Safari rendering width

Saw that this was an issue on the HA forum and reported as fixed but as seen in the attached screen shot from my iPhone it still exists.

Works fine while simulating iPhone X in Chrome, and works as expected in Safari on Mac.

IMG_155F026B49DB-1

Request: media player full album art

Would it be possible to have the currently playing song art fill the card instead of the white background, maybe this could be an additional setting?

rulesColor is not working

I cannot get rulesColor to work. No matter what color I set it to, it stays white - and makes impossible to read on a light background. Below is a snippet of the configuration:

      - type: 'custom:homekit-card'
        home: true
        rules: >
          {% if states('sensor.current_lights_on') | float > 0 %} <li>{{states('sensor.current_lights_on')}} {% if states('sensor.current_lights_on') | float > 1 %}lamper {% else %}lampe {% endif %}tændt</li> {% endif %} 
          {% if states('sensor.current_cameras_recording') | float > 0 %} <li>{{states('sensor.current_cameras_recording')}} {% if states('sensor.current_cameras_recording') | float > 1 %}kameraer {% else %}kamera {% endif %}optager</li> {% endif %}
        rulesColor: '#EB5B4C'

Am I settings this up wrong?

0.4.2 ignores titleColor

title

    title: "Övre Husargatan 9"
    useBrightness: false
    useTemperature: false
    titleColor: "#FFF"
    enableColumns: true
    statePositionTop: true
    horizontalScroll: false
    tileHoldAnimation: true

Add option to create larger tiles

It would be nice to add an option to create larger tiles (e.g. a tile with the width of 2 tiles, or the height of 2 tiles, or both).

This would be very handy, as some components are just too large to fit in a single tile.

`style:` for custom CSS values wont stay active

I've applied some of the custom tile styles to my tiles (e.g. --tile-border-radius: 12px;,--tile-width: 105px;,--tile-height: 81px;) they worked great at first but now will not display. They always show the default values.

For example:

Here is my current tab LOVELACE:

cards:
  - enableColumns: true
    rows:
      - columns:
          - column: 1
            entities:
              - entities:
                  - entity: light.pendants
                    icon: 'mdi:vanity-light'
                    name: Pendants
                  - entity: light.stairway
                    icon: 'mdi:ceiling-light'
                    name: Stairway
                  - entity: light.kitchen
                    icon: 'mdi:ceiling-light'
                    name: Kitchen
                  - entity: switch.kitchen_leds
                    icon: 'mdi:ceiling-light'
                    name: Counter
                  - entity: light.living_room
                    icon: 'mdi:ceiling-light'
                    name: Living Room
                  - custom: light.living_room
                    icon: 'mdi:blinds'
                    name: Living Room Blinds
                    tap_action:
                      action: call-service
                      service: cover.toggle
                      service_data:
                        entity_id: group.lr_all
            tileOnRow: 8
    settings: true
    statePositionTop: true
    style: |
      :host {
        --tile-background: rgba(255, 255, 255, 0.8);
        --tile-border-radius: 12px;
        --tile-width: 105px;
        --tile-height: 81px;
        --tile-on-background: rgba(255, 255, 255, 1);
      }
    supportedFeaturesTreshold: 0
    title: Home
    titleColor: '#FFF'
    type: 'custom:homekit-card'
    useBrightness: true
    useTemperature: true
  - cards:
      - aspect_ratio: 55%
        camera_image: camera.front_door
        camera_view: live
        entity: camera.front_door
        show_name: false
        show_state: false
        type: picture-entity
      - aspect_ratio: 55%
        camera_image: camera.allyway
        camera_view: live
        entity: camera.allyway
        show_name: false
        show_state: false
        type: picture-entity
    type: horizontal-stack
  - enableColumns: true
    rows:
      - columns:
          - column: 1
            entities:
              - entities:
                  - custom: Lights
                    icon: 'mdi:lightbulb-group'
                    name: Lights
                    tap_action:
                      action: navigate
                      navigation_path: /lovelace/lights
                  - custom: TVs
                    icon: 'mdi:television-box'
                    name: TVs
                    tap_action:
                      action: navigate
                      navigation_path: /lovelace/tvs
                  - custom: Blinds
                    icon: 'mdi:blinds'
                    name: Blinds
                    tap_action:
                      action: navigate
                      navigation_path: /lovelace/blinds
                  - custom: CCTV
                    icon: 'mdi:cctv'
                    name: CCTV
                    tap_action:
                      action: navigate
                      navigation_path: /lovelace/cctv
                  - custom: Sonos
                    icon: 'mdi:music-circle-outline'
                    name: Sonos
                    tap_action:
                      action: navigate
                      navigation_path: /lovelace/sonos
                  - custom: Alarm
                    icon: 'mdi:shield-home'
                    name: Alarm
                    tap_action:
                      action: navigate
                      navigation_path: /lovelace/locks
                  - custom: Weather
                    icon: 'mdi:weather-partly-snowy'
                    name: Weather
                    tap_action:
                      action: navigate
                      navigation_path: /lovelace/weather
            tileOnRow: 8
        row: 1
    settings: true
    statePositionTop: true
    style: |
      :host {
        --tile-background: rgba(255, 255, 222, 0.8);
        --tile-border-radius: 12px;
        --tile-width: 85px;
        --tile-height: 57px;
        --tile-on-background: #cce6ff;
        --tile-border-radius: 22px;
      }
    supportedFeaturesTreshold: 0
    title: Home
    titleColor: '#FFF'
    type: 'custom:homekit-card'
    useBrightness: true
    useTemperature: true
type: vertical-stack

But this is how it looks on the page:

image

Number Format - number.toLocaleString ?

Is there any way to format the representation of the number for a card ?

Bildschirmfoto 2020-07-20 um 15 07 34

entities:
  - title: "Wasserverbrauch"
    entities:
      - entity: sensor.wasser_liter_jahr
        name: Jahr
        localestring: 'de-AT'                     ##  this way ??
        tap_action:
          action: more-info
          entity: sensor.wasser_liter_jahr

Result for number.toLocaleString(localestring):

Number(54123.990).toLocaleString("de-DE")
"54.123,99"

Rules height - remove extra white space

Is it possible to remove the extra whitespace/rows in the rules?

Se example below where there's extra whitespace. I would like to be able to set the height either in pixels, number of rows or that it defaults to the same spacing as it is between the title and rules section.

whitespace

Compatibility with Home Assistant 0.110

Transition work fine for the most part but the icon size seams to have been affected.
The icon size is a fair bit smaller now with the new icon handling-function as of 0.110.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.