mirror of
https://github.com/boneIO-eu/esphome.git
synced 2026-04-11 04:50:29 +02:00
Merge pull request #25 from boneIO-eu/main
Fix 24x16 and move Dimmer output to external yaml
This commit is contained in:
42
boards/dimmer_output.yaml
Normal file
42
boards/dimmer_output.yaml
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
output:
|
||||||
|
- platform: ledc
|
||||||
|
pin: 33
|
||||||
|
frequency: 1000Hz
|
||||||
|
inverted: false
|
||||||
|
id: chl01
|
||||||
|
- platform: ledc
|
||||||
|
pin: 32
|
||||||
|
frequency: 1000Hz
|
||||||
|
inverted: false
|
||||||
|
id: chl02
|
||||||
|
- platform: ledc
|
||||||
|
pin: 12
|
||||||
|
frequency: 1000Hz
|
||||||
|
inverted: false
|
||||||
|
id: chl03
|
||||||
|
- platform: ledc
|
||||||
|
pin: 14
|
||||||
|
frequency: 1000Hz
|
||||||
|
inverted: false
|
||||||
|
id: chl04
|
||||||
|
|
||||||
|
- platform: ledc
|
||||||
|
pin: 13
|
||||||
|
frequency: 1000Hz
|
||||||
|
inverted: false
|
||||||
|
id: chr01
|
||||||
|
- platform: ledc
|
||||||
|
pin: 15
|
||||||
|
frequency: 1000Hz
|
||||||
|
inverted: false
|
||||||
|
id: chr02
|
||||||
|
- platform: ledc
|
||||||
|
pin: 2
|
||||||
|
frequency: 1000Hz
|
||||||
|
inverted: false
|
||||||
|
id: chr03
|
||||||
|
- platform: ledc
|
||||||
|
pin: 17
|
||||||
|
frequency: 1000Hz
|
||||||
|
inverted: false
|
||||||
|
id: chr04
|
||||||
@@ -38,7 +38,7 @@ packages:
|
|||||||
'devices_v0_7/i2c.yaml',
|
'devices_v0_7/i2c.yaml',
|
||||||
'devices_v0_7-v0_9/ina219.yaml',
|
'devices_v0_7-v0_9/ina219.yaml',
|
||||||
'devices_v0_7-v0_9/lm75b.yaml',
|
'devices_v0_7-v0_9/lm75b.yaml',
|
||||||
'devices_v0_7-v0_9/pcf.yaml',
|
'devices_v0_7-v0_9/pcf_with_mcp.yaml',
|
||||||
'boards/24x16_output.yaml',
|
'boards/24x16_output.yaml',
|
||||||
# 'devices_v0_7-v0_9/one_wire.yaml',
|
# 'devices_v0_7-v0_9/one_wire.yaml',
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ dashboard_import:
|
|||||||
packages:
|
packages:
|
||||||
internals_packages:
|
internals_packages:
|
||||||
url: https://github.com/boneIO-eu/esphome
|
url: https://github.com/boneIO-eu/esphome
|
||||||
ref: v1.2.0
|
ref: v1.4.0
|
||||||
files: [
|
files: [
|
||||||
'devices/buzzer.yaml',
|
'devices/buzzer.yaml',
|
||||||
'devices/serial_no.yaml',
|
'devices/serial_no.yaml',
|
||||||
@@ -39,7 +39,6 @@ packages:
|
|||||||
'devices_v0_7-v0_9/ina219.yaml',
|
'devices_v0_7-v0_9/ina219.yaml',
|
||||||
'devices_v0_7-v0_9/lm75b.yaml',
|
'devices_v0_7-v0_9/lm75b.yaml',
|
||||||
'devices_v0_7-v0_9/pcf.yaml',
|
'devices_v0_7-v0_9/pcf.yaml',
|
||||||
'boards/32x10_output.yaml',
|
|
||||||
'boards/8_covers_16_output.yaml',
|
'boards/8_covers_16_output.yaml',
|
||||||
# 'devices_v0_7-v0_9/one_wire.yaml',
|
# 'devices_v0_7-v0_9/one_wire.yaml',
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -21,12 +21,13 @@ external_components:
|
|||||||
packages:
|
packages:
|
||||||
internals_packages:
|
internals_packages:
|
||||||
url: https://github.com/boneIO-eu/esphome
|
url: https://github.com/boneIO-eu/esphome
|
||||||
ref: v1.4.0
|
ref: v1.5.0
|
||||||
files:
|
files:
|
||||||
[
|
[
|
||||||
'devices/serial_no.yaml',
|
'devices/serial_no.yaml',
|
||||||
'devices/dimmer_i2c.yaml',
|
'devices/dimmer_i2c.yaml',
|
||||||
'devices/dimmer_ina219.yaml',
|
'devices/dimmer_ina219.yaml',
|
||||||
|
'board/dimmer_output.yaml',
|
||||||
]
|
]
|
||||||
|
|
||||||
ethernet:
|
ethernet:
|
||||||
@@ -135,49 +136,6 @@ binary_sensor:
|
|||||||
input: true
|
input: true
|
||||||
inverted: true
|
inverted: true
|
||||||
|
|
||||||
output:
|
|
||||||
- platform: ledc
|
|
||||||
pin: 33
|
|
||||||
frequency: 1000Hz
|
|
||||||
inverted: false
|
|
||||||
id: chl01
|
|
||||||
- platform: ledc
|
|
||||||
pin: 32
|
|
||||||
frequency: 1000Hz
|
|
||||||
inverted: false
|
|
||||||
id: chl02
|
|
||||||
- platform: ledc
|
|
||||||
pin: 12
|
|
||||||
frequency: 1000Hz
|
|
||||||
inverted: false
|
|
||||||
id: chl03
|
|
||||||
- platform: ledc
|
|
||||||
pin: 14
|
|
||||||
frequency: 1000Hz
|
|
||||||
inverted: false
|
|
||||||
id: chl04
|
|
||||||
|
|
||||||
- platform: ledc
|
|
||||||
pin: 13
|
|
||||||
frequency: 1000Hz
|
|
||||||
inverted: false
|
|
||||||
id: chr01
|
|
||||||
- platform: ledc
|
|
||||||
pin: 15
|
|
||||||
frequency: 1000Hz
|
|
||||||
inverted: false
|
|
||||||
id: chr02
|
|
||||||
- platform: ledc
|
|
||||||
pin: 2
|
|
||||||
frequency: 1000Hz
|
|
||||||
inverted: false
|
|
||||||
id: chr03
|
|
||||||
- platform: ledc
|
|
||||||
pin: 17
|
|
||||||
frequency: 1000Hz
|
|
||||||
inverted: false
|
|
||||||
id: chr04
|
|
||||||
|
|
||||||
light:
|
light:
|
||||||
- platform: rgbw
|
- platform: rgbw
|
||||||
name: 'RGBW L'
|
name: 'RGBW L'
|
||||||
|
|||||||
@@ -21,12 +21,13 @@ external_components:
|
|||||||
packages:
|
packages:
|
||||||
internals_packages:
|
internals_packages:
|
||||||
url: https://github.com/boneIO-eu/esphome
|
url: https://github.com/boneIO-eu/esphome
|
||||||
ref: v1.4.0
|
ref: v1.5.0
|
||||||
files:
|
files:
|
||||||
[
|
[
|
||||||
'devices/serial_no.yaml',
|
'devices/serial_no.yaml',
|
||||||
'devices/dimmer_i2c.yaml',
|
'devices/dimmer_i2c.yaml',
|
||||||
'devices/dimmer_ina219.yaml',
|
'devices/dimmer_ina219.yaml',
|
||||||
|
'board/dimmer_output.yaml',
|
||||||
]
|
]
|
||||||
|
|
||||||
ethernet:
|
ethernet:
|
||||||
@@ -135,49 +136,6 @@ binary_sensor:
|
|||||||
input: true
|
input: true
|
||||||
inverted: true
|
inverted: true
|
||||||
|
|
||||||
output:
|
|
||||||
- platform: ledc
|
|
||||||
pin: 33
|
|
||||||
frequency: 1000Hz
|
|
||||||
inverted: false
|
|
||||||
id: chl01
|
|
||||||
- platform: ledc
|
|
||||||
pin: 32
|
|
||||||
frequency: 1000Hz
|
|
||||||
inverted: false
|
|
||||||
id: chl02
|
|
||||||
- platform: ledc
|
|
||||||
pin: 12
|
|
||||||
frequency: 1000Hz
|
|
||||||
inverted: false
|
|
||||||
id: chl03
|
|
||||||
- platform: ledc
|
|
||||||
pin: 14
|
|
||||||
frequency: 1000Hz
|
|
||||||
inverted: false
|
|
||||||
id: chl04
|
|
||||||
|
|
||||||
- platform: ledc
|
|
||||||
pin: 13
|
|
||||||
frequency: 1000Hz
|
|
||||||
inverted: false
|
|
||||||
id: chr01
|
|
||||||
- platform: ledc
|
|
||||||
pin: 15
|
|
||||||
frequency: 1000Hz
|
|
||||||
inverted: false
|
|
||||||
id: chr02
|
|
||||||
- platform: ledc
|
|
||||||
pin: 2
|
|
||||||
frequency: 1000Hz
|
|
||||||
inverted: false
|
|
||||||
id: chr03
|
|
||||||
- platform: ledc
|
|
||||||
pin: 17
|
|
||||||
frequency: 1000Hz
|
|
||||||
inverted: false
|
|
||||||
id: chr04
|
|
||||||
|
|
||||||
light:
|
light:
|
||||||
- platform: cwww
|
- platform: cwww
|
||||||
name: 'CHL_01_02'
|
name: 'CHL_01_02'
|
||||||
|
|||||||
@@ -21,12 +21,13 @@ external_components:
|
|||||||
packages:
|
packages:
|
||||||
internals_packages:
|
internals_packages:
|
||||||
url: https://github.com/boneIO-eu/esphome
|
url: https://github.com/boneIO-eu/esphome
|
||||||
ref: v1.4.0
|
ref: v1.5.0
|
||||||
files:
|
files:
|
||||||
[
|
[
|
||||||
'devices/serial_no.yaml',
|
'devices/serial_no.yaml',
|
||||||
'devices/dimmer_i2c.yaml',
|
'devices/dimmer_i2c.yaml',
|
||||||
'devices/dimmer_ina219.yaml',
|
'devices/dimmer_ina219.yaml',
|
||||||
|
'board/dimmer_output.yaml',
|
||||||
]
|
]
|
||||||
|
|
||||||
ethernet:
|
ethernet:
|
||||||
@@ -76,107 +77,304 @@ text_sensor:
|
|||||||
binary_sensor:
|
binary_sensor:
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
name: 'IN_01'
|
name: 'IN_01'
|
||||||
|
id: in_01
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf_inputs
|
pcf8574: pcf_inputs
|
||||||
number: 1
|
number: 1
|
||||||
mode:
|
mode:
|
||||||
input: true
|
input: true
|
||||||
inverted: true
|
inverted: true
|
||||||
|
on_multi_click:
|
||||||
|
- timing:
|
||||||
|
- ON for at least 0.7s
|
||||||
|
then:
|
||||||
|
- while:
|
||||||
|
condition:
|
||||||
|
binary_sensor.is_on: in_01
|
||||||
|
then:
|
||||||
|
- if:
|
||||||
|
condition:
|
||||||
|
lambda: 'return id(chl_01).current_values.get_brightness() >= 0.90f;'
|
||||||
|
then:
|
||||||
|
- light.turn_on:
|
||||||
|
id: chl_01
|
||||||
|
brightness: 5%
|
||||||
|
transition_length: 0.2s
|
||||||
|
else:
|
||||||
|
- light.dim_relative:
|
||||||
|
id: chl_01
|
||||||
|
relative_brightness: 5%
|
||||||
|
transition_length: 0.2s
|
||||||
|
- delay: 200ms
|
||||||
|
invalid_cooldown: 0.5s
|
||||||
|
- timing: #single click
|
||||||
|
- ON for at most 0.4s
|
||||||
|
- OFF for at least 0.1s
|
||||||
|
then:
|
||||||
|
light.toggle: chl_01
|
||||||
|
invalid_cooldown: 0.5s
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
name: 'IN_02'
|
name: 'IN_02'
|
||||||
|
id: in_02
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf_inputs
|
pcf8574: pcf_inputs
|
||||||
number: 2
|
number: 2
|
||||||
mode:
|
mode:
|
||||||
input: true
|
input: true
|
||||||
inverted: true
|
inverted: true
|
||||||
|
on_multi_click:
|
||||||
|
- timing:
|
||||||
|
- ON for at least 0.7s
|
||||||
|
then:
|
||||||
|
- while:
|
||||||
|
condition:
|
||||||
|
binary_sensor.is_on: in_02
|
||||||
|
then:
|
||||||
|
- if:
|
||||||
|
condition:
|
||||||
|
lambda: 'return id(chl_02).current_values.get_brightness() >= 0.90f;'
|
||||||
|
then:
|
||||||
|
- light.turn_on:
|
||||||
|
id: chl_02
|
||||||
|
brightness: 5%
|
||||||
|
transition_length: 0.2s
|
||||||
|
else:
|
||||||
|
- light.dim_relative:
|
||||||
|
id: chl_02
|
||||||
|
relative_brightness: 5%
|
||||||
|
transition_length: 0.2s
|
||||||
|
- delay: 200ms
|
||||||
|
invalid_cooldown: 0.5s
|
||||||
|
- timing: #single click
|
||||||
|
- ON for at most 0.4s
|
||||||
|
- OFF for at least 0.1s
|
||||||
|
then:
|
||||||
|
light.toggle: chl_02
|
||||||
|
invalid_cooldown: 0.5s
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
name: 'IN_03'
|
name: 'IN_03'
|
||||||
|
id: in_03
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf_inputs
|
pcf8574: pcf_inputs
|
||||||
number: 3
|
number: 3
|
||||||
mode:
|
mode:
|
||||||
input: true
|
input: true
|
||||||
inverted: true
|
inverted: true
|
||||||
|
on_multi_click:
|
||||||
|
- timing:
|
||||||
|
- ON for at least 0.7s
|
||||||
|
then:
|
||||||
|
- while:
|
||||||
|
condition:
|
||||||
|
binary_sensor.is_on: in_03
|
||||||
|
then:
|
||||||
|
- if:
|
||||||
|
condition:
|
||||||
|
lambda: 'return id(chl_03).current_values.get_brightness() >= 0.90f;'
|
||||||
|
then:
|
||||||
|
- light.turn_on:
|
||||||
|
id: chl_03
|
||||||
|
brightness: 5%
|
||||||
|
transition_length: 0.2s
|
||||||
|
else:
|
||||||
|
- light.dim_relative:
|
||||||
|
id: chl_03
|
||||||
|
relative_brightness: 5%
|
||||||
|
transition_length: 0.2s
|
||||||
|
- delay: 200ms
|
||||||
|
invalid_cooldown: 0.5s
|
||||||
|
- timing: #single click
|
||||||
|
- ON for at most 0.4s
|
||||||
|
- OFF for at least 0.1s
|
||||||
|
then:
|
||||||
|
light.toggle: chl_03
|
||||||
|
invalid_cooldown: 0.5s
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
name: 'IN_04'
|
name: 'IN_04'
|
||||||
|
id: in_04
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf_inputs
|
pcf8574: pcf_inputs
|
||||||
number: 4
|
number: 4
|
||||||
mode:
|
mode:
|
||||||
input: true
|
input: true
|
||||||
inverted: true
|
inverted: true
|
||||||
|
on_multi_click:
|
||||||
|
- timing:
|
||||||
|
- ON for at least 0.7s
|
||||||
|
then:
|
||||||
|
- while:
|
||||||
|
condition:
|
||||||
|
binary_sensor.is_on: in_04
|
||||||
|
then:
|
||||||
|
- if:
|
||||||
|
condition:
|
||||||
|
lambda: 'return id(chl_04).current_values.get_brightness() >= 0.90f;'
|
||||||
|
then:
|
||||||
|
- light.turn_on:
|
||||||
|
id: chl_04
|
||||||
|
brightness: 5%
|
||||||
|
transition_length: 0.2s
|
||||||
|
else:
|
||||||
|
- light.dim_relative:
|
||||||
|
id: chl_04
|
||||||
|
relative_brightness: 5%
|
||||||
|
transition_length: 0.2s
|
||||||
|
- delay: 200ms
|
||||||
|
invalid_cooldown: 0.5s
|
||||||
|
- timing: #single click
|
||||||
|
- ON for at most 0.4s
|
||||||
|
- OFF for at least 0.1s
|
||||||
|
then:
|
||||||
|
light.toggle: chl_04
|
||||||
|
invalid_cooldown: 0.5s
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
name: 'IN_05'
|
name: 'IN_05'
|
||||||
|
id: in_05
|
||||||
pin:
|
pin:
|
||||||
number: 36
|
number: 36
|
||||||
mode:
|
mode:
|
||||||
input: true
|
input: true
|
||||||
inverted: true
|
inverted: true
|
||||||
|
on_multi_click:
|
||||||
|
- timing:
|
||||||
|
- ON for at least 0.7s
|
||||||
|
then:
|
||||||
|
- while:
|
||||||
|
condition:
|
||||||
|
binary_sensor.is_on: in_05
|
||||||
|
then:
|
||||||
|
- if:
|
||||||
|
condition:
|
||||||
|
lambda: 'return id(chl_05).current_values.get_brightness() >= 0.90f;'
|
||||||
|
then:
|
||||||
|
- light.turn_on:
|
||||||
|
id: chl_05
|
||||||
|
brightness: 5%
|
||||||
|
transition_length: 0.2s
|
||||||
|
else:
|
||||||
|
- light.dim_relative:
|
||||||
|
id: chl_05
|
||||||
|
relative_brightness: 5%
|
||||||
|
transition_length: 0.2s
|
||||||
|
- delay: 200ms
|
||||||
|
invalid_cooldown: 0.5s
|
||||||
|
- timing: #single click
|
||||||
|
- ON for at most 0.4s
|
||||||
|
- OFF for at least 0.1s
|
||||||
|
then:
|
||||||
|
light.toggle: chl_05
|
||||||
|
invalid_cooldown: 0.5s
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
name: 'IN_06'
|
name: 'IN_06'
|
||||||
|
id: in_06
|
||||||
pin:
|
pin:
|
||||||
number: 39
|
number: 39
|
||||||
mode:
|
mode:
|
||||||
input: true
|
input: true
|
||||||
inverted: true
|
inverted: true
|
||||||
|
on_multi_click:
|
||||||
|
- timing:
|
||||||
|
- ON for at least 0.7s
|
||||||
|
then:
|
||||||
|
- while:
|
||||||
|
condition:
|
||||||
|
binary_sensor.is_on: in_06
|
||||||
|
then:
|
||||||
|
- if:
|
||||||
|
condition:
|
||||||
|
lambda: 'return id(chl_06).current_values.get_brightness() >= 0.90f;'
|
||||||
|
then:
|
||||||
|
- light.turn_on:
|
||||||
|
id: chl_06
|
||||||
|
brightness: 5%
|
||||||
|
transition_length: 0.2s
|
||||||
|
else:
|
||||||
|
- light.dim_relative:
|
||||||
|
id: chl_06
|
||||||
|
relative_brightness: 5%
|
||||||
|
transition_length: 0.2s
|
||||||
|
- delay: 200ms
|
||||||
|
invalid_cooldown: 0.5s
|
||||||
|
- timing: #single click
|
||||||
|
- ON for at most 0.4s
|
||||||
|
- OFF for at least 0.1s
|
||||||
|
then:
|
||||||
|
light.toggle: chl_06
|
||||||
|
invalid_cooldown: 0.5s
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
name: 'IN_07'
|
name: 'IN_07'
|
||||||
|
id: in_07
|
||||||
pin:
|
pin:
|
||||||
number: 34
|
number: 34
|
||||||
mode:
|
mode:
|
||||||
input: true
|
input: true
|
||||||
inverted: true
|
inverted: true
|
||||||
|
on_multi_click:
|
||||||
|
- timing:
|
||||||
|
- ON for at least 0.7s
|
||||||
|
then:
|
||||||
|
- while:
|
||||||
|
condition:
|
||||||
|
binary_sensor.is_on: in_07
|
||||||
|
then:
|
||||||
|
- if:
|
||||||
|
condition:
|
||||||
|
lambda: 'return id(chl_07).current_values.get_brightness() >= 0.90f;'
|
||||||
|
then:
|
||||||
|
- light.turn_on:
|
||||||
|
id: chl_07
|
||||||
|
brightness: 5%
|
||||||
|
transition_length: 0.2s
|
||||||
|
else:
|
||||||
|
- light.dim_relative:
|
||||||
|
id: chl_07
|
||||||
|
relative_brightness: 5%
|
||||||
|
transition_length: 0.2s
|
||||||
|
- delay: 200ms
|
||||||
|
invalid_cooldown: 0.5s
|
||||||
|
- timing: #single click
|
||||||
|
- ON for at most 0.4s
|
||||||
|
- OFF for at least 0.1s
|
||||||
|
then:
|
||||||
|
light.toggle: chl_07
|
||||||
|
invalid_cooldown: 0.5s
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
name: 'IN_08'
|
name: 'IN_08'
|
||||||
|
id: in_08
|
||||||
pin:
|
pin:
|
||||||
number: 35
|
number: 35
|
||||||
mode:
|
mode:
|
||||||
input: true
|
input: true
|
||||||
inverted: true
|
inverted: true
|
||||||
|
on_multi_click:
|
||||||
output:
|
- timing:
|
||||||
- platform: ledc
|
- ON for at least 0.7s
|
||||||
pin: 33
|
then:
|
||||||
frequency: 1000Hz
|
- while:
|
||||||
inverted: false
|
condition:
|
||||||
id: chl01
|
binary_sensor.is_on: in_08
|
||||||
- platform: ledc
|
then:
|
||||||
pin: 32
|
- if:
|
||||||
frequency: 1000Hz
|
condition:
|
||||||
inverted: false
|
lambda: 'return id(chl_08).current_values.get_brightness() >= 0.90f;'
|
||||||
id: chl02
|
then:
|
||||||
- platform: ledc
|
- light.turn_on:
|
||||||
pin: 12
|
id: chl_08
|
||||||
frequency: 1000Hz
|
brightness: 5%
|
||||||
inverted: false
|
transition_length: 0.2s
|
||||||
id: chl03
|
else:
|
||||||
- platform: ledc
|
- light.dim_relative:
|
||||||
pin: 14
|
id: chl_08
|
||||||
frequency: 1000Hz
|
relative_brightness: 5%
|
||||||
inverted: false
|
transition_length: 0.2s
|
||||||
id: chl04
|
- delay: 200ms
|
||||||
|
invalid_cooldown: 0.5s
|
||||||
- platform: ledc
|
- timing: #single click
|
||||||
pin: 13
|
- ON for at most 0.4s
|
||||||
frequency: 1000Hz
|
- OFF for at least 0.1s
|
||||||
inverted: false
|
then:
|
||||||
id: chr01
|
light.toggle: chl_08
|
||||||
- platform: ledc
|
invalid_cooldown: 0.5s
|
||||||
pin: 15
|
|
||||||
frequency: 1000Hz
|
|
||||||
inverted: false
|
|
||||||
id: chr02
|
|
||||||
- platform: ledc
|
|
||||||
pin: 2
|
|
||||||
frequency: 1000Hz
|
|
||||||
inverted: false
|
|
||||||
id: chr03
|
|
||||||
- platform: ledc
|
|
||||||
pin: 17
|
|
||||||
frequency: 1000Hz
|
|
||||||
inverted: false
|
|
||||||
id: chr04
|
|
||||||
|
|
||||||
light:
|
light:
|
||||||
- platform: monochromatic
|
- platform: monochromatic
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ firmware_destination = "../website/public/esp/firmware"
|
|||||||
def json_pattern(firmware_name):
|
def json_pattern(firmware_name):
|
||||||
return {
|
return {
|
||||||
"name": "ESPHome",
|
"name": "ESPHome",
|
||||||
"version": "2024.5.0",
|
"version": "2024.10.1",
|
||||||
"home_assistant_domain": "esphome",
|
"home_assistant_domain": "esphome",
|
||||||
"funding_url": "https://esphome.io/guides/supporters.html",
|
"funding_url": "https://esphome.io/guides/supporters.html",
|
||||||
"new_install_prompt_erase": False,
|
"new_install_prompt_erase": False,
|
||||||
@@ -56,11 +56,15 @@ for file in glob.glob("*.yaml"):
|
|||||||
print("No file found.")
|
print("No file found.")
|
||||||
break
|
break
|
||||||
firmware_path = f"{cwd}/.esphome/build/{filename}/.pioenvs/{filename}/firmware.factory.bin"
|
firmware_path = f"{cwd}/.esphome/build/{filename}/.pioenvs/{filename}/firmware.factory.bin"
|
||||||
print("CWD", cwd)
|
cmd = f'docker run --rm -p 6052:6052 -v "{cwd}":/config -it ghcr.io/esphome/esphome compile {file}'
|
||||||
subprocess.run(
|
print(cmd)
|
||||||
f'docker run --rm -p 6052:6052 -v "{cwd}":/config -it ghcr.io/esphome/esphome compile {file}',
|
result = subprocess.run(
|
||||||
|
cmd,
|
||||||
shell=True,
|
shell=True,
|
||||||
)
|
)
|
||||||
|
if result.returncode != 0:
|
||||||
|
print("Process failed, breaking.")
|
||||||
|
break
|
||||||
shutil.copyfile(firmware_path, f"{firmware_destination}/{filename}.bin")
|
shutil.copyfile(firmware_path, f"{firmware_destination}/{filename}.bin")
|
||||||
|
|
||||||
with open(
|
with open(
|
||||||
|
|||||||
Reference in New Issue
Block a user