WIP: Locally controlled Tuya Fan component

G’day all
I have recently bought a Goldair Sleepsmart GSPF315 pedestal fan, which uses a Tuya based WiFi controller. So far I have had success controlling the power, speed and oscillation, and on Google Home, it works perfectly. I am having a few problems with a few things. I have based portions of my code on an older Tuya Local switch component by sean6541 (sadly has been removed from Github), and updated
the PyTuya libraries. I am having a few problems:

  1. I cannot change the fan speed using the Home Assistant control panel. However changing the speed using Google Assistant works perfectly.
  2. How do I get it to update the state as soon as a command is changed?
  3. Can I change the speed to a percentage, and will it work for Google Home? The fan is a 12 speed DC-motor
  4. Can I set up mode selection for the fan (normal, nature and sleep)
  5. Is there a way I can make the fan show as unavailable if it is not responding?
  6. I am getting a lot of time out errors when trying to update the state.

Code is here:

Config is

fan:
  - platform: tuya
    name: "Flat Bedroom Fan"
    host: (IP address)
    local_key: (tuya local key)
    device_id: (tuya device ID)
    id: 1

I used tuya-cli to retrieve the device ID and local key.

Anyone? Bueller? Bueller?

Has anyone tested this?

Any progress on this anyone ? or is it possible to use the template fan with local tuya-cli commands ?