How to configure light presets

Hello,

I’ve installed HA yesterday and been getting to know the configuration. Right now I’m trying to see if I can configure a few presets/profiles per light, so I don’t have to use the color picker + brightness slider. However, I just can’t seem to get it to work. Maybe I’m completely going about this the wrong way or maybe what I want is not even possible (I know it’s possible with scenes, but I don’t want to configure multiple scenes per light). I’ve been mainly looking at the /components/light/ documentation.

So far I’ve tried this:

Added an include to my configuration.yaml:

light: !include lights.yaml

Tried to configure a single light with a single profile:

light.bureau.default:
   platform: tradfri
   friendly_name: Bureau
   profile: energize

This throws me an error:

2019-08-18 10:12:19 ERROR (MainThread) [homeassistant.config] Invalid config for [light]: required key not provided @ data['platform']. Got None. (See /home/homeassistant/.homeassistant/configuration.yaml, line 16). Please check the docs at https://home-assistant.io/components/light/

Is this the correct way to get presets per light? If so, how do I get it to work?

profile is used in the light services (light.turn_on, light.turn_off) not the light configuration.

Thanks.

Then I guess I’m kinda missing something in how HA works. What I hope to achieve is that I get a bunch of buttons in the GUI that I can use to switch my lights to a profile. I do have the lights show up in the GUI right now (auto configuration upon install) and I can switch them, but if I want to change any light settings I have to manually pick a color and brightness. Is there any other way to set the lights through the GUI?

Sure, but you said you don’t want to use scenes for some reason.

Yes, because scenes get presented in the GUI like this:

scene

I’m looking for switches where I can set some defaults, instead of getting the color and brightness slider I get right now.

I’ve been looking at templates, but I’m not sure if those get me where I want.

I use drop down lists to select my scenes.
Annotation%202019-08-18%20213141

  trigger:
    platform: state
    entity_id: input_select.deck_scene
  action:
  - service: light.lifx_effect_stop
    entity_id: light.deck_lights
  - service: homeassistant.turn_on
    data_template:
      entity_id: >
        {% if states('input_select.deck_scene') == 'Off' %}
          scene.deck_off
        {% elif states('input_select.deck_scene') == 'Automatic' %}
          scene.deck_automatic
        {% elif states('input_select.deck_scene') == 'Blood' %}
          scene.deck_blood
        {% elif states('input_select.deck_scene') == 'Bright' %}
          scene.deck_bright
        {% elif states('input_select.deck_scene') == 'Forest' %}
          scene.deck_forest
        {% elif states('input_select.deck_scene') == 'Imperial' %}
          scene.deck_imperial
        {% elif states('input_select.deck_scene') == 'Night Light' %}
          scene.deck_night_light
        {% elif states('input_select.deck_scene') == 'Party' %}
          script.deck_party
        {% elif states('input_select.deck_scene') == 'Sky' %}
          scene.deck_sky
        {% elif states('input_select.deck_scene') == 'Under Water' %}
          scene.deck_under_water
        {% elif states('input_select.deck_scene') == 'Watch Movie' %}
          scene.deck_watch_movie
        {% elif states('input_select.deck_scene') == 'Zen' %}
          scene.deck_Zen
        {% else %}
          scene.deck_automatic
        {% endif %}
3 Likes

Thanks, I’ll give that a go!

If anybody happens upon this topic, I’ve found a card that will do (almost) exactly what I was looking for: https://github.com/tcarlsen/lovelace-light-with-profiles

2 Likes