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

OverkizNumber' object has no attribute '_attr_min_value' #665

Closed
1 task done
Mariusthvdb opened this issue Dec 7, 2021 · 13 comments · Fixed by #667
Closed
1 task done

OverkizNumber' object has no attribute '_attr_min_value' #665

Mariusthvdb opened this issue Dec 7, 2021 · 13 comments · Fixed by #667
Labels
bug Something isn't working no-issue-activity

Comments

@Mariusthvdb
Copy link

Did you read the instructions?

The problem

see error log

What version of this integration (ha-tahoma) has the issue?

2.9.3

What version of Home Assistant Core has the issue?

2022.1.0dev

Which gateway / hub do you use?

Somfy Tahoma

Device model

No response

Home Assistant log

2021-12-07 13:51:38 ERROR (MainThread) [homeassistant.components.number] Error adding entities for domain number with platform tahoma
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 382, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 513, in _async_add_entity
    capabilities=entity.capability_attributes,
  File "/usr/src/homeassistant/homeassistant/components/number/__init__.py", line 114, in capability_attributes
    ATTR_MIN: self.min_value,
  File "/config/custom_components/tahoma/number.py", line 82, in min_value
    return self.entity_description.min_value or self._attr_min_value
AttributeError: 'OverkizNumber' object has no attribute '_attr_min_value'
2021-12-07 13:51:38 ERROR (MainThread) [homeassistant.components.number] Error while setting up tahoma platform for number
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 257, in _async_setup_platform
    await asyncio.gather(*pending)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 382, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 513, in _async_add_entity
    capabilities=entity.capability_attributes,
  File "/usr/src/homeassistant/homeassistant/components/number/__init__.py", line 114, in capability_attributes
    ATTR_MIN: self.min_value,
  File "/config/custom_components/tahoma/number.py", line 82, in min_value
    return self.entity_description.min_value or self._attr_min_value
AttributeError: 'OverkizNumber' object has no attribute '_attr_min_value'

Additional information

No response

@Mariusthvdb Mariusthvdb added the bug Something isn't working label Dec 7, 2021
@tetienne
Copy link
Collaborator

tetienne commented Dec 7, 2021

Hi,

Thx for reporting this. We will take care of it.

@iMicknl
Copy link
Owner

iMicknl commented Dec 7, 2021

Fixed in #667. However, I am not sure when we will release this, since this is only broken in 2022.1.0dev which is not a production version.

We could add extra code to check the environment, but for now, I will just keep the PR open.

@Mariusthvdb
Copy link
Author

Mariusthvdb commented Dec 7, 2021

cool, Ill edit the files manually, and see if all is well.
thanks for the swift response

wait, I believe more has been changed since 2.9.3 than only these 2 lines....

btw, isnt the HA dev in sync with current HA beta?

@iMicknl
Copy link
Owner

iMicknl commented Dec 7, 2021

The conflicting change (home-assistant/core#61100) has been merged yesterday, which means it is not in the 2021.12 anymore if I am not mistaken.

@Mariusthvdb
Copy link
Author

hmm, using the latest dev still shows:

2021-12-08 12:07:59 ERROR (MainThread) [homeassistant.components.number] Error while setting up tahoma platform for number
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 257, in _async_setup_platform
await asyncio.gather(*pending)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 382, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 513, in _async_add_entity
capabilities=entity.capability_attributes,
File "/usr/src/homeassistant/homeassistant/components/number/__init__.py", line 114, in capability_attributes
ATTR_MIN: self.min_value,
File "/config/custom_components/tahoma/number.py", line 82, in min_value
return self.entity_description.min_value or self._attr_min_value
AttributeError: 'OverkizNumber' object has no attribute '_attr_min_value'

@iMicknl
Copy link
Owner

iMicknl commented Dec 8, 2021

What do you mean with latest dev? The latest dev is 2022.1?

@Mariusthvdb
Copy link
Author

Mariusthvdb commented Dec 8, 2021

Sorry, I meant dev nightly 2022.1.0.dev20211208

@iMicknl
Copy link
Owner

iMicknl commented Dec 8, 2021

Did you use the updated code?

@Mariusthvdb
Copy link
Author

Mariusthvdb commented Dec 8, 2021

no, I havent updated, because I am not sure which file to use? do you have a link possibly to the updated integration files?
unless this is it: https://github.com/iMicknl/ha-tahoma/tree/fix/665 ?
let me give it a swirl

@iMicknl
Copy link
Owner

iMicknl commented Dec 8, 2021

If you didn't update, than it won't be fixed for sure 😉. You can use https://github.com/iMicknl/ha-tahoma/archive/refs/heads/fix/665.zip, extract this file and place custom_components/tahoma in your custom_components folder.

@Mariusthvdb
Copy link
Author

Mariusthvdb commented Dec 8, 2021

thanks, and yes, the linked fix/655 fixes it ;-)
no more errors in the log for now...

cool.

@Mariusthvdb
Copy link
Author

Mariusthvdb commented Dec 9, 2021

sorry, to nuance the phrase above (no more errors) just letting you know that:

2021-12-09 10:10:56 WARNING (MainThread) [homeassistant.helpers.frame] Detected integration that accessed discovery_info['hostname'] instead of discovery_info.hostname; this will fail in version 2022.6. Please report issue to the custom component author for tahoma using this method at custom_components/tahoma/config_flow.py, line 129: hostname = discovery_info[HOSTNAME]

is still there

Aware #662 but just to be sure my message above didnt lead to confusion... ;-)

@github-actions
Copy link

github-actions bot commented Jan 9, 2022

'There hasn't been any activity on this issue recently. Is this issue still present?
Please make sure to update to the latest Home Assistant version and version of this integration to see if that solves the issue. Let us know if that works for you by adding a comment 👍.
This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working no-issue-activity
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants