Comments (10)
If you get the "Refuse to update..." error, it probably means that you mix up the two entries in the service call.
meter_entity
is the entity_id of the sensor that is part of theplant
.new_sensor
is the entity_id of the physical sensor that you want themeter_entity
to get its data from.
What I personally do, to make a clearer separation between them, is that all my physical sensors (e.g BLE-devices) have generic entity_ids like "sensor.ble_sensor_1_moisture", "sensor.ble_sensor_1_illumination", "sensor.ble_sensor_2_conductivity" etc.
And all my plants sensors have entity_ids like "sensor.rose_moisture", "sensor.chili_conductivity" etc.
That way, if I need to replace a (physical) sensor, it is very easy to grasp the concept and use
service: plant.replace_sensor
data:
meter_entity: sensor.rose_illumination
new_sensor: sensor.ble_sensor_12_illumination
from homeassistant-plant.
I'm experiencing similar issues. I've created 5 plants thus far, 2 have unknown for values. One does not have specific values. All of these values are present in the "base" sensor.
from homeassistant-plant.
Please enable debug log of the custom_components.plant integration.
from homeassistant-plant.
Somehow the wrong sensor is used for the plant. The entites with "miflora" in it where the entity ids when I integrated the sensors the old ESPhome way.
They were deleted and I searched in /config/.storage and couldn't find any references to the old sensors. I don't know, where the integration remembers the old entities and why it uses them.
2022-09-12 10:17:50.642 DEBUG (MainThread) [custom_components.plant] Setting up config entry 7ce9a3ca5abcacd91f13a925fe40c2bb: <homeassistant.config_entries.ConfigEntry object at 0x7f426708d080> 2022-09-12 10:17:51.035 DEBUG (MainThread) [custom_components.plant.number] {'plant_info': {'name': 'Kinderzimmer Bogenhanf', 'species': 'sansevieria zeylanica', 'temperature_sensor': 'sensor.plant_sensor_6db18c_temperature', 'moisture_sensor': 'sensor.plant_sensor_6db18c_moisture', 'conductivity_sensor': 'sensor.plant_sensor_6db18c_conductivity', 'illuminance_sensor': 'sensor.plant_sensor_6db18c_illuminance', 'search_for': 'sansevieria zeylanica', 'entity_picture': '', 'display_pid': 'Sansevieria Zeylanica', 'limits': {'max_moisture': 60, 'min_moisture': 20, 'max_illuminance': 100000, 'min_illuminance': 0, 'max_dli': 30, 'min_dli': 2, 'max_temperature': 40, 'min_temperature': 10, 'max_conductivity': 3000, 'min_conductivity': 500, 'max_humidity': 60, 'min_humidity': 20}}} 2022-09-12 10:17:51.386 DEBUG (MainThread) [custom_components.plant.sensor] {'plant_info': {'name': 'Kinderzimmer Bogenhanf', 'species': 'sansevieria zeylanica', 'temperature_sensor': 'sensor.plant_sensor_6db18c_temperature', 'moisture_sensor': 'sensor.plant_sensor_6db18c_moisture', 'conductivity_sensor': 'sensor.plant_sensor_6db18c_conductivity', 'illuminance_sensor': 'sensor.plant_sensor_6db18c_illuminance', 'search_for': 'sansevieria zeylanica', 'entity_picture': '', 'display_pid': 'Sansevieria Zeylanica', 'limits': {'max_moisture': 60, 'min_moisture': 20, 'max_illuminance': 100000, 'min_illuminance': 0, 'max_dli': 30, 'min_dli': 2, 'max_temperature': 40, 'min_temperature': 10, 'max_conductivity': 3000, 'min_conductivity': 500, 'max_humidity': 60, 'min_humidity': 20}}} 2022-09-12 10:17:51.387 INFO (MainThread) [custom_components.plant.sensor] Added external sensor for None sensor.plant_sensor_6db18c_illuminance 2022-09-12 10:17:51.425 INFO (MainThread) [custom_components.plant.sensor] Setting sensor.kinderzimmer_bogenhanf_illuminance external sensor to sensor.miflora_c47c8d6db18c_illuminance 2022-09-12 10:17:51.426 INFO (MainThread) [custom_components.plant.sensor] Setting sensor.kinderzimmer_bogenhanf_conductivity external sensor to sensor.miflora_c47c8d6db18c_conductivity 2022-09-12 10:17:51.426 INFO (MainThread) [custom_components.plant.sensor] Setting sensor.kinderzimmer_bogenhanf_soil_moisture external sensor to sensor.miflora_c47c8d6db18c_moisture 2022-09-12 10:17:51.426 INFO (MainThread) [custom_components.plant.sensor] Setting sensor.kinderzimmer_bogenhanf_temperature external sensor to sensor.miflora_c47c8d6db18c_temperature 2022-09-12 10:17:51.427 INFO (MainThread) [custom_components.plant.sensor] Setting sensor.kinderzimmer_bogenhanf_ppfd_mol external sensor to sensor.kinderzimmer_bogenhanf_illuminance
from homeassistant-plant.
Try to use the replace_sensor service call instead of removing and re-adding plants.
HA is very insistent on restoring and reusing previous entities when a new sensor is added with the same entity id as a former one.
from homeassistant-plant.
I had this same issue and calling replace_sensor worked for me. Thanks!
from homeassistant-plant.
I'm having the same issue after renaming one of the plants' BLE integration. It used to be yucca
and is now dracaena
. I tried replacing the sensors, but get (debug logging is enabled and this is all that's shown):
Refuse to update non-plant entities: sensor.yucca_illuminance
...for all the sensor.yucca_
variants.
Relevant debug logs:
2022-09-27 17:18:24.926 DEBUG (MainThread) [custom_components.plant.number] {'plant_info': {'name': 'Dracaena', 'species': 'dracaena fragrans', 'temperature_sensor': 'sensor.dracaena_temperature', 'moisture_sensor': 'sensor.dracaena_moisture', 'conductivity_sensor': 'sensor.dracaena_conductivity', 'illuminance_sensor': 'sensor.dracaena_illuminance', 'search_for': 'Dracaena Fragrans', 'data_source': 'openplantbook', 'entity_picture': 'https://opb-img.plantbook.io/dracaena%20fragrans.jpg', 'display_pid': 'Dracaena fragrans', 'limits': {'max_moisture': 60, 'min_moisture': 15, 'max_illuminance': 50000, 'min_illuminance': 2000, 'max_dli': 23, 'min_dli': 10, 'max_temperature': 95, 'min_temperature': 50, 'max_conductivity': 1500, 'min_conductivity': 200, 'max_humidity': 85, 'min_humidity': 30}}}
2022-09-27 17:18:25.492 DEBUG (MainThread) [custom_components.plant.sensor] {'plant_info': {'name': 'Dracaena', 'species': 'dracaena fragrans', 'temperature_sensor': 'sensor.dracaena_temperature', 'moisture_sensor': 'sensor.dracaena_moisture', 'conductivity_sensor': 'sensor.dracaena_conductivity', 'illuminance_sensor': 'sensor.dracaena_illuminance', 'search_for': 'Dracaena Fragrans', 'data_source': 'openplantbook', 'entity_picture': 'https://opb-img.plantbook.io/dracaena%20fragrans.jpg', 'display_pid': 'Dracaena fragrans', 'limits': {'max_moisture': 60, 'min_moisture': 15, 'max_illuminance': 50000, 'min_illuminance': 2000, 'max_dli': 23, 'min_dli': 10, 'max_temperature': 95, 'min_temperature': 50, 'max_conductivity': 1500, 'min_conductivity': 200, 'max_humidity': 85, 'min_humidity': 30}}}
2022-09-27 17:18:25.492 INFO (MainThread) [custom_components.plant.sensor] Added external sensor for None sensor.dracaena_illuminance
2022-09-27 17:18:25.628 INFO (MainThread) [custom_components.plant.sensor] Setting sensor.dracaena_illuminance_2 external sensor to sensor.yucca_illuminance
2022-09-27 17:18:25.629 INFO (MainThread) [custom_components.plant.sensor] Setting sensor.dracaena_conductivity_2 external sensor to sensor.yucca_conductivity
2022-09-27 17:18:25.629 INFO (MainThread) [custom_components.plant.sensor] Setting sensor.dracaena_soil_moisture external sensor to sensor.yucca_moisture
2022-09-27 17:18:25.629 INFO (MainThread) [custom_components.plant.sensor] Setting sensor.dracaena_temperature_2 external sensor to sensor.yucca_temperature
2022-09-27 17:18:25.629 INFO (MainThread) [custom_components.plant.sensor] Setting sensor.dracaena_ppfd_mol external sensor to sensor.dracaena_illuminance_2
From the BLE integration:
From the Plant Monitor integration:
from homeassistant-plant.
I updated the README with the above example, which hopefully makes it a bit clearer.
from homeassistant-plant.
I had the same issue with also Miflora and bluetooth proxies. Solved it as you said using plant.replace_sensor
and everything works perfectly.
from homeassistant-plant.
@Olen, that's much more clear. Thank you!
from homeassistant-plant.
Related Issues (20)
- Plant cards stopped loading after a recent update HOT 4
- Values not shown on the card HOT 2
- Add Rhipsalis oasis picture HOT 1
- Values show up alright in the BLE monitor, but don't carry over to the plant component HOT 3
- Soil moisture showing value from battery instead of moisture HOT 2
- Bug: Double entries keep popping up HOT 3
- Log Error - Constant TIME_SECONDS
- Log warning about HA deprecated constants
- [UX improvements] Steps to add a plant HOT 2
- Plant component produces warnings if one of the subvalues isn't known yet HOT 4
- Illuminance data not retrieved from the related sensor HOT 3
- Spanish translation HOT 4
- Concept for plants without sensors HOT 2
- Plant throws error on HA 2024.2.0b0 HOT 5
- illumination will not report a problem HOT 2
- Reloading causes error of Plant Integration HOT 5
- Repository structure for v2024.2.0 is not compliant
- Change humidity sensor source after creation. HOT 3
- ghost entitiesHi Olen, in my case when I delete a plant there are ghost entities that I can't delete. Any help? HOT 7
- HA 2024.3 and above: Detected that custom integration 'plant' accesses hass.components.websocket_api
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from homeassistant-plant.