mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 13:47:35 +00:00
Change touchline dependency to pytouchline_extended (#136362)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
This commit is contained in:
parent
fcffe5151d
commit
433c2cb43e
@ -4,7 +4,7 @@ from __future__ import annotations
|
|||||||
|
|
||||||
from typing import Any, NamedTuple
|
from typing import Any, NamedTuple
|
||||||
|
|
||||||
from pytouchline import PyTouchline
|
from pytouchline_extended import PyTouchline
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components.climate import (
|
from homeassistant.components.climate import (
|
||||||
@ -53,12 +53,13 @@ def setup_platform(
|
|||||||
"""Set up the Touchline devices."""
|
"""Set up the Touchline devices."""
|
||||||
|
|
||||||
host = config[CONF_HOST]
|
host = config[CONF_HOST]
|
||||||
py_touchline = PyTouchline()
|
py_touchline = PyTouchline(url=host)
|
||||||
number_of_devices = int(py_touchline.get_number_of_devices(host))
|
number_of_devices = int(py_touchline.get_number_of_devices())
|
||||||
add_entities(
|
devices = [
|
||||||
(Touchline(PyTouchline(device_id)) for device_id in range(number_of_devices)),
|
Touchline(PyTouchline(id=device_id, url=host))
|
||||||
True,
|
for device_id in range(number_of_devices)
|
||||||
)
|
]
|
||||||
|
add_entities(devices, True)
|
||||||
|
|
||||||
|
|
||||||
class Touchline(ClimateEntity):
|
class Touchline(ClimateEntity):
|
||||||
|
@ -6,5 +6,5 @@
|
|||||||
"iot_class": "local_polling",
|
"iot_class": "local_polling",
|
||||||
"loggers": ["pytouchline"],
|
"loggers": ["pytouchline"],
|
||||||
"quality_scale": "legacy",
|
"quality_scale": "legacy",
|
||||||
"requirements": ["pytouchline==0.7"]
|
"requirements": ["pytouchline_extended==0.4.5"]
|
||||||
}
|
}
|
||||||
|
2
requirements_all.txt
generated
2
requirements_all.txt
generated
@ -2497,7 +2497,7 @@ pytile==2024.12.0
|
|||||||
pytomorrowio==0.3.6
|
pytomorrowio==0.3.6
|
||||||
|
|
||||||
# homeassistant.components.touchline
|
# homeassistant.components.touchline
|
||||||
pytouchline==0.7
|
pytouchline_extended==0.4.5
|
||||||
|
|
||||||
# homeassistant.components.touchline_sl
|
# homeassistant.components.touchline_sl
|
||||||
pytouchlinesl==0.3.0
|
pytouchlinesl==0.3.0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user