File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -151,7 +151,6 @@ class XClimateNS(XEntity, ClimateEntity):
151151 params = {"ATCEnable" , "ATCMode" , "temperature" , "tempCorrection" }
152152
153153 _attr_entity_registry_enabled_default = False
154- _attr_hvac_modes = [HVACMode .OFF , HVACMode .HEAT_COOL , HVACMode .AUTO ]
155154 _attr_max_temp = 31
156155 _attr_min_temp = 16
157156 _attr_temperature_unit = UnitOfTemperature .CELSIUS
@@ -168,6 +167,11 @@ class XClimateNS(XEntity, ClimateEntity):
168167 else :
169168 _attr_supported_features = ClimateEntityFeature .TARGET_TEMPERATURE
170169
170+ def __init__ (self , ewelink , device : dict ):
171+ # copy mutable list so each instance has its own hvac_modes
172+ self ._attr_hvac_modes = [HVACMode .OFF , HVACMode .HEAT_COOL , HVACMode .AUTO ]
173+ super ().__init__ (ewelink , device )
174+
171175 def set_state (self , params : dict ):
172176 cache = self .device ["params" ]
173177 if cache != params :
You can’t perform that action at this time.
0 commit comments