notoriousbdg / Home-AssistantConfig

Apache License 2.0
180 stars 49 forks source link

Avoid battery sensor creation for plant entities #31

Open ThomDietrich opened 3 years ago

ThomDietrich commented 3 years ago

A plant (https://www.home-assistant.io/integrations/plant/) entity will falsely trigger the creation of a battery entity from attribute. Please exclude, by design a battery entity must exist that feeds into the plant entity. Would have created a PR but wasn't sure how to check for entity type.

Example:

"plant.gruenlilie":

problem: 'moisture low, conductivity low'
sensors:
  moisture: sensor.gruenlilie_moisture
  battery: sensor.gruenlilie_battery
  temperature: sensor.gruenlilie_temperature
  conductivity: sensor.gruenlilie_conductivity
  brightness: sensor.gruenlilie_light
unit_of_measurement_dict:
  brightness: lux
  temperature: °C
  moisture: '%'
  conductivity: µS/cm
  battery: '%'
moisture: 3
battery: 95
temperature: 20.9
conductivity: 11
brightness: 76
max_brightness: 76
friendly_name: Grünlilie