Automating lights in Home Assistant

  Рет қаралды 21,480

Vaclav Chaloupka

Vaclav Chaloupka

Күн бұрын

Пікірлер: 39
@Mopsey1337
@Mopsey1337 4 жыл бұрын
Very detailed description of how you do your automations. I really like that your english is without accent. For me, as a german, I can better understand your english than from an american or britain. Thanks, I will follow your projects in the future. Soon, I will start my own automations on my garret which I'm renovating atm. Thumbs Up!!!!
@StePhanMckillen
@StePhanMckillen 4 жыл бұрын
10 out 10 bro love how you use the Developer tools this will help heaps of people
@scpowered
@scpowered 4 жыл бұрын
Once again, Thank you for the motivation! I love how you make this look so easy! (I have so much to learn)
@ducsue751
@ducsue751 4 жыл бұрын
@6:36 Could you show us how you group the people_home? I have tried to group mine, but the 'int' always shows zero output. binary_sensor - platform: template sensors: people_home: value_template: >- {{ is_state('input_boolean.duc_home', 'on') or is_state('input_boolean.eri_home', 'on') or is_state('input_boolean.shion_home', 'on') }}
@bruxy70
@bruxy70 4 жыл бұрын
- platform: template sensors: people_home: friendly_name: Number of people home entity_id: - person.person1 - person.person2 value_template: >- {{ states.person | map(attribute='state') | select('eq','home') | list | length }}
@jpborjas
@jpborjas 4 жыл бұрын
Great video, very easy to understand. One question though: why are you using a trigger to check on state change, instead of the event state node?
@srenelisiussen581
@srenelisiussen581 4 жыл бұрын
Impressive, you've got admirable skills in Home Assistant. So I wonder if you can crack this problem that I know a lot of people are struggling with: You have a light, like your downstairs light - but it's dimmable (I.e. a Shelly dimmer). And you would like to add a z-wave or zigbee switch on the second floor (no wiring - just the button). The button of course toggles the light on and off - no problem there, but now you would like the light to dim up and down (it can be a two-button switch) as long as you hold the button down - just like the Shelly does if you use the wired input for a button. I have managed to achieve this with ESP home and some buttons connected to a Wemos D1 mini - but I simply can not figure out how to do this with battery powered switches that only send a signal on button state change. Any assistance on this would be greatly appreciated.
@bruxy70
@bruxy70 4 жыл бұрын
I think Frenck was playing with that here kzbin.info/www/bejne/g5etZoKvg9yofsU I do not have any dimmable lights myself, but looking at the services, the service light.turn_on has parameter brightness_step or brightness_step_pct that you can use to increase and decrease the brightness by let's say 10% on each press (not sure if you can keep dimming by holding with a standard button). So you can map that to a button and increase/decrease brightness of some other light.
@zoltanlakatos5270
@zoltanlakatos5270 3 ай бұрын
Great tutorial. I need your help to understand better in the "Lights single-user mode" config. There is an auto_lights current state node which is using the "input_boolean.auto_lights_off" entity. I have not seen any details about this input_boolean where does it come from? Could you please elaborate it a bit more?
@bruxy70
@bruxy70 3 ай бұрын
It is not critical. It basically a sensor that enables all light automationa, by motion sensors, timers atc. If it was just one automation I can enable or disable the automation. I have more of them, so I have one helper to control them all. Since the video,ní have moved to a list of "house modes" to control how different automation respond. By but this goes beyond this simple tutorial.
@vti5
@vti5 4 жыл бұрын
Great videos. Could you make video about your dashboard? How to set it etc...? Thank you.
@bruxy70
@bruxy70 4 жыл бұрын
Thanks for the idea. WIll put it on the list :)
@vti5
@vti5 4 жыл бұрын
@@bruxy70 Tak to bude super. :-)
@certified-forklifter
@certified-forklifter 4 жыл бұрын
cool video!
@MrBearfaced
@MrBearfaced 4 жыл бұрын
Great video, I really like your presentation style, I'm guessing you do presentations as part of your day job.
@bruxy70
@bruxy70 4 жыл бұрын
Thanks! Yes, sometimes I do. But for this format I wish my style was a bit less monotonous/boring. This comes from being Czech I guess - working hard to fix that :).
@valentinene
@valentinene 4 жыл бұрын
Big like. The code looks so easy when done by somebody else :). What's your recipe for a bullet-proof home presence? Are you relying only on NMAP to detect people coming/leaving house?
@bruxy70
@bruxy70 4 жыл бұрын
Well, there is also some thinking, reading documentation, trial-error. But you would not want to watch a video where I am thinking for 20 minutes, would you :). What you see is already tested so I know it works ;). Initially, we used NMAP. It worked in general, but it did have some glitches as the phones try to conserve battery (like the iPhones). I still use that, but also most of us now have the mobile application (both iPhone and Android), and it has a device tracker based on GPS. And I added both device trackers to each person, and then I just use the person. What it also allows me to do is, to turn on the heating some 15 minutes before we get home, when we enter some "near_zone". It works quite well.
@valentinene
@valentinene 4 жыл бұрын
@@bruxy70 maybe, when you are out of ideas for new clips you can share with us the presence detection solution you are using. Keep up the good work ;)
@estebanballs215
@estebanballs215 4 жыл бұрын
Genius. 🤯🔝
@rottison
@rottison 4 жыл бұрын
Thank you this is easy enough for me to do as I am still learning how to write code that HA will use Thank you agian
@tom_basson
@tom_basson 4 жыл бұрын
How do I set up an automatic flow to turn on/off lights at sunrise and sunset in node red
@bruxy70
@bruxy70 4 жыл бұрын
Personally, I don't turn lights on sunset. I do have a motion sensor in a couple of places, and there I turn the lights on when motion is detected, and I use the sun as a condition. And I do not do that in Node Red but in HA automation - as thet are getting great recently, so I use that as my primary choice now. But if you want to turn on teh lighst on sunset, I guess you can use the sun.sun entity state as a trigger. Or I'd probably use the Light Scheduler node kzbin.info/www/bejne/a5u7daGme5t_gdk
@TopherHax
@TopherHax 4 жыл бұрын
Can you please do a video on how you used all existing switches? This is my biggest challenge with wife factor right now.
@bruxy70
@bruxy70 4 жыл бұрын
Hmm, thinking about that - the general concept is probably not worth a video, I can explain it in 4 easy steps. And the actual installation depends on the country. So if I show how I did that, it would be useless for most people in other countries. Let me try to explain and let me know if it helps.... So what you do is, you install Shelly behind the switch in the wall (of Sonoff Basic, but I like Shellys more lately) (obviously, make sure the main electricity switch is off first). 1. The current switch has 2 wires - one going to L, one to the light. From the L wire, you need to take two feeds and connect them to Shelly - contacts L and I (in). 2. Then you disconnect the second wire from the switch and connect it to contact O (out) on Shelly instead. 3. Now connect that disconnected contact on the switch with SW (switch) on Shelly. 4. And the Shelly will also need N wire. And that's it. It should work exactly the same as before, your wife should not notice, and you can also connect to HA (for that, you need to program the Shelly - there are 3 options AFAIK. Personally, I use ESPHome. Or you can use Tasmota (both have to load custom FW to the shelly - there are a number of videos for that), or I think the Shelly now supports MQTT out of the box (haven't tried that). Or I think there is also an integration with Shelly cloud.
@TopherHax
@TopherHax 4 жыл бұрын
@@bruxy70 Makes perfect sense now, thanks for the info!
@neilbrookins8428
@neilbrookins8428 4 жыл бұрын
Vaclav Chaloupka I originally setup 32 Shelly lights with mqtt. Then I found out about the Shelly for hass integration. I re-setup all with that and I like it much better. I’m using the factory installed firmware in my Shelly. And they all are setup with local switches that are sometimes 3-way in 2 or 3 locations.
@TopherHax
@TopherHax 4 жыл бұрын
@@bruxy70 Since this I purchased a Shelly2.5 to test. Wired it into my switches and it's working perfect! Even works great with 3-way switch. Thanks!
@TopherHax
@TopherHax 4 жыл бұрын
@@neilbrookins8428 Yup I am using the stock FW with HACS "Shelly for HASS" integration, it's working perfect.
@honzacermak4648
@honzacermak4648 4 жыл бұрын
Great... like usually!
@rufus4779
@rufus4779 4 жыл бұрын
Thanks for your time and effort in making this video. I am finding it useful. But I have a question as I have tried several times using your code but continue getting an error when I add the code to my yaml file. - person.name1 "String does not match the pattern of "DEPRECIATED^" I get the above error for each line that start with - person.name Any idea why this error pops up as I enter this code?
@bruxy70
@bruxy70 4 жыл бұрын
You can remove the entity_id from the template sensor. They improved the way the template sensors detect the triggers now, and this attribute is not needed anymore.
@jorgegomez374
@jorgegomez374 4 жыл бұрын
where did you learn to program yaml. I am starting whit HA but there is a lot a like to learn. thank you
@bruxy70
@bruxy70 4 жыл бұрын
If you mean automations. then here: www.home-assistant.io/docs/automation/examples/. In the menu on the right, there are links to other pages about triggers, conditions, actions and templates.
@CristiCojita
@CristiCojita 4 жыл бұрын
Hi, about sonoff switch - you replaced / enhanced the dummy one from downstairs with sonoff mini or simply replaced with something else?
@bruxy70
@bruxy70 4 жыл бұрын
Downstairs is a regular sonoff Basic - it switches the light on and off, and has a button to toggle the switch. Upstairs, there is a similar switch, but nothing connected to the relay. It only calls the service to toggle the switch downstairs.
@neilbrookins8428
@neilbrookins8428 4 жыл бұрын
Vaclav Chaloupka I’ve done the same with Shelly. One Shelly controls the light. Other Shelly connects to wall switch. Another example- a switch near door I made to provide an all light on/off function. This is used by visitors for a house showing.
@johnchatzistampoulidis8261
@johnchatzistampoulidis8261 4 жыл бұрын
Very helpful .Can you share nodered flow?
@bruxy70
@bruxy70 4 жыл бұрын
[{"id":"bf1555da.2229c8","type":"subflow","name":"lights off except payload","info":"","category":"","in":[{"x":40,"y":40,"wires":[{"id":"1b0f65f.0ace79a"}]}],"out":[],"env":[],"color":"#DDAA99"},{"id":"1b0f65f.0ace79a","type":"ha-get-entities","z":"bf1555da.2229c8","server":"49151e04.237fb","name":"","rules":[{"property":"entity_id","logic":"starts_with","value":"light.","valueType":"str"},{"property":"entity_id","logic":"is_not","value":"topic","valueType":"msg"}],"output_type":"array","output_empty_results":false,"output_location_type":"msg","output_location":"payload","output_results_count":1,"x":190,"y":40,"wires":[["48552088.73d06"]]},{"id":"a3bc1dd.f0ccae","type":"api-call-service","z":"bf1555da.2229c8","name":"light.turn_off","server":"49151e04.237fb","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"{{ payload.entity_id }}","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":630,"y":40,"wires":[[]]},{"id":"48552088.73d06","type":"split","z":"bf1555da.2229c8","name":"","splt":"","spltType":"str","arraySplt":"1","arraySpltType":"len","stream":true,"addname":"","x":315,"y":40,"wires":[["ce522d18.ab889"]],"l":false},{"id":"ce522d18.ab889","type":"api-current-state","z":"bf1555da.2229c8","name":"light is on","server":"49151e04.237fb","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"{{ payload.entity_id }}","state_type":"str","state_location":"","override_payload":"none","entity_location":"","override_data":"none","blockInputOverrides":false,"x":440,"y":40,"wires":[["a3bc1dd.f0ccae"],[]]},{"id":"3baa1ef1.842032","type":"comment","z":"d891ea4e.afe9d8","name":"Lights \"single-user\" mode (Klara, Jakub)","info":"","x":170,"y":840,"wires":[]},{"id":"e56a5b8c.e431b8","type":"server-state-changed","z":"d891ea4e.afe9d8","name":"Klara_on","server":"49151e04.237fb","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"light.klara","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":100,"y":880,"wires":[["4146576.d089ea8"],[]]},{"id":"4146576.d089ea8","type":"api-current-state","z":"d891ea4e.afe9d8","name":"auto_lights","server":"49151e04.237fb","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.auto_lights_off","state_type":"str","state_location":"","override_payload":"none","entity_location":"","override_data":"none","blockInputOverrides":false,"x":570,"y":880,"wires":[["7b46b3d0.240fac"],[]]},{"id":"7b46b3d0.240fac","type":"api-current-state","z":"d891ea4e.afe9d8","name":"1 person home","server":"49151e04.237fb","version":1,"outputs":2,"halt_if":"1","halt_if_type":"num","halt_if_compare":"is","override_topic":false,"entity_id":"sensor.people_home","state_type":"num","state_location":"","override_payload":"none","entity_location":"","override_data":"none","blockInputOverrides":false,"x":580,"y":960,"wires":[["6c0131d3.9e882"],[]]},{"id":"2f462d68.c27262","type":"server-state-changed","z":"d891ea4e.afe9d8","name":"Jakub_on","server":"49151e04.237fb","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"light.jakub","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":100,"y":940,"wires":[["4146576.d089ea8"],[]]},{"id":"6c0131d3.9e882","type":"subflow:bf1555da.2229c8","z":"d891ea4e.afe9d8","name":"","x":810,"y":960,"wires":[]},{"id":"4f3c0a34.cf3a64","type":"server-state-changed","z":"d891ea4e.afe9d8","name":"Hosti_on","server":"49151e04.237fb","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"light.hosti","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":100,"y":1000,"wires":[["4146576.d089ea8"],[]]},{"id":"8c4eeb1d.c38568","type":"server-state-changed","z":"d891ea4e.afe9d8","name":"loznice_on","server":"49151e04.237fb","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"light.loznice","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":100,"y":1060,"wires":[["4146576.d089ea8"],[]]},{"id":"29e89eb8.bcc0c2","type":"server-state-changed","z":"d891ea4e.afe9d8","name":"predsin_on","server":"49151e04.237fb","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"light.predsin","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":100,"y":1240,"wires":[["4146576.d089ea8"],[]]},{"id":"a4112325.e1e92","type":"server-state-changed","z":"d891ea4e.afe9d8","name":"chodba_on","server":"49151e04.237fb","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"light.chodba","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":100,"y":1120,"wires":[["4146576.d089ea8"],[]]},{"id":"5ab10f66.dbe7","type":"server-state-changed","z":"d891ea4e.afe9d8","name":"galerie_on","server":"49151e04.237fb","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"light.galerie","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":100,"y":1180,"wires":[["4146576.d089ea8"],[]]},{"id":"1fd3a4.1fe89c5d","type":"server-state-changed","z":"d891ea4e.afe9d8","d":true,"name":"garaz_on","server":"49151e04.237fb","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"light.garaz","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":100,"y":1300,"wires":[["4146576.d089ea8"],[]]},{"id":"49151e04.237fb","type":"server","z":"","name":"Home Assistant","legacy":false,"hassio":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]
Starting with AppDaemon in Home Assistant
18:20
Vaclav Chaloupka
Рет қаралды 27 М.
5 Home Assistant Automations For Better Smart Lights!
15:58
Everything Smart Home
Рет қаралды 154 М.
УНО Реверс в Амонг Ас : игра на выбывание
0:19
Фани Хани
Рет қаралды 1,3 МЛН
Хаги Ваги говорит разными голосами
0:22
Фани Хани
Рет қаралды 2,2 МЛН
I am moving to the section layout - 2024.09
34:16
Vaclav Chaloupka
Рет қаралды 5 М.
Mastering Home Assistant Templates: A Beginner's Guide
23:56
SlackerLabs
Рет қаралды 57 М.
Home Assistant practice. Times of the Day, application, template creation
11:26
Alex Kvazis - технологии умного дома
Рет қаралды 16 М.
DIY Whole Home Power Monitoring with ESPHome & Home Assistant
30:39
digiblur DIY
Рет қаралды 260 М.
Home Assistant Setup Made Easy: The Ultimate Guide
33:05
Crosstalk Solutions
Рет қаралды 498 М.
Node-RED + Home Assistant How-To
17:44
The Hook Up
Рет қаралды 466 М.
This is the BEST MATRIX DISPLAY CLOCK for Home Assistant!
23:39
Smart Home Junkie
Рет қаралды 121 М.
Home Assistant Automations versus Node-RED
9:36
Let's Automate
Рет қаралды 15 М.
Templates in Home Assistant - what they are and how to use them!
7:25
Will Surridge Tech
Рет қаралды 29 М.
УНО Реверс в Амонг Ас : игра на выбывание
0:19
Фани Хани
Рет қаралды 1,3 МЛН