hass-control4 icon indicating copy to clipboard operation
hass-control4 copied to clipboard

Can't configure binary_sensor

Open Crash09N opened this issue 1 year ago • 2 comments

I get this Error, when I try to configure the binary sensors. At the Moment only the Lights work with the integration.

Error while setting up control4 platform for binary_sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 356, in _async_setup_platform await asyncio.shield(awaitable) File "/config/custom_components/control4/binary_sensor.py", line 134, in async_setup_entry item_setup_info = await director.getItemSetup(item_id) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pyControl4/director.py", line 135, in getItemSetup return await self.sendPostRequest( ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pyControl4/director.py", line 99, in sendPostRequest await checkResponseForError(await resp.text()) File "/usr/local/lib/python3.12/site-packages/pyControl4/error_handling.py", line 123, in checkResponseForError raise exception(response_text) pyControl4.error_handling.C4Exception: { "error": "_0x238377[a19_0x8231(...)] is not a function" }

Crash09N avatar Apr 30 '24 22:04 Crash09N

Same issue here:

`Logger: homeassistant.components.binary_sensor Source: helpers/entity_platform.py:364 integration: Binary sensor (documentation, issues) First occurred: 9:39:31 PM (1 occurrences) Last logged: 9:39:31 PM

Error while setting up control4 platform for binary_sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 364, in _async_setup_platform await asyncio.shield(awaitable) File "/config/custom_components/control4/binary_sensor.py", line 134, in async_setup_entry item_setup_info = await director.getItemSetup(item_id) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pyControl4/director.py", line 135, in getItemSetup return await self.sendPostRequest( ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pyControl4/director.py", line 99, in sendPostRequest await checkResponseForError(await resp.text()) File "/usr/local/lib/python3.12/site-packages/pyControl4/error_handling.py", line 123, in checkResponseForError raise exception(response_text) pyControl4.error_handling.C4Exception: { "error": "_0x25401c.match is not a function" }`

simonk83 avatar Aug 04 '24 11:08 simonk83

I managed to fix this with the help of - https://github.com/lawtancool/hass-control4/issues/2#issuecomment-1850762656

But it's something that needs fixing in the pyControl4 library otherwise it'll happen again on the next update (or if the hass container gets recreated at some point)

simonk83 avatar Aug 06 '24 05:08 simonk83

Fixed in #29

lawtancool avatar Sep 01 '24 22:09 lawtancool