Change touchline dependency to pytouchline_extended (#136362)

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
This commit is contained in:
Peter Brøndum 2025-02-25 17:00:35 +01:00 committed by GitHub
parent fcffe5151d
commit 433c2cb43e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 10 additions and 9 deletions

View File

@ -4,7 +4,7 @@ from __future__ import annotations
from typing import Any, NamedTuple
from pytouchline import PyTouchline
from pytouchline_extended import PyTouchline
import voluptuous as vol
from homeassistant.components.climate import (
@ -53,12 +53,13 @@ def setup_platform(
"""Set up the Touchline devices."""
host = config[CONF_HOST]
py_touchline = PyTouchline()
number_of_devices = int(py_touchline.get_number_of_devices(host))
add_entities(
(Touchline(PyTouchline(device_id)) for device_id in range(number_of_devices)),
True,
)
py_touchline = PyTouchline(url=host)
number_of_devices = int(py_touchline.get_number_of_devices())
devices = [
Touchline(PyTouchline(id=device_id, url=host))
for device_id in range(number_of_devices)
]
add_entities(devices, True)
class Touchline(ClimateEntity):

View File

@ -6,5 +6,5 @@
"iot_class": "local_polling",
"loggers": ["pytouchline"],
"quality_scale": "legacy",
"requirements": ["pytouchline==0.7"]
"requirements": ["pytouchline_extended==0.4.5"]
}

2
requirements_all.txt generated
View File

@ -2497,7 +2497,7 @@ pytile==2024.12.0
pytomorrowio==0.3.6
# homeassistant.components.touchline
pytouchline==0.7
pytouchline_extended==0.4.5
# homeassistant.components.touchline_sl
pytouchlinesl==0.3.0