Use f-strings in integrations starting with "A" (#32110)
* Use f-strings in integrations starting with A * Use f-strings in tests for integrations starting with A * Fix pylint by renaming variable * Fix nested for loop in f-string for aprs device_tracker * Break long lines into multiple short lines * Break long lines into multiple short lines v2
This commit is contained in:
1 parent
a85808e325
commit
524a1a7587
48 files changed
+162
-229
No files matched your search
@@ -24,13 +24,7 @@ from homeassistant.helpers import config_validation as cv
|
||||
from homeassistant.helpers.dispatcher import dispatcher_send
|
||||
from homeassistant.helpers.entity import Entity
|
||||
|
||||
from .const import (
|
||||
ATTRIBUTION,
|
||||
DEFAULT_CACHEDB,
|
||||
DOMAIN,
|
||||
SIGNAL_CAPTURE_IMAGE,
|
||||
SIGNAL_TRIGGER_QUICK_ACTION,
|
||||
)
|
||||
from .const import ATTRIBUTION, DEFAULT_CACHEDB, DOMAIN
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
@@ -193,7 +187,7 @@ def setup_hass_services(hass):
|
||||
]
|
||||
|
||||
for entity_id in target_entities:
|
||||
signal = SIGNAL_CAPTURE_IMAGE.format(entity_id)
|
||||
signal = f"abode_camera_capture_{entity_id}"
|
||||
dispatcher_send(hass, signal)
|
||||
|
||||
def trigger_quick_action(call):
|
||||
@@ -207,7 +201,7 @@ def setup_hass_services(hass):
|
||||
]
|
||||
|
||||
for entity_id in target_entities:
|
||||
signal = SIGNAL_TRIGGER_QUICK_ACTION.format(entity_id)
|
||||
signal = f"abode_trigger_quick_action_{entity_id}"
|
||||
dispatcher_send(hass, signal)
|
||||
|
||||
hass.services.register(
|
||||
|
||||
Reference in new issue
Block a user