zha-device-handlers: [BUG] TS0601 changing brightness turns off device
Describe the bug
- When changing the brightness of this device it shows as “on” within HA but the device itself doesn’t turn on.
- When changing the brightness of this device when it is already on it will turn off the device while HA still reports it as “on”.
To Reproduce Steps to reproduce the behavior:
- Turn on light
- Try change brightbess
- Light turns off (not in HA but the switch turns off)
Expected behavior A clear and concise description of what you expected to happen. This used to work, I honestly don’t know what version. I’m 100% sure this is broken in all 2022.8.x versions.
Device signature
{
"node_descriptor": "NodeDescriptor(logical_type=<LogicalType.Router: 1>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress|RxOnWhenIdle|MainsPowered|FullFunctionDevice: 142>, manufacturer_code=4098, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=False, *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, *is_security_capable=False)",
"endpoints": {
"1": {
"profile_id": 260,
"device_type": "0x0100",
"in_clusters": [
"0x0000",
"0x0004",
"0x0005",
"0x0006",
"0x0008",
"0xef00"
],
"out_clusters": [
"0x000a",
"0x0019"
]
}
},
"manufacturer": "_TZE200_dfxkcots",
"model": "TS0601",
"class": "zhaquirks.tuya.ts0601_dimmer.TuyaSingleSwitchDimmer"
}
Diagnostic information
{
"home_assistant": {
"installation_type": "Home Assistant Container",
"version": "2022.8.4",
"dev": false,
"hassio": false,
"virtualenv": false,
"python_version": "3.10.5",
"docker": true,
"arch": "aarch64",
"timezone": "Europe/Amsterdam",
"os_name": "Linux",
"os_version": "5.4.0-1068-raspi",
"run_as_root": true
},
"custom_components": {
"afvalbeheer": {
"version": "4.9.6",
"requirements": [
"rsa",
"pycryptodome"
]
},
"luchtmeetnet": {
"version": "0.0.3",
"requirements": [
"luchtmeetnet==0.0.2"
]
},
"dwd_pollenflug": {
"version": "1.0.1",
"requirements": []
},
"adaptive_lighting": {
"version": "1.0.14",
"requirements": []
},
"hacs": {
"version": "1.26.2",
"requirements": [
"aiogithubapi>=22.2.4"
]
},
"worlds_air_quality_index": {
"version": "0.3.3",
"requirements": []
},
"powercalc": {
"version": "v0.25.0-beta.8",
"requirements": [
"numpy>=1.21.1"
]
},
"zha_toolkit": {
"version": "v0.8.12",
"requirements": []
},
"toon_climate": {
"version": "1.0.12",
"requirements": []
}
},
"integration_manifest": {
"domain": "zha",
"name": "Zigbee Home Automation",
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/zha",
"requirements": [
"bellows==0.32.0",
"pyserial==3.5",
"pyserial-asyncio==0.6",
"zha-quirks==0.0.78",
"zigpy-deconz==0.18.0",
"zigpy==0.49.1",
"zigpy-xbee==0.15.0",
"zigpy-zigate==0.9.1",
"zigpy-znp==0.8.1"
],
"usb": [
{
"vid": "10C4",
"pid": "EA60",
"description": "*2652*",
"known_devices": [
"slae.sh cc2652rb stick"
]
},
{
"vid": "10C4",
"pid": "EA60",
"description": "*sonoff*plus*",
"known_devices": [
"sonoff zigbee dongle plus"
]
},
{
"vid": "10C4",
"pid": "EA60",
"description": "*tubeszb*",
"known_devices": [
"TubesZB Coordinator"
]
},
{
"vid": "1A86",
"pid": "7523",
"description": "*tubeszb*",
"known_devices": [
"TubesZB Coordinator"
]
},
{
"vid": "1A86",
"pid": "7523",
"description": "*zigstar*",
"known_devices": [
"ZigStar Coordinators"
]
},
{
"vid": "1CF1",
"pid": "0030",
"description": "*conbee*",
"known_devices": [
"Conbee II"
]
},
{
"vid": "10C4",
"pid": "8A2A",
"description": "*zigbee*",
"known_devices": [
"Nortek HUSBZB-1"
]
},
{
"vid": "0403",
"pid": "6015",
"description": "*zigate*",
"known_devices": [
"ZiGate+"
]
},
{
"vid": "10C4",
"pid": "EA60",
"description": "*zigate*",
"known_devices": [
"ZiGate"
]
},
{
"vid": "10C4",
"pid": "8B34",
"description": "*bv 2010/10*",
"known_devices": [
"Bitron Video AV2010/10"
]
}
],
"codeowners": [
"@dmulcahey",
"@adminiuga",
"@puddly"
],
"zeroconf": [
{
"type": "_esphomelib._tcp.local.",
"name": "tube*"
},
{
"type": "_zigate-zigbee-gateway._tcp.local.",
"name": "*zigate*"
}
],
"after_dependencies": [
"onboarding",
"usb",
"zeroconf"
],
"iot_class": "local_polling",
"loggers": [
"aiosqlite",
"bellows",
"crccheck",
"pure_pcapy3",
"zhaquirks",
"zigpy",
"zigpy_deconz",
"zigpy_xbee",
"zigpy_zigate",
"zigpy_znp"
],
"is_built_in": true
},
"data": {
"ieee": "**REDACTED**",
"nwk": 22991,
"manufacturer": "_TZE200_dfxkcots",
"model": "TS0601",
"name": "_TZE200_dfxkcots TS0601",
"quirk_applied": true,
"quirk_class": "zhaquirks.tuya.ts0601_dimmer.TuyaSingleSwitchDimmer",
"manufacturer_code": 4098,
"power_source": "Mains",
"lqi": 255,
"rssi": -55,
"last_seen": "2022-08-16T00:01:11",
"available": true,
"device_type": "Router",
"signature": {
"node_descriptor": "NodeDescriptor(logical_type=<LogicalType.Router: 1>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress|RxOnWhenIdle|MainsPowered|FullFunctionDevice: 142>, manufacturer_code=4098, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=False, *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, *is_security_capable=False)",
"endpoints": {
"1": {
"profile_id": 260,
"device_type": "0x0100",
"in_clusters": [
"0x0000",
"0x0004",
"0x0005",
"0x0006",
"0x0008",
"0xef00"
],
"out_clusters": [
"0x000a",
"0x0019"
]
}
}
},
"active_coordinator": false,
"entities": [
{
"entity_id": "light.light_livingroom_table_level_on_off",
"name": "_TZE200_dfxkcots TS0601"
}
],
"neighbors": [
{
"device_type": "Coordinator",
"rx_on_when_idle": "On",
"relationship": "Parent",
"extended_pan_id": "**REDACTED**",
"ieee": "**REDACTED**",
"nwk": "0x0000",
"permit_joining": "Unknown",
"depth": "0",
"lqi": "194"
},
{
"device_type": "Router",
"rx_on_when_idle": "On",
"relationship": "Sibling",
"extended_pan_id": "**REDACTED**",
"ieee": "**REDACTED**",
"nwk": "0x106A",
"permit_joining": "Unknown",
"depth": "15",
"lqi": "147"
},
{
"device_type": "Router",
"rx_on_when_idle": "On",
"relationship": "Sibling",
"extended_pan_id": "**REDACTED**",
"ieee": "**REDACTED**",
"nwk": "0x11DD",
"permit_joining": "Unknown",
"depth": "15",
"lqi": "78"
},
{
"device_type": "Router",
"rx_on_when_idle": "On",
"relationship": "Sibling",
"extended_pan_id": "**REDACTED**",
"ieee": "**REDACTED**",
"nwk": "0x13F4",
"permit_joining": "Unknown",
"depth": "15",
"lqi": "87"
},
{
"device_type": "Router",
"rx_on_when_idle": "On",
"relationship": "Sibling",
"extended_pan_id": "**REDACTED**",
"ieee": "**REDACTED**",
"nwk": "0x3B8E",
"permit_joining": "Unknown",
"depth": "15",
"lqi": "73"
},
{
"device_type": "Router",
"rx_on_when_idle": "On",
"relationship": "Sibling",
"extended_pan_id": "**REDACTED**",
"ieee": "**REDACTED**",
"nwk": "0x5133",
"permit_joining": "Unknown",
"depth": "15",
"lqi": "36"
},
{
"device_type": "Router",
"rx_on_when_idle": "On",
"relationship": "Sibling",
"extended_pan_id": "**REDACTED**",
"ieee": "**REDACTED**",
"nwk": "0x553C",
"permit_joining": "Unknown",
"depth": "15",
"lqi": "110"
},
{
"device_type": "Router",
"rx_on_when_idle": "On",
"relationship": "Sibling",
"extended_pan_id": "**REDACTED**",
"ieee": "**REDACTED**",
"nwk": "0x5EED",
"permit_joining": "Unknown",
"depth": "15",
"lqi": "55"
},
{
"device_type": "Router",
"rx_on_when_idle": "On",
"relationship": "Sibling",
"extended_pan_id": "**REDACTED**",
"ieee": "**REDACTED**",
"nwk": "0x686D",
"permit_joining": "Unknown",
"depth": "15",
"lqi": "126"
},
{
"device_type": "Router",
"rx_on_when_idle": "On",
"relationship": "Sibling",
"extended_pan_id": "**REDACTED**",
"ieee": "**REDACTED**",
"nwk": "0x6BC1",
"permit_joining": "Unknown",
"depth": "15",
"lqi": "62"
},
{
"device_type": "Router",
"rx_on_when_idle": "On",
"relationship": "Sibling",
"extended_pan_id": "**REDACTED**",
"ieee": "**REDACTED**",
"nwk": "0x6E6F",
"permit_joining": "Unknown",
"depth": "15",
"lqi": "57"
},
{
"device_type": "Router",
"rx_on_when_idle": "On",
"relationship": "Sibling",
"extended_pan_id": "**REDACTED**",
"ieee": "**REDACTED**",
"nwk": "0x7949",
"permit_joining": "Unknown",
"depth": "15",
"lqi": "69"
},
{
"device_type": "Router",
"rx_on_when_idle": "On",
"relationship": "Sibling",
"extended_pan_id": "**REDACTED**",
"ieee": "**REDACTED**",
"nwk": "0x8347",
"permit_joining": "Unknown",
"depth": "15",
"lqi": "136"
},
{
"device_type": "Router",
"rx_on_when_idle": "On",
"relationship": "Sibling",
"extended_pan_id": "**REDACTED**",
"ieee": "**REDACTED**",
"nwk": "0x8E84",
"permit_joining": "Unknown",
"depth": "15",
"lqi": "63"
},
{
"device_type": "Router",
"rx_on_when_idle": "On",
"relationship": "Sibling",
"extended_pan_id": "**REDACTED**",
"ieee": "**REDACTED**",
"nwk": "0x9FDB",
"permit_joining": "Unknown",
"depth": "15",
"lqi": "74"
},
{
"device_type": "Router",
"rx_on_when_idle": "On",
"relationship": "Sibling",
"extended_pan_id": "**REDACTED**",
"ieee": "**REDACTED**",
"nwk": "0xAD50",
"permit_joining": "Unknown",
"depth": "15",
"lqi": "64"
},
{
"device_type": "Router",
"rx_on_when_idle": "On",
"relationship": "Sibling",
"extended_pan_id": "**REDACTED**",
"ieee": "**REDACTED**",
"nwk": "0xB96B",
"permit_joining": "Unknown",
"depth": "15",
"lqi": "28"
},
{
"device_type": "Router",
"rx_on_when_idle": "On",
"relationship": "Sibling",
"extended_pan_id": "**REDACTED**",
"ieee": "**REDACTED**",
"nwk": "0xBDDE",
"permit_joining": "Unknown",
"depth": "15",
"lqi": "102"
},
{
"device_type": "Router",
"rx_on_when_idle": "On",
"relationship": "Sibling",
"extended_pan_id": "**REDACTED**",
"ieee": "**REDACTED**",
"nwk": "0xC2B7",
"permit_joining": "Unknown",
"depth": "15",
"lqi": "98"
},
{
"device_type": "Router",
"rx_on_when_idle": "On",
"relationship": "Sibling",
"extended_pan_id": "**REDACTED**",
"ieee": "**REDACTED**",
"nwk": "0xC52E",
"permit_joining": "Unknown",
"depth": "15",
"lqi": "44"
},
{
"device_type": "Router",
"rx_on_when_idle": "On",
"relationship": "Sibling",
"extended_pan_id": "**REDACTED**",
"ieee": "**REDACTED**",
"nwk": "0xCC93",
"permit_joining": "Unknown",
"depth": "15",
"lqi": "49"
},
{
"device_type": "Router",
"rx_on_when_idle": "On",
"relationship": "Sibling",
"extended_pan_id": "**REDACTED**",
"ieee": "**REDACTED**",
"nwk": "0xD3D4",
"permit_joining": "Unknown",
"depth": "15",
"lqi": "50"
},
{
"device_type": "Router",
"rx_on_when_idle": "On",
"relationship": "Sibling",
"extended_pan_id": "**REDACTED**",
"ieee": "**REDACTED**",
"nwk": "0xD910",
"permit_joining": "Unknown",
"depth": "15",
"lqi": "82"
}
],
"endpoint_names": [
{
"name": "ON_OFF_LIGHT"
}
],
"user_given_name": "Light - Livingroom Table",
"device_reg_id": "e2372bba3fb7b1b656c1f1944c40bd4d",
"area_id": "livingroom",
"cluster_details": {
"1": {
"device_type": {
"name": "ON_OFF_LIGHT",
"id": 256
},
"profile_id": 260,
"in_clusters": {
"0x0000": {
"endpoint_attribute": "basic",
"attributes": {
"0x0004": {
"attribute_name": "manufacturer",
"value": "_TZE200_dfxkcots"
},
"0x0005": {
"attribute_name": "model",
"value": "TS0601"
}
},
"unsupported_attributes": {}
},
"0x0004": {
"endpoint_attribute": "groups",
"attributes": {},
"unsupported_attributes": {}
},
"0x0005": {
"endpoint_attribute": "scenes",
"attributes": {},
"unsupported_attributes": {}
},
"0xef00": {
"endpoint_attribute": "tuya_manufacturer",
"attributes": {
"0xef00": {
"attribute_name": "mcu_version",
"value": "1.0.1"
}
},
"unsupported_attributes": {}
},
"0x0006": {
"endpoint_attribute": "on_off",
"attributes": {
"0x0000": {
"attribute_name": "on_off",
"value": 0
}
},
"unsupported_attributes": {
"0x4003": {
"attribute_name": "start_up_on_off"
}
}
},
"0x0008": {
"endpoint_attribute": "level",
"attributes": {
"0x0000": {
"attribute_name": "current_level",
"value": 124
},
"0xef01": {
"attribute_name": "minimum_level",
"value": 2
}
},
"unsupported_attributes": {}
}
},
"out_clusters": {
"0x000a": {
"endpoint_attribute": "time",
"attributes": {},
"unsupported_attributes": {}
},
"0x0019": {
"endpoint_attribute": "ota",
"attributes": {},
"unsupported_attributes": {}
}
}
}
}
}
}
Additional logs
Paste any additional debug logs here.
Don't remove the extra line breaks outside the ``` marks.
Additional context
Related issues:
Possible causes:
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 30 (1 by maintainers)
@javicalle Here’s the log. The physical device was off, the device in the GUI was off. I’ve moved the GUI knob from the most left position (min position) to some value. The physical device did not turn on, but the GUI was showing the device as it was turned on.
I’m pretty sure @lotr is describing the same behavior that I described as “HA behaves weirdly” (which, admittedly, is not very descriptive…). HA expects the move_to_level_with_on_off to be correctly implemented, so when the light is off and you increase the level using the slider in HA, HA automatically reports the light as on, since it has sent the move_to_level_with_on_off command. With the new code change, the light does not turn on, so there is a discrepancy between the actual state and what HA reports.
@TheJulianJES
2022-08-30 17:49:25.778 DEBUG (MainThread) [homeassistant.components.zha.entity] light.livingroom_switch_light: received onoff Bool.false while transitioning - skipping updatewe may need to tweak how this works…I confirm my dimmers work correctly after upgrading to HA Core 2022.10.4
@dmulcahey if you need anything else, feel free to contact me even via my email, or just write here, I’ll do my best to help with this 😃