Skip to content

Commit

Permalink
Merge pull request #24 from wxt9861/chore/deps
Browse files Browse the repository at this point in the history
Bump ynab-sdk
  • Loading branch information
wxt9861 authored Feb 24, 2023
2 parents 375a640 + 0ce8e5a commit 0c15832
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.9
FROM python:3.10

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
Expand All @@ -7,7 +7,7 @@ RUN apt-get update \
&& rm -rf /var/lib/apt/lists/*

RUN python -m pip install --upgrade colorlog black pylint python-language-server
RUN python -m pip install --upgrade git+git://github.com/home-assistant/home-assistant.git@dev
RUN python -m pip install --upgrade homeassistant
RUN cd && mkdir -p /config/custom_components


Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/custom_component_helper
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function StartHomeAssistant {
}

function UpdgradeHomeAssistantDev {
python -m pip install --upgrade git+git://github.com/home-assistant/home-assistant.git@dev
python -m pip install --upgrade homeassistant
}

function SetHomeAssistantVersion {
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// See https://aka.ms/vscode-remote/devcontainer.json for format details.
{
"name": "ESXI Stats dev",
"name": "ynab dev",
"context": "..",
"dockerFile": "Dockerfile",
"appPort": "8124:8123",
Expand Down
10 changes: 8 additions & 2 deletions custom_components/ynab/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,12 @@ def __init__(self, hass, config):
self.categories = config[DOMAIN].get("categories")
self.accounts = config[DOMAIN].get("accounts")

self.ynab = None
self.all_budgets = None
self.get_all_budgets = None
self.raw_budget = None
self.get_data = None

@Throttle(MIN_TIME_BETWEEN_UPDATES)
async def update_data(self):
"""Update data."""
Expand Down Expand Up @@ -235,10 +241,10 @@ async def update_data(self):

async def check_files(hass):
"""Return bool that indicates if all files are present."""
base = "{}/custom_components/{}/".format(hass.config.path(), DOMAIN)
base = f"{hass.config.path()}/custom_components/{DOMAIN}/"
missing = []
for file in REQUIRED_FILES:
fullpath = "{}{}".format(base, file)
fullpath = f"{base}{file}"
if not os.path.exists(fullpath):
missing.append(file)

Expand Down
4 changes: 2 additions & 2 deletions custom_components/ynab/const.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
"""Constants for YNAB integration."""
DOMAIN = "ynab"
DOMAIN_DATA = "{}_data".format(DOMAIN)
DOMAIN_DATA = f"{DOMAIN}_data"

PLATFORMS = ["sensor"]
REQUIRED_FILES = ["const.py", "manifest.json", "sensor.py"]
VERSION = "0.1.10"
VERSION = "0.1.12"
ISSUE_URL = "https://github.com/wxt9861/ynab/issues"

STARTUP = """
Expand Down
4 changes: 2 additions & 2 deletions custom_components/ynab/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"issue_tracker": "https://github.com/wxt9861/ynab/issues",
"dependencies": [],
"codeowners": ["@wxt9861"],
"requirements": ["ynab-sdk==0.2.5"],
"version": "0.1.11"
"requirements": ["ynab-sdk==0.4.0"],
"version": "0.1.12"
}

0 comments on commit 0c15832

Please sign in to comment.