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

AttributeError: 'EcoVentFan' object has no attribute '_device_search' #5

Open
jreidel opened this issue Sep 29, 2022 · 10 comments
Open

Comments

@jreidel
Copy link

jreidel commented Sep 29, 2022

Hi,

I just tried the component on my Twinfresh fan, but get an error. I'm not sure if it's not compatible or if this something I can fix. Any idea?

2022-09-29 08:36:39.213 ERROR (MainThread) [homeassistant.components.fan] Error while setting up ecovent platform for fan
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 281, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/ecovent/fan.py", line 77, in async_setup_platform
fan = EcoVentFan(
File "/config/custom_components/ecovent/fan.py", line 270, in init
self._id = self.device_search
File "/config/custom_components/ecovent/fan.py", line 935, in device_search
return self._device_search
AttributeError: 'EcoVentFan' object has no attribute '_device_search'

@49jan
Copy link
Owner

49jan commented Oct 1, 2022

Can you send your configuration for the fan?

@jreidel
Copy link
Author

jreidel commented Oct 2, 2022

It's very simple, just this in configuration.yaml

fan:
  - platform: ecovent
    ip_address: "192.168.86.99"
    name: Tobias

The fan is working in various "standard" apps, such as Blauberg Vento and Twinfresh.

@49jan
Copy link
Owner

49jan commented Oct 11, 2022

It looks like it can't find the device id. Do you see the DeviceID through the apps on your phone? If so, I would suggest that you enter the "device_id" in the config and check if it works for you.

Otherwise, try to enter a random device ID and see if it works for you in this case.

Please reply back with your findings and I'll see if I can do anything on the code to make it easier to use.

@euinor
Copy link

euinor commented Nov 25, 2022

I had the same error, so I added the device ID as suggested, now I get this error.

Logger: homeassistant.components.fan
Source: custom_components/ecovent/fan.py:705
Integration: Fan (documentation, issues)
First occurred: 13:21:30 (2 occurrences)
Last logged: 13:21:30

Error adding entities for domain fan with platform ecovent
Error while setting up ecovent platform for fan
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 428, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 692, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 788, in add_to_platform_finish
    await self.async_added_to_hass()
  File "/config/custom_components/ecovent/fan.py", line 287, in async_added_to_hass
    self.state,
  File "/config/custom_components/ecovent/fan.py", line 705, in state
    return self._state
AttributeError: 'EcoVentFan' object has no attribute '_state'

Configuration.yaml looks like this

fan:
  - platform: ecovent
    name: Master Bedroom dMVHR
    ip_address: "192.168.0.22"
    device id: "002E0026424357139"

Edit: just noticed I got the IP wrong. I've updated it and restarted but still same error. Fan entity exists now but is on state unavailable.

@avassdal
Copy link

I have the exact same error as this.

aglehmann's version works though

@janegilring
Copy link

I initially got this error:

2022-12-21 08:22:37.292 ERROR (MainThread) [homeassistant.components.fan] Error while setting up ecovent platform for fan
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 281, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/ecovent/fan.py", line 77, in async_setup_platform
    fan = EcoVentFan(
  File "/config/custom_components/ecovent/fan.py", line 270, in __init__
    self._id = self.device_search
  File "/config/custom_components/ecovent/fan.py", line 935, in device_search
    return self._device_search
AttributeError: 'EcoVentFan' object has no attribute '_device_search'

I then added a device id as suggested:

fan:
  - platform: ecovent
    name: Basement fan
    ip_address: "10.0.1.154"
    device_id: "85481286"

Now the error is:

2022-12-21 08:28:38.390 ERROR (MainThread) [homeassistant.components.fan] Error adding entities for domain fan with platform ecovent
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 428, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 692, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 788, in add_to_platform_finish
    await self.async_added_to_hass()
  File "/config/custom_components/ecovent/fan.py", line 287, in async_added_to_hass
    self.state,
  File "/config/custom_components/ecovent/fan.py", line 705, in state
    return self._state
AttributeError: 'EcoVentFan' object has no attribute '_state'

@49jan
Copy link
Owner

49jan commented Jan 2, 2023

Please update to version 1.3, the problem should be fixed.

@janegilring
Copy link

janegilring commented Apr 13, 2023

Thanks, I just upgraded to 1.3.

Now the error changed to:

File "/config/custom_components/ecovent/fan.py", line 1123, in unit_type return self._unit_type
AttributeError: 'EcoVentFan' object has no attribute '_unit_type'

@janegilring
Copy link

I just tried to setup the integration once more in a new instance of HA, but the error remains the same.

Did anyone get this working?

@awisur
Copy link

awisur commented Jan 10, 2024

Anyone?

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

6 participants