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 - Навчання та стиль
perfect and very important note about differences in group and config... thx very much
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 ;-)
That's awesome to hear!
Very clear and easy to setup. Thanks. Now I need more smart bulbs.
Oh boy, be aware that this is so addictive. 😂
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
Thanks! I might do that as well!
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
Indeed. I guess this will come in time. Seems an easy implementation.
@@SmartHomeJunkie I presume you cannot combine switches and light entities in same group?
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.
De group functionaliteit was even van mijn radar, maar je hebt het gelukkig weer onder mijn aandacht gebracht. Zeer bruikbaar! Blijf ons verrassen!
Goed te horen! Er komen nog veel meer videos :)
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?
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.
Great info, thanks.
Glad it was helpful!
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!
Good to hear. I don't have a smart lock yet, so I do not know how to help you currently.
You make good videos, tak
Thank you for your kind words!
Very interesting. Thanks!
Glad you like it! 👍🏻
@@SmartHomeJunkie I follow you from the Dominican Republic
Oh that is so cool!
Great video. Can you do one on the installation, setup and use of the Conbee 2 please?
Hi John,
Good suggestion! I will try to do so!
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 :-)
I totally understand your wish, but I am not sure how to show a color wheel on the slider entity row 🤔
@@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! 😅
Sounds interesting indeed!
@@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
Great tip!
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?
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
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.
Alweer iets bijgeleerd :)
Top! 👍🏻
What LED strip light would you recommend for use with HA? Am looking to install some shelf lighting to highlight my Vinyl collection. Thanks
Well, in the description there's a link to the strips that I use together with the gledopto led driver.
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 !
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.
Hi. Happy New 2022. Regarding lights, how to make scroll wheel with several lights? It takes a small space and looks nice.
Not sure what you mean? 🤷🏼
@@SmartHomeJunkie scroll wheel? Like on Iphone setting time for alarm but name of lights instead number.
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?
This is weird. You should see them as lights in HA. No idea why you don't see them as lights 🤷🏼♂️
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
This is quite an old video. You might want to try to create a light group using a helper.
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
Hi Tom,
I do not own such a device, so I'm not sure how to help. 🤷🏼
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?
You can configure additional options for this in the configuration of HA.
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.
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.
@@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!
@@ThijmenCodes There is a possibility to integrate Bluetooth devices in Home Assistant I think. Let me know if you succeed!
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!
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.
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.
Can be many reasons. It might be that two automations are triggering each other or something.
@@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.
@@hoekmotorsports I never saw that happen before.
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.
I'm sorry, but there can be a lot of reasons for this. It's impossible to tell without more info.
@smart Home Junkie Can you help me out? I want to use smart light switches with Smart rgb bulbs.
Sure, what do you want to know exactly?
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
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.
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
@@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. 🤔
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?
This is an old tutorial. Nowadays you can group lights in helpers.
@@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?
@@meierthomas You can use the "Change device type of a switch" helper to transform a switch to a light.
@@SmartHomeJunkie Perfect; that worked. Thanks
@@meierthomas You're welcome!
Can you group light. and switch. together and turn off all at the same time using off command?
Yes you can, but you have to define that in your groups.yaml
@@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.
@@mrteausaable great to hear!!!
i dont see light cards... do I need to add it another way?
This tutorial is quite old, but the light cards should still be there.
how do I get light strips to change colors when triggered?
Create an automation with a call service action that calls light.turn_on and dry the color in that service.
@@SmartHomeJunkie how do you add effects? I do not see a drop down
can we set color from code, and how
You can do it in an automation or a script, but that is very inconvenient.
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!
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.
No need to restart home assistant for light groups, you can reload them straight from the ui.
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.
@@SmartHomeJunkie that could be thru, my groups are outside off the configuration.yaml.
Sorry for my stupidness 🙈
That fucking mouse click though, decent video otherwise.