SmartThings Haiku Fan Control with Home Assistant

I’ve managed to get SmartThings integrated with Home Assistant and my Haiku Fan controlled by SmartThings. What I can seem to figure out is how to control the fan with Home Assistant through the SmartThings integration. It seems all the examples posted are simple switch controls, but the Haiku Fan is both a fan and a light and therefore requires some additional parameters to be passed by Home Assistant to know whether the fan or the light is being controlled, both of which are variable speed/dimable.

I can see in the MQTT logs on both sides. In Home Assistant I can see it subscribing to events from the fan, and I can see actions I take against the fan in Home Assistant are making it to SmartThings. Where the trouble comes in is there’s a stark difference between the parameters passed to the device/fan when using SmartThings vs Home Assistant. For instance, those events generated from within SmartThings have a ‘name’ of ‘light’ or ‘fan’ specified that is missing from my Home Assistant initiated requests. Similarly, when I define my payload in the configuration.yaml to match the working value seen in SmartThings to ‘fanon’, ‘fanoff’, ‘lighton’, or ‘lightoff’, rather than simply ‘on’ or ‘off’, the events no longer appear in SmartThings. If I set my payload for ‘on’ or ‘off’, then the events appear in SmartThings but obviously do nothing.

Below is an example of the settings in my configuration.yaml file which are producing the results seen in the screenshot above. Does anyone have any idea what changes are required to my Home Assistant configuration.yaml file so values passed mirror those that work when I control the device directly via SmartThings? Any help here would be greatly appreciated!

platform: mqtt
name: “Living Room Haiku Fan”
state_topic: “smartthings/Living Room Haiku Fan/switch/cmd”
command_topic: “smartthings/Living Room Haiku Fan/switch/cmd”
brightness_state_topic: ‘smartthings/Living Room Haiku Fan/level/cmd’
brightness_command_topic: ‘smartthings/Living Room Haiku Fan/level/cmd’
brightness_scale: 100
qos: 0
payload_on: “on”
payload_off: “off”
optimistic: false

Out of curiosity, what Device Handler are you using with SmartThings? Also, do you care about seeing the status in Home Assistant, or just sending commands in automations for example.

The Device Handler I’m using is System48/Smartthings/Haiku : Haiku Fan Control