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

error in new version #16

Open
ppnacho opened this issue Jun 4, 2021 · 14 comments
Open

error in new version #16

ppnacho opened this issue Jun 4, 2021 · 14 comments

Comments

@ppnacho
Copy link

ppnacho commented Jun 4, 2021

Este error se originó a partir de una integración personalizada.

Logger: homeassistant.config
Source: custom_components/ssh/sensor.py:18
Integration: ssh (documentation)
First occurred: 11:25:16 (5 occurrences)
Last logged: 11:25:16

Platform error: sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config.py", line 853, in async_process_component_config
platform = p_integration.get_platform(domain)
File "/usr/src/homeassistant/homeassistant/loader.py", line 498, in get_platform
cache[full_name] = self._import_platform(platform_name)
File "/usr/src/homeassistant/homeassistant/loader.py", line 503, in _import_platform
return importlib.import_module(f"{self.pkg_path}.{platform_name}")
File "/usr/local/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "", line 783, in exec_module
File "", line 219, in _call_with_frames_removed
File "/config/custom_components/ssh/sensor.py", line 18, in
from homeassistant.const import (
ImportError: cannot import name 'CONF_SCAN' from 'homeassistant.const' (/usr/src/homeassistant/homeassistant/const.py)

@ppnacho
Copy link
Author

ppnacho commented Jun 4, 2021

CONF_SCAN don't defined in sensor.py. When I define this variable I have an error and if the variable don't defined there are another errors.

@janjbrand
Copy link

I had to remove this component to fix HA, many sensors weren't available. There is certainly something wrong, most likely with CONF_SCAN.

@jaydenthorup
Copy link

Same thing, had to remove the component to get ALL sensors on my HA to run again.

@klona
Copy link

klona commented Jun 6, 2021

Hi, same trouble.
core-2021.6.2
I had to remove all sensors - platform: ssh from configuration to get HA working back.

@ppnacho
Copy link
Author

ppnacho commented Jun 6, 2021

I have change to the previous version and the sensors work OK.

@edersong
Copy link

edersong commented Jun 6, 2021

Same issue here!!

@jaydenthorup
Copy link

Hi, same trouble.
core-2021.6.2
I had to remove all sensors - platform: ssh from configuration to get HA working back.

I did the same and HA is working. If I un-comment and check configuration, it will just sit and spin and never complete the configuration check.

@johny-mnemonic
Copy link

johny-mnemonic commented Jun 8, 2021

Same issue here, it completely breaks HA.
How to go back to previous version? I don't see any other version than 1.14 neither in HACS nor here on Github :-(

@jaydenthorup
Copy link

jaydenthorup commented Jun 8, 2021

I fixed mine for now. Defined SCAN_INTERVAL just below "DOMAIN = 'sensor'", changed self.scan to line below and commented out the # shown below in "/config/custom_components/ssh/sensor.py" Might be a bit hacky, but it worked for me.

DOMAIN = 'sensor'

SCAN_INTERVAL = timedelta(seconds=30)

        self._scan = config.get(MIN_TIME_BETWEEN_UPDATES)


#    vol.Optional(CONF_SCAN, default=MIN_TIME_BETWEEN_UPDATES): cv.string,

#    @Throttle(self._scan)

I also had to define unit_of_measure as blank

  - platform: ssh
    host: myhostaddy
    name: 'my variable name'
    username: myuser
    password: mypassword
    command: "/home/user/whatsmyip.sh"
    value_template: >-
        {%- set line = value.split("\r\n") -%}
        {{ line[1] }}
    unit_of_measurement: ""

@johny-mnemonic
Copy link

@jchasey Would you be please able to tag commit df821269e0a158e2c9f430496f97f4f19608b9d5 as some older version (i.e. 1.13) so that people can easily downgrade till this issue gets fixed? Thanks a lot!

@jchasey
Copy link
Collaborator

jchasey commented Jun 9, 2021

Tagged version to 1.13

@johny-mnemonic
Copy link

@jchasey Thanks!
Unfortunately it doesn't seems to be that simple:-(
To make it working with the latest HA we need #15, because without version in the manifest, the extension is ignored.
But as the breaking change was merged before it in #9, we need proper fix or revert of that breaking change...

@jchasey
Copy link
Collaborator

jchasey commented Jun 9, 2021

New release with reversion of the scan interval changes

@johny-mnemonic
Copy link

It works!
Thanks a million!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants