Git Product home page Git Product logo

lovelace-light-with-profiles's Introduction

Light with Profiles

hacs_badge

Turn on lights based on light_profiles.csv.

demo

Installation

  1. Upload light-with-profiles.js inside your www folder, and add the resource in lovelace config like so:
resources:
  - type: module
    url: /local/light-with-profiles.js
  1. If you like the card to be able to show wich profiles are active (change color) you will need to add your profiles defined in light_profiles.csv in your lovelace.yaml like so:
light_profiles:
  bright: '0.457,0.408,254'
  dimmed: '0.457,0.408,77'
  nightlight: '0.509,0.411,1'
  brightness_only: '0,0,150'
  1. Lastly add the custom card:
type: 'custom:light-with-profiles'
title: Lys
entities:
  - entity: light.spisestuen
    name: 'Override Light Name'
    profiles:
      - name: bright
        icon: 'mdi:brightness-5'
      - name: dimmed
        icon: 'mdi:brightness-4'
      - name: nightlight
        icon: 'mdi:brightness-3'
  - entity: light.udestuen
    profiles:
      - name: bright
        icon: 'mdi:brightness-5'
      - name: dimmed
        icon: 'mdi:brightness-4'
      - name: nightlight
        icon: 'mdi:brightness-3'
  - entity: light.vitus
    profiles:
      - name: bright
        icon: 'mdi:brightness-5'
      - name: dimmed
        icon: 'mdi:brightness-4'
      - name: nightlight
        icon: 'mdi:brightness-3'
  - entity: light.matias
    profiles:
      - name: bright
        icon: 'mdi:brightness-5'
      - name: dimmed
        icon: 'mdi:brightness-4'
      - name: nightlight
        icon: 'mdi:brightness-3'
  - entity: light.sovevaerelset
    profiles:
      - name: bright
        icon: 'mdi:brightness-5'
      - name: dimmed
        icon: 'mdi:brightness-4'
      - name: nightlight
        icon: 'mdi:brightness-3'
  - entity: light.entreen
  - entity: light.kokken

Debug

To show the current values of your lights you can add the debug attribute

type: 'custom:light-with-profiles'
title: Lys
debug: true
entities:
  - entity: light.spisestuen
  - entity: light.entreen
  - entity: light.kokken

Buy Me A Coffee

lovelace-light-with-profiles's People

Contributors

cristianhenzel avatar jiridostal avatar siggibjarna avatar stephanmiehe avatar tcarlsen avatar wrt54g 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

Watchers

 avatar  avatar  avatar  avatar

lovelace-light-with-profiles's Issues

only use brightness

Hi!

I have some KNX lights that wont work if I also send in XY color.
looks like they only work when I use entity and brightness. is it possible to have this as an option? only brightness.

Where to find/place light_profiles.csv

This might be a dumb question but I can't find the light_profiles.csv file in my home assistant installation.
I'm running home-assistant-core inside docker and looking in the mounted folders I can't find the file anywhere.
Do I have to create it first?

Support entity linking for brightness and color change

In the standard HA light controls when you click the name of an entity, it'll show the brightness and color pallet. It would be helpful to port the same functionality into this implementation so that a user does not require both

Button background does not work for light groups

I have a light group that consists of 2 table lamps and am using the standard buttons in an entity card. The buttons work to change the light levels, however the background never changes to show the state. I have verified that the buttons work as expected for the individual lamp entities so I am not sure why the group does not work.

Here is my group in groups.yaml:

  family_room_lamps:
   entities:
     - light.left_family_room_lamp
     - light.right_family_room_lamp

And here is the configuration in the entities card:

  - customSetpoints: true
    entity: group.family_room_lamps
    hiBrightness: 254
    icon: 'mdi:lamp'
    lowBrightness: 50
    medBrightness: 120
    name: Table Lamps
    secondary_info: last-changed
    type: 'custom:light-brightness-preset-row'
  - customSetpoints: true
    entity: light.family_room_fan
    hiBrightness: 254
    lowBrightness: 64
    medBrightness: 128
    name: Family Room Fan
    type: 'custom:light-brightness-preset-row'
  - entity: remote.familyroom
    title: Family Room
  - entity: light.left_family_room_lamp
    type: 'custom:light-brightness-preset-row'
  - entity: light.right_family_room_lamp
    type: 'custom:light-brightness-preset-row'
type: entities

here is a screen shot of the individual lamps in high and the group shows off:

Screen Shot 2020-09-09 at 5 54 04 AM

Support `name` attribute for entity

It would be great to have the ability to override names of entities just like the entities card that ships with HA.

- entity: light.spisestuen
    name: 'My light'
    profiles:
      - name: bright
        icon: 'mdi:brightness-5'
      - name: dimmed
        icon: 'mdi:brightness-4'
      - name: nightlight
        icon: 'mdi:brightness-3'

Profiles do not work

I followed all your installation docs, put the light_profiles.csv inside the /config folder, added the entry light_profiles inside the ui.lovelace.yaml with the same values of light_profiles.csv, added the card inside ui.lovelace.yaml. but this is what i get:

Schermata 2020-10-25 alle 14 23 22

I am able to turn on and off the lights, but clicking over a profile it do not nothing. Nothing change...

For more informations my light_profile.csv is:

bright,0.5119,0.4147,254
dimmed,0.5119,0.4147,77
nightlight,0.363,0.3686,1

And this is what i added into ui.lovelace.yaml:

light_profiles:
  bright: '0.5119,0.4147,254'
  dimmed: '0.5119,0.4147,77'
  nightlight: '0.363,0.3686,1'

My card is:

  - title: Profili Luci
    path: profili
    icon: mdi:lightbulb
    cards:
      - type: custom:light-with-profiles
        title: Profili Luci
        debug: true
        entities:
          - entity: light.yeelight_1
            profiles:
              - name: bright
                icon: 'mdi:brightness-5'
              - name: dimmed
                icon: 'mdi:brightness-4'
              - name: nightlight
                icon: 'mdi:brightness-3'
          - entity: light.yeelight_2
            profiles:
              - name: bright
                icon: 'mdi:brightness-5'
              - name: dimmed
                icon: 'mdi:brightness-4'
              - name: nightlight
                icon: 'mdi:brightness-3'
          - entity: light.yeelight_5
            profiles:
              - name: bright
                icon: 'mdi:brightness-5'
              - name: dimmed
                icon: 'mdi:brightness-4'
              - name: nightlight
                icon: 'mdi:brightness-3'
          - entity: light.yeelight_9
            profiles:
              - name: bright
                icon: 'mdi:brightness-5'
              - name: dimmed
                icon: 'mdi:brightness-4'
              - name: nightlight
                icon: 'mdi:brightness-3'

I am running HASSOS 0.116.4 inside a RPi4

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.