Add full support for mmgg.feeder.petfeeder
Pretty much started from scratch, new branch.
Decided to go with PetFeeder over PetFoodDispenser, neither is wrong but seemed more appropriate. All features now implemented (and one removed resetcleaner as not implemented device side..).
$ miiocli petfeeder --ip *snip* --token *snip* status
Food level: Normal
Feed plan: True
Food outlet: Ok
Food storage lid: Closed
Days until cleaning required: 10 day(s)
Days until desiccant replacement: 29 day(s)
WiFi status led: False
Dispense button lock: True
$ miiocli petfeeder --ip *snip* --token *snip* --help
Usage: miiocli petfeeder [OPTIONS] COMMAND [ARGS]...
Options:
--ip TEXT [required]
--token TEXT [required]
--model TEXT
--help Show this message and exit.
Commands:
add_feed_plan Add Feed Plan.
del_feed_plan Delete Feed Plan.
dispense_food Dispense food.
edit_feed_plan Edit Feed Plan.
get_feed_plans Get feed plans.
info Get (and cache) miIO protocol information from the...
raw_command Send a raw command to the device.
reset_desiccant_left Reset desiccant time.
set_button_lock Set button lock.
set_feed_state Set feed state.
set_wifi_led Set wifi led.
status Retrieve properties.
test_properties Helper to test device properties.
$ miiocli petfeeder --ip *snip* --token *snip* get_feed_plans
Slot: 04 Time: 08:30 Units: 8
Additional requirement for dataclasses backport package for Python <=3.6 (PEP 557)
Timezones in python are in general a mess. But looks to be semi resolved in PEP 615 but that's Python >=3.9 and no backport packages yet so opted just to keep with datetime for now and go between local time and china time which thankfully is fixed utc offset / does not follow DST.
I'm sure there will be bits that still don't quite adhere to your style 😄 but at this point it's got full functionality so happy for you to do whatever you feel best with it.
Oh and I did actually run tox this time 😅