mirror of
https://github.com/esphome/esphome.git
synced 2024-11-24 16:08:10 +01:00
[thermostat] Fix linting and formatting issues (#7442)
Some checks failed
CI / Create common environment (push) Has been cancelled
CI / Run script/ci-custom (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino 2/4 (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino 3/4 (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino 4/4 (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 IDF (push) Has been cancelled
CI / Run script/clang-tidy for ESP8266 (push) Has been cancelled
CI / list-components (push) Has been cancelled
CI / Component test (push) Has been cancelled
CI / Split components for testing into 20 groups maximum (push) Has been cancelled
CI / Test split components (push) Has been cancelled
CI / CI Status (push) Has been cancelled
CI / Check black (push) Has been cancelled
CI / Check flake8 (push) Has been cancelled
CI / Check pylint (push) Has been cancelled
CI / Check pyupgrade (push) Has been cancelled
CI / Run pytest (push) Has been cancelled
CI / Check clang-format (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino 1/4 (push) Has been cancelled
Some checks failed
CI / Create common environment (push) Has been cancelled
CI / Run script/ci-custom (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino 2/4 (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino 3/4 (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino 4/4 (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 IDF (push) Has been cancelled
CI / Run script/clang-tidy for ESP8266 (push) Has been cancelled
CI / list-components (push) Has been cancelled
CI / Component test (push) Has been cancelled
CI / Split components for testing into 20 groups maximum (push) Has been cancelled
CI / Test split components (push) Has been cancelled
CI / CI Status (push) Has been cancelled
CI / Check black (push) Has been cancelled
CI / Check flake8 (push) Has been cancelled
CI / Check pylint (push) Has been cancelled
CI / Check pyupgrade (push) Has been cancelled
CI / Run pytest (push) Has been cancelled
CI / Check clang-format (push) Has been cancelled
CI / Run script/clang-tidy for ESP32 Arduino 1/4 (push) Has been cancelled
This commit is contained in:
parent
c702a3f3ee
commit
cf4bfcdce8
1 changed files with 11 additions and 9 deletions
|
@ -1,7 +1,7 @@
|
|||
import esphome.codegen as cg
|
||||
import esphome.config_validation as cv
|
||||
from esphome import automation
|
||||
import esphome.codegen as cg
|
||||
from esphome.components import climate, sensor
|
||||
import esphome.config_validation as cv
|
||||
from esphome.const import (
|
||||
CONF_AUTO_MODE,
|
||||
CONF_AWAY_CONFIG,
|
||||
|
@ -15,15 +15,15 @@ from esphome.const import (
|
|||
CONF_DRY_ACTION,
|
||||
CONF_DRY_MODE,
|
||||
CONF_FAN_MODE,
|
||||
CONF_FAN_MODE_ON_ACTION,
|
||||
CONF_FAN_MODE_OFF_ACTION,
|
||||
CONF_FAN_MODE_AUTO_ACTION,
|
||||
CONF_FAN_MODE_DIFFUSE_ACTION,
|
||||
CONF_FAN_MODE_FOCUS_ACTION,
|
||||
CONF_FAN_MODE_HIGH_ACTION,
|
||||
CONF_FAN_MODE_LOW_ACTION,
|
||||
CONF_FAN_MODE_MEDIUM_ACTION,
|
||||
CONF_FAN_MODE_HIGH_ACTION,
|
||||
CONF_FAN_MODE_MIDDLE_ACTION,
|
||||
CONF_FAN_MODE_FOCUS_ACTION,
|
||||
CONF_FAN_MODE_DIFFUSE_ACTION,
|
||||
CONF_FAN_MODE_OFF_ACTION,
|
||||
CONF_FAN_MODE_ON_ACTION,
|
||||
CONF_FAN_MODE_QUIET_ACTION,
|
||||
CONF_FAN_ONLY_ACTION,
|
||||
CONF_FAN_ONLY_ACTION_USES_FAN_MODE_TIMER,
|
||||
|
@ -50,8 +50,8 @@ from esphome.const import (
|
|||
CONF_MIN_HEATING_RUN_TIME,
|
||||
CONF_MIN_IDLE_TIME,
|
||||
CONF_MIN_TEMPERATURE,
|
||||
CONF_NAME,
|
||||
CONF_MODE,
|
||||
CONF_NAME,
|
||||
CONF_OFF_MODE,
|
||||
CONF_PRESET,
|
||||
CONF_SENSOR,
|
||||
|
@ -892,7 +892,7 @@ async def to_code(config):
|
|||
if name.upper() in climate.CLIMATE_PRESETS:
|
||||
standard_preset = climate.CLIMATE_PRESETS[name.upper()]
|
||||
|
||||
if two_points_available is True:
|
||||
if two_points_available:
|
||||
preset_target_config = ThermostatClimateTargetTempConfig(
|
||||
preset_config[CONF_DEFAULT_TARGET_TEMPERATURE_LOW],
|
||||
preset_config[CONF_DEFAULT_TARGET_TEMPERATURE_HIGH],
|
||||
|
@ -905,6 +905,8 @@ async def to_code(config):
|
|||
preset_target_config = ThermostatClimateTargetTempConfig(
|
||||
preset_config[CONF_DEFAULT_TARGET_TEMPERATURE_LOW]
|
||||
)
|
||||
else:
|
||||
preset_target_config = None
|
||||
|
||||
preset_target_variable = cg.new_variable(
|
||||
preset_config[CONF_ID], preset_target_config
|
||||
|
|
Loading…
Reference in a new issue