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

[Bug] [zigbee2mqtt] Failed to setup switch for accessory tuya from expose "{"features":[{"access":3,"description":"Enables/disables physical input on t #443

Closed
Jeepmg opened this issue May 14, 2022 · 5 comments · Fixed by #476
Labels
bug Something isn't working stale

Comments

@Jeepmg
Copy link

Jeepmg commented May 14, 2022

Please use the template and fill in all the data requested below!

Describe the bug
Message in Homebridge for all my TuYa TS011F_plug_3

[5/13/2022, 10:36:17 PM] [zigbee2mqtt] Restoring accessory: 0xa4c1389d5a91e50a (0xa4c1389d5a91e50a)
[5/13/2022, 10:36:17 PM] [zigbee2mqtt] Failed to setup switch for accessory Sapin from expose "{"features":[{"access":3,"description":"Enables/disables physical input on the device","name":"state","property":"child_lock","type":"binary","value_off":"UNLOCK","value_on":"LOCK"}],"type":"lock"}": Error: Required "lock_state" property not found for Lock.
[5/13/2022, 10:36:17 PM] [zigbee2mqtt] Restoring accessory: 0xa4c138d45d355204 (0xa4c138d45d355204)
[5/13/2022, 10:36:17 PM] [zigbee2mqtt] Failed to setup switch for accessory Guirlande from expose "{"features":[{"access":3,"description":"Enables/disables physical input on the device","name":"state","property":"child_lock","type":"binary","value_off":"UNLOCK","value_on":"LOCK"}],"type":"lock"}": Error: Required "lock_state" property not found for Lock.
[5/13/2022, 10:36:17 PM] [zigbee2mqtt] Restoring accessory: 0xa4c13877b1676118 (0xa4c13877b1676118)
[5/13/2022, 10:36:17 PM] [zigbee2mqtt] Failed to setup switch for accessory Lampadaire from expose "{"features":[{"access":3,"description":"Enables/disables physical input on the device","name":"state","property":"child_lock","type":"binary","value_off":"UNLOCK","value_on":"LOCK"}],"type":"lock"}": Error: Required "lock_state" property not found for Lock.

Related devices
Are you experiencing this behavior with a particular device? yes

TuYa TS011F_plug_3

To Reproduce
Steps to reproduce the behavior, for example:

  1. Change '...' via the Home app.
  2. Log shows MQTT message '...' being published to topic '...'
  3. The device does the following: '...'

Expected behavior
no error message

MQTT messages
The plug expose

{
"child_lock": "UNLOCK",
"current": 0,
"energy": 0,
"indicator_mode": "off/on",
"linkquality": 149,
"power": 0,
"power_outage_memory": "restore",
"state": "OFF",
"update": {
"state": "idle"
},
"voltage": 237
}

Versions used
Please provide the version of the following pieces of software:

  • This plugin : 1.8.0
  • Homebridge 1.4.1
  • Zigbee2MQTT (can be found in MQTT topic zigbee2mqtt/bridge/info) 1.25.1
  • Homebridge Config UI X (if applicable) 4.44.1
@Jeepmg Jeepmg added the bug Something isn't working label May 14, 2022
@itavero
Copy link
Owner

itavero commented May 14, 2022

If you just want to error to disappear, simply add child_lock to the excluded_keys for these devices (or in the defaults) in the plugin configuration. See the docs for additional info.

The problem is that the device exposes a lock which doesn't have a lock_state. The device probably works just fine, except for the child lock feature.

@Jeepmg
Copy link
Author

Jeepmg commented May 19, 2022

Hello,

I just did your trick

"defaults": {
"excluded_keys": [
"child_lock"

Unfortunately, I still get the error message.

@stale
Copy link

stale bot commented Jun 24, 2022

It appears that this issue did not have an update in quite some time. Please check if you can provide any additional information to help resolve this issue. If there isn't any activity in the next two weeks, this issue will be closed automatically. Thank you for your contributions!

@stale stale bot added the stale label Jun 24, 2022
@itavero
Copy link
Owner

itavero commented Jun 30, 2022

Just checked the code and the error message indeed stays as the check is done "too late".. I'll try to fix that.

@stale
Copy link

stale bot commented Aug 5, 2022

It appears that this issue did not have an update in quite some time. Please check if you can provide any additional information to help resolve this issue. If there isn't any activity in the next two weeks, this issue will be closed automatically. Thank you for your contributions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants