Tag Hue errors as format strings (#55751)

This commit is contained in:
Paulus Schoutsen 2021-09-04 15:38:14 -07:00 committed by GitHub
parent d39b861110
commit cce0ca5688
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -119,7 +119,9 @@ async def async_validate_trigger_config(hass, config):
trigger = (config[CONF_TYPE], config[CONF_SUBTYPE]) trigger = (config[CONF_TYPE], config[CONF_SUBTYPE])
if not device: if not device:
raise InvalidDeviceAutomationConfig("Device {config[CONF_DEVICE_ID]} not found") raise InvalidDeviceAutomationConfig(
f"Device {config[CONF_DEVICE_ID]} not found"
)
if device.model not in REMOTES: if device.model not in REMOTES:
raise InvalidDeviceAutomationConfig( raise InvalidDeviceAutomationConfig(
@ -127,7 +129,9 @@ async def async_validate_trigger_config(hass, config):
) )
if trigger not in REMOTES[device.model]: if trigger not in REMOTES[device.model]:
raise InvalidDeviceAutomationConfig("Device does not support trigger {trigger}") raise InvalidDeviceAutomationConfig(
f"Device does not support trigger {trigger}"
)
return config return config