rospogrigio / localtuya

local handling for Tuya devices
GNU General Public License v3.0
2.71k stars 530 forks source link

Configuration of dimmer switches in localtuya #357

Open oberlinatgithub opened 3 years ago

oberlinatgithub commented 3 years ago

Hello Github community! I have several in wall 2 channel dimmer switches from Amazon. The name is MS-105B. I have already set myself apart from one another with several options to insert them locally into my network. I found out the Device ID and the Local Key and inserted them into my home assistant via localtuya. Unfortunately, I don't get the dim function set. Unfortunately, my Python skills are very limited. And the light.py is very extensive. I know that ID 1 is the on / off and ID 2 is responsible for the dim function. But this option in the integration is only responsible for color reproduction. Is there a template I can use? Many Thanks!

arendst/Tasmota#5737 arendst/Tasmota#8663 arendst/Tasmota#6085

oberlinatgithub commented 3 years ago

So far I have everything to runing, but unfortunately it is not displayed correctly ...

id 12 is just a button, so Hassio's lightbulb symbol is always shown as off.

platform: binary_sensor friendly_name: Schalter Dimmer Wohnzimmer id: 7 device_class: power state_on: "true" # Optional state_off: "false" # Optional

platform: light friendly_name: Schalter Dimmer Wohnzimmer id: 12 # Usually 1 or 20 brightness: 8 # Optional, usually 3 or 22, default: "none" brightness_lower: 29 # Optional, usually 0 or 29, default: 29 brightness_upper: 1000 # Optional, usually 255 or 1000, default: 1000

ErwinSmithZenhomes commented 3 years ago

Did you manage to get this working, would really like to know... due ive got 8 dimmer switches

Floppy commented 3 years ago

Just got one here too, not at all sure how to configure it with localtuya yet though. Happy to provide any information that might help work it out?

ErwinSmithZenhomes commented 3 years ago

thanks I manage to get all of them working with local tuya

Floppy commented 3 years ago

Actually I've just worked it out here, too. I'll update the wiki page of known working devices with the details. 👍🏻

Jdemuren commented 2 years ago

thanks I manage to get all of them working with local tuya

Can you explain how you got it working? Thanks

chechilll commented 2 years ago

Here are the home assistant local tyua config making working the MoesGo 2 way Dimmer

  - host: YOUR_IP
    device_id: YOUR_device_id
    local_key: YOUR_local_key
    friendly_name: Interruptor luz techo
    protocol_version: "3.3"
    entities:
        - platform: light
          friendly_name: Luz 1 - Power
          id: 1                      # Luz 1 Power ON/OFF
          brightness: 2              # Necesario para que aparezca la barra de dimming
          brightness_lower: 5
          brightness_upper: 1000
        - platform: light
          friendly_name: Luz 1 - Dimmable
          id: 2                      # Luz 1 - Dimming
          brightness: 2              # Canal Dimming Luz 1
          brightness_lower: 5
          brightness_upper: 1000
        - platform: light
          friendly_name: Luz 2 - Power
          id: 7                      # Luz 2 Power ON/OFF
          brightness: 8              # Necesario para que aparezca la barra de dimming
          brightness_lower: 5
          brightness_upper: 1000        
        - platform: light
          friendly_name: Luz 2 - Dimmable
          id: 8                      # Luz 2 - Dimming
          brightness: 8              # Canal Dimming Luz 2
          brightness_lower: 5
          brightness_upper: 1000

image

danielccm commented 12 months ago

Here are the home assistant local tyua config making working the MoesGo 2 way Dimmer

  - host: YOUR_IP
    device_id: YOUR_device_id
    local_key: YOUR_local_key
    friendly_name: Interruptor luz techo
    protocol_version: "3.3"
    entities:
        - platform: light
          friendly_name: Luz 1 - Power
          id: 1                      # Luz 1 Power ON/OFF
          brightness: 2              # Necesario para que aparezca la barra de dimming
          brightness_lower: 5
          brightness_upper: 1000
        - platform: light
          friendly_name: Luz 1 - Dimmable
          id: 2                      # Luz 1 - Dimming
          brightness: 2              # Canal Dimming Luz 1
          brightness_lower: 5
          brightness_upper: 1000
        - platform: light
          friendly_name: Luz 2 - Power
          id: 7                      # Luz 2 Power ON/OFF
          brightness: 8              # Necesario para que aparezca la barra de dimming
          brightness_lower: 5
          brightness_upper: 1000        
        - platform: light
          friendly_name: Luz 2 - Dimmable
          id: 8                      # Luz 2 - Dimming
          brightness: 8              # Canal Dimming Luz 2
          brightness_lower: 5
          brightness_upper: 1000

image

How can I add this now with the UI configuration of LocalTuya?