Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SmartThings light brightness not changing #21173

Closed
andrewsayre opened this issue Feb 18, 2019 · 3 comments
Closed

SmartThings light brightness not changing #21173

andrewsayre opened this issue Feb 18, 2019 · 3 comments

Comments

@andrewsayre
Copy link
Member

andrewsayre commented Feb 18, 2019

Home Assistant release with the issue: 0.87.x

Last working Home Assistant release (if known): N/A

Operating environment (Hass.io/Docker/Windows/etc.): All

Component/platform: smartthings.light

Description of problem:
Some users have reported an inability to set/change the brightness of certain lights in HASS using the SmartThings integration. When the user changes the brightness, no error is logged in HASS, but the brightness of the light does not change. At the same time, an error will be logged in the SmartThings Groovy IDE similar to the following:

error groovy.lang.MissingMethodException: No signature of method: script_dth_72d5f7ef4029c8daa8441f2deabebed486fb2938dd86668db854710c0edb4af3.setLevel() is applicable for argument types: (java.lang.Integer, java.lang.Integer) values: [64, 0]

The problem is related to devices that use the following Device Type Handlers (DTH):

  • GE Link Bulb
  • Sylvania Ultra iQ
  • ZigBee Accessory Dimmer
  • ZigBee Dimmer Power
  • ZigBee Dimmer with Motion Sensor
  • ZigBee Dimmer
  • ZLL Dimmer Bulb
  • Z-Wave Metering Dimmer

Additional information:
The root cause of the problem is that the affected DTHs do not properly implement the switchLevel capability. Specifically, they do not have a setlevel overload that accepts 2 parameters, which is expected. An issue has been opened with SmartThings: SmartThingsCommunity/SmartThingsPublic#3986.

Based on the outcome of the issue, an enhancement can be implemented in component dependency pysmartthings to maintain a list of non-confirming DTHs and invoke setLevel with a single parameter.

Please report additional DTHs that experience this issue.

Still experiencing issues? Here's the workaround:

A temporarily workaround is as follows (performed in the SmartThings Groovy IDE):

  1. Create a new device type handler from the affected DTH
  2. Find the method def setLevel(level) method and modify it to: def setLevel(level, rate=0)
  3. Save and self-publish the new DTH
  4. For each affected device, change the DTH to the one newly created.
@asmegin
Copy link

asmegin commented Feb 19, 2019

This fix worked for me although I noted the original value in my DTH was def setLevel(value) and not def setLevel(level).

def setLevel(value, rate=0) worked with my Keen Smart Vents DTHs.

Thank you!

@andrewsayre andrewsayre added problem in device Issue lies within the device, such firmware, software, or user customization/config has parent issue Issue is dependent upon resolution of an issue in another repo. workaround available A workaround/mitigation is available while the root cause is resolved labels Feb 22, 2019
@andrewsayre andrewsayre removed has parent issue Issue is dependent upon resolution of an issue in another repo. problem in device Issue lies within the device, such firmware, software, or user customization/config workaround available A workaround/mitigation is available while the root cause is resolved labels Mar 12, 2019
@andrewsayre
Copy link
Member Author

Parent issue resolved!

@damien67
Copy link

This fix worked for me although I noted the original value in my DTH was def setLevel(value) and not def setLevel(level).

def setLevel(value, rate=0) worked with my Keen Smart Vents DTHs.

Thank you!

Thanks for this quick and dirty solution, worked perfectly for my custom device handler controlling ESP8266s flashed with WLED.

Codered741 added a commit to Codered741/CodysSmartThings that referenced this issue Mar 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants