How to Control Lights in Home Assistant - TUTORIAL

Поділитися
Вставка
  • Опубліковано 22 лип 2024
  • You can configure and control your lights in Home Assistant using a light card, a button card, an entities card, an entity card, and even a custom slider entity row card. This tutorial teaches you step by step how to setup your lights and how to group them so that you can control your lights in a light group.
    ⭐⭐⭐
    I cannot do this without your support!
    If my videos save you time, you can support me in the following ways:
    * Join this channel to get access to perks: 📺 / smarthomejunkie
    * Please consider becoming my patron 🏅 at / smarthomejunkie
    * Please support me by buying me a ☕ at www.buymeacoffee.com/smarthom...
    ⭐⭐⭐
    You can buy the Conbee 2 stick here: amzn.to/2MPzLOJ
    The Samba Share video is here: • How to remote access y...
    The HACS video is here: • Install HACS in Home A...
    The code that is used in this video can be found here: github.com/smarthomejunkie/Ho...
    See the list of Smart Home devices that I use and recommend here:
    github.com/smarthomejunkie/My...
    Follow me on Instagram @smarthomejunkie: / smarthomejunkie
    Follow me on Twitter: / smarth0mejunkie
    Like my page on Facebook: / smarthomejunkie
    If you got enthusiastic about Home Assistant, you can watch these videos too:
    * What is Home Assistant?: • What Is Home Assistant...
    * How to install Home Assistant: • The Home Assistant ins...
    * Set up automations in Home Assistant: • How to set up Automati...
    * Ultimate presence detection in Home Assistant: • Ultimate Presence Dete...
    * and many more in this playlist: • Home Assistant
    Check my channel for more awesome Smart Home tutorials: / smarthomejunkie
    Contents:
    0:00 Introduction
    0:27 General description
    01:11 Light card examples
    03:52 Setup light groups
    09:54 Setup a light button
    10:42 Setup a light entities card
    12:27 Setup a light entity card
    14:10 Setup of a custom slider entity row card
    #homeassistant #homeautomation #iot #smarthome
  • Навчання та стиль

