diff --git a/homeassistant/components/mqtt/client.py b/homeassistant/components/mqtt/client.py index 6500c9f91c9..16a02e4956e 100644 --- a/homeassistant/components/mqtt/client.py +++ b/homeassistant/components/mqtt/client.py @@ -220,8 +220,7 @@ def async_subscribe_internal( mqtt_data = hass.data[DATA_MQTT] except KeyError as exc: raise HomeAssistantError( - f"Cannot subscribe to topic '{topic}', " - "make sure MQTT is set up correctly", + f"Cannot subscribe to topic '{topic}', make sure MQTT is set up correctly", translation_key="mqtt_not_setup_cannot_subscribe", translation_domain=DOMAIN, translation_placeholders={"topic": topic}, diff --git a/homeassistant/components/mqtt/event.py b/homeassistant/components/mqtt/event.py index d9812aaaf48..f665f2c4016 100644 --- a/homeassistant/components/mqtt/event.py +++ b/homeassistant/components/mqtt/event.py @@ -151,7 +151,7 @@ class MqttEvent(MqttEntity, EventEntity): ) except KeyError: _LOGGER.warning( - ("`event_type` missing in JSON event payload, " " '%s' on topic %s"), + "`event_type` missing in JSON event payload, '%s' on topic %s", payload, msg.topic, ) diff --git a/homeassistant/components/mqtt/siren.py b/homeassistant/components/mqtt/siren.py index 22f64053d23..1cc5ba2d2e5 100644 --- a/homeassistant/components/mqtt/siren.py +++ b/homeassistant/components/mqtt/siren.py @@ -217,10 +217,7 @@ class MqttSiren(MqttEntity, SirenEntity): try: json_payload = json_loads_object(payload) _LOGGER.debug( - ( - "JSON payload detected after processing payload '%s' on" - " topic %s" - ), + "JSON payload detected after processing payload '%s' on topic %s", json_payload, msg.topic, ) diff --git a/homeassistant/components/mqtt/update.py b/homeassistant/components/mqtt/update.py index 99b4e5cb821..59742d24b60 100644 --- a/homeassistant/components/mqtt/update.py +++ b/homeassistant/components/mqtt/update.py @@ -151,10 +151,7 @@ class MqttUpdate(MqttEntity, UpdateEntity, RestoreEntity): rendered_json_payload = json_loads(payload) if isinstance(rendered_json_payload, dict): _LOGGER.debug( - ( - "JSON payload detected after processing payload '%s' on" - " topic %s" - ), + "JSON payload detected after processing payload '%s' on topic %s", rendered_json_payload, msg.topic, ) diff --git a/homeassistant/components/recorder/migration.py b/homeassistant/components/recorder/migration.py index 6ae1e265901..860a3ef8c0f 100644 --- a/homeassistant/components/recorder/migration.py +++ b/homeassistant/components/recorder/migration.py @@ -2073,10 +2073,7 @@ def _wipe_old_string_time_columns( session.execute(text("UPDATE events set time_fired=NULL LIMIT 100000;")) session.commit() session.execute( - text( - "UPDATE states set last_updated=NULL, last_changed=NULL " - " LIMIT 100000;" - ) + text("UPDATE states set last_updated=NULL, last_changed=NULL LIMIT 100000;") ) session.commit() elif engine.dialect.name == SupportedDialect.POSTGRESQL: diff --git a/homeassistant/components/recorder/util.py b/homeassistant/components/recorder/util.py index 55364863f7e..a1f8d90953c 100644 --- a/homeassistant/components/recorder/util.py +++ b/homeassistant/components/recorder/util.py @@ -927,10 +927,7 @@ def filter_unique_constraint_integrity_error( if ignore: _LOGGER.warning( - ( - "Blocked attempt to insert duplicated %s rows, please report" - " at %s" - ), + "Blocked attempt to insert duplicated %s rows, please report at %s", row_type, "https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+recorder%22", exc_info=err, diff --git a/homeassistant/components/zwave_js/services.py b/homeassistant/components/zwave_js/services.py index d1cb66ceafc..fe293fd178b 100644 --- a/homeassistant/components/zwave_js/services.py +++ b/homeassistant/components/zwave_js/services.py @@ -488,10 +488,7 @@ class ZWaveServices: ) if nodes_without_endpoints and _LOGGER.isEnabledFor(logging.WARNING): _LOGGER.warning( - ( - "The following nodes do not have endpoint %x and will be " - "skipped: %s" - ), + "The following nodes do not have endpoint %x and will be skipped: %s", endpoint, nodes_without_endpoints, )