Skip to content

Releases: dawidchyrzynski/arduino-home-assistant

2.1.0

09 Feb 23:50
1d333ab
Compare
Choose a tag to compare

New features:

  • Added support for setting MQTT's keep alive #153 by @allenb2800
  • Added support for the state_class property in the HASensor #179
  • Implemented extended unique ID support for all device types. This allows you to prefix each device type's unique ID with the device ID, ensuring smooth deployment of identical code on multiple devices without encountering unique ID conflicts #212
  • Added support for the configuration_url property in the HADevice #182
  • Added getCurrentOption method to the HASelect device type #163
  • Added support for publishing the None state in the HASelect device type #146
  • Added support for publishing the None state in the HASensor device type #175
  • Added support for the expire_after property in the HASensor #171
  • Added support for the expire_after property in the HABinarySensor #159
  • Added support for the JSON attributes in the HASensor
  • Added support for the object_id property in all device types
  • Added setBufferSize method to the HAMqtt class #202
  • Added getState method to the HAMqtt class
  • Added onDisconnected callback method to the HAMqtt class
  • Added onStateChanged callback method to the HAMqtt class
  • Added support for Arduino Due #137

Fixes:

  • Fixed a bug with the maximum number of device types #190 by @martaisty
  • Fixed compiler warning: class 'HANumeric' is implicitly friends with itself #197 by @shedokan
  • The default limit for device types has been raised to 24 on processors other than ATMega328/ATMega168. The previous default limit of 6 led to confusion for many users.

2.0.0

15 Oct 06:45
0fc32a5
Compare
Choose a tag to compare

New features:

  • Added support for the icon property in the HABinarySensor (you can set the icon using HABinarySensor::setIcon("iconName"))
  • Added support for changing the current state of the HABinarySensor using HABinarySensor::setCurrentState method
  • Added support for forcing setState in HABinarySensor using a second argument as follows HABinarySensor::setState(true, true)
  • Added support for the device_class property in the HACover (you can set the class using HACover::setDeviceClass("className")
  • Added support for the icon property in the HACover (you can set the icon using HACover::setIcon("iconName"))
  • Added pointer of the sender to the HACover callback function
  • Added support for optimistic property in the HACover (you can change the mode using HACover::setOptimistic(true))
  • Added support for forcing setPosition in HACover using a second argument as follows HACover::setPosition(100, true)
  • Added support for the device_class property in the HASwitch (you can set the class using HASwitch::setDeviceClass("className")
  • Added support for the optimistic property in the HASwitch (you can change the mode using HASwitch::setOptimistic(true))
  • Added support for the force_update property in the HASensor (you can set the mode using HASensor::setForceUpdate(true))
  • Added support for the HAButton device type
  • Added support for the HADeviceTracker device type
  • Added support for the HACamera device type
  • Added support for the HALock device type
  • Added support for the HASelect device type
  • Added support for the HANumber device type
  • Added support for the HAScene device type
  • Added support for the HALight device type

Bugs fixes:

  • Last Will Message is now retained (#70)
  • Compilation error on SAMD family (#82)

New examples:

  • Button - adding simple buttons to the Home Assistant panel.

Breaking changes:

  • Changed structure of all MQTT topics used in the library.
  • Changed constructor of the HABinarySensor class (removed deviceClass and initialState arguments)
  • Renamed HABinarySensor::getState() method to HABinarySensor::getCurrentState()
  • Replaced HATriggers with HADeviceTrigger - the new implementation is not backward compatible. Please check the updated example of the multi-state-button.
  • Renamed HADevice::isOnline() method to HADevice::isAvailable()
  • Renamed HASwitch::onStateChanged method to HASwitch::onCommand.
  • Renamed HAFan::onStateChanged method to HAFan::onStateCommand.
  • Renamed HAFan::onSpeedChanged method to HAFan::onSpeedCommand.
  • Changed logic of the HASwitch callback. Please check the led-switch example.
  • Refactored HASensor logic. It's now divided into two different classes: HASensor and HASensorNumber.
  • Removed all legacy constructors with HAMqtt argument
  • Removed onConnectionFailed callback from the HAMqtt class
  • The position in the HACover is now available as configurable feature. It's disabled by default.
  • Refactored HAHVAC class to support more features of the MQTT discovery. Please check the update example.

1.3.0

17 Apr 18:05
a4e50b7
Compare
Choose a tag to compare

New features:

  • Added onMessage() method to HAMqtt class
  • Added support for HA Covers - #23
  • Added support for setting different prefix for non-discovery topics (see Advanced MQTT example) - #22
  • Added setName method to HASensor
  • Added setName method to HASwitch
  • Added onBeforeStateChanged callback to HASwitch - #31

Updates:

  • Removed legacy properties from HAFan (Home Assistant 2021.4.4). Deprecated methods will be removed after a quarter (2021.7)
  • Separated uniqueID field from name in all devices types - #32

1.2.0

17 Apr 07:19
15562fa
Compare
Choose a tag to compare

Breaking changes:

  • Refactored HASensor implementation. Please take a look at updated example.

New features:

  • Added support for HVAC - #1
  • Added support for excluding devices types from the compilation using defines (see src/ArduinoHADefines.h)
  • Added support for setting icon in HASwitch and HASensor - #12
  • Added support for setting retain flag in HASwitch
  • Added support for text (const char*) payload in HASensor - #13
  • Added support for fans (HAFan) - #9
  • Added support for connecting to the MQTT broker using hostname - #8
  • Added onConnected() method in the HAMqtt
  • Added onConnectionFailed() method in the HAMqtt
  • Added support for MQTT LWT (see Advanced Availability example) - #7

Updates:

  • Optimized codebase and logic in all devices types
  • Updated all examples
  • Fixed compilation warnings in all classes