Fix rotationPercent settings from entity config#319
Conversation
|
Hi and thank you very much for your contribution! I am completely confused by my own code (maybe because it is ugly, but i failed to refactor it to a more readable form more than once ;)). What exactly is this doing? I see that after the property has been set in the This updates the current rotationPercent value for a knob. But why? Can you describe your use-case? (I know, I added the code somewhen but I am not sure what the intention was)? |
Hello! I am trying to control a motorized shade. I can call Therefore I would need to know the percentage. Initially I wanted to read from the state, but the code is really ugly: So I thought if I can keep the I am also exploring an "optimistic update" feature, where if you rotate the knob, the percentage is immediately reflected on the screen, until overridden by Home Assistant's state. This is also for the motorized shades, since those things are slow, and if you rotate the knob, you have no idea what value you set it to. |
The plugin code supports updating rotation percentage using value calculated from the entity config yaml, but the config factory does not pass this field along, so it does not work. This PR fixes the issue.