@@ -477,13 +477,20 @@ def swing_mode(self):
477
477
h = horizontal ["currentMode" ]["value" ]
478
478
if vertical is not None :
479
479
v = vertical ["currentMode" ]["value" ]
480
- if h != "stop " :
480
+ if h == "swing " :
481
481
swingMode = SWING_HORIZONTAL
482
- if v != "stop" :
483
- if h != "stop" :
482
+ if v == "swing" :
484
483
swingMode = SWING_BOTH
485
484
else :
486
485
swingMode = SWING_VERTICAL
486
+ if v == "floorHeatingAirflow" :
487
+ swingMode = "floorHeatingAirflow"
488
+ if v == "windNice" :
489
+ if h == "swing" :
490
+ swingMode = "Comfort Airflow and Horizontal"
491
+ else :
492
+ swingMode = "Comfort Airflow"
493
+
487
494
return swingMode
488
495
489
496
@property
@@ -501,12 +508,18 @@ def swing_modes(self):
501
508
for mode in horizontal ["currentMode" ]["values" ]:
502
509
if mode == "swing" :
503
510
swingModes .append (SWING_HORIZONTAL )
511
+ if mode == "floorHeatingAirflow" :
512
+ swingModes .append (mode )
504
513
if vertical is not None :
505
514
for mode in vertical ["currentMode" ]["values" ]:
506
515
if mode == "swing" :
507
516
swingModes .append (SWING_VERTICAL )
508
- if horizontal is not None :
509
- swingModes .append (SWING_BOTH )
517
+ if horizontal is not None :
518
+ swingModes .append (SWING_BOTH )
519
+ if mode == "windNice" :
520
+ swingModes .append ("Comfort Airflow" )
521
+ if horizontal is not None :
522
+ swingModes .append ("Comfort Airflow and Horizontal" )
510
523
_LOGGER .info ("Support swing modes %s" , swingModes )
511
524
return swingModes
512
525
@@ -521,22 +534,22 @@ async def async_set_swing_mode(self, swing_mode):
521
534
horizontal = fanDirection .get ("horizontal" )
522
535
vertical = fanDirection .get ("vertical" )
523
536
if horizontal is not None :
524
- new_hMode = (
525
- "swing"
526
- if swing_mode in (SWING_HORIZONTAL , SWING_BOTH )
527
- else "stop"
528
- )
537
+ new_hMode = "stop"
538
+ if swing_mode in (SWING_HORIZONTAL , SWING_BOTH , "Comfort Airflow and Horizontal" ):
539
+ new_hMode = "swing"
529
540
res = await self ._device .set_path (self ._device .getId (), self .embedded_id , "fanControl" , f"/operationModes/{ operationmode } /fanDirection/horizontal/currentMode" , new_hMode )
530
541
if res is False :
531
542
_LOGGER .warning ("Device '%s' problem setting horizontal swing mode to %s" , self ._device .name , new_hMode )
532
543
else :
533
544
fanControl ["value" ]["operationModes" ][operationmode ]["fanDirection" ]["horizontal" ]["currentMode" ]["value" ] = new_hMode
534
545
if vertical is not None :
535
- new_vMode = (
536
- "swing"
537
- if swing_mode in (SWING_VERTICAL , SWING_BOTH )
538
- else "stop"
539
- )
546
+ new_vMode = "stop"
547
+ if swing_mode in (SWING_VERTICAL , SWING_BOTH ):
548
+ new_vMode = "swing"
549
+ if swing_mode in ("floorHeatingAirflow" ):
550
+ new_vMode = "floorHeatingAirflow"
551
+ if swing_mode in ("Comfort Airflow" , "Comfort Airflow and Horizontal" ):
552
+ new_vMode = "windNice"
540
553
res &= await self ._device .set_path (self ._device .getId (), self .embedded_id , "fanControl" , f"/operationModes/{ operationmode } /fanDirection/vertical/currentMode" , new_vMode )
541
554
if res is False :
542
555
_LOGGER .warning ("Device '%s' problem setting horizontal swing mode to %s" , self ._device .name , new_vMode )
0 commit comments