Skip to content

Commit

Permalink
Merge pull request #80 from daroga0002/reorg
Browse files Browse the repository at this point in the history
Small tuning of different things
  • Loading branch information
anarion80 authored Apr 4, 2024
2 parents 8f5dd06 + eec29cb commit f9fce5b
Show file tree
Hide file tree
Showing 29 changed files with 21 additions and 13 deletions.
1 change: 0 additions & 1 deletion .devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,5 @@
},
"remoteUser": "vscode",
"features": {
"ghcr.io/devcontainers/features/rust:1": {}
}
}
1 change: 1 addition & 0 deletions .github/scripts/update_hacs_manifest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Update the manifest file."""

import json
import os
import sys
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.2.2
rev: v0.3.5
hooks:
# Run the linter.
- id: ruff
Expand Down
File renamed without changes.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Platform | Description
`sensor` | Show info and status from Tech API.
`climate` | Thermostats.

![Tech Thermostat Cards](/custom_components/tech/images/ha-tech-1.png)
![Tech Thermostat Cards](./images/ha-tech-1.png)

## :pencil2: Plans for development

Expand All @@ -71,15 +71,15 @@ Platform | Description
1. You should see "Success!" dialog with the name of the imported controller(s).
1. Now you should have Climate entities representing your home zones available in Home Assistant. Go to your UI Lovelace configuration and add Thermostat card with your Climate entities.

![Tech Controllers Setup 1](/custom_components/tech/images/ha-tech-add-integration-1.png)
![Tech Controllers Setup 1](./images/ha-tech-add-integration-1.png)

![Tech Controllers Setup 2](/custom_components/tech/images/ha-tech-add-integration-2.png)
![Tech Controllers Setup 2](./images/ha-tech-add-integration-2.png)

![Tech Controllers Setup 3](/custom_components/tech/images/ha-tech-add-integration-3.png)
![Tech Controllers Setup 3](./images/ha-tech-add-integration-3.png)

![Tech Controllers Setup 3](/custom_components/tech/images/ha-tech-add-integration-4.png)
![Tech Controllers Setup 3](./images/ha-tech-add-integration-4.png)

![Tech Controllers Setup 4](/custom_components/tech/images/ha-tech-2.png)
![Tech Controllers Setup 4](./images/ha-tech-2.png)

## :arrow_up: Migration to version 2

Expand Down
1 change: 1 addition & 0 deletions custom_components/tech/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""The Tech Controllers integration."""

import asyncio
import logging
import re
Expand Down
1 change: 1 addition & 0 deletions custom_components/tech/assets.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Assets for translations."""

import logging

from .const import DEFAULT_ICON, ICON_BY_ID, ICON_BY_TYPE, TXT_ID_BY_TYPE
Expand Down
1 change: 1 addition & 0 deletions custom_components/tech/binary_sensor.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Platform for binary sensor integration."""

import logging

from homeassistant.components import binary_sensor
Expand Down
1 change: 1 addition & 0 deletions custom_components/tech/climate.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Support for Tech HVAC system."""

import logging
from typing import Any, Optional

Expand Down
1 change: 1 addition & 0 deletions custom_components/tech/config_flow.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Config flow for Tech Sterowniki integration."""

import logging
from typing import List
import uuid
Expand Down
1 change: 1 addition & 0 deletions custom_components/tech/entity.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""TileEntity."""

from abc import abstractmethod
import logging
from typing import Any
Expand Down
1 change: 1 addition & 0 deletions custom_components/tech/sensor.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Support for Tech HVAC system."""

import itertools
import logging
from typing import Any, Dict
Expand Down
6 changes: 2 additions & 4 deletions custom_components/tech/tech.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Python wrapper for getting interaction with Tech devices."""

import asyncio
import json
import logging
Expand Down Expand Up @@ -112,10 +113,7 @@ async def authenticate(self, username, password):
"""
path = "authentication"
post_data = json.dumps({
"username": username,
"password": password
})
post_data = json.dumps({"username": username, "password": password})
try:
result = await self.post(path, post_data)
self.authenticated = result["authenticated"]
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
colorlog==6.7.0
homeassistant>=2024.3.0
pip>=21.0,<23.2
ruff==0.2.2
ruff==0.3.5
pre-commit
1 change: 1 addition & 0 deletions tests/common.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Common helpers."""

import pathlib


Expand Down
1 change: 1 addition & 0 deletions tests/tests_api/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""pytest fixtures."""

from collections.abc import AsyncGenerator
import json

Expand Down
1 change: 1 addition & 0 deletions tests/tests_api/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
(username: "test", password: "test").
"""

import json
import logging
from unittest.mock import AsyncMock, patch
Expand Down

0 comments on commit f9fce5b

Please sign in to comment.