Co-authored-by: Jean-Marc Collin <jean-marc.collin-extern@renault.com>
This commit is contained in:
@@ -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:
|
||||||
|
|||||||
@@ -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