Skip to content

Commit

Permalink
Merge pull request #125 from kratz00/f_strings
Browse files Browse the repository at this point in the history
Fix 'f string' usage in debug log messages
  • Loading branch information
unixorn authored Sep 27, 2023
2 parents f5a4519 + 9fc260c commit 06aab1a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ha_mqtt_discoverable/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -668,8 +668,8 @@ def _setup_client(self, on_connect: Optional[Callable] = None) -> None:
"""Create an MQTT client and setup some basic properties on it"""
mqtt_settings = self._settings.mqtt
logger.debug(
f"Creating mqtt client({mqtt_settings.client_name}) for "
"{mqtt_settings.host}:{mqtt_settings.port}"
f"Creating mqtt client ({mqtt_settings.client_name}) for "
f"{mqtt_settings.host}:{mqtt_settings.port}"
)
self.mqtt_client = mqtt.Client(mqtt_settings.client_name)
if mqtt_settings.tls_key:
Expand Down Expand Up @@ -790,7 +790,7 @@ def write_config(self):

logger.debug(
f"Writing '{config_message}' to topic {self.config_topic} on "
"{self._settings.mqtt.host}:{self._settings.mqtt.port}"
f"{self._settings.mqtt.host}:{self._settings.mqtt.port}"
)
self.wrote_configuration = True
self.config_message = config_message
Expand Down

0 comments on commit 06aab1a

Please sign in to comment.