找回密码
 立即注册

微信扫码登录

搜索
查看: 47620|回复: 137

[插件集成] 南方电网电费数据集成,支持短信验证码和扫码登陆

 火... [复制链接]

0

主题

29

回帖

548

积分

高级会员

积分
548
金钱
519
HASS币
0
发表于 2022-11-19 15:08:56 | 显示全部楼层
点添加已绑定的缴费号时候出现 Unknown error occurred
回复

使用道具 举报

0

主题

29

回帖

548

积分

高级会员

积分
548
金钱
519
HASS币
0
发表于 2022-11-20 09:20:48 | 显示全部楼层
cubicpill 发表于 2022-11-19 21:56
可以麻烦发一下日志吗?我感觉可能对于不同省份有些返回结构不一定一样,我只测试过广东的 ...

我也是广东的



Logger: aiohttp.server
Source: custom_components/china_southern_power_grid_stat/csg_client/__init__.py:523
Integration: China Southern Power Grid Statistics (documentation, issues)
First occurred: 09:15:33 (3 occurrences)
Last logged: 09:16:54
Error handling request

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 435, 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 60, in security_filter_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, 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 82, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 136, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 241, in post
    return await super().post(request, flow_id)
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 73, 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 280, 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/china_southern_power_grid_stat/config_flow.py", line 175, in async_step_init
    return await self.async_step_add_account()
  File "/config/custom_components/china_southern_power_grid_stat/config_flow.py", line 232, in async_step_add_account
    accounts = await self.hass.async_add_executor_job(
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/china_southern_power_grid_stat/csg_client/__init__.py", line 523, in get_all_electricity_accounts
    AreaCode(item["areaCode"]),
  File "/usr/local/lib/python3.10/enum.py", line 385, in __call__
    return cls.__new__(cls, value)
  File "/usr/local/lib/python3.10/enum.py", line 710, in __new__
    raise ve_exc
ValueError: '032000' is not a valid AreaCode

回复

使用道具 举报

0

主题

29

回帖

548

积分

高级会员

积分
548
金钱
519
HASS币
0
发表于 2022-11-20 19:34:09 | 显示全部楼层
cubicpill 发表于 2022-11-20 15:57
已经修复,麻烦更新一下看看是否解决?

已经可以了·····
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian ( 晋ICP备17001384号-1 )

GMT+8, 2025-9-11 03:51 , Processed in 0.302323 second(s), 7 queries , MemCached On.

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

快速回复 返回顶部 返回列表