dentra / ha-kvarta-c Goto Github PK
View Code? Open in Web Editor NEWHome Assistant Kvarta-C integration
License: MIT License
Home Assistant Kvarta-C integration
License: MIT License
При попытке добавления интеграции выскакивает неизвестная ошибка.
По логу, скорее всего проблема с количеством сервисов и их номеров. т.к. в учете 3 счетчика, один из них счетчик тепла на отопление.
Прикладываю часть лога.
2023-04-27 16:38:10.302 DEBUG (MainThread) [custom_components.kvartac.kvartac_api] POST https://www.kvarta-c.ru/voda.php?action=login: {'action': 'login', 'subaction': 'enter', 'usertype': 'tenant', 'tsgid': '----', 'accountid': '----000----', 'password': '----'}
2023-04-27 16:38:10.862 DEBUG (MainThread) [custom_components.kvartac.kvartac_api] Parsing account
2023-04-27 16:38:10.862 DEBUG (MainThread) [custom_components.kvartac.kvartac_api] Account ID: ---000---
2023-04-27 16:38:10.862 DEBUG (MainThread) [custom_components.kvartac.kvartac_api] Account: СПб, пр-т --------, д.--, корп..- кв. ---
2023-04-27 16:38:10.862 DEBUG (MainThread) [custom_components.kvartac.kvartac_api] Organisation: Управляющая компания
2023-04-27 16:38:10.862 DEBUG (MainThread) [custom_components.kvartac.kvartac_api] Previous save date: 24.04.2023
2023-04-27 16:38:10.867 DEBUG (MainThread) [custom_components.kvartac.kvartac_api] Found 7 services
2023-04-27 16:38:10.867 DEBUG (MainThread) [custom_components.kvartac.kvartac_api] Parsing service 1
2023-04-27 16:38:10.868 DEBUG (MainThread) [custom_components.kvartac.kvartac_api] Parsing counter for "ХВС" at 12
2023-04-27 16:38:10.868 DEBUG (MainThread) [custom_components.kvartac.kvartac_api] Counter service1counter1[0190---]=183
2023-04-27 16:38:10.869 DEBUG (MainThread) [custom_components.kvartac.kvartac_api] Parsing service 2
2023-04-27 16:38:10.869 DEBUG (MainThread) [custom_components.kvartac.kvartac_api] Parsing counter for "Компонент на ХВ" at 17
2023-04-27 16:38:10.869 DEBUG (MainThread) [custom_components.kvartac.kvartac_api] Counter service6counter1[0181---]=168
2023-04-27 16:38:10.869 DEBUG (MainThread) [custom_components.kvartac.kvartac_api] Parsing service 3
2023-04-27 16:38:10.869 DEBUG (MainThread) [custom_components.kvartac.kvartac_api] Parsing counter for "Отопление" at 22
2023-04-27 16:38:10.869 DEBUG (MainThread) [custom_components.kvartac.kvartac_api] Counter service7counter1[17-012---]=23.872
2023-04-27 16:38:10.870 DEBUG (MainThread) [custom_components.kvartac.kvartac_api] Parsing service 4
2023-04-27 16:38:10.870 DEBUG (MainThread) [custom_components.kvartac.kvartac_api] Parsing counter for "Нет счетчиков? - Обратитесь в бухгалтерию вашей организации.
Телефоны вашей бухгалтерии обычно указаны на счете (квитанции)." at 27
2023-04-27 16:38:10.870 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request
resp = await request_handler(request)
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 117, in impl
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 85, in security_filter_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 227, in forwarded_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 80, in ban_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 235, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 146, in handle
result = await result
File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 180, in post
return await super().post(request, flow_id)
File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 72, in wrapper
result = await method(view, request, data, *args, **kwargs)
File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 110, in post
result = await self._flow_mgr.async_configure(flow_id, data)
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 271, in async_configure
result = await self._async_handle_step(
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 367, in _async_handle_step
result: FlowResult = await getattr(flow, method)(user_input)
File "/config/custom_components/kvartac/config_flow.py", line 75, in async_step_user
info = await validate_input(self.hass, user_input)
File "/config/custom_components/kvartac/config_flow.py", line 58, in validate_input
await api.async_fetch()
File "/config/custom_components/kvartac/kvartac_api.py", line 195, in async_fetch
await self._async_fetch()
File "/config/custom_components/kvartac/kvartac_api.py", line 169, in _async_fetch
res = self._parse_html(content)
File "/config/custom_components/kvartac/kvartac_api.py", line 145, in _parse_html
self._parse_service(links, i + 1, 11 + (i * 5))
File "/config/custom_components/kvartac/kvartac_api.py", line 119, in _parse_service
self._parse_counter(links, service, start_index)
File "/config/custom_components/kvartac/kvartac_api.py", line 78, in _parse_counter
counter = links[start_index + 1].find("input")
IndexError: list index out of range
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.