String formatting and max line length - Part 7 (#84532)

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
Franck Nijhof 2022-12-27 11:18:56 +01:00 committed by GitHub
parent 3149c52be1
commit d4f69a3652
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
40 changed files with 249 additions and 110 deletions

View file

@ -210,12 +210,14 @@ async def _execute_channel_command_based_action(
if action_channel is None:
raise InvalidDeviceAutomationConfig(
f"Unable to execute channel action - channel: {channel_name} action: {action_type}"
f"Unable to execute channel action - channel: {channel_name} action:"
f" {action_type}"
)
if not hasattr(action_channel, action_type):
raise InvalidDeviceAutomationConfig(
f"Unable to execute channel action - channel: {channel_name} action: {action_type}"
f"Unable to execute channel action - channel: {channel_name} action:"
f" {action_type}"
)
await getattr(action_channel, action_type)(**config)