Olen / homeassistant-plant

Alternative Plant component of home assistant
295 stars 22 forks source link

Soil moisture sensor - "No matching entities found" #191

Open Fade2Gray2 opened 4 weeks ago

Fade2Gray2 commented 4 weeks ago

I am running Home Assistant 2024.8.1 and have installed the latest version of the Plant Monitor integration. I have Ecokwit soil moisture sensors setup under the ecowitt integration. The sensor entity I am trying to use is:

sensor.soil_moisture_1

Under the ecowitt integration in HA, all my ecowitt sensors are displaying correctly along with their current values. Issue: However, when I go into the Plant Monitor UI and select the soil moisture sensor option in the drop down, it does not detect sensor.soil_moisture_1. The sensor (no sensors) do not show up in the list.

Oddly, if I select other sensor types in Plant Monitor like temperature or light level, it is able to correctly detect and display sensors from other integrations.

It seems to be specifically an issue with Plant Monitor not recognizing the ecowitt soil moisture sensor entity, even though that sensor is functioning correctly under the ecowitt integration.

image image

Could this been the result of the recent HA core updates? Thanks

TheWarped commented 4 weeks ago

This was happening with some of my temperature template sensors. I wasn't able to set the sensor through the UI, but I could through the service "Plant monitor: Replace sensor". Maybe check if you can change it there for a work around until the UI issue is patched.

Olen commented 4 weeks ago

My guess is that the ecowitt integration does not report the correct device type, so the Plant integration dos not know that this is a moisture sensor. Please report it as an issue for the ecowitt integration.

In the mean time, you can do as @TheWarped suggests. Use the "Replace Sensor" action to set the right sensor. The service call does not try to alidate what kind of sensor you are replacing with.

Fade2Gray2 commented 4 weeks ago

Hi, I am not sure l would agree with what you are saying, as the Ecowitt (per my previous screenshot) integration is correctly displaying all of the sensors and values under the Ecowitt integration. Prior to the Home Assistant core upgrade your integration was working across all 6 Ecowitt sensors I had also attempted changing the sensor per TheWarped suggestion, however, the dropdown option to perform the "Replace sensor" doesn't display the moisture sensors thus unable to perform the replace option. Your integration does pick up the other (temp, humidity etc.) sensors but fails to pick up the moisture sensor (the main important sensor)

TheWarped commented 4 weeks ago

@Fade2Gray2 Hmm, one more work around idea, try copying the sensor entity ID, pasting it into the service dropdown, and hitting enter despite it not showing in the drop down.
I had to do that with a few of mine but disregarded the names not popping up as something like my system not catching all the new entities I was making or me providing too long of names and causing an error there. If I remember right, I think it only happened on entities with really long names, but that could've been coincidence. That method worked for a few of mine, though it took a few minutes after I submitted it to take effect.

Olen commented 4 weeks ago

Your screenshot does not show anything about what DeviceClass the ecowitt integration is using. The Plant integration will only include sensors with the right DeviceClass in the dropdown. https://developers.home-assistant.io/docs/core/entity/sensor/

For soil moisture, the expeced class i "SensorDeviceClass.MOISTURE"

I can't find anything in the source of the ecowitt integration that sets this DeviceClass: https://github.com/home-assistant/core/blob/dev/homeassistant/components/ecowitt/sensor.py

You can use Yaml-mode in the "Replace Sensor" Action (Service Call) to paste in the correct sensor entity_id.

jeffcybulski commented 4 days ago

I was able to use the place method to get the moister sensor connected.

And Hass-Variables to get a fake lux reading connected.

However, when I create a Hass-Variables irradiance sensor value of 800 (ppfd) into the Plant ppfd, it reads as 0.0006105 mol/s⋅m². This value seems to be derived from the lux value somehow.