-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove useless enoceanmqtt modules copy
- Loading branch information
1 parent
779c29d
commit 451f07f
Showing
9 changed files
with
48 additions
and
699 deletions.
There are no files selected for viewing
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import logging | ||
import traceback | ||
|
||
from enoceanmqtt.communicator import Communicator | ||
from enoceanmqtt.enoceanmqtt import conf, parse_args, setup_logging, load_config_file | ||
|
||
|
||
def main(): | ||
"""entry point if called as an executable""" | ||
# logging.getLogger().setLevel(logging.DEBUG) | ||
# Parse command line arguments | ||
conf.update(parse_args()) | ||
|
||
# setup logger | ||
setup_logging(conf['logfile'], logging.DEBUG if conf['debug'] else logging.INFO) | ||
|
||
# load config file | ||
sensors, global_config = load_config_file(conf['config']) | ||
conf.update(global_config) | ||
|
||
# Select the overlay | ||
if str(global_config.get('overlay')).lower() == "ha": | ||
try: | ||
from enoceanmqtt.overlays.homeassistant.ha_communicator import HACommunicator | ||
except ImportError: | ||
logging.error("Unable to import Home Assistant overlay") | ||
return | ||
logging.info("Selected overlay : Home Assistant") | ||
com = HACommunicator(conf, sensors) | ||
else: | ||
logging.info("Selected overlay : None") | ||
com = Communicator(conf, sensors) | ||
|
||
# start working | ||
try: | ||
com.run() | ||
|
||
# catch all possible exceptions | ||
except: # pylint: disable=broad-except,bare-except | ||
logging.error(traceback.format_exc()) | ||
|
||
|
||
# check for execution | ||
if __name__ == "__main__": | ||
main() |
Empty file.
Empty file.
File renamed without changes.
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
File renamed without changes.
Oops, something went wrong.