Tado: fix 113982 (#114109)

fix-113982
pull/114084/head^2
Niels Perfors 2024-03-24 13:28:09 +01:00 committed by GitHub
parent d4b180cf75
commit db3eeec78c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,6 @@
"""Support for the (unofficial) Tado API."""
from datetime import timedelta
from datetime import datetime, timedelta
import logging
from PyTado.interface import Tado
@ -439,7 +439,8 @@ class TadoConnector:
def set_meter_reading(self, reading: int) -> dict[str, str]:
"""Send meter reading to Tado."""
dt: str = datetime.now().strftime("%Y-%m-%d")
try:
return self.tado.set_eiq_meter_readings(reading=reading)
return self.tado.set_eiq_meter_readings(date=dt, reading=reading)
except RequestException as exc:
raise HomeAssistantError("Could not set meter reading") from exc