Skip to content
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

Read values from plant domain #13

Open
k1rd3rf opened this issue Jun 5, 2020 · 1 comment
Open

Read values from plant domain #13

k1rd3rf opened this issue Jun 5, 2020 · 1 comment

Comments

@k1rd3rf
Copy link

k1rd3rf commented Jun 5, 2020

It would be nice to specify one entity instead of each and every entity, since HA support the plant domain.

plant:
  ficus:
    sensors:
      moisture: sensor.plant_ficus_moisture
      conductivity: sensor.plant_ficus_conductivity
      brightness: sensor.plant_ficus_brightness
      temperature: sensor.plant_ficus_temperature
      battery: sensor.plant_ficus_battery
    min_moisture: 20
    max_moisture: 60
    min_conductivity: 350
    max_conductivity: 2000
    min_brightness: 2500
    max_brightness: 35000
    min_temperature: 8
    max_temperature: 32
    min_battery: 15

lovelace:

- type: custom:miflora-card
  title: 'Ficus microcarpa'
  image: images/ficus_microcarpa.jpg
  plant: plant.ficus
@Olen
Copy link
Contributor

Olen commented Jun 8, 2020

I like the idea.
Getting the current status from the plant entity is easy enough. However, I can't find an easy way to get the configured max/min-values.
There is another card here that just checks if the state contains a keyword, and will color the icon red based on that:
https://github.com/jckoester/lovelace-picture-plant-card

But I don't really like that approach.

I think it would be better to get the configured min/max-values into the attributes of the plant "sensors":
https://github.com/home-assistant/core/blob/dev/homeassistant/components/plant/__init__.py

That way we could read it directly from the plant entity.
But that requires a PR to the plant component...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants