Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor component structure #12

Merged
merged 4 commits into from
Jan 31, 2024
Merged

Conversation

TillFleisch
Copy link
Owner

@TillFleisch TillFleisch commented Jan 31, 2024

This PR changes the location at which sub-components are located and refactors the switch and number components to be in line with ESPHomes standards.
The platform names used in configuration files have changed from matrix_display to hub75_matrix_display.

Breaking Change

The platform name has been changed from matrix_display to hub75_matrix_display.
Components must be changed from matrix_display,matrix_display_switch,matrix_display_brightness to hub75_matrix_display.
Furthermore, the explicit definition of platformio_options:lib_deps must not be declared in the yaml configuration.
The newly added use_custom_library option can be used to revert to the old import style.

Old New
esphome:
  name: matrix-display
  friendly_name: Matrix Display
  platformio_options:
    lib_deps:
      - SPI
      - Wire
      - Adafruit BusIO
      - adafruit/Adafruit GFX Library
      - https://github[...]ing

display:
  - platform: matrix_display
    id: matrix
    width: 64
    height: 32

switch:
  - platform: matrix_display_switch
    matrix_id: matrix
    name: "Power"

number:
  - platform: matrix_display_brightness
    matrix_id: matrix
    name: "Brightness"
esphome:
  name: matrix-display
  friendly_name: Matrix Display

display:
  - platform: hub75_matrix_display
    id: matrix
    width: 64
    height: 32

switch:
  - platform: hub75_matrix_display
    matrix_id: matrix
    name: "Power"

number:
  - platform: hub75_matrix_display
    matrix_id: matrix
    name: "Brightness"

@TillFleisch TillFleisch merged commit dd1bade into main Jan 31, 2024
7 checks passed
@TillFleisch TillFleisch deleted the component-structure-refactor branch January 31, 2024 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant