mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Tag Hue errors as format strings (#55751)
This commit is contained in:
parent
d39b861110
commit
cce0ca5688
@ -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
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user