GithubHelp home page GithubHelp logo

liudger / hass-xiaomi-mi-flora-and-flower-care Goto Github PK

View Code? Open in Web Editor NEW

This project forked from r-renato/hass-xiaomi-mi-flora-and-flower-care

0.0 0.0 0.0 3.21 MB

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

License: MIT License

Python 57.96% TypeScript 42.04%

hass-xiaomi-mi-flora-and-flower-care's Introduction

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

Please read carefully

  1. Need to register to Flower Care™ Smart Monitor App on Google Android devices or on Apple iOS devices to use this component.
  2. This custom component extends the Home Assistant Plant monitor with plant information coming from the Flora Care application.
  3. The lovelace card is self installed by the component and can be used also without the xiaomi Flora sensor.

Home Assistant lovelace card Home Assistant lovelace card

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

To add , perform the following:

  1. In the Home Assistant UI, go to Configuration >> Lovelace Dashboards >> Resources tab
  2. Click the + button
  3. Under url, copy and paste the following URL:
/hacsfiles/hacs-card-for-xiaomi-mi-flora-and-flower-care/hacs-card-for-xiaomi-mi-flora-and-flower-care.js
  1. Under Resource Type, select 'Javascript Module'.

If you are using YAML to manage your Lovelace UI, 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

- Lovelace card config with maintenance session (without sensors)

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

Home Assistant lovelace card

- Lovelace card config with info and maintenance session (without sensors)

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

Home Assistant lovelace card

- Lovelace card config with info and maintenance session (with sensors)

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

Home Assistant lovelace card

or with mod-card
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

hass-xiaomi-mi-flora-and-flower-care's People

Contributors

dnguyen800 avatar r-renato avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.