Closed 20after4 closed 3 months ago
I think it would make more sense for the pipsolar component to expose these settings as a select instead of the switch and output components. The switches behavior is a bit glitchy acting as a radio-button group but only after a long delay. The output component obviously wasn't meant for arbitrary integers as the value, it seems to be designed for dimmers, mainly.
I may make an attempt at implementing the select behavior as a native component instead of yaml+lambda. If I make any progress I will open a PR.
Now I see that the pip8048 branch already has a prototype for a select component. Is there any plan to merge that? Also are there any compatibility concerns if I tried to run that branch with an older model inverter?
Ok I was able to get it working using the pip8048 branch. No compatibility issues with my older PIP inverter. It seems to me that the code in that branch is good enough to be merged. It's much less broken than main is currently (or what is currently included with the main esphome distribution)
Here is example code that attempts to set the values of output_source_priority and charger_source_priority by using a select and a lambda:
When I attempt to set, for example, output_source_priority to battery (value == 2.0) then here is the debug output from my esphome device:
See how the value gets clipped to
1.0
even though I'm passing2.0
as the argument toset_level
. If I set it to "Utility" (value ==0.0
) then it works correctly, only because the value is within the expected range of0.0
to1.0