Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speedtest fails to setup on my system #17352

Closed
kennedyshead opened this issue Oct 12, 2018 · 5 comments · Fixed by #17452
Closed

Speedtest fails to setup on my system #17352

kennedyshead opened this issue Oct 12, 2018 · 5 comments · Fixed by #17452

Comments

@kennedyshead
Copy link
Contributor

Home Assistant release with the issue:

0.81.0.dev0

Last working Home Assistant release (if known):

Operating environment (Hass.io/Docker/Windows/etc.):

cat /proc/version
Linux version 4.15.0-34-generic (buildd@lgw01-amd64-047) (gcc version 7.3.0 (Ubuntu 7.3.0-16ubuntu3)) #37-Ubuntu SMP Mon Aug 27 15:21:48 UTC 2018

Component/platform:

https://www.home-assistant.io/components/sensor.speedtest/

Description of problem:
The platform can not be setup without the "day" config

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

- platform: speedtest
  monitored_conditions:
    - ping
    - download
    - upload

Traceback (if applicable):

Traceback (most recent call last):
  File "/home/knutas/src/home-assistant/env/lib/python3.6/site-packages/homeassistant-0.81.0.dev0-py3.6.egg/homeassistant/helpers/entity_platform.py", line 128, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
    return fut.result()
  File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/knutas/src/home-assistant/env/lib/python3.6/site-packages/homeassistant-0.81.0.dev0-py3.6.egg/homeassistant/components/sensor/speedtest.py", line 65, in setup_platform
    data = SpeedtestData(hass, config)
  File "/home/knutas/src/home-assistant/env/lib/python3.6/site-packages/homeassistant-0.81.0.dev0-py3.6.egg/homeassistant/components/sensor/speedtest.py", line 160, in __init__
    day=config.get(CONF_DAY))
  File "/home/knutas/src/home-assistant/env/lib/python3.6/site-packages/homeassistant-0.81.0.dev0-py3.6.egg/homeassistant/helpers/event.py", line 28, in factory
    hass.loop, ft.partial(async_factory, *args, **kwargs)).result()
  File "/usr/lib/python3.6/concurrent/futures/_base.py", line 432, in result
    return self.__get_result()
  File "/usr/lib/python3.6/concurrent/futures/_base.py", line 384, in __get_result
    raise self._exception
  File "/home/knutas/src/home-assistant/env/lib/python3.6/site-packages/homeassistant-0.81.0.dev0-py3.6.egg/homeassistant/util/async_.py", line 195, in run_callback
    future.set_result(callback(*args))
TypeError: async_track_time_change() got an unexpected keyword argument 'day'

Additional information:

@kennedyshead
Copy link
Contributor Author

This is actually related to #17199

It was stated in that merge that these where not used, but it seems that statement is incorrect

@amelchio
Copy link
Contributor

Cc @OttoWinter

@OttoWinter
Copy link
Member

Oh yes, that's a bug. I was looking for all uses of the base method, but forgot to look for the uses of each base method too 🤔

The problem is that day wil be a bit hard to implement, and would complicate future efforts to introduce day_of_week triggers. It's still possible, and I will evaluate if this day_of_month option will be easy to re-implement as a fix.

On the other hand though, I can't imagine many people are using the day option... Why would you run a speed test only on specific days of the month. I mean only running speed tests on some days of the week would kinda still make sense, but day of month seems a bit odd to me. Seems like an option that was just introduced "because you can" (here)

What would you think about just removing that option as a breaking change? I mean users can still manually trigger the speedtest with automations if they really need to.

@amelchio
Copy link
Contributor

@OttoWinter I think that would be fine, it actually seems like the entire timer configuration in the speedtest sensor could just be delegated to automations.

@kennedyshead
Copy link
Contributor Author

I agree, who would ever want to have a test a specific day every month?

@ghost ghost added the in progress label Oct 14, 2018
@ghost ghost removed the in progress label Oct 14, 2018
@home-assistant home-assistant locked and limited conversation to collaborators Feb 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants