custom-cards / light-entity-row Goto Github PK
View Code? Open in Web Editor NEWEntity row for lights with sliders for adjusting different values based on features
Entity row for lights with sliders for adjusting different values based on features
Is it possible to use light groups?
Like group.kitchen_lights? I have a few groups of different lights that I'd like to use this card for if possible. Thank you!
Minor point, in readme.md, first line entites should be entities
Hi! This is a cool custom component.
Would you able to modify it a bit by adding the possibility if needed to hide the toggle button (on/off switch)?
thanks in advance
I have added the following section
- type: entities
title: Lights
entities:
- type: "custom:light-entity-row"
entity: light.kitchen_table
icon: mdi:lamp # optional
name: Lamp # optional
- type: "custom:light-entity-row"
entity: light.kitchen_fan
showColorPicker: true # shows color picker if supported
showColorSliders: true # shows hue/saturation sliders if supported
And I get this
Only show the brightness bar when on.
Hello,
I really like this card, very slick!
However im having problems using it.
It loads, and i have it assigned a decora wifi light. I can control the light but i want to turn off unsupported features for this light, namely the color temperature buttons and the color temperature slider.
Here's my lovelace config for this section:
- type: 'custom:light-entity-row'
entity: light.mias
icon: mdi:lamp
name: Lamp
showTempButtons: false
showBrightness: true
showColorTemp: false
showColorPicker: false
showColorSliders: false
In this config, temp buttons are still being shown as well as the colorTemp slider. However the other options seem to work for turning them off and on (showColorPicker, showColorSliders).
I see in the code it says:
if (!this._config.hideTempButtons && this.isSupported(SUPPORT_COLOR_TEMP)) {
this.showTempButtons = true
}
So its almost like somehow if the code detects the element supports color temp then show it anyway? Am i reading that right? But when i look at the element output i do not see any support for color temp, only brightness.
The decora wifi light element shows supported_features of 33
Thank you kindly for your efforts.
I like this card as it works better with my fibaro RGBW controller. Thanks for sharing.
A few niggles though:
Here's a shot of the card:
The buttons work with light.turn_on
which is great, but say I want to call something like hue.hue_activate_scene
. Can you please add an override to the buttons service calls.
type: entities
title: Main Bedroom
show_header_toggle: false
entities:
Cannot add property buttons, object is not extensible
entity: light.main_bedroom_light
type: custom:light-entity-row
icon: mdi:light
name: Light
Since 2022.12.1 I have not been able to update to the current version. It just spins and spins and never does anything.
I've added a light-entity-row for my Yeelight LED strip. But in the main UI, it's displayed as an error "Custom element doesn't exist" and the actual card popups after clicking on that error.
My config:
title: LED strip
type: entities
entities:
- type: 'custom:light-entity-row'
entity: light.yeelight_strip2_04cf8c777dc8
showColorPicker: true
showColorSliders: true
Home Assistant version: 0.86.4
Will light-entity-row continue to work in HA 2023.5?
Hi.
A change in how lovelace cards are set up in Home Assistant 0.105 increases performance, but enables cards to accidentally modify their own configuration in the loaded lovelace configuration.
I'm going through the cards in the HACS default repository, and noticed that your card may be susceptible to this. Looking through your code it seems you may modify parts of the config object passed to your card in setConfig
.
The result could be that your card does not work well with the GUI editors or that parts of the configuration start showing up multiple times.
At some point in the future, it is likely that the configuration will be frozen before being passed to setConfig
. At this point, your card will fail entirely when it tries to modify the configuration object.
There are several ways to fix/protect agains this problem.
The best is to restructure setConfig
such that the configuration is never modified.
Other alternatives are to make a copy of the configuration and work on that instead.
setConfig(config) {
config = { ...config }; // This works for simple configurations not containing arrays or objects
...
import { deepClone } from "deep-clone-simple";
// https://github.com/balloob/deep-clone-simple
setConfig(config) {
config = deepClone(config); // This is a safe and fast method
...
or
setConfig(config) {
config = JSON.parse(JSON.stringify(config)); // This uses built-in functions, but may be slower than deepClone
...
Please note that I have not tested your card agains Home Assistant 0.105 or later, but just quickly looked through the code. If I'm mistaken in my assessment, I appologize for taking your time.
See thomasloven/hass-config#6 for more info.
Type is missing, see hacs/integration#845
I'd like to know if it is possible to add more than one light and more buttons in one card and how.
Which are the service_data available for light and if i can add more of them in one card....
Polymer were removed in version 2023.5 (I noticed after upgrade to 2023.5.4) which stopped ligt-entity-row to working.
Log:
2023-05-30 12:46:20.906 ERROR (MainThread) [frontend.js.latest.202305033] https://[myhost]:8123/hacsfiles/light-entity-row/light-entity-row.js:10:40 Uncaught ReferenceError: Polymer is not defined
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.