2.0.0
New features:
- Added support for the
icon
property in theHABinarySensor
(you can set the icon usingHABinarySensor::setIcon("iconName")
) - Added support for changing the current state of the
HABinarySensor
usingHABinarySensor::setCurrentState
method - Added support for forcing
setState
inHABinarySensor
using a second argument as followsHABinarySensor::setState(true, true)
- Added support for the
device_class
property in theHACover
(you can set the class usingHACover::setDeviceClass("className")
- Added support for the
icon
property in theHACover
(you can set the icon usingHACover::setIcon("iconName")
) - Added pointer of the sender to the
HACover
callback function - Added support for
optimistic
property in theHACover
(you can change the mode usingHACover::setOptimistic(true)
) - Added support for forcing
setPosition
inHACover
using a second argument as followsHACover::setPosition(100, true)
- Added support for the
device_class
property in theHASwitch
(you can set the class usingHASwitch::setDeviceClass("className")
- Added support for the
optimistic
property in theHASwitch
(you can change the mode usingHASwitch::setOptimistic(true)
) - Added support for the
force_update
property in theHASensor
(you can set the mode usingHASensor::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:
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 (removeddeviceClass
andinitialState
arguments) - Renamed
HABinarySensor::getState()
method toHABinarySensor::getCurrentState()
- Replaced
HATriggers
withHADeviceTrigger
- the new implementation is not backward compatible. Please check the updated example of themulti-state-button
. - Renamed
HADevice::isOnline()
method toHADevice::isAvailable()
- Renamed
HASwitch::onStateChanged
method toHASwitch::onCommand
. - Renamed
HAFan::onStateChanged
method toHAFan::onStateCommand
. - Renamed
HAFan::onSpeedChanged
method toHAFan::onSpeedCommand
. - Changed logic of the
HASwitch
callback. Please check theled-switch
example. - Refactored
HASensor
logic. It's now divided into two different classes:HASensor
andHASensorNumber
. - Removed all legacy constructors with
HAMqtt
argument - Removed
onConnectionFailed
callback from theHAMqtt
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.