mirror of
https://github.com/esphome/esphome.git
synced 2025-11-16 23:05:46 +00:00
Add additional sx127x lambda tests (#11793)
This commit is contained in:
@@ -26,6 +26,15 @@ sx127x:
|
|||||||
- sx127x.send_packet:
|
- sx127x.send_packet:
|
||||||
data: [0xC5, 0x51, 0x78, 0x82, 0xB7, 0xF9, 0x9C, 0x5C]
|
data: [0xC5, 0x51, 0x78, 0x82, 0xB7, 0xF9, 0x9C, 0x5C]
|
||||||
|
|
||||||
|
number:
|
||||||
|
- platform: template
|
||||||
|
name: "SX127x Number"
|
||||||
|
id: my_number
|
||||||
|
optimistic: true
|
||||||
|
min_value: 0
|
||||||
|
max_value: 100
|
||||||
|
step: 1
|
||||||
|
|
||||||
button:
|
button:
|
||||||
- platform: template
|
- platform: template
|
||||||
name: "SX127x Button"
|
name: "SX127x Button"
|
||||||
@@ -38,3 +47,5 @@ button:
|
|||||||
- sx127x.set_mode_rx
|
- sx127x.set_mode_rx
|
||||||
- sx127x.send_packet:
|
- sx127x.send_packet:
|
||||||
data: [0xC5, 0x51, 0x78, 0x82, 0xB7, 0xF9, 0x9C, 0x5C]
|
data: [0xC5, 0x51, 0x78, 0x82, 0xB7, 0xF9, 0x9C, 0x5C]
|
||||||
|
- sx127x.send_packet: !lambda |-
|
||||||
|
return {0x01, 0x02, (uint8_t)id(my_number).state};
|
||||||
|
|||||||
Reference in New Issue
Block a user