diff --git a/intern/docker_esphome/templates/config/esphome_display02.yaml b/intern/docker_esphome/templates/config/esphome_display02.yaml index 7273a514828ea9c395439ce06ab1c8ef9ceb0f01..6aeb7653b422208daa676cf7b0d21695f53c8693 100644 --- a/intern/docker_esphome/templates/config/esphome_display02.yaml +++ b/intern/docker_esphome/templates/config/esphome_display02.yaml @@ -3,9 +3,9 @@ {% include "/includes/ansible.inc.yaml" %} {% include "/includes/board.d1_mini.inc.yaml" %} - # force newline + + platformio_options: - upload_speed: 115200 lib_deps: - Wire # Also required by GFX. - SPI # Also required by GFX. @@ -18,7 +18,8 @@ external_components: components: [ obegraensad_panel ] refresh: 0s {% include "/includes/common.inc.yaml" %} -# force newline + + on_message: - topic: ESPHome/{{ devicename }}/state/command payload: "ON" @@ -34,25 +35,36 @@ light: name: 'Brightness' id: matrix_light output: matrix_brightness - restore_mode: RESTORE_DEFAULT_ON + restore_mode: ALWAYS_ON output: - - platform: esp8266_pwm + - platform: ledc # Enables brightness control. id: matrix_brightness pin: - number: GPIO14 + number: GPIO25 inverted: True globals: - - id: coords - type: int - restore_value: no - initial_value: '0' - - id: length - type: int - restore_value: no - initial_value: '0' + - id: coords + type: int + restore_value: no + initial_value: '0' + - id: length + type: int + restore_value: no + initial_value: '0' + +binary_sensor: +- platform: gpio + pin: + number: GPIO26 + inverted: true + mode: + input: true + pullup: true + id: button + name: button time: - platform: sntp @@ -100,8 +112,8 @@ text_sensor: display: - platform: obegraensad_panel latch_pin: 12 - clock_pin: 04 - data_pin: 05 + clock_pin: 14 + data_pin: 27 id: my_display pages: - id: Page1