From 0668b7d0030431de57f51ace1216e900d9088738 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?val=C3=A8re=20didon?= Date: Sun, 1 Dec 2024 20:49:05 +0100 Subject: [PATCH] fix f-string delimiters in publish_to_hass_api (#161) --- src/rpi-cpu2mqtt.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rpi-cpu2mqtt.py b/src/rpi-cpu2mqtt.py index 632bbf2..64e1709 100644 --- a/src/rpi-cpu2mqtt.py +++ b/src/rpi-cpu2mqtt.py @@ -658,12 +658,12 @@ def publish_to_hass_api(cpu_load=0, cpu_temp=0, used_space=0, voltage=0, sys_clo if value: if param == 'drive_temps' and isinstance(value, dict): for device, temp in value.items(): - entity_id = f"sensor.{hostname.replace("-","_")}_{device}_temp" + entity_id = f"sensor.{hostname.replace('-','_')}_{device}_temp" state = temp attributes = config_json(device + "_temp", device, True) send_sensor_data_to_home_assistant(entity_id, state, attributes) else: - entity_id = f"sensor.{hostname.replace("-","_")}_{param}" + entity_id = f"sensor.{hostname.replace('-','_')}_{param}" state = value attributes = config_json(param, "0", True) send_sensor_data_to_home_assistant(entity_id, state, attributes)