File tree 3 files changed +18
-4
lines changed
components/hcpbridge/cover
3 files changed +18
-4
lines changed Original file line number Diff line number Diff line change
1
+ # Gitignore settings for ESPHome
2
+ # This is an example and may include too much for your use-case.
3
+ # You can modify this file to suit your needs.
4
+ /.esphome /
5
+ /secrets.yaml
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ hcpbridge:
29
29
cover :
30
30
- platform : hcpbridge
31
31
name : Garage Door
32
+ id : garagedoor_cover
32
33
33
34
switch :
34
35
- platform : hcpbridge
38
39
ssid : " My Network"
39
40
password : " My Password"
40
41
41
- api:
42
+ api :
43
+
44
+
45
+ button :
46
+ platform : template
47
+ name : " Garage Door Vent"
48
+ on_press :
49
+ - lambda : |-
50
+ id(garagedoor_cover).on_go_to_vent();
Original file line number Diff line number Diff line change 2
2
import esphome .config_validation as cv
3
3
import esphome .codegen as cg
4
4
from esphome .const import (
5
- CONF_OUTPUT_ID
5
+ CONF_ID
6
6
)
7
7
8
8
from .. import hcpbridge_ns , HCPBridge , CONF_HCPBridge_ID
13
13
14
14
CONFIG_SCHEMA = cv .All (
15
15
cover .COVER_SCHEMA .extend ({
16
- cv .GenerateID (CONF_OUTPUT_ID ): cv .declare_id (HCPBridgeCover ),
16
+ cv .GenerateID (): cv .declare_id (HCPBridgeCover ),
17
17
cv .GenerateID (CONF_HCPBridge_ID ): cv .use_id (HCPBridge ),
18
18
}).extend (cv .polling_component_schema ("500ms" )),
19
19
)
20
20
21
21
async def to_code (config ):
22
- var = cg .new_Pvariable (config [CONF_OUTPUT_ID ])
22
+ var = cg .new_Pvariable (config [CONF_ID ])
23
23
await cg .register_component (var , config )
24
24
await cover .register_cover (var , config )
25
25
parent = await cg .get_variable (config [CONF_HCPBridge_ID ])
You can’t perform that action at this time.
0 commit comments