Skip to content

Commit f9fce5b

Browse files
authored
Merge pull request #80 from daroga0002/reorg
Small tuning of different things
2 parents 8f5dd06 + eec29cb commit f9fce5b

29 files changed

+21
-13
lines changed

.devcontainer.json

-1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,5 @@
3838
},
3939
"remoteUser": "vscode",
4040
"features": {
41-
"ghcr.io/devcontainers/features/rust:1": {}
4241
}
4342
}

.github/scripts/update_hacs_manifest.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Update the manifest file."""
2+
23
import json
34
import os
45
import sys

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
33
# Ruff version.
4-
rev: v0.2.2
4+
rev: v0.3.5
55
hooks:
66
# Run the linter.
77
- id: ruff
File renamed without changes.

README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Platform | Description
4646
`sensor` | Show info and status from Tech API.
4747
`climate` | Thermostats.
4848

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

5151
## :pencil2: Plans for development
5252

@@ -71,15 +71,15 @@ Platform | Description
7171
1. You should see "Success!" dialog with the name of the imported controller(s).
7272
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.
7373

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

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

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

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

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

8484
## :arrow_up: Migration to version 2
8585

custom_components/tech/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""The Tech Controllers integration."""
2+
23
import asyncio
34
import logging
45
import re

custom_components/tech/assets.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Assets for translations."""
2+
23
import logging
34

45
from .const import DEFAULT_ICON, ICON_BY_ID, ICON_BY_TYPE, TXT_ID_BY_TYPE

custom_components/tech/binary_sensor.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Platform for binary sensor integration."""
2+
23
import logging
34

45
from homeassistant.components import binary_sensor

custom_components/tech/climate.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Support for Tech HVAC system."""
2+
23
import logging
34
from typing import Any, Optional
45

custom_components/tech/config_flow.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Config flow for Tech Sterowniki integration."""
2+
23
import logging
34
from typing import List
45
import uuid

custom_components/tech/entity.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""TileEntity."""
2+
23
from abc import abstractmethod
34
import logging
45
from typing import Any

custom_components/tech/sensor.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Support for Tech HVAC system."""
2+
23
import itertools
34
import logging
45
from typing import Any, Dict

custom_components/tech/tech.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Python wrapper for getting interaction with Tech devices."""
2+
23
import asyncio
34
import json
45
import logging
@@ -112,10 +113,7 @@ async def authenticate(self, username, password):
112113
113114
"""
114115
path = "authentication"
115-
post_data = json.dumps({
116-
"username": username,
117-
"password": password
118-
})
116+
post_data = json.dumps({"username": username, "password": password})
119117
try:
120118
result = await self.post(path, post_data)
121119
self.authenticated = result["authenticated"]
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.

requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
colorlog==6.7.0
22
homeassistant>=2024.3.0
33
pip>=21.0,<23.2
4-
ruff==0.2.2
4+
ruff==0.3.5
55
pre-commit

tests/common.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Common helpers."""
2+
23
import pathlib
34

45

tests/tests_api/conftest.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""pytest fixtures."""
2+
23
from collections.abc import AsyncGenerator
34
import json
45

tests/tests_api/test_api.py

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
(username: "test", password: "test").
55
66
"""
7+
78
import json
89
import logging
910
from unittest.mock import AsyncMock, patch

0 commit comments

Comments
 (0)