Skip to content

WORK IN PROGRESS 🏠 openHAB custom integration for Home Assistant

License

Notifications You must be signed in to change notification settings

kubawolanin/ha-openhab

Repository files navigation

openHAB custom integration for Home Assistant

GitHub Release GitHub Activity License hacs BuyMeCoffee Discord Community Forum

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

HACS Installation

  1. Go to http://homeassistant.local:8123/hacs/integrations
  2. Add https://github.com/kubawolanin/ha-openhab custom integration repository
  3. Download the openHAB repository
  4. Go to http://homeassistant.local:8123/config/integrations and add new integration
  5. Choose "openHAB" from the list and follow the config flow steps

Manual Installation

  1. Using the tool of choice open the directory (folder) for your HA configuration (where you find configuration.yaml).
  2. If you do not have a custom_components directory (folder) there, you need to create it.
  3. In the custom_components directory (folder) create a new folder called openhab.
  4. Download all the files from the custom_components/openhab/ directory (folder) in this repository.
  5. Place the files you downloaded in the new directory (folder) you created.
  6. Restart Home Assistant
  7. 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

Configuration is done in the UI

Icons

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 classes

Device class of each Entity is assigned dynamically based on Items name or label.

Changes in openHAB Items

When you add/remove Items in openHAB, simply reload the integration in Home Assistant. New entities will appear automatically after reloading the custom component.

Contributions are welcome!

If you want to contribute to this please read the Contribution guidelines


About

WORK IN PROGRESS 🏠 openHAB custom integration for Home Assistant

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages