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:
springstan 2020-02-23 22:38:05 +01:00 committed by GitHub
parent a85808e325
commit 524a1a7587
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
48 changed files with 162 additions and 229 deletions

View file

@ -8,7 +8,7 @@ from homeassistant.components.binary_sensor import BinarySensorDevice
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from . import AbodeAutomation, AbodeDevice
from .const import DOMAIN, SIGNAL_TRIGGER_QUICK_ACTION
from .const import DOMAIN
_LOGGER = logging.getLogger(__name__)
@ -60,7 +60,7 @@ class AbodeQuickActionBinarySensor(AbodeAutomation, BinarySensorDevice):
async def async_added_to_hass(self):
"""Subscribe Abode events."""
await super().async_added_to_hass()
signal = SIGNAL_TRIGGER_QUICK_ACTION.format(self.entity_id)
signal = f"abode_trigger_quick_action_{self.entity_id}"
async_dispatcher_connect(self.hass, signal, self.trigger)
def trigger(self):