Create Protobuf Plugin for automatically generating native API stubs (#633)

* Create Protobuf Plugin for automatically generating native API stubs

* Format

* Delete api.proto

* Cleanup, use no_delay conditionally

* Updates

* Update

* Lint

* Lint

* Fixes

* Camera

* CustomAPIDevice

* Fix negative VarInt, Add User-defined services arrays

* Home Assistant Event

* Fixes

* Update custom_api_device.h
This commit is contained in:
Otto Winter
2019-06-18 19:31:22 +02:00
committed by GitHub
parent fc465d6d93
commit 369d175694
47 changed files with 7183 additions and 3110 deletions

View File

@@ -40,6 +40,24 @@ api:
- stepper.set_target:
id: my_stepper2
target: !lambda 'return int_;'
- service: array_types
variables:
bool_arr: bool[]
int_arr: int[]
float_arr: float[]
string_arr: string[]
then:
- logger.log:
format: 'Bool: %s (%u), Int: %d (%u), Float: %f (%u), String: %s (%u)'
args:
- YESNO(bool_arr[0])
- bool_arr.size()
- int_arr[0]
- int_arr.size()
- float_arr[0]
- float_arr.size()
- string_arr[0].c_str()
- string_arr.size()
wifi:
ssid: 'MySSID'