File tree 2 files changed +4
-5
lines changed
custom_components/jcihitachi_tw
2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -256,7 +256,7 @@ def unique_id(self):
256
256
return f"{ self ._thing .gateway_mac_address } _climate"
257
257
258
258
def calculate_supported_features (self ):
259
- support_flags = ClimateEntityFeature .TARGET_TEMPERATURE | ClimateEntityFeature .FAN_MODE | ClimateEntityFeature .PRESET_MODE
259
+ support_flags = ClimateEntityFeature .TURN_ON | ClimateEntityFeature . TURN_OFF | ClimateEntityFeature . TARGET_TEMPERATURE | ClimateEntityFeature .FAN_MODE | ClimateEntityFeature .PRESET_MODE
260
260
if self ._thing .support_code .HorizontalWindDirectionSetting != "unsupported" and \
261
261
self ._thing .support_code .VerticalWindDirectionSwitch != "unsupported" :
262
262
support_flags |= ClimateEntityFeature .SWING_MODE
Original file line number Diff line number Diff line change 1
1
"""JciHitachi integration."""
2
2
import logging
3
3
4
- from homeassistant .components .fan import (SUPPORT_PRESET_MODE ,
5
- SUPPORT_SET_SPEED , FanEntity )
4
+ from homeassistant .components .fan import (FanEntity , FanEntityFeature )
6
5
from homeassistant .util .percentage import (ordered_list_item_to_percentage ,
7
6
percentage_to_ordered_list_item )
8
7
@@ -108,9 +107,9 @@ def unique_id(self):
108
107
def calculate_supported_features (self ):
109
108
support_flags = 0
110
109
if self ._thing .support_code .FanSpeed != "unsupported" :
111
- support_flags |= SUPPORT_SET_SPEED
110
+ support_flags |= FanEntityFeature . SET_SPEED
112
111
if self ._thing .support_code .FanSpeed & 1 == 1 : # auto mode is at the first bit.
113
- support_flags |= SUPPORT_PRESET_MODE
112
+ support_flags |= FanEntityFeature . PRESET_MODE
114
113
115
114
return support_flags
116
115
You can’t perform that action at this time.
0 commit comments