purifier-card icon indicating copy to clipboard operation
purifier-card copied to clipboard

request support for Xiaomi 4 compact

Open mattiabrunello5 opened this issue 1 year ago • 7 comments

Is your feature request related to a problem? Please describe. support for Xiaomi 4 compact air purifier

Describe the solution you'd like add the support for the purifier

Describe alternatives you've considered

Additional context now i try to integrate them but the card is empty Cattura

mattiabrunello5 avatar Dec 30 '22 13:12 mattiabrunello5

There hasn't been any activity on this issue recently. This issue has now been marked as stale and will be closed if no further activity occurs. Please, update to the latest version and check if that solves the issue. Thank you for your contributions!

github-actions[bot] avatar Jun 16 '23 20:06 github-actions[bot]

@mattiabrunello5 not sure if this helps, but here's my settings for Xiaomi (Smart) Air Purifier 4 Pro - its bigger cousin, for example

type: custom:purifier-card
entity: fan.xiaomi_smart_air_purifier_4_pro
compact_view: false
aqi:
  entiry_id: sensor.xiaomi_smart_air_purifier_4_pro_pm10
  unit: PM2.5
stats:
  - entity_id: sensor.xiaomi_smart_air_purifier_4_pro_temperature
    unit: °C
    subtitle: Temp
  - entity_id: sensor.xiaomi_smart_air_purifier_4_pro_humidity
    unit: '%'
    subtitle: Humidity
  - entity_id: sensor.xiaomi_smart_air_purifier_4_pro_filter_life_remaining
    unit: '%'
    subtitle: Filter
shortcuts:
  - name: Speed 1
    icon: mdi:fan-speed-1
    percentage: '33'
  - name: Speed 2
    icon: mdi:fan-speed-2
    percentage: '66'
  - name: Speed 3
    icon: mdi:fan-speed-3
    percentage: '100'
  - name: Silent
    icon: mdi:volume-off
    preset_mode: Silent
  - name: Favorite
    icon: mdi:heart
    preset_mode: Favorite
  - name: Auto
    icon: mdi:auto-mode
    preset_mode: Auto
show_name: true

image

PPsyrius avatar Jun 23 '23 05:06 PPsyrius

There hasn't been any activity on this issue recently. This issue has now been marked as stale and will be closed if no further activity occurs. Please, update to the latest version and check if that solves the issue. Thank you for your contributions!

github-actions[bot] avatar Aug 22 '23 06:08 github-actions[bot]

I would also like the support of the slider.

Toolmaster30 avatar Aug 24 '23 13:08 Toolmaster30

+1 for this

type: custom:purifier-card
entity: fan.zhimi_cpa4_8395_air_purifier
compact_view: false
aqi:
  entiry_id: sensor.zhimi_cpa4_8395_pm25_density
  unit: PM2.5
stats:
  - entity_id: sensor.zhimi_cpa4_8395_pm25_density
    subtitle: PM2.5 Density
    value_template: '{{ value }}'
  - entity_id: sensor.zhimi_cpa4_8395_filter_life_level
    unit: '%'
    subtitle: Filter Life
  - entity_id: sensor.zhimi_cpa4_8395_filter_left_time
    unit: ''
    subtitle: Days Left
shortcuts:
  - name: Speed 1
    icon: mdi:fan-speed-1
    percentage: '33'
  - name: Speed 2
    icon: mdi:fan-speed-2
    percentage: '66'
  - name: Speed 3
    icon: mdi:fan-speed-3
    percentage: '100'
  - name: Silent
    icon: mdi:volume-off
    preset_mode: Silent
  - name: Favorite
    icon: mdi:heart
    preset_mode: Favorite
  - name: Auto
    icon: mdi:auto-mode
    preset_mode: Auto

The result is the following: Képernyőfotó 2023-09-12 - 23 44 27

I can't make the slider and the fan-speed shortcuts working

antalmate12 avatar Sep 12 '23 21:09 antalmate12

