Closed fhochleitner closed 5 years ago
The watering of the plants is now displayed on the homepage. Small waterdrops are displayed and the duration is shown in the label. This looks like the following:
However, there are a few issues with this solution:
I created a class WateringData, (like SensorData), which holds the specific watering data. maybe WateringData and SensorData should extend an abstract base class. So methods, like ...
public List<SensorData> getAllData(Integer maxNumber, String sensorName, Date from, Date to)
don't get copied for every data class, but are more generic.
The MongoDbProducer lets you only work with one single collection ('habarama'). So SensorData- and WateringData-objects are all in the same collection in the mongoDB.
With the sendActorMessage(String location, String actorName, Integer duration)
I don't get the current moisture value. So in the frontend I use the previous value (last value before watering) and not the actual.
The code can be reviewed and tested on the branch: 178_Display_watering_of_plants_on_homepage
As as User I want to know when my plant my watered and how it affected its moisture level.
Acceptance Criteria