Closed onkelandy closed 6 years ago
+1 manual suspend function does not work in current shng develop branch.
I'll have a look at the issues, however it may take until February before I have time to do so.
FYI: I changed some lines in AutoBlindCliCommands.py to get the cli commands registered:
Include:
from lib.plugin import Plugins
new Syntax for add_command (needs bugfix in cli plugin as well):
cli.add_command("as_list", self.cli_list, "autoblind", "as_list: list AutoState items")
cli.add_command("as_detail", self.cli_detail, "autoblind", "as_detail [asItem]: show details on AutoState item [asItem]")
def _get_cli_plugin(self):
# noinspection PyBroadException
plugins = Plugins.get_instance()
try:
for plugin in plugins.return_plugins():
if plugin._shortname == 'cli':
self.logger.debug("cli plugin found.")
return plugin
except Exception:
self.logger.info("cli plugin NOT found.")
return None
Bugfix für plugins/cli/init.py (group param added)
def add_command(self, command, function, group, usage):
"""
Add command to list of available commands
:param command: Command to add
:param function: Function to execute for command
:param usage: Usage string for help-command
"""
self.commands.add_command(command, function, group, usage)
Thanks for the update. Autoblind is running without any error now but I can't use the CLI commands.. Says "unknown command"?
A new branch "Version 1.4.0" is available which contains the adaptions. All adaptions are made based on the rc_v1.4.2-branch of SmarthomeNG
Looks very good, thanks alot!! Any chance that you look into the other issues and/or ideas soon?
Had an error:
2018-02-03 09:25:41 WARNING EG.entrance.window.shutter.auto.manuell Item EG.entrance.window.shutter.auto.manuell: problem evaluating sh.autoblind_plugin_functions.manual_item_update_eval('EG.entrance.window.shutter.auto.manuell', caller, source): 'SmartHome' object has no attribute 'autoblind_plugin_functions'
With removing an indent in init.py line 61: self.get_sh().autoblind_plugin_functions = AutoBlindFunctions.AbFunctions(self.get_sh())
fixed that error.
For the 1.4-branch, i have removed several functions, which have been marked as obsolete in the past