From b5b945ab4d97d6f3441a39943d1ef0c48e20f922 Mon Sep 17 00:00:00 2001 From: muppet3000 Date: Thu, 3 Mar 2022 23:05:13 +0000 Subject: [PATCH] Fix data type for growatt lastdataupdate (#67511) (#67582) Co-authored-by: Paulus Schoutsen --- homeassistant/components/growatt_server/sensor.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/homeassistant/components/growatt_server/sensor.py b/homeassistant/components/growatt_server/sensor.py index 71c1c69e08a..67095492de7 100644 --- a/homeassistant/components/growatt_server/sensor.py +++ b/homeassistant/components/growatt_server/sensor.py @@ -221,12 +221,9 @@ class GrowattData: # Create datetime from the latest entry date_now = dt.now().date() last_updated_time = dt.parse_time(str(sorted_keys[-1])) - combined_timestamp = datetime.datetime.combine( + mix_detail["lastdataupdate"] = datetime.datetime.combine( date_now, last_updated_time ) - # Convert datetime to UTC - combined_timestamp_utc = dt.as_utc(combined_timestamp) - mix_detail["lastdataupdate"] = combined_timestamp_utc.isoformat() # Dashboard data is largely inaccurate for mix system but it is the only call with the ability to return the combined # imported from grid value that is the combination of charging AND load consumption