Releases: leosperry/ha-kafka-net
Releases · leosperry/ha-kafka-net
V10.2.1
V10.2
New Features
- Added Automation Modes - You can now manage how threads are managed for rapidly firing automations.
- Smart Mode - Automation mode that combines the best parts of different automation modes. See Parallelism and Threads for complete details.
Enhancement
- Added Increment/Decrement methods for number helper entitites
Bug Fix
- Fixed exception being thrown in auto updating entity
Snapshot
method
Breaking changes
- Previously thread management behaved like
AutomationMode.Parallel
. The default is nowAutomationMode.Smart
. See Parallelism and Threads for complete details. - Methods in
IAutomationRegistry
previously marked obsolete have been removed.
V10.1.1
V10.1
Features
- The
IHaStateCache
has methods for storing and retrieving user defined types. - Added state change Increase/Decreased helpers
Enhancements
- Memory optimization during type conversion.
- Consistent and documented behavior for entities entering a bad state.
Bug Fixes
- auto-updating entities entering bad state can prevent automations with
TriggerOnBadState
set to true from firing.
Breaking changes
- The return types for methods in the
IUpdatingEntityProvider
have been changed and new methods added.
V10.0.2
Enhancements
- Automations on dashboard are now sorted by last time they were triggered. Previously they were sorted by the order in which they were registered, which has no real value. Now, when you go to the dashboard, you'll see the most recently triggered automations.
- Removed requirement to set EntityId on
LightTurnOnModel
during init. Sometimes it is helpful to hold onto light settings without setting the entity id immediately. If you do not set it prior to making an API call, Home Assistant will return a 500. - Aggregate exceptions caught in the automation trace provider where the inner exception is a
TaskCanceledException
will now behave the same as if the outer exception was aTaskCancelledException
. It will be logged, and will not report that the automation failed.
Bug Fixes
- Sometimes meta data set by a user would not be used. Automations would still run as expected, but Name, Description, etc. were ignored.
Breaking changes
- None
V10.0.1
This release fixes a couple minor bugs introduced with V10 and adds some generic automation specific enhancements.
Enhancements
- Added strong-typed interfaces for common use cases
IAutomation_SceneController
IAutomation_ColorLight
IAutomation_DimmableLight
IAutomation_Button
- Added state extension for getting entity Friendly Name
- Pretty print generic automation types on dashboard
Bug Fixes
- Automation wrappers may not always expose meta data correctly
- Legacy
LightOffOnNoMotion
automation could not be registered
Breaking Changes
- None
Version 10
New Features
- Strongly-typed Automations.
IAutomation
,IConditionalAutomation
, andISchedulableAutomation
all now have generic implementations. e.g.IAutomation<OnOff, ColorLightModel>
. When you implement one of the generic versions, you no longer need to convert the rawHaEntityStateChange
into a strongly-typed version before working with it. The conversion will be done for you. IAutomationBuilder
has generic methods associated with each of the new generic types.IAutomationRegistrar
now hasTryRegister
methods - Previously, theIAutomationRegistrar
had differentRegister
methods for simple and delayable automations. It was not always obvious why you could not register multiple at the same time if they were different types. This confusion would have been increased with the new generic types. TheTryRegister
methods take in anyIAutomationBase
, and find the appropriate wrapper to register them all.- An overload of
TryRegister
takes in aFunc<IAutomationBase>
. This expands on the safe startup ideas from V9.3. TheIAutomationBuilder
can throw an exception if you do not correctly configure an automation before calling theBuild()
method. If that occurs when using the overload that takes aFunc
, instead of raising the exception immediately, it will instead add the error to the initialization error collection and allow all other automations created in the registry to be registered. - Added
AutomationTypeConversionFailure
toISystemMonitor
. If type conversion for any of your strongly-typed automations fails, the system monitor will be called. This could happen if there was a breaking change in either Home Assistant or an integration you have enabled. - Added
IFallbackExecution
interface for use with strongly typed automations. If you would like to handle type conversion errors in the automation itself, you can implement this interface to receive the raw state.
Enhancements
- Added more "For" methods for Scheduled Automations when using the builder to match existing methods for conditional automations.
- Added more state change extension methods such as
BecameGreaterThan
when working with non-nullable types.
Bug Fixes
- Automation builder would not respect some settings for delayable automations. Specifically
ShouldContinueOnError
andShouldExecutePastEvents
Breaking Changes
IAutomationRegistrar
has deprecated methods. They will continue to work, but will be removed in a future version.- Removed support for custom delay evaluators. Users can implement
ISchedulableAutomation
to get the same functionality.
V 9.2.2
New Features
- Added
IStartupHelpers
object for injecting into your implementations ofIAutomationRegistry
. The only thing it does is wrap theIAutomationBuilder
,IAutomationFactory
, andIUpdatingEntityProvider
into a single object so you have less to inject and less boiler plate to write. - Added API extension methods for setting values of "Input Date and/or Time" helper entities
V 9.2.1
V 9.2
This version is all about startup routines. New features have been added to enable asynchronous initialization of your classes as well as several defensive startup measures.
New Features
- New
IInitializeOnStartup
interface that can be applied to any automation or registry. It implements one method which will be called exactly one time at startup to allow you to execute any initialization logic you need outside of the constructor. ISystemMonitor
has new method calledInitializationFailure
, which will be called exactly 1 time at startup if there are any failures during startup. It has a default implementation that will send a persistent notification to your Home Assistant instance. If you do not like this behavior, simply implement the method and handle errors as you see fit.- New defensive startup routines - Along with the
IInitializeOnStartup
interface being added, several places in the code are now surrounded bytry/catch
blocks. Whereas previously, an error in startup in any automation or registry may have prevented startup. Now, if at all possible, HaKafkaNet will start and be able to execute some automations. See Startup Routines for complete details. - New
TimeSpan
extension methods on entity providers for use when you use "Date and/or Time" helper entities and select "Time" only.
Bug Fixes
- Issue #77 - Fixed Json parsing of HA Date/Time helper states with both date and time are used
Breaking Changes
- If you are using the test harness, you will need update it to version 9.2 also.