I am trying to implement this on my system, but I am getting this error.
2020-01-31 10:16:48.913812 WARNING AppDaemon: ------------------------------------------------------------,
2020-01-31 10:16:48.913985 WARNING AppDaemon: Unexpected error running initialize() for plant_tracker,
2020-01-31 10:16:48.914156 WARNING AppDaemon: ------------------------------------------------------------,
2020-01-31 10:16:48.914750 WARNING AppDaemon: Traceback (most recent call last):,
File "/usr/local/lib/python3.6/site-packages/appdaemon/appdaemon.py", line 1581, in init_object,
File "/conf/apps/PlantTracker.py", line 8, in initialize,
init(),
self.initialize_plants(),
File "/conf/apps/PlantTracker.py", line 43, in initialize_plants,
db_plants = self.get_plants_from_db(),
File "/conf/apps/PlantTracker.py", line 20, in get_plants_from_db,
db_plants = json.load(f),
File "/usr/local/lib/python3.6/json/__init__.py", line 299, in load,
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw),
File "/usr/local/lib/python3.6/json/__init__.py", line 354, in loads,
return _default_decoder.decode(s),
File "/usr/local/lib/python3.6/json/decoder.py", line 339, in decode,
obj, end = self.raw_decode(s, idx=_w(s, 0).end()),
File "/usr/local/lib/python3.6/json/decoder.py", line 357, in raw_decode,
raise JSONDecodeError("Expecting value", s, err.value) from None,
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0),
2020-01-31 10:16:48.914918 WARNING AppDaemon: ------------------------------------------------------------
I had to manually create the plants.db file to resolve a previous error.
I also had to change the class to PlantTracker2 in the apps.yaml.
This is the first time I am using AppDaemon, so it is possible I am doing something wrong :-)
But looking at the error it seems you didn't account for new installations?