Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4a7ae81c8f | |||
| dbf2bc6982 | |||
| 2430e7dd8c |
@@ -1,11 +1,11 @@
|
|||||||
default_config:
|
default_config:
|
||||||
|
|
||||||
logger:
|
logger:
|
||||||
default: info
|
default: warning
|
||||||
logs:
|
logs:
|
||||||
custom_components.versatile_thermostat: debug
|
# custom_components.versatile_thermostat: debug
|
||||||
custom_components.versatile_thermostat.underlyings: debug
|
# custom_components.versatile_thermostat.underlyings: debug
|
||||||
custom_components.versatile_thermostat.climate: debug
|
# custom_components.versatile_thermostat.climate: debug
|
||||||
|
|
||||||
# If you need to debug uncommment the line below (doc: https://www.home-assistant.io/integrations/debugpy/)
|
# If you need to debug uncommment the line below (doc: https://www.home-assistant.io/integrations/debugpy/)
|
||||||
debugpy:
|
debugpy:
|
||||||
|
|||||||
@@ -214,6 +214,9 @@ class BaseThermostat(ClimateEntity, RestoreEntity):
|
|||||||
|
|
||||||
super().__init__()
|
super().__init__()
|
||||||
|
|
||||||
|
# To remove some silly warning event if code is fixed
|
||||||
|
self._enable_turn_on_off_backwards_compatibility = False
|
||||||
|
|
||||||
self._hass = hass
|
self._hass = hass
|
||||||
self._entry_infos = None
|
self._entry_infos = None
|
||||||
self._attr_extra_state_attributes = {}
|
self._attr_extra_state_attributes = {}
|
||||||
@@ -2700,3 +2703,12 @@ class BaseThermostat(ClimateEntity, RestoreEntity):
|
|||||||
await self._async_set_preset_mode_internal(self._attr_preset_mode, True)
|
await self._async_set_preset_mode_internal(self._attr_preset_mode, True)
|
||||||
|
|
||||||
self.hass.create_task(self._check_initial_state())
|
self.hass.create_task(self._check_initial_state())
|
||||||
|
|
||||||
|
async def async_turn_off(self) -> None:
|
||||||
|
await self.async_set_hvac_mode(HVACMode.OFF)
|
||||||
|
|
||||||
|
async def async_turn_on(self) -> None:
|
||||||
|
if self._ac_mode:
|
||||||
|
await self.async_set_hvac_mode(HVACMode.COOL)
|
||||||
|
else:
|
||||||
|
await self.async_set_hvac_mode(HVACMode.HEATING)
|
||||||
|
|||||||
@@ -329,7 +329,7 @@ CONF_WINDOW_ACTIONS = [
|
|||||||
CONF_WINDOW_ECO_TEMP,
|
CONF_WINDOW_ECO_TEMP,
|
||||||
]
|
]
|
||||||
|
|
||||||
SUPPORT_FLAGS = ClimateEntityFeature.TARGET_TEMPERATURE
|
SUPPORT_FLAGS = ClimateEntityFeature.TARGET_TEMPERATURE | ClimateEntityFeature.TURN_OFF | ClimateEntityFeature.TURN_ON
|
||||||
|
|
||||||
SERVICE_SET_PRESENCE = "set_presence"
|
SERVICE_SET_PRESENCE = "set_presence"
|
||||||
SERVICE_SET_PRESET_TEMPERATURE = "set_preset_temperature"
|
SERVICE_SET_PRESET_TEMPERATURE = "set_preset_temperature"
|
||||||
|
|||||||
@@ -14,6 +14,6 @@
|
|||||||
"quality_scale": "silver",
|
"quality_scale": "silver",
|
||||||
"requirements": [],
|
"requirements": [],
|
||||||
"ssdp": [],
|
"ssdp": [],
|
||||||
"version": "6.0.0",
|
"version": "6.0.1",
|
||||||
"zeroconf": []
|
"zeroconf": []
|
||||||
}
|
}
|
||||||
@@ -98,63 +98,80 @@ async def async_setup_entry(
|
|||||||
if vt_type != CONF_THERMOSTAT_CENTRAL_CONFIG:
|
if vt_type != CONF_THERMOSTAT_CENTRAL_CONFIG:
|
||||||
# Creates non central temperature entities
|
# Creates non central temperature entities
|
||||||
if not entry.data.get(CONF_USE_PRESETS_CENTRAL_CONFIG, False):
|
if not entry.data.get(CONF_USE_PRESETS_CENTRAL_CONFIG, False):
|
||||||
for preset in CONF_PRESETS_VALUES:
|
|
||||||
entities.append(
|
|
||||||
TemperatureNumber(
|
|
||||||
hass, unique_id, name, preset, False, False, entry.data
|
|
||||||
)
|
|
||||||
)
|
|
||||||
if entry.data.get(CONF_AC_MODE, False):
|
if entry.data.get(CONF_AC_MODE, False):
|
||||||
for preset in CONF_PRESETS_WITH_AC_VALUES:
|
for preset in CONF_PRESETS_WITH_AC_VALUES:
|
||||||
|
_LOGGER.warning(
|
||||||
|
"%s - configuring Number non central, AC, non AWAY for preset %s",
|
||||||
|
name,
|
||||||
|
preset,
|
||||||
|
)
|
||||||
entities.append(
|
entities.append(
|
||||||
TemperatureNumber(
|
TemperatureNumber(
|
||||||
hass, unique_id, name, preset, True, False, entry.data
|
hass, unique_id, name, preset, True, False, entry.data
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
else:
|
||||||
|
for preset in CONF_PRESETS_VALUES:
|
||||||
|
_LOGGER.warning(
|
||||||
|
"%s - configuring Number non central, non AC, non AWAY for preset %s",
|
||||||
|
name,
|
||||||
|
preset,
|
||||||
|
)
|
||||||
|
entities.append(
|
||||||
|
TemperatureNumber(
|
||||||
|
hass, unique_id, name, preset, False, False, entry.data
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
if entry.data.get(
|
if entry.data.get(
|
||||||
CONF_USE_PRESENCE_FEATURE, False
|
CONF_USE_PRESENCE_FEATURE, False
|
||||||
) is True and not entry.data.get(CONF_USE_PRESENCE_CENTRAL_CONFIG, False):
|
) is True and not entry.data.get(CONF_USE_PRESENCE_CENTRAL_CONFIG, False):
|
||||||
for preset in CONF_PRESETS_AWAY_VALUES:
|
|
||||||
entities.append(
|
|
||||||
TemperatureNumber(
|
|
||||||
hass, unique_id, name, preset, False, True, entry.data
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
if entry.data.get(CONF_AC_MODE, False):
|
if entry.data.get(CONF_AC_MODE, False):
|
||||||
for preset in CONF_PRESETS_AWAY_WITH_AC_VALUES:
|
for preset in CONF_PRESETS_AWAY_WITH_AC_VALUES:
|
||||||
|
_LOGGER.warning(
|
||||||
|
"%s - configuring Number non central, AC, AWAY for preset %s",
|
||||||
|
name,
|
||||||
|
preset,
|
||||||
|
)
|
||||||
entities.append(
|
entities.append(
|
||||||
TemperatureNumber(
|
TemperatureNumber(
|
||||||
hass, unique_id, name, preset, True, True, entry.data
|
hass, unique_id, name, preset, True, True, entry.data
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
else:
|
||||||
|
for preset in CONF_PRESETS_AWAY_VALUES:
|
||||||
|
_LOGGER.warning(
|
||||||
|
"%s - configuring Number non central, non AC, AWAY for preset %s",
|
||||||
|
name,
|
||||||
|
preset,
|
||||||
|
)
|
||||||
|
entities.append(
|
||||||
|
TemperatureNumber(
|
||||||
|
hass, unique_id, name, preset, False, True, entry.data
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
# For central config only
|
# For central config only
|
||||||
else:
|
else:
|
||||||
entities.append(
|
entities.append(
|
||||||
ActivateBoilerThresholdNumber(hass, unique_id, name, entry.data)
|
ActivateBoilerThresholdNumber(hass, unique_id, name, entry.data)
|
||||||
)
|
)
|
||||||
for preset in CONF_PRESETS_VALUES:
|
|
||||||
entities.append(
|
|
||||||
CentralConfigTemperatureNumber(
|
|
||||||
hass, unique_id, name, preset, False, False, entry.data
|
|
||||||
)
|
|
||||||
)
|
|
||||||
for preset in CONF_PRESETS_WITH_AC_VALUES:
|
for preset in CONF_PRESETS_WITH_AC_VALUES:
|
||||||
|
_LOGGER.warning(
|
||||||
|
"%s - configuring Number central, AC, non AWAY for preset %s",
|
||||||
|
name,
|
||||||
|
preset,
|
||||||
|
)
|
||||||
entities.append(
|
entities.append(
|
||||||
CentralConfigTemperatureNumber(
|
CentralConfigTemperatureNumber(
|
||||||
hass, unique_id, name, preset, True, False, entry.data
|
hass, unique_id, name, preset, True, False, entry.data
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
for preset in CONF_PRESETS_AWAY_VALUES:
|
|
||||||
entities.append(
|
|
||||||
CentralConfigTemperatureNumber(
|
|
||||||
hass, unique_id, name, preset, False, True, entry.data
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
for preset in CONF_PRESETS_AWAY_WITH_AC_VALUES:
|
for preset in CONF_PRESETS_AWAY_WITH_AC_VALUES:
|
||||||
|
_LOGGER.warning(
|
||||||
|
"%s - configuring Number central, AC, AWAY for preset %s", name, preset
|
||||||
|
)
|
||||||
entities.append(
|
entities.append(
|
||||||
CentralConfigTemperatureNumber(
|
CentralConfigTemperatureNumber(
|
||||||
hass, unique_id, name, preset, True, True, entry.data
|
hass, unique_id, name, preset, True, True, entry.data
|
||||||
|
|||||||
Reference in New Issue
Block a user