@slaxor @Olen
Not sure if this is an API bug, or a plugin bug at the moment, however I’m finding that sometimes, it fails to get the image from Plantbook
Some examples:
avocado_plant:
species: Persea americana
image: openplantbook
returns
image: https://objectstorage.ap-sydney-1.oraclecloud.com/n/sdyd5yr3jypo/b/plant-img/o/persea%20americana.jpg
However
pachira_aquatica:
species: Pachira macrocarpa
image: openplantbook
returns
image: openplantbook
I’ve checked on Plantbook and it seems the display_pid
is correct and does exist: https://open.plantbook.io/api/v1/plant/detail/pachira%20macrocarpa/
I think it might be a bug in the plugin which I will raise, but the logs suggest everything is OK
2022-04-26 11:31:42 DEBUG (MainThread) [custom_components.plant] Fetched data from https://open.plantbook.io/api/v1/plant/detail/pachira macrocarpa:
2022-04-26 11:31:42 DEBUG (MainThread) [custom_components.plant] {'pid': 'pachira macrocarpa', 'display_pid': 'Pachira macrocarpa', 'alias': 'pachira aquatica', 'max_light_mmol': 4700, 'min_light_mmol': 2800, 'max_light_lux': 40000, 'min_light_lux': 1200, 'max_temp': 32, 'min_temp': 10, 'max_env_humid': 85, 'min_env_humid': 30, 'max_soil_moist': 60, 'min_soil_moist': 15, 'max_soil_ec': 2000, 'min_soil_ec': 350, 'image_url': 'https://objectstorage.ap-sydney-1.oraclecloud.com/n/sdyd5yr3jypo/b/plant-img/o/pachira%20macrocarpa.jpg'}
2022-04-26 11:31:42 DEBUG (MainThread) [custom_components.plant] Plant: pachira_aquatica Var: name Config: None Value: Pachira macrocarpa
2022-04-26 11:31:42 DEBUG (MainThread) [custom_components.plant] Plant: pachira_aquatica Var: min_temperature Config: 10.0 Value: 10
2022-04-26 11:31:42 DEBUG (MainThread) [custom_components.plant] Plant: pachira_aquatica Var: max_temperature Config: 40.0 Value: 32
2022-04-26 11:31:42 DEBUG (MainThread) [custom_components.plant] Plant: pachira_aquatica Var: min_moisture Config: 20 Value: 15
2022-04-26 11:31:42 DEBUG (MainThread) [custom_components.plant] Plant: pachira_aquatica Var: max_moisture Config: 60 Value: 60
2022-04-26 11:31:42 DEBUG (MainThread) [custom_components.plant] Plant: pachira_aquatica Var: min_conductivity Config: 500 Value: 350
2022-04-26 11:31:42 DEBUG (MainThread) [custom_components.plant] Plant: pachira_aquatica Var: max_conductivity Config: 3000 Value: 2000
2022-04-26 11:31:42 DEBUG (MainThread) [custom_components.plant] Plant: pachira_aquatica Var: min_brightness Config: 0 Value: 1200
2022-04-26 11:31:42 DEBUG (MainThread) [custom_components.plant] Plant: pachira_aquatica Var: max_brightness Config: 100000 Value: 40000
2022-04-26 11:31:42 DEBUG (MainThread) [custom_components.plant] Plant: pachira_aquatica Var: image Config: openplantbook Value: https://objectstorage.ap-sydney-1.oraclecloud.com/n/sdyd5yr3jypo/b/plant-img/o/pachira%20macrocarpa.jpg
Compare it against the one that does work
2022-04-26 11:31:41 DEBUG (MainThread) [custom_components.plant] Fetched data from https://open.plantbook.io/api/v1/plant/detail/persea americana:
2022-04-26 11:31:41 DEBUG (MainThread) [custom_components.plant] {'pid': 'persea americana', 'display_pid': 'Persea americana', 'alias': 'pear', 'max_light_mmol': 8000, 'min_light_mmol': 4200, 'max_light_lux': 76000, 'min_light_lux': 4000, 'max_temp': 35, 'min_temp': 8, 'max_env_humid': 80, 'min_env_humid': 30, 'max_soil_moist': 60, 'min_soil_moist': 15, 'max_soil_ec': 2000, 'min_soil_ec': 350, 'image_url': 'https://objectstorage.ap-sydney-1.oraclecloud.com/n/sdyd5yr3jypo/b/plant-img/o/persea%20americana.jpg'}
2022-04-26 11:31:41 DEBUG (MainThread) [custom_components.plant] Plant: avocado_plant Var: name Config: None Value: Persea americana
This line seems to be the difference: 2022-04-26 11:31:41 DEBUG (MainThread) [custom_components.plant] Plant: avocado_plant Var: name Config: None Value: Persea americana