niceboygithub / AqaraGateway

Aqara Gateway/Hub integration for Home Assistant
505 stars 66 forks source link

Improve AqaraVerticalBlindsController (lumi.curtain.acn011) #228

Closed Necroneco closed 7 months ago

Necroneco commented 7 months ago
  1. Make set_cover_tilt_position more semantic, 0 is closed, 100 is fully open

  1. Fix a status bug: this device will not report run_state to stop when set_cover_position to a value other than 0 and 100, so clear the opening or closing when receiving position.

Some related logs

# open
2024-02-09 14:53:38  DEBUG ... lumi.curtain.acn011 <= {'position': 100} [1707461618.9473288]
2024-02-09 14:53:39  DEBUG ... lumi.curtain.acn011 <= {'position': 100} [1707461619.4650853]
2024-02-09 14:53:39  DEBUG ... lumi.curtain.acn011 <= {'run_state': 1} [1707461619.6661365]

2024-02-09 14:53:55  DEBUG ... lumi.curtain.acn011 <= {'run_state': 2} [1707461635.6363757]
2024-02-09 14:53:55  DEBUG ... lumi.curtain.acn011 <= {'position': 100} [1707461635.7927725]

# from 100 to 68
2024-02-09 14:54:35  DEBUG ... lumi.curtain.acn011 <= {'position': 68} [1707461675.5879767]
2024-02-09 14:54:36  DEBUG ... lumi.curtain.acn011 <= {'position': 68} [1707461676.2125897]
2024-02-09 14:54:36  DEBUG ... lumi.curtain.acn011 <= {'run_state': 0} [1707461676.4084277]

2024-02-09 14:54:43  DEBUG ... lumi.curtain.acn011 <= {'position': 68} [1707461683.1574302]