feat: initial commit

This commit is contained in:
devilr33f 2025-11-04 11:21:01 +06:00
commit e436fafd9e
13 changed files with 812 additions and 0 deletions

View file

@ -0,0 +1,16 @@
from __future__ import annotations
def to_ha_condition(icon: str, time_of_day: str | None) -> str:
if icon == "d":
return "sunny" if time_of_day == "day" else "clear-night"
mapping = {
"c": "cloudy",
"c_s": "snowy",
"c_r": "rainy",
"c_rs": "snowy-rainy",
"d_c": "partlycloudy",
}
return mapping.get(icon, "cloudy")