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

Implementing BTHome for the Flic Twist #106

Closed
GraceGRD opened this issue Jan 29, 2024 · 4 comments
Closed

Implementing BTHome for the Flic Twist #106

GraceGRD opened this issue Jan 29, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@GraceGRD
Copy link

Hi,

I'm working on creating custom firmware for the Flic Twist which uses bthome-v2 for communication.

For those who don't know about this device, it is a smart button with a rotary encoder and 12 LEDs.

Looking at the documented format I'm not sure which events I should support. E.g. implement combined button and dimmer events to do automations like push and twist.

I'm thinking about holding the button and rotate to select channel 1 to 12 (this would be an internal state of the flic). Then send rotate events for these channels when you rotate the device.

I would like some advice from you, what is the way forward to implement this using existing events or would creating new event-types make sense?

@GraceGRD GraceGRD added the enhancement New feature or request label Jan 29, 2024
@Ernst79
Copy link
Collaborator

Ernst79 commented Jan 29, 2024

We currently have two type of events, button presses and rotation of a dimmer, with the number of steps it has rotated.

It's all up to you what you want/need. you could make something like a button press event, and combine that with a "counter", which gives an actual state (1 to 12). A dimmer is more like, "rotate left with 3 steps from the current position". If you start at 9, and you rotate it 3 steps, a counter sensor would give a state of 9+3 = 12, while a dimmer event would only report rotate left, 3 steps. You could also use button + dimmer + counter, to have the actual direction + the state, if you need to distinguish between left and right rotation and also need the channel.

We can add a "channel" sensor, if that is helpful.

@GraceGRD
Copy link
Author

Thank you for your quick response.

For now I don't think it is logical to add a "channel" sensor. First I'll have to get the rotary encoder peripheral functional before I'm attempting to hook everything up to BTHome. After this I'll do some testing using the available events (button/dimmer) including a counter and check if this works nicely with Home Assistant automations.

@Ernst79
Copy link
Collaborator

Ernst79 commented Jan 29, 2024

ok, let me know if you need new sensors and/or events.

@Ernst79
Copy link
Collaborator

Ernst79 commented Jun 8, 2024

I'm closing this issue for now. Please open a new one if you need further assistance

@Ernst79 Ernst79 closed this as completed Jun 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants