Skip to content

Johboh/HomeAssistantEntities

Repository files navigation

HomeAssistantEntities

PlatformIO CI ESP-IDF CI GitHub release Clang-format

Arduino (using Arduino IDE or PlatformIO) and ESP-IDF (using Espressif IoT Development Framework or PlatformIO) compatible library for providing sensors and actuators to Home Assistant using MQTT.

Home Assistant has a well defined way of defining sensors and actuators using MQTT. This library register a device with one or mulitple sensors and provide a way to publish new values for them, as well as listen for commands from Home Assistant.

Currently supported sensors

  • Atmospheric Preassure (hPa)
  • Binary Sensor / Boolean
  • Brightness (%)
  • Door (open/closed)
  • Humidity (%)
  • Json (raw "json"-sensor)
  • Lock (locked/unlocked)
  • Motion (detected/not detected)
  • Number
  • Sound (detected/not detected)
  • String (raw "String"-sensor)
  • Temperature (°C/°F)
  • Voltage (mV/V)
  • Weight (g/kg)

Currently supported actuators (and sensors)

  • Curtain (open/opening, close/closing, position)
  • Event
  • Light (brightness, rgb, effect)
  • Select
  • Switch (on/off)

Installation

PlatformIO (Arduino or ESP-IDF):

Add the following to libs_deps:

   Johboh/HomeAssistantEntities@^7.0.7

You also need a MQTT library and a JSON library. See Dependencies section. Suggestion:

   johboh/MQTTRemote@^4.0.4
   bblanchon/ArduinoJson@^7.1.0

Arduino IDE

Search for HomeAssistantEntities by johboh in the library manager. You also need a MQTT library and a JSON library. See Dependencies section. Suggestion: MQTTRemote by johboh and ArduinoJson by bblanchon.

Espressif IoT Development Framework:

In your existing idf_component.yml or in a new idf_component.yml next to your main component:

dependencies:
  johboh/homeassistantentities:
    version: ">=7.0.7"

You also need a MQTT library. See Dependencies section. Suggestion:

  johboh/mqttrmote:
    version: ">=4.0.5"

Examples

Functionallity verified on the following platforms and frameworks

Newer version most probably work too, but they have not been verified.

Dependencies

About

Arduino library for Home Assistant entities for MQTT

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages