Fix dangerous brackets (#56384)
parent
0a5fdb2e68
commit
811feb69ba
|
@ -81,7 +81,7 @@ async def async_setup(hass, config):
|
|||
options = {}
|
||||
mode = conf.get(CONF_MODE, MODE_ROUTER)
|
||||
for name, value in conf.items():
|
||||
if name in ([CONF_DNSMASQ, CONF_INTERFACE, CONF_REQUIRE_IP]):
|
||||
if name in [CONF_DNSMASQ, CONF_INTERFACE, CONF_REQUIRE_IP]:
|
||||
if name == CONF_REQUIRE_IP and mode != MODE_AP:
|
||||
continue
|
||||
options[name] = value
|
||||
|
|
|
@ -373,7 +373,7 @@ class AsusWrtRouter:
|
|||
"""Update router options."""
|
||||
req_reload = False
|
||||
for name, new_opt in new_options.items():
|
||||
if name in (CONF_REQ_RELOAD):
|
||||
if name in CONF_REQ_RELOAD:
|
||||
old_opt = self._options.get(name)
|
||||
if not old_opt or old_opt != new_opt:
|
||||
req_reload = True
|
||||
|
|
|
@ -371,7 +371,7 @@ class RadioThermostat(ClimateEntity):
|
|||
|
||||
def set_preset_mode(self, preset_mode):
|
||||
"""Set Preset mode (Home, Alternate, Away, Holiday)."""
|
||||
if preset_mode in (PRESET_MODES):
|
||||
if preset_mode in PRESET_MODES:
|
||||
self.device.program_mode = PRESET_MODE_TO_CODE[preset_mode]
|
||||
else:
|
||||
_LOGGER.error(
|
||||
|
|
|
@ -85,7 +85,7 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
|
|||
for chem_sensor_name in coordinator.data[SL_DATA.KEY_CHEMISTRY]:
|
||||
enabled = True
|
||||
if equipment_flags & EQUIPMENT.FLAG_CHLORINATOR:
|
||||
if chem_sensor_name in ("salt_tds_ppm"):
|
||||
if chem_sensor_name in ("salt_tds_ppm",):
|
||||
enabled = False
|
||||
if chem_sensor_name in SUPPORTED_CHEM_SENSORS:
|
||||
entities.append(
|
||||
|
|
Loading…
Reference in New Issue