sarahhenkens / home-assistant-iocare

27 stars 15 forks source link

add switch for the purifier light #2

Closed kylerw closed 3 years ago

robert-alfaro commented 4 years ago

@kylerw does python-iocare work for you? I'm getting an issue with 'code' key not existent in one of the json responses. This doesn't have anything to do with your changes or this component..but since your changes are recent, I'm wondering if something changed in their API recently.. Moreover, it seems like the python-iocare project is closed source (not collaborative). I mean sure we can look at sources upon installing the package, but seems like it's no longer maintained.

sarahhenkens commented 4 years ago

@robert-alfaro, I was originally planning to write my own API client for their API until I found that closed off python project. It was working with my initial prototype.

We might need to pull an older version during install? Last time I checked, it was working with 0.1.5.

robert-alfaro commented 4 years ago

Something changed in their API recently..I think. Today I noticed a forced app (Android) update too.

deekue commented 4 years ago

this one? https://github.com/evandcoleman/python-iocare

robert-alfaro commented 4 years ago

That is the python package used under the hood. It needs updating.

skynet01 commented 3 years ago

Sooo.. any updates on this? Would love to be able to control the light :)

Varjo1 commented 3 years ago

Sooo.. any updates on this? Would love to be able to control the light :)

Seconded!

kylerw commented 3 years ago

I don't have write access to the repo to merge or resolve conflicts.

RobertD502 commented 3 years ago

Would it make more sense to set this up as a light entity instead of a switch entity? Light entities have an on/off component to them like switches.

kylerw commented 3 years ago

The light entity is typically used for devices that support dimming and/or color changes. The light on this device does neither so it likely should fall to the switch entity like it has been configured. I am, however, no expert on the design rules so open to feedback.

sarahhenkens commented 3 years ago

Looks like we have a merge conflict after merging the other PR :( Can you rebase?

RobertD502 commented 3 years ago

The light entity is typically used for devices that support dimming and/or color changes. The light on this device does neither so it likely should fall to the switch entity like it has been configured. I am, however, no expert on the design rules so open to feedback.

I'm not an expert on the design rules either. Based on what you said, I'd agree with sticking to a switch design. There are lights that aren't fully controllable such as the Hue White bulbs, but even then they do still have brightness control, which the light on the purifier doesn't.