sampsyo / hass-smartthinq

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

add swing modes #73

Closed cynicer closed 3 years ago

cynicer commented 3 years ago

As commented in #34 Home Assistant doesn't support two separate types of swing modes, like some LG ACs. I added a predefined list of combined modes which I found useful in my setup and exposed the functions to HA. Maybe you want to add it in some form to your project.

cynicer commented 3 years ago

Works fine for me, yes.

sampsyo commented 3 years ago

Excellent! Works for me too. :smiley: Thanks again!!

ticky commented 3 years ago

This is a cool contribution, but it’s worth noting that not all air conditioners support all the now-advertised modes. It would be great if a follow-up patch could be added which filters the list, like was done for hvac_modes and operation_modes in #24!

I’d be happy to give this a go myself, but my model doesn’t appear to advertise support for any of these modes you’ve added, so I’m not clear on what part of the support data to use for it.

Here is the support data from my LP1419IVSM (retrieved from self._ac.model.data within LGDevice): ``` "SupportAccumulate": { "_comment": "FuncSync_전력량사용여부", "option": { "0": "@NOT_SUPPORT", "1": "@ACCUMULATE_INDOOR", "2": "@MOMENTARY_INOUTDOOR" }, "type": "Enum" }, "SupportAirPolution": { "_comment": "FuncSync_공기오염도", "option": { "0": "@NON" }, "type": "Enum" }, "SupportAroma": { "_comment": "FuncSync_아로마지원", "option": { "0": "@NON" }, "type": "Enum" }, "SupportDRED": { "_comment": "FuncSync_DRED", "option": { "0": "@NON" }, "type": "Enum" }, "SupportDuctZoneType": { "_comment": "FuncSync_덕트ZONE타입", "option": { "0": "@NON" }, "type": "Enum" }, "SupportGroupType": { "_comment": "FuncSync_그룹타입", "option": { "0": 0, "1": 1, "5": 16 }, "type": "Enum" }, "SupportLight": { "_comment": "FuncSync_라이팅", "option": { "0": "@NON" }, "type": "Enum" }, "SupportMFilter": { "_comment": "FuncSync_M필터지원", "option": { "0": "@NON", "1": "@SUPPORT" }, "type": "Enum" }, "SupportMicom": { "_comment": "FuncSync_Sub모델명", "option": { "13": "@13", "15": "@15", "17": "@17", "21": "@21", "9": "@9" }, "type": "Enum" }, "SupportOpMode": { "_comment": "FuncSync_운전모드", "option": { "0": "@NON", "1": "@AC_MAIN_OPERATION_MODE_COOL_W", "2": "@AC_MAIN_OPERATION_MODE_DRY_W", "3": "@AC_MAIN_OPERATION_MODE_FAN_W" }, "type": "Enum" }, "SupportPACMode": { "_comment": "FuncSync_PAC모드", "option": { "0": "@NON" }, "type": "Enum" }, "SupportPush": { "_comment": "FuncSync_푸쉬 지원", "option": { "0": "@NON", "1": "@MANSU" }, "type": "Enum" }, "SupportQVoice": { "_comment": "FuncSync_음성인식/안내지원여부", "option": { "0": "@NON" }, "type": "Enum" }, "SupportRACMode": { "_comment": "FuncSync_RAC모드", "option": { "0": "@NON" }, "type": "Enum" }, "SupportRACSubMode": { "_comment": "FuncSync_RAC서브모드", "option": { "0": "@NON", "5": "@AC_MAIN_WIND_DIRECTION_SWING_UP_DOWN_W" }, "type": "Enum" }, "SupportRemocon": { "_comment": "FuncSync_유선리모컨지원", "option": { "0": "@NON" }, "type": "Enum" }, "SupportReserve": { "_comment": "FuncSync_예약", "option": { "0": "@NON", "1": "@SLEEP_TIMER", "2": "@EASY_TIMER", "3": "@ONOFF_TIMER", "6": "@WEEKLY_SCHEDULE" }, "type": "Enum" }, "SupportSmartFunc": { "_comment": "FuncSync_진단 FOTA 지원", "option": { "0": "@NON", "1": "@wifiDiagnosis", "2": "@Fota", "3": "@audibleDiagnosis" }, "type": "Enum" }, "SupportStandbyPwr": { "_comment": "FuncSync_실내기 대기전력차단 지원", "option": { "0": "@NON" }, "type": "Enum" }, "SupportTempCfg": { "_comment": "FuncSync_온도단위", "option": { "0": "@NON", "1": "@C", "2": "@F" }, "type": "Enum" }, "SupportTempCtrl": { "_comment": "FuncSync_온도제어자리수", "option": { "0": "@1_0UNIT_CONTROL", "1": "@0_5UNIT_CONTROL" }, "type": "Enum" }, "SupportTempLimit": { "_comment": "FuncSync_온도범위 설정 지원 여부", "option": { "0": "@NON" }, "type": "Enum" }, "SupportVision": { "_comment": "FuncSync_유선리모컨지원", "option": { "0": "@NON" }, "type": "Enum" }, "SupportWindDir": { "_comment": "FuncSync_바람방향", "option": { "0": "@AC_MAIN_WIND_DIRECTION_FIX_W" }, "type": "Enum" }, "SupportWindMode": { "_comment": "FuncSync_바람모드", "default": "0", "option": { "0": "@OFF" }, "type": "Enum" }, "SupportWindStrength": { "_comment": "FuncSync_바람세기", "option": { "0": "@NON", "3": "@AC_MAIN_WIND_STRENGTH_LOW_W", "5": "@AC_MAIN_WIND_STRENGTH_MID_W", "7": "@AC_MAIN_WIND_STRENGTH_HIGH_W" }, "type": "Enum" }, ```

Interestingly, despite these advertised features, my unit does support a single swing mode, and it is currently enabled, with Home Assistant reporting “Vertical” mode is on, which maps to the [ACHSwingMode.OFF, ACVSwingMode.ALL] mode, suggesting that my AC should theoretically list @100 in SupportWindDir as far as I can tell.

For that reason, I’d love to know what your AC unit reports, as maybe there’s something else which could be used to check for this.

serbasan commented 3 years ago

Sorry, where I find self._ac.model.data inside LGDevice, Homeassitant, app in my Iphone?