I'm trying to use TP-Link Tapo S200B Smart Button on HA , I can integrate the hub but the device (TAPO S200B) don't have press event entities. Anyone can help on this issue?
They are not currently supported, and it might be that adding support is not that easy as the library doesn't currently have support for eventing (that is, we poll the devices and act based on responses). We might need to check if we can use #900 for this.
There hasn't been any activity on this issue recently. This issue has been automatically marked as stale because of that. It will be closed if no further activity occurs.
Please make sure to update to the latest python-kasa version and check if that solves the issue.
Thank you for your contributions.
For anyone landing here in 2026+ looking for a working answer, here's what I learned reverse-engineering this on a live H100 hub today.
The good news
S200B press + rotation events ARE retrievable via python-kasa today. The hub's get_trigger_logs method returns entries with full event detail, including rotation direction + magnitude.
The catch
python-kasa's LogEntry dataclass in kasa/smart/modules/triggerlogs.py drops the params field from the raw response. That's where rotation direction lives (params.rotate_deg, signed integer in degrees). Without that field, you can detect "a rotation happened" but not which way.
Working around it (today, with no python-kasa changes)
Query the hub directly via the control_child wrapper instead of going through the parsed LogEntry:
raw=awaithub.protocol.query({
"control_child": {
"device_id": s200b.device_id,
"requestData": {
"method": "get_trigger_logs",
"params": {"start_id": 0}
}
}
})
logs=raw["control_child"]["responseData"]["result"]["logs"]
# logs[0] is now the raw dict including 'params'
Event taxonomy (verified)
The S200B firmware emits exactly three discrete event types — confirmed by both the raw get_trigger_logs response and the trigger picker in the official Tapo app:
Hub event field
params
Interpretation
singleClick
(none)
Button press, any duration. Long-press is NOT a discrete event; it's just a delayed singleClick on release.
rotation
{"rotate_deg": +N}
Clockwise rotation, magnitude in degrees (commonly +30, +90, +120 per detected step).
rotation
{"rotate_deg": -N}
Anti-clockwise, same scale, negative sign.
Double-press is just two singleClick events; debounce in software if you want to distinguish.
Drop-in PR
I've opened a tiny PR to python-kasa adding the params field to LogEntry (optional, default None, fully backwards compatible): #1697
End-to-end working Home Assistant custom_component
For anyone who wants this in HA right now without waiting for upstream changes to land:
Polls the hub every 2s, fires tapo_button_pressed and tapo_button_rotated events with full payload (degrees, direction, device_id, etc.) usable as automation triggers. Sits alongside the core tplink integration without conflict.
Activity
rytilahti commented on Sep 13, 2024
They are not currently supported, and it might be that adding support is not that easy as the library doesn't currently have support for eventing (that is, we poll the devices and act based on responses). We might need to check if we can use #900 for this.
If you don't mind, could you provide us a fixture file as described here: https://python-kasa.readthedocs.io/en/latest/contribute.html#contributing-fixture-files ? If the response data has information about the button pressed, we could easily add it.
github-actions commented on Dec 13, 2024
There hasn't been any activity on this issue recently. This issue has been automatically marked as stale because of that. It will be closed if no further activity occurs.
Please make sure to update to the latest python-kasa version and check if that solves the issue.
Thank you for your contributions.
startlingdan commented on May 16, 2026
For anyone landing here in 2026+ looking for a working answer, here's what I learned reverse-engineering this on a live H100 hub today.
The good news
S200B press + rotation events ARE retrievable via python-kasa today. The hub's get_trigger_logs method returns entries with full event detail, including rotation direction + magnitude.
The catch
python-kasa's LogEntry dataclass in kasa/smart/modules/triggerlogs.py drops the params field from the raw response. That's where rotation direction lives (params.rotate_deg, signed integer in degrees). Without that field, you can detect "a rotation happened" but not which way.
Working around it (today, with no python-kasa changes)
Query the hub directly via the control_child wrapper instead of going through the parsed LogEntry:
Event taxonomy (verified)
The S200B firmware emits exactly three discrete event types — confirmed by both the raw get_trigger_logs response and the trigger picker in the official Tapo app:
Double-press is just two singleClick events; debounce in software if you want to distinguish.
Drop-in PR
I've opened a tiny PR to python-kasa adding the params field to LogEntry (optional, default None, fully backwards compatible): #1697
End-to-end working Home Assistant custom_component
For anyone who wants this in HA right now without waiting for upstream changes to land:
https://github.com/startlingdan/home-assistant-tapo-button
Polls the hub every 2s, fires tapo_button_pressed and tapo_button_rotated events with full payload (degrees, direction, device_id, etc.) usable as automation triggers. Sits alongside the core tplink integration without conflict.