postlund / home-card Goto Github PK
View Code? Open in Web Editor NEWA quick glance of the state of your home in Home Assistant Lovelace UI.
License: MIT License
A quick glance of the state of your home in Home Assistant Lovelace UI.
License: MIT License
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.
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"
When trying to cast a view using cast.show_lovelace_view the red error box displays. Seems like custom cards require this line:
var LitElement = LitElement || Object.getPrototypeOf(customElements.get("hui-view"));
https://community.home-assistant.io/t/home-assistant-cast-with-custom-cards/137457
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"
- type: car
entity: binary_sensor.people_home
state_map:
On: 'home'
'off': 'not_home'
- type: car
entity: binary_sensor.people_home
state_map:
'on': 'home'
'off': 'not_home'
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'
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
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:
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.
Could you add this card to HACS to simplify install and updates?
Thanks for the hard work btw:))
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%
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.
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?
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.