66 lines
1.2 KiB
YAML
66 lines
1.2 KiB
YAML
esphome:
|
|
name: blinds
|
|
|
|
project:
|
|
name: dasfoo.blinds
|
|
version: "1.0"
|
|
|
|
includes:
|
|
- somfy.h
|
|
|
|
esp8266:
|
|
board: nodemcuv2
|
|
|
|
logger:
|
|
|
|
mqtt:
|
|
broker: mqtt
|
|
id: mqtt_client
|
|
|
|
globals:
|
|
- id: somfy_remote_id_base
|
|
type: int
|
|
# Can be retrieved from MQTT server. Take the key with lowest integer value
|
|
# from /rolling_code/ path.
|
|
initial_value: !secret somfy_remote_id_base
|
|
|
|
cover:
|
|
- platform: custom
|
|
lambda: |-
|
|
auto rfPin = D2;
|
|
std::vector<esphome::cover::Cover*> blinds;
|
|
|
|
for (int i = 0; i < 13; ++i) {
|
|
auto cover = new SomfyRTS(
|
|
rfPin,
|
|
id(somfy_remote_id_base) + i,
|
|
id(mqtt_client));
|
|
blinds.push_back(cover);
|
|
App.register_component(cover);
|
|
}
|
|
|
|
return blinds;
|
|
|
|
covers:
|
|
- name: "Office window"
|
|
- name: "Bedroom"
|
|
- name: "Living Room side"
|
|
- name: "Wardrobe"
|
|
- name: "Child West door"
|
|
- name: "Child West window"
|
|
- name: "Hallway Stairs window"
|
|
- name: "Kitchen window"
|
|
- name: "Kitchen door"
|
|
- name: "Living Room door"
|
|
- name: "Living Room window"
|
|
- name: "Guest East window"
|
|
- name: "Guest East door"
|
|
|
|
ota:
|
|
password: !secret ota_password
|
|
|
|
wifi:
|
|
ssid: !secret wifi_ssid
|
|
password: !secret wifi_password
|
|
domain: ""
|