rogro82 / hass-variables

Home Assistant variables component
238 stars 58 forks source link

Feature Request: Use entity_id instead of variable #62

Open Ex0danify opened 2 years ago

Ex0danify commented 2 years ago

I don't know if this extension is still actively maintained, but I'll write my proposal anyways.

With the current situation the service call to "set_variable" MUST contain the variables entity_id as key 'variable'.

Current Situation: When calling the service with an entity_id supplied, Home Assistant will throw an error: "extra keys not allowed @ data['entity_id']"

Request: Remove the required 'variable' from the service data and use entity_id instead.

I looked through the code, but I can't quite seem to understand where to change it to allow the passed entity_id to be used as variable (I have an understanding of coding in general, but sadly I haven't looked into development for Home Assistant yet.)

skynet01 commented 2 years ago

+1 for this as I also have the same issue :)