mjg59 / python-broadlink

Python module for controlling Broadlink RM2/3 (Pro) remote controls, A1 sensor platforms and SP2/3 smartplugs
MIT License
1.35k stars 477 forks source link

Expose durations beyond the CLI #742

Closed wgrant closed 2 months ago

wgrant commented 1 year ago

Context

Broadlink's IR/RF message protocol is well-understood, but translation between it and the standard microsecond duration format usable in other IR contexts is only accessible via broadlink_cli.

Proposed change

Move the two duration<->Broadlink functions from broadlink_cli to broadlink.remote, where they can be used by applications consuming the library.

Type of change

Checklist

bengtmartensson commented 1 year ago

This is a good idea. However, the implementation conflicts with my PR #741. Either this PR should be rewritten on top of mine, or the other way around.

See also #743.

felipediel commented 2 months ago

Awesome, I'll merge the fix here.

felipediel commented 2 months ago

Closed with https://github.com/mjg59/python-broadlink/pull/788. Thanks @bengtmartensson!