djansen1987 / SAJeSolar

SAJ eSolar Portal Sensors
GNU General Public License v3.0
21 stars 13 forks source link

Add more states to runningState handling #60

Closed elboletaire closed 10 months ago

elboletaire commented 1 year ago

For what I can see in the code, the state handling is binary: if it's zero it's shown as off, any other value is shown as on. In my case, I see I'm getting the state as 2 and, in the official SAJ portal, I can see the state as red. It doesn't mean it's not working, but there's some error connection in the inverter (a red color isn't a good UX for this case).

imatge imatge

I'm pretty newbie to homeassistant and, more specifically, to how plugins and sensors are done but, could it be possible to make it non binary? In this case, I'd show a "warning" text for this specific case.

djansen1987 commented 10 months ago

Hi @elboletaire , what kind of device do you have? as there are multiple status values. also for example for accessories to converts

djansen1987 commented 10 months ago

Please test with the latest release https://github.com/djansen1987/SAJeSolar/releases/tag/v1.4.7

elboletaire commented 10 months ago

TBH I ended up modifying entirely the plugin on my own, but the change looks good, so I'll close the issue.

djansen1987 commented 10 months ago

That is sad to hear, you could also do a PR to make the integration better for everyone. But thank you for the confirmation.

elboletaire commented 10 months ago

That is sad to hear, you could also do a PR to make the integration better for everyone. But thank you for the confirmation.

Not sure my edits were worth adding... after doing many changes I realized I could had avoided doing changes by just creating aliases... If I were to do changes to the plugin I think I'd change it entirely, grouping sensors in a better way. But that's a lot of work and, as it is right now works for me, so.. 🤷🏼

djansen1987 commented 10 months ago

I understand 👍 if you ever have some great additions let me know. I self do not use the integration my self an created it for a family member. For him it is also working so any additions had low priority unleas added via PR