Hi fantastic people!
I’m very new to HA, and home automation in general.
I’m an experienced control systems engineer and automate I/O and routine tasks (usually Visual Basic so others can easily understand it, don’t judge, I haven’t needed to learn Python much yet) for a living.
I’ve got a bunch of Fibaro dimmers (and a single quibino dimmer), some multi sensors of various brands, and some Aeotec Wallmotes.
When I first set up some motion sensors, I started experimenting, and tried making an automation of:
When motion detected, if dark, turn light on.
Simple enough. Cool.
Next I wanted to make it so that when motion was detected again, or by a different sensor, that it would turn the light back off, but only if it had been turned on by the first automation, not manually.
There was no option for “if this automation ran recently” in the conditions, so I made an input boolean that I can turn on to flag when the first automation had been the one to turn the light on (adding a condition that if the light was already on, it wouldn’t fire).
I went looking for the ‘turn on my new input boolean’ in the actions, nope, not there.
So, I made a scene where the boolean was on, and a scene where the boolean was off. Now I don’t even need the booleans, I can see when the scenes are on and off?
No, it seems that scenes being active. not booleans, are available in the conditions… hmmmmmm.
Giving up on that, I’ve taken a look at the WallMotes.
I can see the button pressed, button held, and button released events, I can select those events under ‘device’ in an automation, and I can toggle a light on and off based on them. Cool, so far so good.
I want to change the dimming level of a fibaro light based on sliding along the wall mote. Hmmm. No value for position of the finger… Fine, let’s do some digging.
Found that with some config changes, the wallmote will change the values of configuration parameters 9 and 10 based on where you tap and / or slide. Awesome!
So now I’m trying to get the value of a configuration parameter, manipulate (scale) that, and write that to the brightness of the dimmer. Should be easy!
Nope… Seems you can’t ‘get’ a value of a config parameter as an action. You can check it as a condition, but if there’s 100 possible values, I don’t want to explicitly write an automation for each… that’s realllllly dumb.
OK, fine, maybe a script will help. I’m fine with picking up new languages, let’s see how scripts work!
Clicked on new script, and look! more drop down boxes, with the same selections available as were in automations… this is going nowhere.
I tried clicking the “…” and selecting to edit in ymal. Seems the ymal editor for it is a bunch of ‘commands’, not really variables. How do I begin to get a value, manipulate it, and write it somewhere else?
I skipped over that and looked into writing a value into the brightness. So far, I’ve been unable to find any ‘command’ to set a specific brightness. There’s ‘brightness up’ and ‘brightness down’ actions, but nothing about setting a value. Yet in the HA gui, there certainly is a 0-100% value. How do I get access to this value in an automation or script?
All I want is to be able to see all my inputs, all my outputs, and then write code to do what I want with them. Usually there’s at least a list of all members/values/whatever-you-want-to-call-them for a given device/structure/whatever-HA-uses. This is going to be very painful if I need to spend hours googling each device to find the specific thing I have to add to the config file to make those things show up in HA, but if there’s a repository for that or it’s fairy easy to find, I’m willing. So far I’m drawing a blank though.
Where am I going wrong?