basnijholt / miflora

☘️🌑🌼πŸ₯€πŸ‘ Mi Flora Plant sensor Python package
MIT License
362 stars 99 forks source link

Basic implementation of ropot #111

Closed chrostek closed 4 years ago

chrostek commented 6 years ago

very basic implementation of ropot. gives back false for nonexistant value MI_LIGHT for ropot

ChristianKuehnel commented 5 years ago

@chrostek Thx for your contribution :+1: ! I just had a look and the change really is quite minimal. Nice!

I do have two requests for your pull request before merging it:

  1. You're using the length of the data to identify if we're talking to a normal sensor or to a ropot. Please move this check into a new function "is_ropot()" or something similar so that it's clear why you're doing this check and then use this function instead of the len(data)>24 check, where you need to check.

  2. Please add a test case with some test data for a ropot so that we make sure this use case keeps working in case of future changes.

ChristianKuehnel commented 5 years ago

close/open to trigger a new build

chrostek commented 5 years ago

I'm no python programmer, so i asked a friend to implement your request. unfortunately my ropot seems to be dead (no bt connection to app or miflora anymore), so i cannot test the new changes.