* MetOfficeData now retrieves both 3-hourly and daily data (full forecast data, as well as "now" snapshot) on each update * Bump datapoint API up to latest version * Create 2 sets of sensors - one of each set for 3-hourly and for daily data (same ones initially enabled, for now) * Create two entities (one each for 3-hourly and daily data) and also add in the forecast data for each dataset * Testing changes to accommodate now having two sets of everything for 3-hourly and daily update data * Removed unused import (reported by flake8) * As per conversation with @MatthewFlamm leave the 3-hourly entity's unique_id unchanged (although the display name is changed) * Make some improvements based on reviews Make some improvements and fix up the formatting/linting failures. * Make some improvements based on reviews Make some improvements and fix up the formatting/linting failures. * Added more test coverage * import asyncio * Try to fix test * Rewrote everything using CoordinatorEntity * Fixed config flow * Fixed lint errors Co-authored-by: MrHarcombe <ian.harcombe@gmail.com> Co-authored-by: Henco Appel <hencoappel+github@gmail.com>
11 lines
320 B
Python
11 lines
320 B
Python
"""Common Met Office Data class used by both sensor and entity."""
|
|
|
|
|
|
class MetOfficeData:
|
|
"""Data structure for MetOffice weather and forecast."""
|
|
|
|
def __init__(self, now, forecast, site):
|
|
"""Initialize the data object."""
|
|
self.now = now
|
|
self.forecast = forecast
|
|
self.site = site
|