Broadlink S1C Alarm Kit Custom Sensor Component

Did you add at yaml
sensor:

  • platform: broadlink_s1c
    and other parameters?

Yes, everything worked for a long time, I don’t remember what I did, but the sensor appeared in the system. thanks

1 Like

Hello, I installed the Broadlink S1c via hacs, but it does not detect my door sensors, I am sharing the error code I received, I would be happy if you could help.

Please, try to rename your sensor.

Please update “Broadlink s2c and s1c sensors” from HACS to remove warning

device_state_attributes now deprecated · nick2525/broadlink_s1c_s2c@70c75ee · GitHub I updated version in HACS to remove warning “implements device_state_attributes. Please report it to the custom component author.” which will appear in HA 2021.12

from code of HA # Warning added in 2021.12, will be removed in 2022.4", (core/entity.py at d64bf3cc6c6a1fc43b980a845e60b6d108ae8590 · home-assistant/core · GitHub) you can see, that you should to update GitHub - nick2525/broadlink_s1c_s2c: Broadlink s2c and Broadlink s1c sensors for Home Assistant before 2022.4 version

2 Likes

@Sunonline
@Pantomax
@Marc_R
@udayaw
@dearlk
@dustardly2
@Eric_Descoteaux
@roberto87
@imperialjoy
@eyals
Does anybody have new S3C or S3 sensor?

Is there a possibility to add a unique_id to the sensors?

I would like to use the alarm panel of HA but all my alarm sensors are like this:

sensor.porta_da_entrada but I need them to be something like this: binary_sensor.porta_da_entrada

I don’t know why they are like that, they only report two states but they show up in HA as sensor.porta_da_entrada

Unfortunately not anymore, because my device died and I had to buy Zigbee

Hello,

After the last update 2023.6 I have a problem with broadlink sensors
I use the following integration GitHub - nick2525/broadlink_s1c_s2c: Broadlink s2c and Broadlink s1c sensors for Home Assistant

Logger: homeassistant.loader
Source: custom_components/broadlink_s1c/sensor.py:78
Integration: broadlink_s1c (documentation, issues)
First occurred: 13:27:55 (1 occurrences)
Last logged: 13:27:55

Unexpected exception importing platform custom_components.broadlink_s1c.sensor
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/loader.py”, line 833, in get_platform
cache[full_name] = self._import_platform(platform_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/loader.py”, line 850, in _import_platform
return importlib.import_module(f"{self.pkg_path}.{platform_name}")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “”, line 1206, in _gcd_import
File “”, line 1178, in _find_and_load
File “”, line 1149, in _find_and_load_unlocked
File “”, line 690, in _load_unlocked
File “”, line 940, in exec_module
File “”, line 241, in _call_with_frames_removed
File “/config/custom_components/broadlink_s1c/sensor.py”, line 78, in
@asyncio.coroutine
^^^^^^^^^^^^^^^^^
AttributeError: module ‘asyncio’ has no attribute ‘coroutine’

Hello. Same problem. I have no idea of python but it seems that @asyncio.coroutine thing is obsolete and is no longer valid for python 3.11. It would be great if someone could develop these changes to make the integration work again.
Please help!!

I have tried modifying sensor.py. Prelimirary tested without errors:

Look for and delete:
import asyncio
@asyncio.coroutine (two times)

Modify:
Where:
def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
Then:
async def async_setup_platform(hass, config, async_add_devices, discovery_info=None):

Where:
def async_event_listener(self, event):
Then:
async def async_event_listener(self, event):

Where:
yield from self.async_update_ha_state()
Then:
await self.async_update_ha_state()

And that’s all.

5 Likes

Thank you rnsalinero, you are the best!

According to the HA logs i would suggest using

await self.async_write_ha_state()

on the last replacement

1 Like

Thank you very much. ( rnsalinero, Raoul Mihaila)
Everything is going well now

Thanks a lot! Fixed here also with your updates

6.1 is not work well,try it

I’m on 6.1

After the suggested updates to the sensor.py it seems to work with no errors

I get it。now it is work well。so good

Mine did not work! Error when add sensor to HA.

请教一下当修改了已经都设置好的s1c的门磁和红外的名字以后,再次启动HA会提示原来的名字的门磁和红外已经不存在了,,但是新修改的名字的门磁和红外也并么有给搜出来,猜测应该是要删除掉旧的,才可以加入新的,请问这个要怎么处理?