The assumption you are proficient in YAML is because you tagged your post with “Blueprints”. There’s no way anyone can create a Blueprint without knowledge of YAML.
However, your question has nothing to do with Blueprints.
You have the state and you have the attributes, the on/off issue you are referring to is the state of the device, where the brightness is an attribute.
You can find all the attributes in the online docs (i.e., for lights ).
The example you got was YAML, but the user interface is just a shortcut to create that YAML and nobody wants to screenshot all the examples :). So to translate what was provided in the UI:
@123
I’m migrating away from Smartthings. I have a Location status in Smartthings( Home, Away, Night) which I’m trying to map via a simulated dimmer bulb.
I have created webcore routes in ST that changes brighness of the dimmer bulb based on it’s location state. I’m trying to read that value in HA and then I’ll use it in different automation to perform different task based on this value.
You’ll have to cozy up to YAML. It feels a bit daunting at first but it’s not too bad once you get the hang of it. To answer your question you would have something like this:
Here is an example from my own system where I synchronize the state of a “dummy” light to the status of another light and use a single light entity to control two other lights. While the outcome is a bit different, it is similar enough that you can use it as a baseline to draft your own.
As I have mentioned, I’m migrating away from ST and wanted to move gradually to not overwhelm myself. So I have paired ST with HA and I can see all the physical devices in HA.
ST has a logical/virtual entity named Location. Home/Away/Night,etc. I’m just trying to sync that status somehow with something here in HA. So far not doing good
I am thinking of creating 3 boolean flags and set/reset them based on Brighness value which will have some fixed value based on location status in ST. May be there’s some other simple way, but as I said I’m just a week old. Let me read more in forum and online docs.
Thank you.
You can go into the Developer section of HA and pull up the states for the “source entity”, that will tell you the state and the attributes, then you can use a modification of my above sample to bring that data into your automation or into another template entity.
Specifically the section on the Trigger State Object. That’s what lets you use the value, that caused the trigger to occur, within the automation’ action.
If I do manually create automation in YAML, should I add them in automations.yaml or I should keep this file for UI automations only.
Can I have another file and create manual/YAML automations in that file?
I tried adding automation line in configurations file twice and it gave me error.
You can’t have two automation sections like that, your YAML will throw an error. From the HA docs on automation it tells you exactly how to either use the YAML editor in automations or add manual automatons in the configuration.yaml file.