Add switch to LG ThinQ for power control (#137512)

Add switch for convenient power control

Co-authored-by: yunseon.park <yunseon.park@lge.com>
pull/137543/head
LG-ThinQ-Integration 2025-02-06 19:39:58 +09:00 committed by GitHub
parent 84d7cb3a76
commit f56d058443
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 39 additions and 3 deletions

View File

@ -7,8 +7,11 @@
"express_mode": {
"default": "mdi:snowflake-variant"
},
"express_fridge": {
"default": "mdi:snowflake"
},
"hot_water_mode": {
"default": "mdi:list-status"
"default": "mdi:heat-wave"
},
"humidity_warm_mode": {
"default": "mdi:heat-wave"
@ -39,6 +42,9 @@
},
"warm_mode": {
"default": "mdi:heat-wave"
},
"display_light": {
"default": "mdi:lightbulb-on-outline"
}
},
"binary_sensor": {

View File

@ -30,10 +30,13 @@
"name": "Auto mode"
},
"express_mode": {
"name": "Ice plus"
"name": "Express mode"
},
"express_fridge": {
"name": "Express cool"
},
"hot_water_mode": {
"name": "Hot water"
"name": "Heating water"
},
"humidity_warm_mode": {
"name": "Warm mist"
@ -64,6 +67,9 @@
},
"warm_mode": {
"name": "Heating"
},
"display_light": {
"name": "Lighting"
}
},
"binary_sensor": {

View File

@ -33,6 +33,18 @@ class ThinQSwitchEntityDescription(SwitchEntityDescription):
DEVICE_TYPE_SWITCH_MAP: dict[DeviceType, tuple[ThinQSwitchEntityDescription, ...]] = {
DeviceType.AIR_CONDITIONER: (
ThinQSwitchEntityDescription(
key=ThinQProperty.AIR_CON_OPERATION_MODE,
translation_key="operation_power",
entity_category=EntityCategory.CONFIG,
),
ThinQSwitchEntityDescription(
key=ThinQProperty.DISPLAY_LIGHT,
translation_key=ThinQProperty.DISPLAY_LIGHT,
on_key="on",
off_key="off",
entity_category=EntityCategory.CONFIG,
),
ThinQSwitchEntityDescription(
key=ThinQProperty.POWER_SAVE_ENABLED,
translation_key=ThinQProperty.POWER_SAVE_ENABLED,
@ -121,8 +133,20 @@ DEVICE_TYPE_SWITCH_MAP: dict[DeviceType, tuple[ThinQSwitchEntityDescription, ...
off_key="false",
entity_category=EntityCategory.CONFIG,
),
ThinQSwitchEntityDescription(
key=ThinQProperty.EXPRESS_FRIDGE,
translation_key=ThinQProperty.EXPRESS_FRIDGE,
on_key="true",
off_key="false",
entity_category=EntityCategory.CONFIG,
),
),
DeviceType.SYSTEM_BOILER: (
ThinQSwitchEntityDescription(
key=ThinQProperty.BOILER_OPERATION_MODE,
translation_key="operation_power",
entity_category=EntityCategory.CONFIG,
),
ThinQSwitchEntityDescription(
key=ThinQProperty.HOT_WATER_MODE,
translation_key=ThinQProperty.HOT_WATER_MODE,