Tuya Bulb Appears in HA as a Switch

Hello all - I am having a problem getting HASS to recognize a Tuya light bulb as a bulb (with dimming) instead of a switch.

I bought a couple of Merkury Innovations A19 Smart Light Bulbs (MI-BW942-999W) a while ago. They cannot be flashed OTA with Tasmota - despite my best efforts. :rage: I can set them up w/ Tuya no problem and Tuya sees them as lightbulbs with dimming etc. When I fire up the Tuya integration in Home Assistant, however, Home Assistant only sees these bulbs as switches, not lights, and there is no dimming control. :man_facepalming:

Has anyone had any experience with this?

Many thanks…

1 Like

Perhaps this solves your problem?

Thanks for such a speedy response! :zap: I will give this a shot when I can and report back.

I’m having the same problem. I have a handful of Merkury bulbs that I use with the TuyaSmart App. In TuyaSmart I can control the brightness and RGB color just fine. However in HA the bulbs show up as switches and can only be toggled on and off. Adding the supported_features option in customizations doesn’t work because they are still seen as switches rather than lights.

I have tried using the “Tuya Custom” integration and still have the same problem. I’ve tried manually configuring them as lights but nothing I have done will get HA to recognize them as lights instead of switches. I’m new to HA and this has me beating my head against a wall trying to figure out.

Is there any way to manually set the entity ID domain from “switch.eb2658bexxxxxxx” to “light.eb2658bexxxxxxx”? Manually editing core.entity_registry and core.device_registry doesn’t work. If I could just get the devices to be seen as lights all my problems would be solved. I’m new to HA so I’m not entirely sure where the switch designation comes from. I thought that by editing switch.py or light.py I might be able to force them to register as lights but nothing I did worked.

Any help would be fantastic as I’d love to get into HA but I hit this wall right out of the gate.

Yup, same. I tried Hellis81’s suggestion but to no avail. Like AceMasterHan, I set HA to recognize the switch as a light, and then customized the entity to have supported_features equal to 1. This gave my a brightness slider in Lovelace, but it had no effect (because HA still sees the entity as a switch). Frustrating.

Perhaps you need to do this:

I’ve read a bit about templates but at the time I didn’t fully understand it. The last few days of tinkering and reading have given me a better understanding of HA in general so I’ll try to give the template a shot. I’ll report back if I get anywhere with it.

I was able to convert the Tuya bulb from switch to light by putting it under the light part of the configuration as below:

light:
  - platform: switch
    name: Light
    entity_id: switch.bulb1

Now it worked making it into a light but it will not dim (white light only) even if I change the supported_features to “1” so not sure how to fix that issue. I looked at the template idea but it would not work on a dimmable bulb.

Looks like the_reza has figured out what the problem is and has gotten Teckin to push out a firmware update to fix some of his bulbs. I’m going to contact Merkury and see if I can get them to do the same.

1 Like

Well I’ve been in contact with Merkury/Geeni about this but so far I’m not getting anywhere. I can’t seem to make them understand that the problem is not in the Geeni app itself. They just keep responding that they have confirmed that the bulbs are registered as lights. I’ve sent examples of the API calls and every bit of information that I can but so far I’m just going in circles.

@AceMasterHan Im experiencing the same issue as you with the Geeni bulbs. Happy to try get in touch with them too to try and push the issue. If you find any useful info to pass them let me know :slight_smile:

@Fimtitzgerald After going around in circles for days today they responded saying that they do not support Home Assistant or any other third party integrations besides Google/Alexa and they will not be making any changes or updates at this time. From their perspective there is no bug because the bulbs work fine in the Geeni app.

I politely told them that I would not be purchasing any more Merkury/Geeni products until Home Assistant integration is supported and that I would be recommending to the rest of the Home Assistant community that they do the same. I also talked about how many sales they are missing out on by lacking this integration and how a simple firmware patch could endear them to a whole new clientele earning them much word of mouth advertising etc. Probably bullshit but again I was very polite with the entire interaction and I wanted to plant that seed in their head. It may not do any good but it was worth a shot.

So it seems that for now we’re stuck with our bulbs being switches. Maybe if enough people reach out to them they’ll reconsider. Of course I would encourage everyone to be polite and not harass anyone. The support team doesn’t have the power to make those decisions, they’re just middlemen trying to earn a paycheck.

@AceMasterHan Could you share where/how you reached out to them?

So from my experience the bulbs from 2020 you can’t flash. However if you dig through the shelf at Walmart you might be able to find bulbs labeled on the bottom “Merkury Innovations 2019”.

I recommend stuffing those cloud connected pieces of **** back in the box and return to Geeni. Find 2019 bulbs. Then flash Esphome on them.

I have seven Merkury bulbs and they work like a charm!

If you must use tuya cloud integration definetly hide your network from the bulbs using a VLan

Hello Dreelin,

I am quit new on home-assistant.
Could you please explain to me how you got this to work exactly?
I am using only white lights, so If I could dimm these, that would be great!

I tried adding the code you provided, only changed the entity_id, but still no luck.
Any thoughts/directions you could give me?

Kind regards,

Dwayne

@dwaynepeeters , sure! So if you have your Tuya bulbs setup in HA using the Tuya Integration it will make all the bulbs “switch.bulb_1” as the entity_ids. Now not knowing how you setup your HA using only the configuration.yaml as you main way of doing everything or you broke it all down into separate groups of things with directories for those items. Example is you have your segments of configuration broken up into separate directories like below in your “configuration.yaml” file:

###############
#             #
#   Includes  #
#             #
###############
group: !include_dir_merge_named groups/
script: !include_dir_merge_named scripts/
automation: !include automations.yaml
sensor: !include_dir_merge_list sensors/
input_boolean: !include_dir_merge_named input_booleans/
binary_sensor: !include_dir_merge_list binary_sensors/
camera: !include_dir_merge_list cameras/
switch: !include_dir_merge_list switches/
light: !include_dir_merge_list lights/
scene: !include_dir_merge_list scenes/
cover: !include_dir_merge_list covers/

That way you can create a switches_to_lightes.yaml with the code I put in the above/below comment. What you are doing with that code is create a “switch” entity_id to a “light” entity_id. This will allow your HA to see your Tuya Bulbs as lights not a switch.

###########################################
#####  Changing Switches to a Lights  #####
###########################################
  - platform: switch
    name: Office Lamp
    entity_id: switch.office_lamp

I hope that makes more sense or did I totally lose you?