Set alarm and climate supported features default (#82247)
This commit is contained in:
parent
f60850586e
commit
da2efde354
11 changed files with 2 additions and 11 deletions
|
@ -133,7 +133,7 @@ class AlarmControlPanelEntity(Entity):
|
||||||
_attr_changed_by: str | None = None
|
_attr_changed_by: str | None = None
|
||||||
_attr_code_arm_required: bool = True
|
_attr_code_arm_required: bool = True
|
||||||
_attr_code_format: CodeFormat | None = None
|
_attr_code_format: CodeFormat | None = None
|
||||||
_attr_supported_features: AlarmControlPanelEntityFeature | int
|
_attr_supported_features: AlarmControlPanelEntityFeature | int = 0
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def code_format(self) -> CodeFormat | None:
|
def code_format(self) -> CodeFormat | None:
|
||||||
|
|
|
@ -225,7 +225,7 @@ class ClimateEntity(Entity):
|
||||||
_attr_precision: float
|
_attr_precision: float
|
||||||
_attr_preset_mode: str | None
|
_attr_preset_mode: str | None
|
||||||
_attr_preset_modes: list[str] | None
|
_attr_preset_modes: list[str] | None
|
||||||
_attr_supported_features: ClimateEntityFeature | int
|
_attr_supported_features: ClimateEntityFeature | int = 0
|
||||||
_attr_swing_mode: str | None
|
_attr_swing_mode: str | None
|
||||||
_attr_swing_modes: list[str] | None
|
_attr_swing_modes: list[str] | None
|
||||||
_attr_target_humidity: int | None = None
|
_attr_target_humidity: int | None = None
|
||||||
|
|
|
@ -126,7 +126,6 @@ class FibaroThermostat(FibaroDevice, ClimateEntity):
|
||||||
self._target_temp_device: FibaroDevice | None = None
|
self._target_temp_device: FibaroDevice | None = None
|
||||||
self._op_mode_device: FibaroDevice | None = None
|
self._op_mode_device: FibaroDevice | None = None
|
||||||
self._fan_mode_device: FibaroDevice | None = None
|
self._fan_mode_device: FibaroDevice | None = None
|
||||||
self._attr_supported_features = 0
|
|
||||||
self.entity_id = ENTITY_ID_FORMAT.format(self.ha_id)
|
self.entity_id = ENTITY_ID_FORMAT.format(self.ha_id)
|
||||||
|
|
||||||
siblings = fibaro_device.fibaro_controller.get_siblings(fibaro_device)
|
siblings = fibaro_device.fibaro_controller.get_siblings(fibaro_device)
|
||||||
|
|
|
@ -172,7 +172,6 @@ class IntesisAC(ClimateEntity):
|
||||||
self._hvane = None
|
self._hvane = None
|
||||||
self._power = False
|
self._power = False
|
||||||
self._fan_speed = None
|
self._fan_speed = None
|
||||||
self._attr_supported_features = 0
|
|
||||||
self._power_consumption_heat = None
|
self._power_consumption_heat = None
|
||||||
self._power_consumption_cool = None
|
self._power_consumption_cool = None
|
||||||
|
|
||||||
|
|
|
@ -445,7 +445,6 @@ class ZoneDevice(ClimateEntity):
|
||||||
self._zone = zone
|
self._zone = zone
|
||||||
self._name = zone.name.title()
|
self._name = zone.name.title()
|
||||||
|
|
||||||
self._attr_supported_features = 0
|
|
||||||
if zone.type != Zone.Type.AUTO:
|
if zone.type != Zone.Type.AUTO:
|
||||||
self._state_to_pizone = {
|
self._state_to_pizone = {
|
||||||
HVACMode.OFF: Zone.Mode.CLOSE,
|
HVACMode.OFF: Zone.Mode.CLOSE,
|
||||||
|
|
|
@ -107,7 +107,6 @@ class RiscoAlarm(AlarmControlPanelEntity):
|
||||||
self._code_disarm_required = options[CONF_CODE_DISARM_REQUIRED]
|
self._code_disarm_required = options[CONF_CODE_DISARM_REQUIRED]
|
||||||
self._risco_to_ha = options[CONF_RISCO_STATES_TO_HA]
|
self._risco_to_ha = options[CONF_RISCO_STATES_TO_HA]
|
||||||
self._ha_to_risco = options[CONF_HA_STATES_TO_RISCO]
|
self._ha_to_risco = options[CONF_HA_STATES_TO_RISCO]
|
||||||
self._attr_supported_features = 0
|
|
||||||
self._attr_has_entity_name = True
|
self._attr_has_entity_name = True
|
||||||
self._attr_name = None
|
self._attr_name = None
|
||||||
for state in self._ha_to_risco:
|
for state in self._ha_to_risco:
|
||||||
|
|
|
@ -90,7 +90,6 @@ class SIAAlarmControlPanel(SIABaseEntity, AlarmControlPanelEntity):
|
||||||
"""Class for SIA Alarm Control Panels."""
|
"""Class for SIA Alarm Control Panels."""
|
||||||
|
|
||||||
entity_description: SIAAlarmControlPanelEntityDescription
|
entity_description: SIAAlarmControlPanelEntityDescription
|
||||||
_attr_supported_features = 0
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
|
|
@ -104,7 +104,6 @@ class SwitcherClimateEntity(
|
||||||
self._attr_target_temperature_step = 1
|
self._attr_target_temperature_step = 1
|
||||||
self._attr_temperature_unit = TEMP_CELSIUS
|
self._attr_temperature_unit = TEMP_CELSIUS
|
||||||
|
|
||||||
self._attr_supported_features = 0
|
|
||||||
self._attr_hvac_modes = [HVACMode.OFF]
|
self._attr_hvac_modes = [HVACMode.OFF]
|
||||||
for mode in remote.modes_features:
|
for mode in remote.modes_features:
|
||||||
self._attr_hvac_modes.append(DEVICE_MODE_TO_HA[mode])
|
self._attr_hvac_modes.append(DEVICE_MODE_TO_HA[mode])
|
||||||
|
|
|
@ -97,7 +97,6 @@ class TuyaAlarmEntity(TuyaEntity, AlarmControlPanelEntity):
|
||||||
description: AlarmControlPanelEntityDescription,
|
description: AlarmControlPanelEntityDescription,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Init Tuya Alarm."""
|
"""Init Tuya Alarm."""
|
||||||
self._attr_supported_features = 0
|
|
||||||
super().__init__(device, device_manager)
|
super().__init__(device, device_manager)
|
||||||
self.entity_description = description
|
self.entity_description = description
|
||||||
self._attr_unique_id = f"{super().unique_id}{description.key}"
|
self._attr_unique_id = f"{super().unique_id}{description.key}"
|
||||||
|
|
|
@ -134,7 +134,6 @@ class TuyaClimateEntity(TuyaEntity, ClimateEntity):
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Determine which values to use."""
|
"""Determine which values to use."""
|
||||||
self._attr_target_temperature_step = 1.0
|
self._attr_target_temperature_step = 1.0
|
||||||
self._attr_supported_features = 0
|
|
||||||
self.entity_description = description
|
self.entity_description = description
|
||||||
|
|
||||||
super().__init__(device, device_manager)
|
super().__init__(device, device_manager)
|
||||||
|
|
|
@ -182,7 +182,6 @@ class ZWaveClimate(ZWaveBaseEntity, ClimateEntity):
|
||||||
check_all_endpoints=True,
|
check_all_endpoints=True,
|
||||||
)
|
)
|
||||||
self._set_modes_and_presets()
|
self._set_modes_and_presets()
|
||||||
self._attr_supported_features = 0
|
|
||||||
if self._current_mode and len(self._hvac_presets) > 1:
|
if self._current_mode and len(self._hvac_presets) > 1:
|
||||||
self._attr_supported_features |= ClimateEntityFeature.PRESET_MODE
|
self._attr_supported_features |= ClimateEntityFeature.PRESET_MODE
|
||||||
# If any setpoint value exists, we can assume temperature
|
# If any setpoint value exists, we can assume temperature
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue