mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 14:17:45 +00:00
parent
d4b180cf75
commit
db3eeec78c
@ -1,6 +1,6 @@
|
|||||||
"""Support for the (unofficial) Tado API."""
|
"""Support for the (unofficial) Tado API."""
|
||||||
|
|
||||||
from datetime import timedelta
|
from datetime import datetime, timedelta
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from PyTado.interface import Tado
|
from PyTado.interface import Tado
|
||||||
@ -439,7 +439,8 @@ class TadoConnector:
|
|||||||
|
|
||||||
def set_meter_reading(self, reading: int) -> dict[str, str]:
|
def set_meter_reading(self, reading: int) -> dict[str, str]:
|
||||||
"""Send meter reading to Tado."""
|
"""Send meter reading to Tado."""
|
||||||
|
dt: str = datetime.now().strftime("%Y-%m-%d")
|
||||||
try:
|
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:
|
except RequestException as exc:
|
||||||
raise HomeAssistantError("Could not set meter reading") from exc
|
raise HomeAssistantError("Could not set meter reading") from exc
|
||||||
|
Loading…
x
Reference in New Issue
Block a user