Long-time automation guy (but HA noob) stumped with the automation front-end for setting the value of an entity based on a device attribute. Is this even possible?Specifics:
I’m trying to set the value of either (preferably both, but I’ll take either):
(1) an input helper (number 0-100)
(2) a dimmer device
I’m using the automation front-end to define the action. But the trick is that I want to reference the value in a device attribute, not an entity. Is this possible? TIA…
OK I see the entity ID for the mop, but coming back to the original question, I still can’t figure out how to use an Action in the Automation front-end to set the value of an entity to the value of a device attribute. Assume I’m missing something.
EDIT: to be more clear, I can see how to set the value of a dimmer or a helper to a number (73, 42, 9, 57), but not to the value of a device attribute. Seems like such a basic action. Is it possible?
I did something using Z-Wave Devices and an input helper. Anytime I change the value of the input helper it triggers the automation and uses that value as input for the Z-Wave Set Value Service.
Think it was just autocorrect at work, combined with my sloppiness — yes it’s vacuum.alice
Thank you. Will try. And yes valid values are 0-100 so I think I’m safe.
Can I correctly infer, by its absence, that there is no way to assign a value to an entity based on another entity just using an action in the automation front end (not YAML)? I’m not averse to YAML, just seeking to understand.
@tom_l Im guessing there’s a simple typo with the single quotes since there’s an odd number of them in the snippet you shared, but whatever I do (e.g., one pair or two pairs of single quotes), I get an error message. “expected dictionary @ data [‘action’][0]”
Can I correctly infer, by its absence, that there is no way to assign a value to an entity based on another entity just using an action in the automation front end (not YAML)? I’m not averse to YAML, just seeking to understand.
@tom_l, I assume there’s an analogue to this syntax for text strings, rather than dimmers. Is there documentation somewhere I can consult, rather than asking for you each individual scenario?
Templating has opened my eyes to entirely new possibilities. Thanks @tom_l !
Today, I’ve been trying to create a simple automation that stuffs a thermostat’s setpoint value into a number helper. I keep getting “expected float for dictionary value @ data[‘value’]. Got None”. I’ve scoured the forum to try to understand what to do, but I’m stumped.
I even pasted the template into the “Developer tools” template area, and it returns the expected value.