Hi everyone, I want to show my first serious integration: hnap-device.
This is a Work in Progress integration to Home Assistant supporting HNAP devices. It communicates locally with the devices, i.e. no cloud needed, but only supports polling (it can’t configure anything on devices).
Theorically all HNAP devices are supported, however only a few are really tested:
D-Link Motion Sensor (DCH-S150)
D-Link Siren Device (DCH-S220)
Currently motion sensors and sirens are the only platforms implemented but support for cameras or water detectors are really easy to implement.
This integration uses modern features from HomeAssistant like UI config.
It can be tested as custom_component or using HACS
I did, but then there is an error with: “no devices or entities”. If i enter invalid credentials or an invalid host, there is another error, so it seems to work a bit.
edit: here is the log:
Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht
Logger: homeassistant.config_entries
Source: custom_components/hnap_device/init.py:62
Integration: HNAP device (documentation, issues)
First occurred: 09:09:39 (3 occurrences)
Last logged: 18:21:20
Error setting up entry DCH-S220 for hnap_device
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/config_entries.py”, line 390, in async_setup
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/config/custom_components/hnap_device/init.py”, line 62, in async_setup_entry
hass.config_entries.async_setup_platforms(entry, entry.data[CONF_PLATFORMS])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: ‘ConfigEntries’ object has no attribute ‘async_setup_platforms’