-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Renamed functions and variables for item: - item.state -> item.value - item.set_state -> item.set_value - item.post_state -> item.post_value - item.get_state -> item.get_value - Moved configuration to EasyCo - MQTT configuration has listen_only switch, too - Added NumberItem to openhab.items - Updated lots documentation - Added functions with corresponding commands for OpenhabItems - Added command processing for OpenhabItems - Prepared for Openhab 2.5 - Use relative names in testing configuration - Counter is thread safe - renamed ColorItem.value to ColorItem.brightness - MultiModeValue has function calculate_lower_priority_value which returns the low prio value
- Loading branch information
1 parent
22556a4
commit ba2764e
Showing
61 changed files
with
872 additions
and
573 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__VERSION__ = '0.8.0' | ||
__VERSION__ = '0.9.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,28 @@ | ||
from .configentry import ConfigEntry, ConfigEntryContainer | ||
from EasyCo import ConfigContainer, ConfigEntry | ||
|
||
|
||
class Ping(ConfigEntry): | ||
def __init__(self): | ||
super().__init__() | ||
self.enabled = False | ||
self.item = '' | ||
self.interval = 10 | ||
class Ping(ConfigContainer): | ||
enabled: bool = ConfigEntry(True, description='If enabled the configured item will show how long it takes to send ' | ||
'an update from HABApp and get the updated value back from openhab' | ||
'in milliseconds') | ||
item: str = ConfigEntry('HABApp_Ping', description='Name of the item') | ||
interval: int = ConfigEntry(10, description='Seconds between two pings') | ||
|
||
|
||
class General(ConfigEntry): | ||
def __init__(self): | ||
super().__init__() | ||
self.listen_only = False | ||
class General(ConfigContainer): | ||
listen_only: bool = ConfigEntry( | ||
False, description='If True HABApp will not change anything on the openhab instance.' | ||
) | ||
|
||
|
||
class Connection(ConfigEntry): | ||
def __init__(self): | ||
super().__init__() | ||
self.host = 'localhost' | ||
self.port = 8080 | ||
self.user = '' | ||
self.password = '' | ||
class Connection(ConfigContainer): | ||
host: str = 'localhost' | ||
port: int = 8080 | ||
user: str = '' | ||
password: str = '' | ||
|
||
self._entry_kwargs['user'] = {'default': ''} | ||
self._entry_kwargs['password'] = {'default': ''} | ||
|
||
|
||
class Openhab(ConfigEntryContainer): | ||
def __init__(self): | ||
self.ping = Ping() | ||
self.connection = Connection() | ||
self.general = General() | ||
class Openhab(ConfigContainer): | ||
ping = Ping() | ||
connection = Connection() | ||
general = General() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.