1
0
mirror of https://github.com/home-assistant/core.git synced 2026-07-07 14:56:25 +01:00
Files
core/homeassistant/components/metoffice/helpers.py
T
2026-04-30 21:14:48 +02:00

11 lines
278 B
Python

"""Helpers used for Met Office integration."""
from typing import Any
def get_attribute(data: dict[str, Any] | None, attr_name: str) -> Any | None:
"""Get an attribute from weather data."""
if data:
return data.get(attr_name, {}).get("value")
return None