bit3725 / homeassistant-mi-water-purifier

XiaoMi Water Purifier component for Home Assistant.
72 stars 31 forks source link

confusing installation guide #8

Open NapalmCandy opened 4 years ago

NapalmCandy commented 4 years ago

Hi,

I am trying to install this component but the installation guide is confusing. It say:

1: Copy custom_components/sensor/mi_water_purifier.py to .homeassistant/custom_components/sensor

But the folders and .py files are:

custom_components/mi_water_purifier/sensor.py

I am not sure where to put __init__.py and sensor.py. or if I need to rename the sensor.py to mi_water_purifier.py

Also I have a problem on configuration.yaml and the group configuration, it don't pass the verification and give me the error:

Invalid config for [group]: expected a dictionary for dictionary value @ data['group']. Got [OrderedDict([('xiaomi_water_purifier', OrderedDict([('name', 'Xiaomi Water Purifier'), ('icon', 'mdi:water'), ('entities', ['sensor.tap_water', 'sensor.filtered_water', 'sensor.pp_cotton_filter', 'sensor.front_active_carbon_filter', 'sensor.ro_filter', 'sensor.rear_active_carbon_filter'])]))])]. (See /config/configuration.yaml, line 13).

Can you help me please?

Thanks

thomashooo commented 3 years ago

Hi,

I am trying to install this component but the installation guide is confusing. It say:

1: Copy custom_components/sensor/mi_water_purifier.py to .homeassistant/custom_components/sensor

But the folders and .py files are:

custom_components/mi_water_purifier/sensor.py

I am not sure where to put __init__.py and sensor.py. or if I need to rename the sensor.py to mi_water_purifier.py

Also I have a problem on configuration.yaml and the group configuration, it don't pass the verification and give me the error:

Invalid config for [group]: expected a dictionary for dictionary value @ data['group']. Got [OrderedDict([('xiaomi_water_purifier', OrderedDict([('name', 'Xiaomi Water Purifier'), ('icon', 'mdi:water'), ('entities', ['sensor.tap_water', 'sensor.filtered_water', 'sensor.pp_cotton_filter', 'sensor.front_active_carbon_filter', 'sensor.ro_filter', 'sensor.rear_active_carbon_filter'])]))])]. (See /config/configuration.yaml, line 13).

Can you help me please?

Thanks 1、项目文件夹才是对的,请复制mi_water_purifier整个含init.py,sensor.py custom_components/mi_water_purifier/sensor.py 2、groups.yaml xiaomiwater: name: WaterPurifier icon: mdi:water entities:

  • sensor.tap_water
  • sensor.filtered_water
  • sensor.pp_cotton_filter
  • sensor.front_active_carbon_filter
  • sensor.ro_filter
  • sensor.rear_active_carbon_filter
auntispam commented 3 years ago

try

cp custom_components/mi_water_purifier/sensor.py to .homeassistant/custom_components/mi_water_purifier/sensor.py

I have successfully added the script and configuration.yml for Xiaomi Water Purifier. However, it still shows some error after restarted.

Fail to get_prop from Xiaomi water purifier