+1 for this

type: custom:purifier-card
entity: fan.zhimi_cpa4_8395_air_purifier
compact_view: false
aqi:
  entiry_id: sensor.zhimi_cpa4_8395_pm25_density
  unit: PM2.5
stats:
  - entity_id: sensor.zhimi_cpa4_8395_pm25_density
    subtitle: PM2.5 Density
    value_template: '{{ value }}'
  - entity_id: sensor.zhimi_cpa4_8395_filter_life_level
    unit: '%'
    subtitle: Filter Life
  - entity_id: sensor.zhimi_cpa4_8395_filter_left_time
    unit: ''
    subtitle: Days Left
shortcuts:
  - name: Speed 1
    icon: mdi:fan-speed-1
    percentage: '33'
  - name: Speed 2
    icon: mdi:fan-speed-2
    percentage: '66'
  - name: Speed 3
    icon: mdi:fan-speed-3
    percentage: '100'
  - name: Silent
    icon: mdi:volume-off
    preset_mode: Silent
  - name: Favorite
    icon: mdi:heart
    preset_mode: Favorite
  - name: Auto
    icon: mdi:auto-mode
    preset_mode: Auto

The result is the following: Képernyőfotó 2023-09-12 - 23 44 27

I can't make the slider and the fan-speed shortcuts working

Mind under aqi object It's written "entiry_id" instead of "entity_id". Like this you'll be able to visualize aqi data within the card.

Besides that, I have a Xiaomi 4 Compact and seems that slider cannot work on this device since xiaomi_miot integration creates 2 entities: One to turn on/off and switch between modes, and a slider to customize manual mode.

That's why your shortcuts dont't work, you need to set a service like following configuration:

type: custom:purifier-card
entity: fan.zhimi_cpa4_9859_air_purifier
aqi:
  entity_id: sensor.zhimi_cpa4_9859_pm25_density
  unit: PM2.5
stats:
  - entity_id: sensor.zhimi_cpa4_9859_pm25_density
    subtitle: PM2.5
  - entity_id: sensor.zhimi_cpa4_9859_filter_life_level
    unit: '%'
    subtitle: Filter Life
shortcuts:
  - name: sleep
    icon: mdi:power-sleep
    preset_mode: Sleep
  - name: 25%
    icon: mdi:circle-slice-2
    preset_mode: Favorite
    service: number.set_value
    service_data:
      entity_id: number.zhimi_cpa4_9859_favorite_level
      value: 3
  - name: 50%
    icon: mdi:circle-slice-4
    preset_mode: Favorite
    service: number.set_value
    service_data:
      entity_id: number.zhimi_cpa4_9859_favorite_level
      value: 7
  - name: 75%
    icon: mdi:circle-slice-6
    preset_mode: Favorite
    service: number.set_value
    service_data:
      entity_id: number.zhimi_cpa4_9859_favorite_level
      value: 11
  - name: 100%
    icon: mdi:circle-slice-8
    preset_mode: Favorite
    service: number.set_value
    service_data:
      entity_id: number.zhimi_cpa4_9859_favorite_level
      value: 14
  - name: auto
    icon: mdi:fan-auto
    preset_mode: Auto
show_name: true
show_state: true
show_toolbar: true
compact_view: false

The only chance to make the slider work is at custom-card side. It would be a nice feature to be able to configure the slider and set it to a different entity other than the device.

javato avatar Oct 20 '23 14:10 javato

There hasn't been any activity on this issue recently. This issue has now been marked as stale and will be closed if no further activity occurs. Please, update to the latest version and check if that solves the issue. Thank you for your contributions!

github-actions[bot] avatar Dec 19 '23 15:12 github-actions[bot]

This issue was closed because it has been stalled for 30 days with no activity. Please open a new issue if the issue is still relevant, linking to this one.

github-actions[bot] avatar Jan 18 '24 16:01 github-actions[bot]