jeroenterheerdt / HAsmartirrigation

Smart Irrigation custom component for Home Assistant
https://jeroenterheerdt.github.io/HAsmartirrigation/
MIT License
367 stars 49 forks source link

[Bug] can't set options 0.0.32 #33

Closed ciechompl closed 4 years ago

ciechompl commented 4 years ago

Describe the bug after latest update when trying to open component options I'm getting infinite please wait (see screenshot) i did removed integration, component, rebooted, reinstalled component, re-added integration ... nothing better :)

To Reproduce Steps to reproduce the behavior:

  1. Go to 'conf->integration->smart irrigation -> options'

screenshot image

Error log

2020-06-05 23:25:18 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 418, in start
    resp = await task
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_app.py", line 458, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_middlewares.py", line 119, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/real_ip.py", line 39, in real_ip_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 73, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 127, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 125, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 186, in post
    return await super().post(request)
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 54, in wrapper
    result = await method(view, request, *args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 72, in post
    "show_advanced_options": data["show_advanced_options"],
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 129, in async_init
    flow, flow.init_step, data, init_done
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 201, in _async_handle_step
    result: Dict = await getattr(flow, method)(user_input)
  File "/config/custom_components/smart_irrigation/config_flow.py", line 365, in async_step_init
    return await self.async_step_user()
  File "/config/custom_components/smart_irrigation/config_flow.py", line 492, in async_step_user
    return await self._show_options_form(user_input)
  File "/config/custom_components/smart_irrigation/config_flow.py", line 399, in _show_options_form
    CONF_CHANGE_PERCENT * 100.0, DEFAULT_CHANGE_PERCENT * 100.0
TypeError: can't multiply sequence by non-int of type 'float'

Installed version 0.0.32

Additional context sensors seems to be ok:

image image image

jeroenterheerdt commented 4 years ago

thanks - fixed in v0.0.34

ciechompl commented 4 years ago

thx ... 0.0.34 solved bug :)

jeroenterheerdt commented 4 years ago

:) thanks. I was already working on it, so that's why I was this fast :)

ciechompl commented 4 years ago

in general you are fast like hell :) amazing :)