-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use default values if min / max is missing in openPlantBook #152
Comments
I don't understand? Can't you just input whatever values you want and add the plant? I guess openplantbook returns blank values for empty? |
I don't think so. OpenPlantBook should not fall back to defaults, as I would like to update those information in OpenPlantBook rather than having some (maybe wrong) information there. The HA integration otherwise should allow me to setup the plant even if the information are missing in OPB. |
If I create the plant without using opb - it is using the defaults - and then, I can change the integration to use opb again. |
But those fields are just plain input-fields? Can't you just type a number there, or use the small arrows to increase/decrease the value? |
ok, following use cases: I use OPB because I want to use the values reported from there.
|
Please feel free to add a PR that fixes this (and possibly explains it better, because I still fail to see that this is a big problem). And there is no way for the integration to know if a value was originally fetched from OPB, if it was input manually by the user or of it was the "default" value. And you can easily change these values by updating the "number.xxxx" entries, and of course the integration would not know anything about that either. My point is that the sentence "I cannot create the plant." does not make any sense. Yes, maybe it would be convenient in the odd case where OPB does not provide correct values to not have to type in a few numbers, but in my head, there is a bug in OPB if it does not provide all the data it promises. There is already code in place that ensures that if the value is not retuned at all from OPB, it uses the default value:
But if OPB returns "something", but it's not a number, then the (correct) error message "expected int" is shown. |
ok, thanks for the explanation about the last topic. |
Again, |
honestly, even if it is a bug in opb - which should be fixed there, I think it would make sense to catch some of those cases also in the integration. Talking about convenience - I am using already 15 or 16 devices ... 11 more should be added now, in some cases with some more exotic plants that aren't available in big numbers - so they are not yet available in opb at all. therefore, just having the defaults would be very convenient, rather than providing all required information for each of the plants in a row... setting up all those sensors is already a bit time consuming ^^ Don't get me wrong - I am just want to help, making this integration even better ;) |
Yes, sure. But as I said. The integration expects OPB to return numbers or nothing. So catching real empty values is alrady somthing that is done (for convenience). |
Hi,
I am creating some new plants that are currently not available in OpenPlant Book.
As of now, I don't have the min/max values for illumination and the other sensors, so I kept them empty until I can provide some information for those.
Plant-Monitor can find the plant, but is now showing that the information are missing.
Unfortunately, this means, I cannot create the plant.
If the plant would not be available in OpenPlantBook, the integration is providing default values.
I can then use the default values (and hopefully they would be updated when the information will be available in Open Plant Book)....
Right now, it would be great, if the integration could show an information that the values are missing in OpenPlantBook - but would then use the default values instead, to allow the creation of the plant in HA
The text was updated successfully, but these errors were encountered: