Component to integrate with openHAB.
This is a Work in Progress repo!
This component will set up the following platforms.
Platform | Item types |
---|---|
binary_sensor |
Contact |
sensor |
String , Number , DateTime |
switch |
Switch |
cover |
Rollershutter |
device_tracker |
Location |
In the future this integration will also support the following platforms:
Platform | Item types |
---|---|
light |
Color , Dimmer |
camera |
Image |
media_player |
Player |
- Go to http://homeassistant.local:8123/hacs/integrations
- Add
https://github.com/kubawolanin/ha-openhab
custom integration repository - Download the openHAB repository
- Go to http://homeassistant.local:8123/config/integrations and add new integration
- Choose "openHAB" from the list and follow the config flow steps
- Using the tool of choice open the directory (folder) for your HA configuration (where you find
configuration.yaml
). - If you do not have a
custom_components
directory (folder) there, you need to create it. - In the
custom_components
directory (folder) create a new folder calledopenhab
. - Download all the files from the
custom_components/openhab/
directory (folder) in this repository. - Place the files you downloaded in the new directory (folder) you created.
- Restart Home Assistant
- In the HA UI go to "Configuration" -> "Integrations" click "+" and search for "openHAB"
Using your HA configuration directory (folder) as a starting point you should now also have this:
custom_components/openhab/translations/en.json
custom_components/openhab/translations/nb.json
custom_components/openhab/translations/sensor.nb.json
custom_components/openhab/__init__.py
custom_components/openhab/api.py
custom_components/openhab/binary_sensor.py
custom_components/openhab/config_flow.py
custom_components/openhab/const.py
custom_components/openhab/manifest.json
custom_components/openhab/sensor.py
custom_components/openhab/switch.py
To show the icons, we are taking openHAB Items "category" field and then matching its value with predefined map (based on classic iconset and Material Design Icons). If none is returned, we proceed with checking the Item's type (Switch, String, Number, Contact and so on) - all of these have their own icon as well.
Device class of each Entity is assigned dynamically based on Items name or label.
When you add/remove Items in openHAB, simply reload the integration in Home Assistant. New entities will appear automatically after reloading the custom component.
If you want to contribute to this please read the Contribution guidelines