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 '_unit_type' #10

Open
euinor opened this issue Jan 5, 2023 · 9 comments
Open

AttributeError: 'EcoVentFan' object has no attribute '_unit_type' #10

euinor opened this issue Jan 5, 2023 · 9 comments

Comments

@euinor
Copy link

euinor commented Jan 5, 2023

I'm getting the below error with ver 1.3. The fan entity is created but unavailable.

Logger: homeassistant.components.fan
Source: custom_components/ecovent/fan.py:1123
Integration: Fan (documentation, issues)
First occurred: 4 January 2023 at 22:46:42 (2 occurrences)
Last logged: 4 January 2023 at 22:46:43

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 789, in add_to_platform_finish
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 545, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 586, in _async_write_ha_state
    attr.update(self.extra_state_attributes or {})
  File "/config/custom_components/ecovent/fan.py", line 400, in extra_state_attributes
    data[ATTR_UNIT_TYPE] = self.unit_type
  File "/config/custom_components/ecovent/fan.py", line 1123, in unit_type
    return self._unit_type
AttributeError: 'EcoVentFan' object has no attribute '_unit_type'

This is my config

fan:
  - platform: ecovent
    name: Master Bedroom dMVHR 
    ip_address: " 192.168.0.22" 
    device_id: "002E002642435713"
@jreidel
Copy link

jreidel commented Jan 5, 2023

Similiar error. I think I have a v1 TwinFresh fan, maybe it's not supported? What kind of fan do you have @euinor ?

@euinor
Copy link
Author

euinor commented Jan 5, 2023

It is a Blauberg VENTO EXPERT A50-1 S10 W V.2. The A50 is not explicitly supported but it should be the same as the supported Blauberg fans. I do have an A30 and an A30 DUO so maybe I'll try those.

@49jan
Copy link
Owner

49jan commented Jan 5, 2023

What version of HA are you using?

@euinor
Copy link
Author

euinor commented Jan 5, 2023

This is with 2023.1.0

@yarosman
Copy link

Have same issues with A100 on 2023.3.5

@kondrikserg
Copy link

And i have similar error with _unit_type

@archipita
Copy link

I am trying to use this extension as well and I have the same error with unite_type.
Commenting out this line in fan.py, I get the error on the next parameter (airflow).
The first two are working (airflows and id).
Can it be that there are changes with the parameters' names?
My HA is 2023.11.6 and the integration is v1.3.

@MrOzzOnline
Copy link

MrOzzOnline commented Dec 4, 2023

same issue here

AttributeError: 'EcoVentFan' object has no attribute '_unit_type'
2023-12-04 17:46:57.819 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 367, in _async_setup_platform
await asyncio.gather(*pending)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 507, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 752, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1023, in add_to_platform_finish
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 743, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 843, in _async_write_ha_state
state, attr = self._async_generate_attributes()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 787, in _async_generate_attributes
attr.update(self.extra_state_attributes or {})
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/ecovent/fan.py", line 400, in extra_state_attributes
data[ATTR_UNIT_TYPE] = self.unit_type
^^^^^^^^^^^^^^
File "/config/custom_components/ecovent/fan.py", line 1123, in unit_type
return self._unit_type

@awisur
Copy link

awisur commented Jan 9, 2024

Same issue still, just got two of theese installed. Please fix =)

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 507, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 752, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1278, in add_to_platform_finish
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 941, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1062, in _async_write_ha_state
state, attr, capabilities, shadowed_attr = self.__async_calculate_state()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1002, in __async_calculate_state
attr.update(self.extra_state_attributes or {})
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/ecovent/fan.py", line 400, in extra_state_attributes
data[ATTR_UNIT_TYPE] = self.unit_type
^^^^^^^^^^^^^^
File "/config/custom_components/ecovent/fan.py", line 1123, in unit_type
return self._unit_type
^^^^^^^^^^^^^^^
AttributeError: 'EcoVentFan' object has no attribute '_unit_type'

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

8 participants