Skip to content

Commit

Permalink
Include Libraries via CodeGenerator
Browse files Browse the repository at this point in the history
  • Loading branch information
AzonInc committed Oct 31, 2024
1 parent f198fa4 commit 3d98f85
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 19 deletions.
6 changes: 0 additions & 6 deletions .github/example-project-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@
esphome:
name: test-nuki

libraries:
- Preferences
- https://github.com/h2zero/NimBLE-Arduino#1.4.0
- Crc16
- https://github.com/I-Connect/NukiBleEsp32

esp32:
framework:
type: arduino
Expand Down
6 changes: 0 additions & 6 deletions .github/example-project-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@
esphome:
name: test-nuki

libraries:
- Preferences
- https://github.com/h2zero/NimBLE-Arduino#1.4.0
- Crc16
- https://github.com/I-Connect/NukiBleEsp32#93e7da927171c8973b7ef857c7fa644c174ed47d

esp32:
framework:
type: arduino
Expand Down
7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,6 @@ The lock entity is updated whenever the look changes state (via Nuki App, HA, or
Add the following to the ESPHome yaml file:

```yaml
esphome:
libraries:
- Preferences
- https://github.com/h2zero/NimBLE-Arduino#1.4.0
- Crc16
- https://github.com/uriyacovy/NukiBleEsp32

external_components:
- source: github://uriyacovy/ESPHome_nuki_lock

Expand Down
10 changes: 10 additions & 0 deletions components/nuki_lock/lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,16 @@ async def to_code(config):
trigger = cg.new_Pvariable(conf[CONF_TRIGGER_ID], var)
await automation.build_automation(trigger, [], conf)

# Libraries
cg.add_library("Preferences", None)
cg.add_library("h2zero/NimBLE-Arduino", "1.4.0")
cg.add_library("Crc16", None)
cg.add_library(
None,
None,
"https://github.com/I-Connect/NukiBleEsp32#93e7da927171c8973b7ef857c7fa644c174ed47d",
)


# Actions
NukiLockUnpairAction = nuki_lock_ns.class_(
Expand Down

0 comments on commit 3d98f85

Please sign in to comment.