Yes on 2.4.0. I just repeated this all again, stopped z2m docker, disabled the MQTT Auto Discovery hardware item in Dz, deleted all discovery topics and base topics from the broker using Mqtt Explorer. I also deleted all devices relating to the airfilter in the Dz device list.
Then I restarted the z2m container and let it create all the discovery and base topics. I then enabled the MQTT Auto Discovery hardware item in Dz and let the device be re-discovered. The new Starkwind devices were created, including a selector switch for the fan speed and a custom sensor also for the fan speed.
These topics were created on the broker...
zigbee2mqtt/starkwind airfilter
{"air_quality":"hazardous","child_lock":"UNLOCK","device_age":799097,"fan_mode":"7","fan_speed":7,"fan_state":"ON","filter_age":348351,"identify":null,"led_enable":true,"linkquality":15,"pm25":152,"replace_filter":true,"update":{"installed_version":69633,"latest_version":69633,"state":"idle"}}
and
z2m/fan/0x2c1165fffea5bcac/fan/config
{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"command_topic":"zigbee2mqtt/starkwind airfilter/set/fan_state","device":{"hw_version":1,"identifiers":["zigbee2mqtt_0x2c1165fffea5bcac"],"manufacturer":"IKEA","model":"STARKVIND air purifier","model_id":"E2007","name":"starkwind airfilter","sw_version":"1.1.001","via_device":"zigbee2mqtt_bridge_0x00124b002298908f"},"name":null,"object_id":"starkwind_airfilter","origin":{"name":"Zigbee2MQTT","sw":"2.4.0","url":"https://www.zigbee2mqtt.io"},"percentage_command_template":"{{ {0:'off', 1:'1', 2:'2', 3:'3', 4:'4', 5:'5', 6:'6', 7:'7', 8:'8', 9:'9'}[value] | default('') }}","percentage_command_topic":"zigbee2mqtt/starkwind airfilter/set/fan_mode","percentage_state_topic":"zigbee2mqtt/starkwind airfilter","percentage_value_template":"{{ {'off':0, '1':1, '2':2, '3':3, '4':4, '5':5, '6':6, '7':7, '8':8, '9':9}[value_json.fan_mode] | default('None') }}","preset_mode_command_topic":"zigbee2mqtt/starkwind airfilter/set/fan_mode","preset_mode_state_topic":"zigbee2mqtt/starkwind airfilter","preset_mode_value_template":"{{ value_json.fan_mode if value_json.fan_mode in ['auto'] else 'None' | default('None') }}","preset_modes":["auto"],"speed_range_max":9,"speed_range_min":1,"state_topic":"zigbee2mqtt/starkwind airfilter","state_value_template":"{{ value_json.fan_state }}","unique_id":"0x2c1165fffea5bcac_fan_zigbee2mqtt"}
I changed the speed directly on the fan hardware and this change was reflected in z2m, mosquitto and Dz. Then I went to change the fan to level 4 and instead it turned "off" with the error again ...
Code: Select all
Zigbee MQTT: Climate device invalid/unknown preset_mode received! (0x2c1165fffea5bcac_fan_zigbee2mqtt: [object object])
On the broker after this appeared..
zigbee2mqtt/starkwind airfilter/set/fan_mode
{"fan_mode":4}
But the fan switched off and in Dz it changed to off and in z2m it changed to off. Curiously there is an extra "On/Off" switch endpoint in z2m which doesn't appear in Dz. If I switch this (and not the "fan mode" endpoint) in the z2m GUI the fan will turn on. It will also turn on in z2m using the fan speed selector.
Intel NUC with Ubuntu Server VM (Proxmox),mosquitto(docker),RFXtrx433E,zwavejsUI (docker),Zigbee2mqtt(docker),SMA Hub (docker),Harmony Hub plugin, Kodi plugin,Homebridge(docker)+Google Home,APC UPS,SMA Modbus,Mitsubishi MQTT, Broadlink,Dombus