Skip to content

Commit

Permalink
2024.10.0 (#23)
Browse files Browse the repository at this point in the history
* fix lint errors
* update manifest
* bump pyfuelprices (#21)
  • Loading branch information
pantherale0 authored Oct 14, 2024
1 parent 43d5336 commit 0c9337f
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: "Set up Python"
uses: actions/[email protected]
with:
python-version: "3.11"
python-version: "3.12"
cache: "pip"

- name: "Install requirements"
Expand Down
8 changes: 4 additions & 4 deletions custom_components/fuel_prices/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""Fuel Prices integration."""

import contextlib
import logging

from datetime import timedelta
Expand Down Expand Up @@ -30,20 +29,21 @@
from .const import DOMAIN, CONF_AREAS, CONF_SOURCES, CONF_CHEAPEST_SENSORS, CONF_CHEAPEST_SENSORS_COUNT, CONF_CHEAPEST_SENSORS_FUEL_TYPE
from .coordinator import FuelPricesCoordinator

type FuelPricesConfigEntry = ConfigEntry[FuelPricesConfig]

_LOGGER = logging.getLogger(__name__)
PLATFORMS = [Platform.SENSOR]


@dataclass
class FuelPricesConfig:
"""Represent a config for Anglian Water."""
"""Represent a Fuel Price Config."""

coordinator: FuelPricesCoordinator
areas: list[dict]


type FuelPricesConfigEntry = ConfigEntry[FuelPricesConfig]


def _build_configured_areas(hass_areas: dict) -> list[dict]:
module_areas = []
for area in hass_areas:
Expand Down
1 change: 0 additions & 1 deletion custom_components/fuel_prices/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import logging
from typing import Any
from homeassistant.config_entries import ConfigEntry, OptionsFlow

from pyfuelprices.sources.mapping import SOURCE_MAP, COUNTRY_MAP
import voluptuous as vol
Expand Down
4 changes: 3 additions & 1 deletion custom_components/fuel_prices/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
"iot_class": "cloud_polling",
"issue_tracker": "https://github.com/pantherale0/ha-fuelprices/issues",
"requirements": [
"xmltodict",
"brotli",
"these-united-states==1.1.0.21",
"pyfuelprices==2.6.4"
"pyfuelprices==2024.10.1"
],
"ssdp": [],
"version": "0.0.0",
Expand Down
4 changes: 1 addition & 3 deletions custom_components/fuel_prices/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,12 @@

from homeassistant.components.sensor import SensorEntity
from homeassistant.const import CONF_LATITUDE, CONF_LONGITUDE, CONF_RADIUS, CONF_NAME, STATE_UNKNOWN
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from pyfuelprices.const import PROP_FUEL_LOCATION_SOURCE
from . import FuelPricesConfigEntry
from .const import CONF_AREAS, DOMAIN, CONF_STATE_VALUE, CONF_CHEAPEST_SENSORS, CONF_CHEAPEST_SENSORS_COUNT, CONF_CHEAPEST_SENSORS_FUEL_TYPE
from .const import CONF_STATE_VALUE, CONF_CHEAPEST_SENSORS, CONF_CHEAPEST_SENSORS_COUNT, CONF_CHEAPEST_SENSORS_FUEL_TYPE
from .entity import FuelStationEntity, CheapestFuelEntity
from .coordinator import FuelPricesCoordinator

_LOGGER = logging.getLogger(__name__)

Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
colorlog==6.7.0
homeassistant==2024.7.1
git+https://github.com/home-assistant/core@dev
pip>=21.0,<23.2
ruff==0.0.292
pyfuelprices==2.6.4
pyfuelprices==2024.10.1

0 comments on commit 0c9337f

Please sign in to comment.