HIDDEN Home Assistant GEM

  Рет қаралды 19,119

Smart Home Makers

Smart Home Makers

Күн бұрын

Пікірлер: 80
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
Use my link bit.ly/SmartHomeMakersDCMar22 and check out the first chapter of any DataCamp course for FREE to unlock new career opportunities and become data fluent today!
@jjcarrion2
@jjcarrion2 2 жыл бұрын
This is super powerful!! I didn't know how to integrate this kind of scripts into home assistant and I think that with this, there is no limit, thanks for this tutorial!
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
I agree with you Jose! seems worth looking into python!
@TomTheDutchy
@TomTheDutchy Жыл бұрын
Hi, great video. How would you go about makin API calls for example energieprices? Where would you store the data?
@Donly1pt
@Donly1pt 2 жыл бұрын
Very good explanation. Syntax looks simpler than templating, or at least more similar to what I'm used to.
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
Thanks Filipe!
@lwizinski
@lwizinski 2 жыл бұрын
So many times I've said, I know how to do what I want to do in Python, but I don't get how to do in HA...
@RobinDeBecker
@RobinDeBecker 2 жыл бұрын
My first steps creating something from scratch in Python. Need to have a closer look at it as I do not use smart bulbs, but smart dimmable wall switches...
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
Hi Robin! Think that you can create any home assistant service with python!
@KrastyoKrastev
@KrastyoKrastev 2 жыл бұрын
another great video! :) and I love Python. Did not know I can use it in HA :) Thanks!
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
Happy to help!
@boomsig9069
@boomsig9069 2 жыл бұрын
Extremely powerful hidden gem and easy to follow tutorial. Fantastic job!
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
Thanks Boomsig!
@uSlackr
@uSlackr 2 жыл бұрын
this is fabulous! Question - when might I use a a service like this vs a script? Is it simply a matter of being able to use a real scripting language vs yaml?
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
Because Python is much more powerful you can write fewer lines of code to achieve something the sky is the limit !
@FrankGraffagnino
@FrankGraffagnino 2 жыл бұрын
very cool. thanks for sharing! this is powerful for python programmers. which is a lot of people.
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
Thanks Frank!
@MagicJF
@MagicJF Жыл бұрын
Question: ¿Are this scripts being interpreted on HA server, or is there some sort of C++ translation and compiling into the sensors/ESP devices? In short, I would like to know if the automation scripts will keep running if internet service goes down.
@mikeb1578
@mikeb1578 2 жыл бұрын
i want to control a group of lights and only the lights that are on. but it seems not the full api is available. no expand etc etc. or do you know a way? i hate the yaml stuff. it is cumbersome. so my question is how to implement dimming of a helper group of lights. but only dim the lights that are off. i implemented it in a script but can not get it to work in python script
@Max-ph5in
@Max-ph5in 2 жыл бұрын
Can you slowly dim a pir triggered zigbee light (say in the toilet) so that as the later it gets, the dimmer it gets? I've tried some static dimming while the light is not 'ON'. But it looks like it needs to be on to change the value in the light?
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
Hi Max, I think you can, think of the inputs you need for your function and the output
@AntonioVillanuevaB
@AntonioVillanuevaB 2 жыл бұрын
Great video!!! Thanks! 😁
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
Thanks Antonio!!
@austenpsmith
@austenpsmith 2 жыл бұрын
Would there be any benefit in using python over the yaml interface for something like this or would this really be for something more complex or just personal preference?
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
Personal preference is key, the more complex the piece of code it might be easier to write it in Python , consider future expandability also!
@zigajamnik
@zigajamnik 2 жыл бұрын
Hi, i receive an error when trying to run this script. what is wrong? ERROR (SyncWorker_14) [homeassistant.components.python_script.light_fading.py] Error executing script: Not allowed to access HomeAssistant.service
@jcdock
@jcdock 2 жыл бұрын
This is an awesome feature. Python is very powerful language
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
It is! Thanks Jc dock!
@thebaldfox
@thebaldfox 2 жыл бұрын
Another good tutorial !
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
Much appreciated buddy!
@Hookbeak
@Hookbeak 2 жыл бұрын
Confused here - services.yaml doesn't exist in my home assistant - i created one but it's not picked up by anything. can you explain where services.yaml is supposed to be and how to make that entire section work?
@Hookbeak
@Hookbeak 2 жыл бұрын
Figured it out - has to be created in the python_scripts folder
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
Hey Andrew! Glad you figured it out :) is it all working now?
@catfish9873
@catfish9873 2 жыл бұрын
Thanks!
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
Thanks Catfish for your support!!
@okanerdem
@okanerdem 2 жыл бұрын
Thanks for the great video. I've a question for another topic. I'm using MFA for homeassistant. Each login, i have to use code to login. There is a way to add trusted device? I tried some of things but i could not. On my iphone devices it's not needed. I can login without any code
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
Hi Okan! Is your HA externally exposed?
@okanerdem
@okanerdem 2 жыл бұрын
@@SmartHomeMakers First of all thanks for the answer, How can i to be sure for this? Normally i'm trying to logon from local network (192.168.1.x) if i enabled mfa on HA, i have to write security code for each login. I've a vpn server in home and for remote access will connect by vpn but right now trying from local network :)
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
@@okanerdem Thank you for watching! The reason I was asking was your risk profile is if MFA was worth the potential hassle in your case. If you can access HA outside your network / away from home or not. I haven’t seen a way to add trusted devices at this moment !
@okanerdem
@okanerdem 2 жыл бұрын
@@SmartHomeMakers Actually the main point of my question is that, if i connected to local network, there is a way/solution to pass mfa code? Because always i have to login with mfa pass. What i want to do, if i connected to my homenetwork, I don't want to have to do any validation. For example, i'm using synology nas with mfa but i login with mfa only first login. It's not needed to login again with mfa authentication code if i conneted with same device and with same network but if i open the synology web browser with hidden mode on chrome (for example) it's asking again authentication code. I want to use same with HA. But for HA, I have to write pascode for each login. But strange, on my mobile phone, i can login directly without any passcode. Sorry for my bad english, I may have mis-phrased :)
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
@@okanerdem It makes sense what you are saying don't worry about the English. I don't have MFA turned on so can't really help
@amirhoseinakbarzadeh5088
@amirhoseinakbarzadeh5088 2 жыл бұрын
Perfect👌
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
Thanks a lot!
@thngzys
@thngzys 2 жыл бұрын
Are we able to do network calls with services?
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
API calls? Made another video about that :)
@thngzys
@thngzys 2 жыл бұрын
@@SmartHomeMakers nice. Time to binge watch. It's also applicable to services?
@jazautomation
@jazautomation 2 жыл бұрын
Super.
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
Thanks JAZ!
@jazautomation
@jazautomation 2 жыл бұрын
@@SmartHomeMakers I really like your more advance topic. That video was perfect. I thought you needed appdaemon to write python script and I did not feel really ready for that yet.
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
@@jazautomation I know really cool!
@mikeerdely7248
@mikeerdely7248 2 жыл бұрын
You want to make sure current_brightness is not 0, or you'll get a divide by zero error.
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
Good shout Mike!
@NoProblem76
@NoProblem76 2 жыл бұрын
Gee I can finally get rid of the annoying nodered
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
Great news!
@threepe0
@threepe0 10 ай бұрын
While this is useful, what you’re doing is writing a script… so you don’t have to write a script. Nerds, including myself here, get way too excited about doing things other places/other ways. But sometimes it’s easy to lose sight of when you’re just moving the problem. If you’re smart, your code is reusable… almost like 🤔 templates.
@SmartHomeMakers
@SmartHomeMakers 10 ай бұрын
Agree with what you mentioned :)
@espressomatic
@espressomatic 2 жыл бұрын
Python = scripting, so this isn't better than a script, it *IS* a script. But... It's not YAML - thank god. YAML sucks. There's nothing out there today or yesterday that I can think of that's worse than YAML.
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
Yep YAML is just good for configurations
@larryo4480
@larryo4480 2 жыл бұрын
First, I appreciate your content very much. I watch all of your videos. However, why do you, and most KZbinrs, do everything in DARK mode? I can barely make out anything on my screen, much less follow the code examples. Please look at one of your videos and consider using a white screen. Thanks.
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
Thanks Larry for your honest feedback! I will run a poll on the channel to decide if we got with white screen or black!
@cjrivo
@cjrivo 2 жыл бұрын
Because dark mode is superior and easier on the eyes. At least most programmers think this. I am watching this video in a phone, with far from max brightness, and see just fine. If you can’t make out the code, maybe you need to increase the quality of the video?
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
@@cjrivo Thanks Jan for your take
@AndreaGhensi
@AndreaGhensi 2 жыл бұрын
If this is what you learn in the datacamp course, please stop using it! It works, but it's ugly, and tere's too much ugly code out there! It's fine if you keep it for yourself, but not if you publish it in a KZbin video. - while loop that only decrement the variable should be replaced by a for loop - indentation should be 4 spaces (if someone pastes you code in other copied code, error would happen) - use f-strings instead of string concatenation
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
Just something simple non coders can pickup on
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
I disagree code doesn’t need to be perfect for a YT video it isn’t a production system, happy to publish an improved version of the code Andrea
@AndreaGhensi
@AndreaGhensi 2 жыл бұрын
@@SmartHomeMakers I understand this is not production code, but the problem is the users that see your code will use it/base their code(and code style) on it, thinking is good code. This propagates bad coding practices, and github is full of it! It's not your fault, but you'll end up being a part of it. Sorry if I sound too harsh, maybe I shouldn't watch coding videos early in the morning 😅
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
@@AndreaGhensi I didn’t get much sleep either with a new born :)
@danielhitch
@danielhitch 2 жыл бұрын
Is there a reason why you chose python over a while loop or a repeat until in a home assistant automation and script? www.home-assistant.io/docs/scripts/#while-loop
@DavidNijman
@DavidNijman 2 жыл бұрын
Probably he's using it as an example to show what you can do with Python scripts, not to replace home assistant automation and scripts
@danielhitch
@danielhitch 2 жыл бұрын
@@DavidNijman I am thinking the same but I was just wondering if there may have been a different driver behind it
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
Indeed, I had tried that in my 5 scripts video! Some people can write python and run locally so debug, many find coding scary
@vulvamare
@vulvamare 2 жыл бұрын
I am new here ... but now, well ... now I'm not leaving !!
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
Thanks Vulva! Welcome to the channel!
Home Assistant Templating Masterclass (Full Course)
46:18
Smart Home Makers
Рет қаралды 55 М.
5 MUST HAVE SCRIPTS for Home Assistant (Coding Tutorial)
16:24
Smart Home Makers
Рет қаралды 46 М.
Ozoda - Lada ( Official Music Video 2024 )
06:07
Ozoda
Рет қаралды 24 МЛН
Кәсіпқой бокс | Жәнібек Әлімханұлы - Андрей Михайлович
48:57
Synyptas 4 | Жігіттер сынып қалды| 3 Bolim
19:27
Mastering Scripts in Home Assistant: A Comprehensive Guide
14:00
Smart Home Junkie
Рет қаралды 43 М.
Home Assistant Concepts Explained Device, Entity, Service, Automation
14:03
This is How I Scrape 99% of Sites
18:27
John Watson Rooney
Рет қаралды 110 М.
I Built My Own Presence Detection Sensor!
13:28
Everything Smart Home
Рет қаралды 93 М.
START Leveraging Loops NOW - Home Assistant Coding Tutorial (Templating)
12:47
The KEY To Thinking Like a Programmer (Fix This Or Keep Struggling)
10:39
5 Home Assistant Built-In Integrations You Probably Should be Using
12:45
uv IS the Future of Python Packaging 🐍📦
25:16
Hynek Schlawack
Рет қаралды 14 М.
I should have done this YEARS Ago - Using Variables in Automations
26:47
Hive Mind Automation
Рет қаралды 11 М.
Зу-зу Күлпаш 2. Бригадир.
43:03
ASTANATV Movie
Рет қаралды 382 М.
哈莉奎茵教学正确跟错误 #joker #cosplay#Harriet Quinn
0:17
佐助与鸣人
Рет қаралды 18 МЛН
Немного другой школьный урок
0:31
BitesFrome
Рет қаралды 1,3 МЛН
Посылка заперла дверь
0:15
ЛАЙФСТОРИ
Рет қаралды 12 МЛН