Move blinds from custom component to CC1101
This commit is contained in:
+7
-2
@@ -4,13 +4,15 @@ esphome:
|
|||||||
|
|
||||||
project:
|
project:
|
||||||
name: dasfoo.blinds
|
name: dasfoo.blinds
|
||||||
version: "1.0"
|
version: "2.0"
|
||||||
|
|
||||||
includes:
|
includes:
|
||||||
- somfy.h
|
- somfy.h
|
||||||
|
- cc1101.h
|
||||||
|
|
||||||
libraries:
|
libraries:
|
||||||
- SPI
|
- SPI
|
||||||
|
- lsatan/SmartRC-CC1101-Driver-Lib
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
device_base: !include templates/esp32-poe.yaml
|
device_base: !include templates/esp32-poe.yaml
|
||||||
@@ -25,7 +27,7 @@ globals:
|
|||||||
cover:
|
cover:
|
||||||
- platform: custom
|
- platform: custom
|
||||||
lambda: |-
|
lambda: |-
|
||||||
auto rfPin = D2;
|
auto rfPin = 4;
|
||||||
std::vector<esphome::cover::Cover*> blinds;
|
std::vector<esphome::cover::Cover*> blinds;
|
||||||
|
|
||||||
for (int i = 0; i < 13; ++i) {
|
for (int i = 0; i < 13; ++i) {
|
||||||
@@ -37,6 +39,9 @@ cover:
|
|||||||
App.register_component(cover);
|
App.register_component(cover);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SomfyRTS ctor will set correct pin modes, now we can initialize cc1101.
|
||||||
|
cc1101_Init();
|
||||||
|
|
||||||
return blinds;
|
return blinds;
|
||||||
|
|
||||||
covers:
|
covers:
|
||||||
|
|||||||
Reference in New Issue
Block a user