КОМЕНТАРІ • 99

  • @tomytomytomy3188
    @tomytomytomy3188 Рік тому +1

    perfect and very important note about differences in group and config... thx very much

  • @user-sg6lz3ej3n
    @user-sg6lz3ej3n 7 місяців тому +1

    Tnx. I must admit that I typically avoid UA-cam tutorials as you need to scan through a 30 min video to find the 5 sec information part. Your videos come directly to the point and the information is (at least for me) really helpful and also points to related elements which might be useful. I will keep subscribe to your channel! First time and it didn't hurt ;-)

  • @GorkemYildirim
    @GorkemYildirim 3 роки тому +1

    Very clear and easy to setup. Thanks. Now I need more smart bulbs.

    • @SmartHomeJunkie
      @SmartHomeJunkie  3 роки тому +1

      Oh boy, be aware that this is so addictive. 😂

  • @wism881
    @wism881 3 роки тому +1

    Super helpful. Just moving house and getting prepared with HA. Dankjewel!
    If you ever feel so inclined, I'd be super interested in content about further integrating Hue devices, like motion sensor and most importantly the dimmers! Tot zo

  • @SCRAMPLER
    @SCRAMPLER 3 роки тому +1

    I was struggling with this and created a scene for all lights in the group OFF but this is much smarter thanks. Cant believe there isn't an easier way of doing this already

    • @SmartHomeJunkie
      @SmartHomeJunkie  3 роки тому

      Indeed. I guess this will come in time. Seems an easy implementation.

    • @SCRAMPLER
      @SCRAMPLER 3 роки тому

      @@SmartHomeJunkie I presume you cannot combine switches and light entities in same group?

    • @SmartHomeJunkie
      @SmartHomeJunkie  3 роки тому +1

      Well, you can do it in groups.yaml, but you will miss the possibility to set the color. You can switch the lights and the switches which are in the combined group though.

  • @stephentittel4742
    @stephentittel4742 3 роки тому +2

    De group functionaliteit was even van mijn radar, maar je hebt het gelukkig weer onder mijn aandacht gebracht. Zeer bruikbaar! Blijf ons verrassen!

    • @SmartHomeJunkie
      @SmartHomeJunkie  3 роки тому

      Goed te horen! Er komen nog veel meer videos :)

    • @stephentittel4742
      @stephentittel4742 3 роки тому

      Kunnen we je vragen om onderwerpen te behandelen zoals Zigbee HA en Zigbee2MQTT? Ik heb beiden draaien, maar alleen Zigbee HA werkt. Ik ben in de veronderstelling dat je beiden moet draaien; de Zigbee HA is de broker in deze, die door Zigbee2MQTT gebruikt wordt. Of zit ik verkeerd?

    • @SmartHomeJunkie
      @SmartHomeJunkie  3 роки тому

      Je kan het altijd vragen hoor :)
      Ik gebruik zelf alleen Deconz en heb geen behoefte aan ZHA of Zigbee2MQTT. Voor zover ik het weet kan je ZHA zelfstandig draaien zonder Zigbee2MQTT. Als je een Conbee stick gebruikt heb je voorzover ik weet altijd ook Deconz nodig om de firmware van je stick te kunnen upgraden.

  • @ronm6585
    @ronm6585 3 роки тому +1

    Great info, thanks.

  • @BenedetFamily
    @BenedetFamily 3 роки тому +1

    As always, fantastic and simple videos! Especially for a newbie like me. I was able to get the one button toggle to work beautifully for lights and even some covers (i.e blinds), but I cannot get it to work with my locks. I've used "lock" instead of lights in the yaml but it won't allow me to create a card with a button toggle and I get an error when I check the yaml config. My locks are connected via 2MQTT if that matters. Thanks and keep up the great work. You've helped me a lot!

    • @SmartHomeJunkie
      @SmartHomeJunkie  3 роки тому

      Good to hear. I don't have a smart lock yet, so I do not know how to help you currently.

  • @sekt1953
    @sekt1953 3 роки тому +1

    You make good videos, tak

  • @jolmav9400
    @jolmav9400 3 роки тому +1

    Very interesting. Thanks!

  • @johndoudar6395
    @johndoudar6395 3 роки тому +1

    Great video. Can you do one on the installation, setup and use of the Conbee 2 please?

    • @SmartHomeJunkie
      @SmartHomeJunkie  3 роки тому +2

      Hi John,
      Good suggestion! I will try to do so!

  • @kasperholmj
    @kasperholmj 3 роки тому +4

    Very nice little tutorial, thank you for this!
    I absolutely prefer the last one with the slider - though it would be even more brilliant if it also included the option of changing the colour as well.
    So to have multiple sliders underneath eachother with all the functions available :-)

    • @SmartHomeJunkie
      @SmartHomeJunkie  3 роки тому +3

      I totally understand your wish, but I am not sure how to show a color wheel on the slider entity row 🤔

    • @kasperholmj
      @kasperholmj 3 роки тому +2

      @@SmartHomeJunkie I don't know either how it can be done technically, but a colour wheel could be displayed as a line instead.
      And perhaps the brightness slider could be a 3-way toggle switch with the lever in the middle, so when you dragged and held the lever to the right the brightness would go up, and opposite when held to the left. As you let go the lever would pop back in the middle.
      Dony know if it makes sense, but perhaps I need to make a drawing and send it to the HA Developer Team! 😅

    • @SmartHomeJunkie
      @SmartHomeJunkie  3 роки тому +2

      Sounds interesting indeed!

    • @Smarthomeyourself
      @Smarthomeyourself 3 роки тому +1

      @@kasperholmj take a look at light entity card in hacs. its a not colour wheel line but effects, color chooser and brigthness slider on one card. no need to open the default color-chooser dialog anymore.
      atm my most used card for lights

    • @SmartHomeJunkie
      @SmartHomeJunkie  3 роки тому +1

      Great tip!

  • @nateF888
    @nateF888 Рік тому

    Hi, my sonoff light bulb is already connected to home assistant. I can turn it on and off but the options to change its brightness and color in the card does not pop up. do you know how to fix this?

  • @patrickdevries8794
    @patrickdevries8794 3 роки тому

    Great tutorial, Managed to also make it work. One question. How to also group a wifi power plug with a plain not dimable light together with the 2 hue lights

    • @SmartHomeJunkie
      @SmartHomeJunkie  3 роки тому

      You can do this by creating a group in the groups.yaml. But, you will miss some light functionalities because the group adapts is functionality from the device with the least functions.

  • @timothybogaert6189
    @timothybogaert6189 2 роки тому +1

    Alweer iets bijgeleerd :)

  • @johndoudar6395
    @johndoudar6395 3 роки тому +1

    What LED strip light would you recommend for use with HA? Am looking to install some shelf lighting to highlight my Vinyl collection. Thanks

    • @SmartHomeJunkie
      @SmartHomeJunkie  3 роки тому +1

      Well, in the description there's a link to the strips that I use together with the gledopto led driver.

  • @scpipad
    @scpipad Рік тому

    Great video... I have sonoff light switch with 2 keys in my bathroom... is it possible to add group lights with light switch ? Thank you !

    • @SmartHomeJunkie
      @SmartHomeJunkie  Рік тому

      This is quite an old video. Nowadays, you can create light groups in the Helper section of Home Assistant. I'm not sure what you're trying to set up though.

  • @zdravkozoric7844
    @zdravkozoric7844 2 роки тому +1

    Hi. Happy New 2022. Regarding lights, how to make scroll wheel with several lights? It takes a small space and looks nice.

    • @SmartHomeJunkie
      @SmartHomeJunkie  2 роки тому

      Not sure what you mean? 🤷🏼

    • @zdravkozoric7844
      @zdravkozoric7844 2 роки тому

      @@SmartHomeJunkie scroll wheel? Like on Iphone setting time for alarm but name of lights instead number.

  • @weekienng2015
    @weekienng2015 9 місяців тому +1

    Hi, thank you for the video! I recently bought some Ikea bulbs (model "LED2005R5"), and paired to Z2MQTT. However, under "Entities" in HA, i can only see the device type as "sensor.bulb_name_here", and none of the bulbs are "light.bulb_name_here" as i would expect. As a result, im unable to follow the usual steps of treating these devices as lights. When i navigate to Z2MQTT integration > "dashboard", only then am i able to control the state, brightness levels, color temp. Do you have any advice please?

    • @SmartHomeJunkie
      @SmartHomeJunkie  9 місяців тому +1

      This is weird. You should see them as lights in HA. No idea why you don't see them as lights 🤷🏼‍♂️

  • @mansuk07
    @mansuk07 2 місяці тому

    if I've got 4 separate entities for RGBW LED for each colour and its has its own brightness. I like to control all of the entities to have a combined entity/group that I can control the overall colour via colour picker/wheel. Any ideas in how I can do this?
    If I do group - it doesn't give me option to select colour like you have in your video.
    Appreciate any advice

    • @SmartHomeJunkie
      @SmartHomeJunkie  2 місяці тому

      This is quite an old video. You might want to try to create a light group using a helper.

  • @9856CB
    @9856CB 2 роки тому

    I have a 6 button insteon wall switch (suffering from the fall of insteon). In home assistant it shows the "a" thru "d" button that have the same code (i.e. 54_5d_09). Except for the major On/Off buttons on the wall switch, HA shows 4 separate entities that control the "a"-"d" buttons. Do you have a video or concept that you can share to how to set this up in Scripts to Automation? I'd try creating in the HA, but have run into problems and had to delete everything down to a bare Docker in Synology and start all over again.
    Thank you,
    Tom

    • @SmartHomeJunkie
      @SmartHomeJunkie  2 роки тому

      Hi Tom,
      I do not own such a device, so I'm not sure how to help. 🤷🏼

  • @jj77669
    @jj77669 2 роки тому

    I have Eufy RGB bulbs which I had to add manually to the configuration file, for integration with HASS. When I made a light card, there's no RGB options, only toggle on/off. Is there something else to add, or is this just how Eufy bulbs are, with HASS?

    • @SmartHomeJunkie
      @SmartHomeJunkie  2 роки тому

      You can configure additional options for this in the configuration of HA.

  • @ThijmenCodes
    @ThijmenCodes 2 роки тому +1

    Hi Ed, thank you for the video. Question: do you perhaps know more about controlling bluetooth bulbs via Home Assistant? Right now I have HA setup on a Gigabyte mini-pc (similar to an Intel NUC) which has a bluetooth module so in theory it should be able to control bluetooth bulbs. I know WiFi lights are definitely superior, but as I have these laying around I wonder if this has been done before.

    • @SmartHomeJunkie
      @SmartHomeJunkie  2 роки тому +1

      Hi Thijmen,
      Unfortunately I do not have Bluetooth bulbs myself, so I cannot test this. In your comment you say that WiFi bulbs are superior to that, which is true, but I'd recommend to go the Zigbee route instead of WiFi.

    • @ThijmenCodes
      @ThijmenCodes 2 роки тому +1

      ​@@SmartHomeJunkie Yes, that's right of course! I should have said that Bluetooth is the least favorable of all of the options ;-)
      Anyway, I'll look into it and let you know if I find something interesting. Perhaps it is possible to intercept/read the Bluetooth packets that the (terrible) iOS/Android app sends to the bulbs, and replicate the signal via the mini-pc's bluetooth adapter.
      Groeten uit Groningen!

    • @SmartHomeJunkie
      @SmartHomeJunkie  2 роки тому +1

      @@ThijmenCodes There is a possibility to integrate Bluetooth devices in Home Assistant I think. Let me know if you succeed!

  • @peteforu
    @peteforu 4 місяці тому

    Coming to Lights, it suddenly stroke me that these eventually breaks and need to be replaced. Since these smartbulbs contain all the logics inside them, one can not just replace them and then keep the function as before. They have to be paired and saved as an item in HA. Then reassigned into an automation and so on. I'll guess there is a way to remove the old one and re-use its name. Do you have a tutorial on how to make this "bulb swapping" as easy as possible?
    Btw, Great tutorials you have made and as a beginner I appreciate them a lot!

    • @SmartHomeJunkie
      @SmartHomeJunkie  4 місяці тому

      This is a really old tutorial. If you use entity IDs instead of devices, you can give your new lamp the same entity id as your old lamp and everything will keep working.

  • @hoekmotorsports
    @hoekmotorsports Рік тому +1

    Hi, I really love your tutorials. They helped me alot setting up my motion activated lights in the basement/ garage. I have only one issue that I can't figure out. Sometimes, two specific lights come back on after the automation (or manually) has turned them off.
    Strangely enough when a light immediately comes back on, the log says it was triggered by:turned on triggered by service light.turn_off
    Sometimes I have to manually switch a light off up to five times before it will stay off.
    I use sonoff zbmini switches with LED downlighters, installed via ZHA. I use only the automations as shown in you're tutorial (not the blueprints) and I have set the modes to restart as that seem to help the stability a bit.
    Really hope you have some advice, as this doesn't help my case in convincing my wife hahaha.

    • @SmartHomeJunkie
      @SmartHomeJunkie  Рік тому

      Can be many reasons. It might be that two automations are triggering each other or something.

    • @hoekmotorsports
      @hoekmotorsports Рік тому

      @@SmartHomeJunkie Many thanks for your fast reply! I don't use groups and the affected lights that come back on the most, have only one (the first simple you described) automation assigned to them.
      Have you ever seen a light being turned on by the light.turn.off service?
      I think I will start by exchanging the hardware to a solid working location and see if the problem moves along.

    • @SmartHomeJunkie
      @SmartHomeJunkie  Рік тому

      @@hoekmotorsports I never saw that happen before.

  • @pravinfalcao410
    @pravinfalcao410 2 роки тому +1

    Any idea why I am not able to see any sensor, light or switch entity in my HA? I am struggling since week but no breakthrough. Any help is appreciated.

    • @SmartHomeJunkie
      @SmartHomeJunkie  2 роки тому

      I'm sorry, but there can be a lot of reasons for this. It's impossible to tell without more info.

  • @nics8040
    @nics8040 2 роки тому +1

    @smart Home Junkie Can you help me out? I want to use smart light switches with Smart rgb bulbs.

  • @electrongrup
    @electrongrup 2 роки тому +1

    Hello; is there a way to synchronize one rgb light based on another rgb light status? My scenarios is like this: I have Hue Play RGB that reacts to my music (changing colors) and I would like to produce same effect on my other rgb lights (Wizz lights). Thank you

    • @SmartHomeJunkie
      @SmartHomeJunkie  2 роки тому

      I am not sure if you can read the current parameters of one light. But I'm also afraid that the response time will be too slow to get this working fluently.

    • @electrongrup
      @electrongrup 2 роки тому

      all details are available, so it is just the how to!? as for delays, I assume it should not be a problem since ping response in less than 10 ms in my wifi network - even 100ms delay will be acceptable for rgb response (after all computations). Thx

    • @SmartHomeJunkie
      @SmartHomeJunkie  2 роки тому

      @@electrongrup I really doubt if it will be fluently. I have multiple spots in my kitchen for example and sometimes there's a slight tube difference in turning on and off between them when I click one button that turns on the whole group. So, doing something that you want might be a challenge. 🤔

  • @meierthomas
    @meierthomas Рік тому

    Thanks for the video! I try to keep configuration.yaml as small as possible. You mention we lose some functionality and flexibility when we use groups.yaml. What do we lose by going to that file instead of configuration.yaml?

    • @SmartHomeJunkie
      @SmartHomeJunkie  Рік тому +1

      This is an old tutorial. Nowadays you can group lights in helpers.

    • @meierthomas
      @meierthomas Рік тому

      @@SmartHomeJunkie But that still is restricted to lights. I have some lights that show up as switches. So there's no way to combine them into groups if I have a mix of both in say a room?

    • @SmartHomeJunkie
      @SmartHomeJunkie  Рік тому +1

      @@meierthomas You can use the "Change device type of a switch" helper to transform a switch to a light.

    • @meierthomas
      @meierthomas Рік тому +1

      @@SmartHomeJunkie Perfect; that worked. Thanks

    • @SmartHomeJunkie
      @SmartHomeJunkie  Рік тому

      @@meierthomas You're welcome!

  • @mrteausaable
    @mrteausaable 2 роки тому

    Can you group light. and switch. together and turn off all at the same time using off command?

    • @SmartHomeJunkie
      @SmartHomeJunkie  2 роки тому

      Yes you can, but you have to define that in your groups.yaml

    • @mrteausaable
      @mrteausaable 2 роки тому +1

      @@SmartHomeJunkie I am able to get it to work because lights and switches are different. If I call groups lights off all the switches in the group are not responding and visa versa.

    • @SmartHomeJunkie
      @SmartHomeJunkie  2 роки тому

      @@mrteausaable great to hear!!!

  • @joeblstrn
    @joeblstrn Рік тому +1

    i dont see light cards... do I need to add it another way?

    • @SmartHomeJunkie
      @SmartHomeJunkie  Рік тому

      This tutorial is quite old, but the light cards should still be there.

  • @joeblstrn
    @joeblstrn Рік тому

    how do I get light strips to change colors when triggered?

    • @SmartHomeJunkie
      @SmartHomeJunkie  Рік тому

      Create an automation with a call service action that calls light.turn_on and dry the color in that service.

    • @joeblstrn
      @joeblstrn Рік тому

      @@SmartHomeJunkie how do you add effects? I do not see a drop down

  • @sekt1953
    @sekt1953 3 роки тому

    can we set color from code, and how

    • @SmartHomeJunkie
      @SmartHomeJunkie  3 роки тому

      You can do it in an automation or a script, but that is very inconvenient.

  • @DavidNijman
    @DavidNijman 3 роки тому +1

    I don't get the remark to do it in configuration.yaml? Because it is lacking if you do it in groups.yaml so make a lights.yaml. Import it in configuration.yaml . It is best to keep the configuration.yaml clean and clear. Why don't you install VScode in Home Assistant? Faster and no need for making drive mappings, you can drop files in it directly. Slider card is great! Thanks!

    • @SmartHomeJunkie
      @SmartHomeJunkie  3 роки тому +1

      Well maybe it's just the way how I'm used to work with it. Adding lights in groups.yaml does not work fully, so I added it to configuration.yaml, just as the documentation said at that time. Not sure if it will work with a lights.yaml. Anyway, I guess it would be even better if light groups can be created straight in HA without editing a yaml file.
      I use vscode on my local machine and enabled git on my HA so that all my code is stored and synced with git which I can merge using vscode on my local machine. Not sure if the vscode addon supports syncing with git.

  • @remcoverhagen192
    @remcoverhagen192 3 роки тому

    No need to restart home assistant for light groups, you can reload them straight from the ui.

    • @SmartHomeJunkie
      @SmartHomeJunkie  3 роки тому

      Sorry, but to my knowledge that is only true when you add a light group in the groups.yaml. Not if you use it in the configuration.yaml.
      You can create light groups in the groups.yaml too, but you cannot use the light card in your lovelace dashboard with light groups that are created in the groups.yaml. You can only use the light card with light groups that are created in the configuration.yaml.

    • @remcoverhagen192
      @remcoverhagen192 3 роки тому +1

      @@SmartHomeJunkie that could be thru, my groups are outside off the configuration.yaml.
      Sorry for my stupidness 🙈

  • @Rowey
    @Rowey Рік тому

    That fucking mouse click though, decent video otherwise.