AnthonMS / my-cards

Bundle of my custom Lovelace cards for Home Assistant. Includes: my-slider, my-slider-v2, my-button
Other
96 stars 26 forks source link

Purifier/Fan Speed/Mode not implemented correctly #13

Open panhans opened 2 years ago

panhans commented 2 years ago

Hi there,

using the card with my Xiaomi Purifier 3H. I have noticed when changing the slider the mode of the purifier will set to mode fan instead of Favorite. With mode fan the purifier provides only 3 different fanspeed presets. (33% / 66% / 100% ) and cant be adjusted stepless as assumed. Didnt' found card options that could handle that behavior.

Greetings!

AnthonMS commented 2 years ago

If you can share some more information about the following, I will be able to implement that fan the next time I'm working on the card.

  1. What kind of entity is it?
  2. Which services can be called?
  3. What is it you want? I mean, the fan mode only provides the three steps, but does the Favorite mode provide stepless?
AnthonMS commented 2 years ago

I'm pretty sure this has been resolved. If not let me know. I might update the old slider as well to fix it.

panhans commented 1 year ago

Oh, sry! I completly missed that!

  1. It's a fan entity
  2. Service for setting mode

service: fan.set_preset_mode
data:
  preset_mode: Favorite
target:
  entity_id: fan.xiaomi_air_purifier_3h

Service for setting Fanspeed

service: fan.set_percentage
data:
  percentage: 44
target:
  entity_id: fan.xiaomi_air_purifier_3h
  1. Exactly: preset mode Fan provides 4 steps and preset mode Favorite let you set the speed stepless.