sampsyo / hass-smartthinq

Home Assistant component for LG SmartThinQ HVAC devices
MIT License
285 stars 98 forks source link

Home Assistant 0.96.5 problem after upgrading #24

Open ctih opened 5 years ago

ctih commented 5 years ago

configuration.yaml

climate:
  - platform: smartthinq
    refresh_token: #secretACcode
    country: DK
    language: da-DK

manifest.json

{
    "domain": "smartthinq",
    "name": "hass-smartthinq",
    "documentation": "https://github.com/sampsyo/hass-smartthinq",
    "dependencies": [],
    "codeowners": ["@sampsyo"],
    "requirements": ["https://github.com/sampsyo/wideq/archive/master.zip#wide1==1.0.1"] ### **#I have changed this line to run on HASS.IO**

}

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 226, in async_update_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 256, in _async_write_ha_state attr.update(self.state_attributes or {}) File "/usr/src/homeassistant/homeassistant/components/climate/init.py", line 206, in state_attributes data[ATTR_FAN_MODE] = self.fan_mode File "/config/custom_components/smartthinq/climate.py", line 176, in fan_mode mode = self._state.fan_speed File "/usr/local/lib/python3.7/site-packages/wideq/ac.py", line 298, in fan_speed return ACFanSpeed(self.lookup_enum('WindStrength')) File "/usr/local/lib/python3.7/enum.py", line 310, in call return cls.new(cls, value) File "/usr/local/lib/python3.7/enum.py", line 564, in new raise exc File "/usr/local/lib/python3.7/enum.py", line 548, in new result = cls.missing(value) File "/usr/local/lib/python3.7/enum.py", line 577, in missing raise ValueError("%r is not a valid %s" % (value, cls.name)) ValueError: '@AC_MAIN_WIND_STRENGTH_NATURE_W' is not a valid ACFanSpeed`

sampsyo commented 5 years ago

Please include some amount of detail with your bug report. And please use GitHub's Markdown features to make pastes like this display correctly.

ctih commented 5 years ago

Hi

Sorry I dont know a lot about programming. Please explain what you need from me? Do you run Home Assistant 0.96.4?

I think this is missing in the AC mode code "@AC_MAIN_WIND_STRENGTH_NATURE_W"

ctih commented 5 years ago

Please help I'm stuck. Is there other with same problem?

sampsyo commented 5 years ago

Hi, @ctih—in moments like these, I think it's super important to remember the context of the text field you're writing in. The developers of this library have put this online out a vague hope that it might be useful to other people. This is not our job; we're not hoping (or even wanting!) to get paid in any way. This means that we just don't have the time to work hard to help solve problems that we're not in the midst of solving ourselves.

I realize that this is a frustrating reality. I know that you don't think you have the skills or background to solve the problem yourself, so you're hoping that someone else might do it instead. But the reality is that even if you make it clear how much this means to you, it's not really going to justify the large investment of time it would take to have someone else do the work for you. It's unjust and unfair! But it would also be unjust and unfair for people to be conscripted into doing this labor for you.

Sorry for the disappointing response! But I hope this helps frame the context for other open-source software you might use in the future.

ctih commented 5 years ago

Sorry. I did not want to make you fix the awesome work you made. Just wanted to know if I was making a mistake. Error 40! 😳 I hope that someone could answer me.

Did you make this software for fun without using it for yourself?

Have a nice day and thanks for your good work.

Do you have some way to pay you? PayPal?

sampsyo commented 5 years ago

It's totally cool! Just wanted to clue you in about how these open-source interactions tend to go—and to keep expectations low. :smiley:

I do use it myself, for my AC units. But because I don't have this problem, it's super hard to investigate why it might hypothetically happen for someone else, on someone else's AC units.

I really appreciate the offer, but I'd prefer not to get paid for this effort. I do have a few charities I like to point people to, however, if they really feel moved: https://movetoamend.org/civicrm/contribute/transact?reset=1&id=2 https://www.corporateaccountability.org https://transequality.org

ctih commented 5 years ago

I got it working for a short time but now its back to same error. :( Does it have something with the new climate cleanup? https://developers.home-assistant.io/blog/2019/07/03/climate-cleanup.html

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 226, in async_update_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 256, in _async_write_ha_state attr.update(self.state_attributes or {}) File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 206, in state_attributes data[ATTR_FAN_MODE] = self.fan_mode File "/config/custom_components/smartthinq/climate.py", line 176, in fan_mode mode = self._state.fan_speed File "/usr/local/lib/python3.7/site-packages/wideq/ac.py", line 298, in fan_speed return ACFanSpeed(self.lookup_enum('WindStrength')) File "/usr/local/lib/python3.7/enum.py", line 310, in __call__ return cls.__new__(cls, value) File "/usr/local/lib/python3.7/enum.py", line 564, in __new__ raise exc File "/usr/local/lib/python3.7/enum.py", line 548, in __new__ result = cls._missing_(value) File "/usr/local/lib/python3.7/enum.py", line 577, in _missing_ raise ValueError("%r is not a valid %s" % (value, cls.__name__)) ValueError: '@AC_MAIN_WIND_STRENGTH_NATURE_W' is not a valid ACFanSpeed

ctih commented 5 years ago

Hi

Now i know when the problem starts. I think when the airflow mode "Natural Wind (Auto Wind)" is selected from the AC remote the addon in home assistant cant startup if hass.io restarts. The tree options i have is low, medium, high. Is it possible to add this mode to your code? '@AC_MAIN_WIND_STRENGTH_NATURE_W' @sampsyo

The airflow setting is mentioned in this link on page 17. Link to the lg manual: https://www.lg.com/au/air-conditioning/download/LG_Split_Systems_Brochure.pdf

sampsyo commented 5 years ago

Pull requests are welcome if you'd like to show where this needs to be added!

ctih commented 5 years ago

@sampsyo

Done :) Hope for the best i´m not a programmer only a IT Supporter.