Coder Social home page Coder Social logo

postlund / home-card Goto Github PK

View Code? Open in Web Editor NEW
190.0 190.0 21.0 592 KB

A quick glance of the state of your home in Home Assistant Lovelace UI.

License: MIT License

JavaScript 100.00%
home-assistant home-assistant-custom home-automation lovelace lovelace-ui

home-card's People

Contributors

avidit avatar postlund avatar wetzel402 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

home-card's Issues

add to HACS

Could you add this card to HACS to simplify install and updates?
Thanks for the hard work btw:))

Door status inverted

My door sensor shows 'off' when closed and 'on' when open. I've tried to use 'state_map' to invert the states but the door is always shown the door-open.png image.

- type: door
  entity: binary_sensor.front_door_contact
  state_map:
    on: "off"
    off: "on"

Release 2021.6.0 - 2021.6.0 broke Home-Card

I love Home-Card. It is the centerpiece of my HA dashboard.

2021.6.0 appears to have broken Home-Card. Any thoughts?

Let me know what information you need, if you think can be corrected.

Screen Shot 2021-06-03 at 7 19 29 AM

No decimal support for resources

Hi,

There does not seem to be any decimal support for sensors added in the resource section.
If you add a temperature sensor and the current temperature is for example -1.6, the card will show -2.
Will there be support for decimals?

Images are shifted.

Hi,
Thanks for such an awesome repository and component for Home Assistant. I have set it up and this is happening on my side, a bit strange as you see all images are on the right side. I will investigate furthermore!

image

Cordially,
Bruno

Resources actions do not work

Both the tap_action and hold_action do not work as intended but the more-info always displays.

              resources:
                - entity: input_boolean.home_scene
                  icon: mdi:home
                  tap_action: 
                    action: toggle
                  hold_action:
                    action: none
                - entity: input_boolean.guest_mode_bedroom
                  icon: mdi:account-multiple
                  tap_action: 
                    action: toggle
                  hold_action:
                    action: none

state_map Issue

I use a binary_sensor.people_home which tracks both my wife and my device_trackers and gives a boolean "On" or "Off".

However on two different iOS devices the UI reacts differently when the binary_sensor is "On"

  1. If I use this...my iPhone and Safari web browser do not display the car but the iPad does
                - type: car
                  entity: binary_sensor.people_home
                  state_map:
                    On: 'home'
                    'off': 'not_home'
  1. This displays correctly iPhone and Safari but not iPad iOS app.
                - type: car
                  entity: binary_sensor.people_home
                  state_map:
                    'on': 'home'
                    'off': 'not_home'
  1. Note on all devices, unless I use quotes for the 'home' and 'not_home', no car displays so I'm guessing the code is specifically looking for an exact match rather than looking for variations of "on", "On", "true", "True" etc.

Full config below for reference

  name: My Home
  views:
    - icon: mdi:home-assistant
      path: home
      title: Home
      background: paper-card
      cards:
        - type: vertical-stack
          cards: 
            - type: custom:search-card
              max_results: 5
            - type: 'custom:home-card'
              theme: two_story_with_garage
              weather: weather.dark_sky
              entities:
                - type: door
                  entity: lock.front_door
                  state_map:
                    'locked': 'on' 
                    'unlocked': 'off'
                - type: garage
                  entity: cover.my_garage_door
                - type: upstairs_light
                  entity: group.second_floor_lights
                - type: downstairs_light
                  entity: group.main_floor_lights
                - type: car
                  entity: binary_sensor.people_home
                  state_map:
                    On: 'home'
                    'off': 'not_home'

custom_themes not work

i'm trying the custom_themes but the style doesn't seem to work correctly.

          - type: custom:home-card
            weather: weather.dark_sky
            theme: my_home
            background: transparent
            entities:
              - type: car
                entity: person.giuseppe
                state_map:
                  off: not_home
                  on: home
              - type: sprinkler
                entity: input_boolean.prova                      
            custom_themes:
              my_home:
                house: house.png
                overlay_actions:
                  '*':
                    tap_action:
                      action: toggle
                  car:
                    tap_action:
                      action: more-info
                overlays:
                  car:
                    home:
                      - image: car.png
                        style:
                          width: 8%
                          left: 60%
                          top: 50%
                    not_home:
                      - image: car.png
                        style:
                          left: 40%
                          top: 40%                
                  sprinkler:
                    on:
                      - image: sprinkler-on.png
                        style:
                          left: 10%
                          top: 10%
                    off:
                      - image: sprinkler-off.png
                        style:
                          left: 40%
                          top: 40%

if I remove the "," the style work.
Schermata 2021-06-30 alle 18 02 32

Outstanding Card

This is not an issue but this is an amazing card that could be expanded on greatly, such as taking the season sensor to change the environment outside since you use the Freepak graphics. Even weather can add rain or snow if it is doing that. It can be limitless and I think this card looks great.

Toggle the front door lock

For the door, when using “lock.front_door” it doesn’t toggle the entity as the garage and “cover.garage_door_opener” does.

Also, if possible as a feature request, the ability to add a confirmation message before would prevent accidental tapping.

Setup Issue

When you are setting this up in your WWW folder and create the home-card folder do you put the two files into that and then cope the theme directory into it? I tried to set it up like you have but it will not show any of the graphics. I think this card idea is awesome and love to get it setup but can't seem to make it working in the UI editor.

Feature Request: Configure the title with an entity_id

I'm not sure why using weather.dark_sky is returning "Dark Sky" rather than something more informative like the location or the description. Could you add a method to manually configure what is displayed with an entity_id instead?

Screen Shot 2019-12-28 at 2 24 29 PM

Empty id specified in weather

I am having trouble configuring the card. After entering these two lines in the Card Configuration I get the error message "Empty id specified in weather"
type: 'custom:home-card'
theme: two_story_with_garage

If I add a line for the weather using dark_sky, I get a TypeError: Cannot convert undefined or null to object
weather: weather.dark_sky

I am very new to HA so it could be my mistake. This is how weather is defined in my configuration.yaml
weather:

  • platform: darksky
    api_key:
    mode: daily

weather.home -- does not exist. It looks like weather.dark_sky is recognized but maybe it does not contain an attribute that is expected.

I appreciate your help and look forward to using the card.

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.