mirror of
https://github.com/boneIO-eu/esphome.git
synced 2026-04-10 20:50:02 +02:00
fix to main
This commit is contained in:
@@ -121,7 +121,7 @@ packages:
|
|||||||
- path: sdm630/package.yaml
|
- path: sdm630/package.yaml
|
||||||
|
|
||||||
dashboard_import:
|
dashboard_import:
|
||||||
package_import_url: github://boneIO-eu/esphome/boneio-dimmer_g2_8ch-dev0_4.yaml@latest
|
package_import_url: github://boneIO-eu/esphome/boneio-dimmer_g2_8ch-dev0_4.yaml@main
|
||||||
import_full_config: true
|
import_full_config: true
|
||||||
|
|
||||||
pcf8574:
|
pcf8574:
|
||||||
@@ -236,6 +236,20 @@ switch:
|
|||||||
mode:
|
mode:
|
||||||
output: true
|
output: true
|
||||||
inverted: false
|
inverted: false
|
||||||
|
- platform: gpio
|
||||||
|
id: can_bus_switch
|
||||||
|
name: 'CAN Bus Switch'
|
||||||
|
pin:
|
||||||
|
number: GPIO35
|
||||||
|
mode:
|
||||||
|
output: true
|
||||||
|
inverted: false
|
||||||
|
- platform: gpio
|
||||||
|
name: "CAN RX"
|
||||||
|
pin: GPIO47
|
||||||
|
- platform: gpio
|
||||||
|
name: "CAN TX"
|
||||||
|
pin: GPIO48
|
||||||
|
|
||||||
binary_sensor:
|
binary_sensor:
|
||||||
|
|
||||||
@@ -323,35 +337,35 @@ binary_sensor:
|
|||||||
id: can_bus_button
|
id: can_bus_button
|
||||||
|
|
||||||
|
|
||||||
canbus:
|
# canbus:
|
||||||
- platform: esp32_can
|
# - platform: esp32_can
|
||||||
tx_pin: GPIO48
|
# tx_pin: GPIO48
|
||||||
rx_pin: GPIO47
|
# rx_pin: GPIO47
|
||||||
can_id: 4
|
# can_id: 4
|
||||||
bit_rate: 50kbps
|
# bit_rate: 50kbps
|
||||||
on_frame:
|
# on_frame:
|
||||||
- can_id: 5
|
# - can_id: 5
|
||||||
then:
|
# then:
|
||||||
- lambda: |-
|
# - lambda: |-
|
||||||
if(x.size() > 0) {
|
# if(x.size() > 0) {
|
||||||
switch(x[0]) {
|
# switch(x[0]) {
|
||||||
case 0x12: // button release
|
# case 0x12: // button release
|
||||||
id(can_bus_button).publish_state(false);
|
# id(can_bus_button).publish_state(false);
|
||||||
break;
|
# break;
|
||||||
case 0x11: // button press
|
# case 0x11: // button press
|
||||||
id(can_bus_button).publish_state(true);
|
# id(can_bus_button).publish_state(true);
|
||||||
break;
|
# break;
|
||||||
}
|
# }
|
||||||
}
|
# }
|
||||||
|
|
||||||
button:
|
# button:
|
||||||
- platform: template
|
# - platform: template
|
||||||
name: 'CAN Sensor ON'
|
# name: 'CAN Sensor ON'
|
||||||
on_press:
|
# on_press:
|
||||||
- logger.log: Button Pressed
|
# - logger.log: Button Pressed
|
||||||
- canbus.send: [0x11, 0x22, 0x33]
|
# - canbus.send: [0x11, 0x22, 0x33]
|
||||||
- platform: template
|
# - platform: template
|
||||||
name: 'CAN Sensor OFF'
|
# name: 'CAN Sensor OFF'
|
||||||
on_press:
|
# on_press:
|
||||||
- logger.log: Button Pressed
|
# - logger.log: Button Pressed
|
||||||
- canbus.send: [0x12, 0x22, 0x33]
|
# - canbus.send: [0x12, 0x22, 0x33]
|
||||||
Reference in New Issue
Block a user