/hass-xiaomi-mi-flora-and-flower-care

The Home Assistant custom component uses Flower Care™ Smart Monitor to retrieve flower information (http://www.huahuacaocao.com/product).

Primary LanguagePythonMIT LicenseMIT

Xiaomi mi flora and Flower care integration

The Home Assistant custom component uses Flower Care™ Smart Monitor to retrieve flower information (http://www.huahuacaocao.com/product). HuaHuaCaoCao means flowers & Plants in Chinese.

hacs_badge

License Total alerts Language grade: Python

BuyMeCoffee

Need to register to Flower Care™ Smart Monitor App on Google Android devices or on Apple iOS devices to use the component.

Home Assistant Plant monitor extended component, integrated with Flora care application plant informations.

Manual installation

  1. Using the tool of choice, open the directory (folder) of your HA configuration (there you can find configuration.yaml).
  2. If you do not have a custom_components directory (folder) there, you need to create it.
  3. In the custom_components directory (folder) create a new folder called huahuacaocao.
  4. Download all the files from the custom_components/huahuacaocao/ directory (folder) in this repository.
  5. Place the files you downloaded in the new directory (folder) you created.

Configuration

  1. Install your preferred Flower Care™ Smart Monitor App
  2. Register your credentials in App, the same credentials will be used to configure the huahuacaocao integration component

Component variables

username

(string)(Required)
The username to use with your Flower Care™ Smart Monitor App.

password

(string)(Required)
The corresponding password in yourFlower Care™ Smart Monitor App.

region

(string)(Optional)
Your country code (two-letter)

Examples

huahuacaocao:
  username: !secret huahuacaocao_user
  password: !secret huahuacaocao_password
  region: EU

Sensor variables

plant_id

(string)(Required)
Plant alias. You can find it in the Plant Archive panel of the Flower Care™ Smart Monitor App

Name

(string)(Required)
Name to use in the frontend.

sensors

(list)(Required)
List of sensor measure entities.

moisture

(string)(Optional)
Moisture of the plant. Measured in %. Can have a min and max value set optionally.

battery

(string)(Optional)
Battery level of the plant sensor. Measured in %. Can only have a min level set optionally.

temperature

(string)(Optional)
Temperature of the plant. Measured in degrees Celsius. Can have a min and max value set optionally.

conductivity

(string)(Optional)
Conductivity of the plant. Measured in µS/cm. Can have a min and max value set optionally.

brightness

(string)(Optional)
Light exposure of the plant. Measured in Lux. Can have a min and max value set optionally.

Examples

  - platform: huahuacaocao
    plant_id: "zamioculcas zamiifolia"
    name: "Plant Zamioculcas Zamiifolia"
    sensors:
      moisture: sensor.zamioculcas_zamiifolia_moisture
      battery: sensor.zamioculcas_zamiifolia_battery
      temperature: sensor.zamioculcas_zamiifolia_temperature
      conductivity: sensor.zamioculcas_zamiifolia_conductivity
      brightness: sensor.zamioculcas_zamiifolia_light_intensity

Integration Examples

huahuacaocao:
  username: !secret huahuacaocao_user
  password: !secret huahuacaocao_password
  region: EU
  
sensor:
  - platform: miflora
    mac: 'XX:XX:XX:XX:XX:XX'
    name: Zamioculcas Zamiifolia
    force_update: true
    median: 3
    monitored_conditions:
      - moisture
      - light
      - temperature
      - conductivity
      - battery

  - platform: huahuacaocao
    plant_id: "zamioculcas zamiifolia"
    name: "Plant Zamioculcas Zamiifolia"
    sensors:
      moisture: sensor.zamioculcas_zamiifolia_moisture
      battery: sensor.zamioculcas_zamiifolia_battery
      temperature: sensor.zamioculcas_zamiifolia_temperature
      conductivity: sensor.zamioculcas_zamiifolia_conductivity
      brightness: sensor.zamioculcas_zamiifolia_light_intensity

Home Assistant Flora Panel

Home Assistant plant panel

Lovelace Configuration

Import the card using:

resources:
  - url: /hacsfiles/hacs-card-for-xiaomi-mi-flora-and-flower-care/hacs-card-for-xiaomi-mi-flora-and-flower-care.js
    type: js

Card variables

Name Type Requirement Default Description
type string Required Card type must be custom:xiaomi-mi-flora-and-flower-care-card
name string Optional Card name shown on top
zone_name string Optional Zone name, where the flower is located
display string list Optional Ordered list of sessions. Valid values: info, maintenance
entity string Optional huahuacaocao plant sensor name

Examples

type: custom:xiaomi-mi-flora-and-flower-care-card
name: "Zamioculcas Zamiifolia"
entity: plant.plant_zamioculcas_zamiifolia

or

type: custom:xiaomi-mi-flora-and-flower-care-card
name: "Zamioculcas Zamiifolia"
zone_name: "Kitchen"
display:
    - info
    - maintenance

or

type: custom:mod-card
card:
  type: custom:xiaomi-mi-flora-and-flower-care-card
  name: "Zamioculcas Zamiifolia"
  entity: plant.plant_zamioculcas_zamiifolia
style:|
   ha-card {
      --primary-text-color: #FFFFFF;
      --secondary-text-color: #FFFFFF;
      --paper-item-icon-color: #FFFFFF;
      --table-tr-td-border-bottom: #FFFFFF;
      --banner-background: rgba(50,50,50,0.75);
      --content-background: rgba(50,50,50,0.75);
   }

Home Assistant lovelace card