home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.78k stars 30.88k forks source link

Lupus Integration: Scan for Switches results in error #82936

Closed chrisi-taylor closed 1 year ago

chrisi-taylor commented 1 year ago

The problem

Dear Devolper-Team, I just started with HA and ran into a problem. I searched the internet without relevant results. Here is the issue: I placed integration information in the configuration.yaml file for my lupus alarmsystem (XT2 plus). But the integration only works for sensors not for power switches! Going deeper into the issue I discovered an error message:

Logger: homeassistant.components.switch

Source: components/lupusec/switch.py:33 Integration: Schalter (documentation, issues) First occurred: 14:41:51 (1 occurrences) Last logged: 14:41:51 Error while setting up lupusec platform for switch

Traceback (most recent call last): File "/usr/lib/python3.10/site-packages/homeassistant/helpers/entity_platform.py", line 281, in _async_setup_platform await asyncio.shield(task) File "/usr/lib/python3.10/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) File "/usr/lib/python3.10/site-packages/homeassistant/components/lupusec/switch.py", line 33, in setup_platform for device in data.lupusec.get_devices(generic_type=CONST.TYPE_SWITCH): File "/usr/lib/python3.10/site-packages/lupupy/init.py", line 272, in get_devices if device.type is not None and device.type in generic_type[0]: TypeError: 'in ' requires string as left operand, not int`

I am not really sure if this is an error in general, or if it is just triggered by specific circumstances concerning my environment. (The last changes in switch.py are quite a while ago and there are no messages from other users...) I have got about 70 devices linked to the lupus alarmsystem. Most of them are sensors (these are recognized by HA and displayed in the main dashboard). And there are several other devices like smoke detectors, PIR-sensors, thermostat devices which will not be passed on to HA. Finally there are more than 10 power switches (with and without metering) and 4 shutter relais. I think these should be passed on to HA, but they do not appear anywhere in the WebGUI. Is it possible that the switch.py-code can not handle a special type of power switch like the shutter relays?

Thank you very much for the whole effort you put into the project!

Kind regards

Chris

What version of Home Assistant Core has the issue?

core-2022.11.4

What was the last working version of Home Assistant Core?

no previus version - first install

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Lupusec

Link to integration documentation on our website

https://www.home-assistant.io/integrations/lupusec/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 1 year ago

Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration (switch) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `switch` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Change the title of the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign switch` Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


switch documentation switch source (message by IssueLinks)

home-assistant[bot] commented 1 year ago

Hey there @majuss, mind taking a look at this issue as it has been labeled with an integration (lupusec) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `lupusec` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Change the title of the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign lupusec` Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


lupusec documentation lupusec source (message by IssueLinks)

majuss commented 1 year ago

Hi @chrisi-taylor I'am the maintainer of lupupy and the HA integration. Switches are currently not supported, I'am sorry. I will work on a future lupupy release. The problem is always the hardware availability. Unfortunately I only have the base stations without any sensors etc.

chrisi-taylor commented 1 year ago

Hello @majuss,

okay I see…

On this website https://www.home-assistant.io/integrations/lupusec/ switches are mentioned…is it only in combination with XT1 base then?

Kind regards and many thanks Chris

Von: majuss @.> Gesendet: Dienstag, 29. November 2022 17:48 An: home-assistant/core @.> Cc: Schneider, Christian @.>; Mention @.> Betreff: Re: [home-assistant/core] Lupus Integration: Scan for Switches results in error (Issue #82936)

Hi @chrisi-taylorhttps://github.com/chrisi-taylor I'am the maintainer of lupupy and the HA integration. Switches are currently not supported, I'am sorry. I will work on a future lupupy release. The problem is always the hardware availability. Unfortunately I only have the base stations without any sensors etc.

— Reply to this email directly, view it on GitHubhttps://github.com/home-assistant/core/issues/82936#issuecomment-1330949254, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AHYJBDRJ7SM427G2ULKMDWDWKYXVNANCNFSM6AAAAAASOSK6FU. You are receiving this because you were mentioned.Message ID: @.**@.>>

Wichtiger Hinweis: Die Information in dieser E-Mail ist vertraulich. Sie ist ausschließlich für den Adressaten bestimmt. Sollten Sie nicht der für diese E-Mail bestimmte Adressat sein, unterrichten Sie bitte den Absender und vernichten Sie diese Mail. Vielen Dank. Unbeschadet der Korrespondenz per E-Mail, sind unsere Erklärungen ausschließlich final rechtsverbindlich, wenn sie in herkömmlicher Schriftform (mit eigenhändiger Unterschrift) oder durch Übermittlung eines solchen Schriftstücks per Telefax erfolgen.

Important note: The information included in this e-mail is confidential. It is solely intended for the recipient. If you are not the intended recipient of this e-mail please contact the sender and delete this message. Thank you. Without prejudice of e-mail correspondence, our statements are only legally binding when they are made in the conventional written form (with personal signature) or when such documents are sent by fax.

majuss commented 1 year ago

Yes currently they only work with the XT1. Maybe I can add them before christmas to lupupy.

chrisi-taylor commented 1 year ago

Hey, this is great news! :-)

Thank you for your efforts!


Von: majuss @.***> Gesendet: Montag, 5. Dezember 2022 13:13 An: home-assistant/core Cc: Schneider, Christian; Mention Betreff: Re: [home-assistant/core] Lupus Integration: Scan for Switches results in error (Issue #82936)

Yes currently they only work with the XT1. Maybe I can add them before christmas to lupupy.

— Reply to this email directly, view it on GitHubhttps://github.com/home-assistant/core/issues/82936#issuecomment-1337241368, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AHYJBDUPENBPE6AUQ7DD35TWLXL7XANCNFSM6AAAAAASOSK6FU. You are receiving this because you were mentioned.Message ID: @.***>

Wichtiger Hinweis: Die Information in dieser E-Mail ist vertraulich. Sie ist ausschließlich für den Adressaten bestimmt. Sollten Sie nicht der für diese E-Mail bestimmte Adressat sein, unterrichten Sie bitte den Absender und vernichten Sie diese Mail. Vielen Dank. Unbeschadet der Korrespondenz per E-Mail, sind unsere Erklärungen ausschließlich final rechtsverbindlich, wenn sie in herkömmlicher Schriftform (mit eigenhändiger Unterschrift) oder durch Übermittlung eines solchen Schriftstücks per Telefax erfolgen.

Important note: The information included in this e-mail is confidential. It is solely intended for the recipient. If you are not the intended recipient of this e-mail please contact the sender and delete this message. Thank you. Without prejudice of e-mail correspondence, our statements are only legally binding when they are made in the conventional written form (with personal signature) or when such documents are sent by fax.

majuss commented 1 year ago

@chrisi-taylor Hi chris I checked what I have, but I only got the "Funkrelais". https://www.lupus-electronics.de/shop/documents/XTPro_ger.pdf Page 84. This is utterly useless unfortunately... I guess you want integration for these things: https://shop.lupus-direkt.de/de/lupusec-funksteckdose-stromzaehler-xt2-plus.html?

If you could send it to me physically, I would be able to integrate it. Or if you provide me some kind of VPN? Otherwise it's really hard. Drop a mail: ich@majuss.de

issue-triage-workflows[bot] commented 1 year ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.