Skip to content

Commit

Permalink
Removed services.py file
Browse files Browse the repository at this point in the history
  • Loading branch information
kgn3400 committed Aug 10, 2024
1 parent f97dba4 commit fb74a0d
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 18 deletions.
2 changes: 0 additions & 2 deletions custom_components/lotto_dk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

from .component_api import ComponentApi
from .const import CONF_EURO_JACKPOT, CONF_LOTTO, CONF_VIKING_LOTTO, DOMAIN, LOGGER
from .services import async_setup_services

PLATFORMS: list[Platform] = [Platform.SENSOR]

Expand Down Expand Up @@ -52,7 +51,6 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
entry.async_on_unload(entry.add_update_listener(update_listener))

await async_setup_services(hass, component_api)
return True


Expand Down
5 changes: 5 additions & 0 deletions custom_components/lotto_dk/component_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
from homeassistant.core import HomeAssistant, ServiceCall
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator

from .const import DOMAIN


class LottoTypes(Enum):
"""Lotto enum."""
Expand Down Expand Up @@ -56,6 +58,9 @@ def __init__(
self.next_webscrape_delta: int = 60
self.coordinator: DataUpdateCoordinator

"""Setup the actions for the Lotto integration."""
hass.services.async_register(DOMAIN, "update", self.async_update_service)

self.find_next_lotto_scroll()

# ------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion custom_components/lotto_dk/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
],
"single_config_entry": true,
"ssdp": [],
"version": "1.0.17",
"version": "1.0.18",
"zeroconf": []
}
13 changes: 0 additions & 13 deletions custom_components/lotto_dk/services.py

This file was deleted.

2 changes: 1 addition & 1 deletion custom_components/lotto_dk/translations/da.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@
"name": "Opdater"
}
}
}
}
2 changes: 1 addition & 1 deletion custom_components/lotto_dk/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,4 @@
"name": "Update"
}
}
}
}

0 comments on commit fb74a0d

Please sign in to comment.