Releases: openhab/openhab-python
Releases · openhab/openhab-python
cleanups
- ** BREAKING CHANGE **
openhab.Timer
removed.- Can be replaced with default Threading or Timer implementation.
- No need to register shutdown procedure in the lifecycleTracker anymore
- Old timer can be found as an example
bugfixes and features
- Register lifecycleTracker dispose hook only if a Timer is used
- Global ZonedDateTime to datetime conversion.
ZonedDateTime
&Instant
is now a registered interop_type - Add
Registry.removeItem
,Item.getThings
,Item.getChannels
, 'Item.getChannelUIDs',Item.getLinks
,Item.linkChannel
&Item.unlinkChannel
=> API documentation - Improved error logs for catched java exceptions in python.
- Fix simple rule decorator (
rule
instead ofrule()
). Both variants works now. - Preview for type hinting (autocompletion)
- BREAKING CHANGE: Changed parameter of Registry.addItem
- BREAKING CHANGE: Replace NotInitialisedException with NotFoundException for getItem, removeItem, getThing, getChannel
bugfixes and cleanups
- Removed "Python => Java" type conversion for sendCommand and postUpdate. Is now handled inside Add-on in a generic way.
- Replace error message "TypeError: invalid instantiation of foreign object" with a more helpful description
=> "One of your function parameters does not match the required value type. Check the openHAB API documentation to confirm correct value type." - Initial integration tests started
small refactorings
- renamed rule
profile
option toprofiler_enabled
- new rule
runtime_measurement
option
1.0.3
- Improved error messages for Java Foreign Objects
- Old like "foreign object has no attribute 'test'"
- New like "Java instance of 'org.openhab.core.types.UnDefType' has no attribute 'test'"
- Improved java <=> python type conversion
- Proxy classes for
Item
,State
,Thing
,Channel
,HistoricItem
are now real ChildClasses of Java Foreign Objects - As a result, much more object function results are transparently converted, like
datetime
<=>ZonedDateTime
- Proxy classes for
- Refactored and cleaned Metadata handling
- Registry.getItemMetadata => Registry.getItem().getMetadata().get
- Registry.setItemMetadata => Registry.getItem().getMetadata().set
- Registry.removeItemMetadata => Registry.getItem().getMetadata().remove & Registry.getItem().getMetadata().removeAll
- BREAKING CHANGE
- State 'DateTimeType' is not converted to a
datetime
anymore. Instead it stays as a 'DateTimeType', but the methodgetZonedDateTime
returns adatetime
. This leads to a much more consistent behavior. - Metadata API changed
- Registry.safeItemName move to Item.buildSafeName
- State 'DateTimeType' is not converted to a
v1.0.2
- refactor and simplify object type mapping.
This results in a generic solution, wich covers all functions, including upcoming, not yet existing ones.
Means functions in newer openhab versions are without any update correctly handled. - fixed internal bundle version parsing for beta, milstone or rc versions
various fixes
fixed persistence extension handling
cleaned and generalized value type mapping
various fixes
improved rule config handling for openhab 5
fix datetime conversion for null values
datetime related fixes
v1.0.0-rc3
- improved README
- fixed GenericEventTrigger
- fixed ItemNotFound behavior
- added addItem and safeItemName functions to Registry
- cleanup usage of Dummy Set class => depends on latest openhab main branch
fix uuid generation
fix uuid generation