I have a corner case maybe and wondering if there is a good way of approaching my desired output.
I want to create virtual entities, and attach attributes to them.
I am running most of my automation in Node Red.
I want to create myself a profile, so add my license plate for my car, my code for the keypad for access, etc.
Same for each of the people in my household.
So when a car is detected, a picture is captured and sent to Node Red ALPD flow I have. Once the license plate is retrieved, it will pull each of the people and compare the license plate. If it is matched, it will open the garage and send me a notification on my phone.
I have a lot of the middle part working, just need to figure out the best way to create the individuals with their profile information. It is based on a MySQL design I had.
I thought about creating them as “Devices” (yeah I know), and adding entities for each of the pieces of info like license, pictures, etc. But realized it may by totally the wrong approach and may make the whole thing a pain to maintain when I want to add access to certain areas for the cleaning lady, access to the gardener for the backyard and through the gate only, etc. You can see how it may become cumbersome.
ok, I got it done, but how do I access the attributes?
Trying to access them in YAML or in NodeRed. When I run a test flow in NodeRed, I get the core attributes.
This is my test flow:
The output is only latitude, longitude, gps_accuracy, source being my phone, etc. No actual attributes from customize.
Is there something I need to do, or are they tagger differently?
Even in YAML, if I want to create an automation, how do I get access to the license plate or pin in this case?
Thanks in advance.
Sorry for not being clear. What I meant by access to is based on the message in node red received, this is the content.
You see the attributes which are tied to the person.haz in my case. But the custom attributes do not show up. This output is from the debug node from my flow above.
Once I get the attributes pulled into Node Red, I can then access them using other nodes to run my logic and automation. I do all my automations in Node Red.
@finity, thanks for the help. That was it. I could not see them in the dev tab, so it turned out to be a spacing issue in my customize code.
Once that was fixed, all worked as planned.
Now I see what I am expecting in Node Red! and in HA