One major difference that I can think of is that I have connected my switch to a Tuya hub before... So I will remove the battery for 10 minutes, although there is a little chance this will change anything.
Hopefully adding some more debug information in the next version will help to find out where the problem may be. I am testing my one pcs TS004F pairing to two different HE hubs, the 'production' one using the driver as downloaded from GitHub.
NB I didn't press button 4 but I did press buttons 2 and 3, which didn't appear in logs or events (I did try using the switch to scene mode a couple of times - tho it looks like the install did it in the first place too)
Bad news..
Switching between the Dimmer and Scene modes works, but... only when TS004F has been first paired to a Tuya gateway! Afterward, when the device is re-paired to HE hub, it can be switched into Scene control mode and all the 12 button combinations work.
However, if the battery cell is removed for several minutes and the device is paired to HE again, it will not work anymore.
The above means that we are still missing some specific configurations that are performed by the Tuya hub during the pairing process. I hope this missing configuration depends only on the Tuya Zigbee coordinator, and does not involve Tuya cloud in any way!
So, we don't have a working driver for TS004F yet. I will continue trying, but for sure this will take more time.
I think it's this 2mqtt stuff. An update would be needed in Hubitat libraries to handle this type of Tuya device properly, before we could write successful drivers on top of it. There is a thread requesting it here Smart life / Tuya support
It didn't work as expected after the first pairing. Aside from connecting it, it does nothing. After re-paired to HE hub with kkossev "Tuya Scene Switch TS004F" driver still couldn't change to Scene control mode. I looked at the driver. I corrected the typo: "swicthIntoSceneMode" (rather it has nothing to do with whether the switch works). Re-paired. Then I changed the driver to the default tuya switch driver. Now the switch is working.
I did not have time to check if, apart from pressing, there is a possibility to use double pressing and holding option for the buttons. I was able to assign single press to each button.
I haven't had a tuya gate before. I have not changed to scene mode. I assigned actions to buttons via Button Controller (device / driver did not generate child buttons).
Shame to say but I don't remember. I did not expect anything to work, so I changed the settings so quickly. Here in the city I have everything on another smart system but at the weekend I will be in the countryside and check it thoroughly.
If the battery was already installed is it possible you received one that had been returned by a previous customer? Maybe they had already paired with a Tuya hub previously?
Of course it could be that someone had paired the tuya before, but this is unlikely.
It is quite possible that I will contact the seller about his other product (I still cannot find a working driver to his other product that will generate 2 child devices for me):
I'd expect quite a few of them had been returned as people expected them to work like others that appear identical, then return them assuming them to be faulty. After testing (with their Tuya hub) at the factory they are probably sent out again to sell as "working fine". Which could explains why it's not totally rare that some already have batteries.
Of course it may be as you say. I will ask the seller.
Hmm... but even if it were, I still couldn't (and should have been able to) change it to scene switch mode and use with kkossev "Tuya Scene Switch TS004F" driver.
Based on post #124 where kkossev says their device worked with the driver but only where it had been previously paired with a Tuya gateway. After a hard reset it was no longer fully compliant with the driver.
I am not 100% sure why, but after sending quickly a magic sequence of read attributes commands during the pairing process, now it works for me even when the battery was taken out for a long time,.
Please test and let me know if it works in your environments. Here I have tested it with two different C7 hubs (one is even on a non-standard Zigbee channel 24), but I have only one TS004F device. Seems there are critical timings that may vary in different setups.