diff --git a/HomeDicator/core.yaml b/HomeDicator/core.yaml index c680be6..2df4a32 100644 --- a/HomeDicator/core.yaml +++ b/HomeDicator/core.yaml @@ -1,4 +1,4 @@ ---- +--- substitutions: homedicator_core_version_tag: "v0.3.2" diff --git a/HomeDicator/core/config/common/light.yaml b/HomeDicator/core/config/common/light.yaml old mode 100755 new mode 100644 index dd0033f..bb68867 --- a/HomeDicator/core/config/common/light.yaml +++ b/HomeDicator/core/config/common/light.yaml @@ -1,6 +1,6 @@ light: - platform: monochromatic - output: ledc_gpio45 + output: ledc_pin name: Display id: indicator_display_backlight entity_category: config diff --git a/HomeDicator/core/config/common/lvgl/on_idle.yaml b/HomeDicator/core/config/common/lvgl/on_idle.yaml old mode 100755 new mode 100644 index 58e1efa..5518634 --- a/HomeDicator/core/config/common/lvgl/on_idle.yaml +++ b/HomeDicator/core/config/common/lvgl/on_idle.yaml @@ -2,8 +2,9 @@ timeout: !lambda |- switch (id(turn_off_screen_after_value)) { case 0: return 600000; // "Never" (10 min in ms / will check as a condition in the then block) case 1: return 60000; // "1 min" - case 2: return 300000; // "5 min" - case 3: return 900000; // "15 min" + case 2: return 180000; // "3 min" + case 3: return 300000; // "5 min" + case 4: return 900000; // "15 min" default: return 600000; // Default to 10 min in case of an invalid index } then: diff --git a/HomeDicator/core/config/device/guition-4inch/hardware.yaml b/HomeDicator/core/config/device/guition-4inch/hardware.yaml new file mode 100644 index 0000000..c1642c3 --- /dev/null +++ b/HomeDicator/core/config/device/guition-4inch/hardware.yaml @@ -0,0 +1,107 @@ +esp32: + board: esp32-s3-devkitc-1 + variant: esp32s3 + flash_size: 16MB + framework: + type: esp-idf + sdkconfig_options: + COMPILER_OPTIMIZATION_SIZE: y + CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240: "y" + CONFIG_ESP32S3_DATA_CACHE_64KB: "y" + CONFIG_ESP32S3_DATA_CACHE_LINE_64B: "y" + CONFIG_SPIRAM_FETCH_INSTRUCTIONS: y + CONFIG_SPIRAM_RODATA: y + +psram: + mode: octal + speed: 80MHz + +output: + - platform: ledc + pin: + number: GPIO38 + id: ledc_pin + frequency: 100Hz + +i2c: + - id: bus_a + scl: GPIO45 + sda: GPIO19 + scan: false + +spi: + - id: lcd_spi + clk_pin: GPIO48 + mosi_pin: GPIO47 + +touchscreen: + platform: gt911 + id: guition_touchscreen + transform: + mirror_x: false + mirror_y: false + on_release: + - script.execute: activity_detected + +display: + - platform: st7701s + id: guition_display + update_interval: never + auto_clear_enabled: False + spi_mode: MODE3 + data_rate: 2MHz + color_order: RGB + invert_colors: False + dimensions: + width: 480 + height: 480 + cs_pin: 39 + de_pin: 18 + hsync_pin: 16 + vsync_pin: 17 + pclk_pin: 21 + pclk_frequency: 12MHz + pclk_inverted: False + hsync_pulse_width: 8 + hsync_front_porch: 10 + hsync_back_porch: 20 + vsync_pulse_width: 8 + vsync_front_porch: 10 + vsync_back_porch: 10 + init_sequence: + - 1 + # Custom sequences are an array, first byte is command, the rest are data. + - [0xFF, 0x77, 0x01, 0x00, 0x00, 0x10] # CMD2_BKSEL_BK0 + - [0xCD, 0x00] # disable MDT flag + data_pins: + red: + - 11 #r1 + - 12 #r2 + - 13 #r3 + - 14 #r4 + - 0 #r5 + green: + - 8 #g0 + - 20 #g1 + - 3 #g2 + - 46 #g3 + - 9 #g4 + - 10 #g5 + blue: + - 4 #b1 + - 5 #b2 + - 6 #b3 + - 7 #b4 + - 15 #b5 + +ota: + - platform: esphome + password: ${ota_key} + +wifi: + ssid: ${wifi_ssid} + password: ${wifi_password} + on_disconnect: + - lvgl.label.update: + id: lvgl_wifi_signal_icon + text: "\U000F092E" diff --git a/HomeDicator/core/config/device/sdl/hardware.yaml b/HomeDicator/core/config/device/sdl/hardware.yaml index a770d67..6bfef7c 100755 --- a/HomeDicator/core/config/device/sdl/hardware.yaml +++ b/HomeDicator/core/config/device/sdl/hardware.yaml @@ -2,7 +2,7 @@ host: output: - platform: template - id: ledc_gpio45 + id: ledc_pin type: float write_action: - logger.log: "Backlight output changed!" diff --git a/HomeDicator/core/config/device/seeed-sensecap-indicator/hardware.yaml b/HomeDicator/core/config/device/seeed-sensecap-indicator/hardware.yaml index d07071f..7fa67b8 100755 --- a/HomeDicator/core/config/device/seeed-sensecap-indicator/hardware.yaml +++ b/HomeDicator/core/config/device/seeed-sensecap-indicator/hardware.yaml @@ -22,7 +22,7 @@ output: pin: number: GPIO45 ignore_strapping_warning: true - id: ledc_gpio45 + id: ledc_pin frequency: 100Hz i2c: diff --git a/HomeDicator/device/guition-4inch.yaml b/HomeDicator/device/guition-4inch.yaml new file mode 100644 index 0000000..3dd9c60 --- /dev/null +++ b/HomeDicator/device/guition-4inch.yaml @@ -0,0 +1,7 @@ +packages: + HomeDicatorBase: !include ../core.yaml + +binary_sensor: + - id: !remove indicator_button + +<<: !include ../core/config/device/guition-4inch/hardware.yaml diff --git a/HomeDicator/user_interface/pages/settings.yaml b/HomeDicator/user_interface/pages/settings.yaml old mode 100755 new mode 100644 index d22b776..466d659 --- a/HomeDicator/user_interface/pages/settings.yaml +++ b/HomeDicator/user_interface/pages/settings.yaml @@ -130,6 +130,7 @@ widgets: options: - "Never" - "1 min" + - "3 min" - "5 min" - "15 min" - obj: diff --git a/HomeDicator/user_interface/templates/tiles/sensor/square.yaml b/HomeDicator/user_interface/templates/tiles/sensor/square.yaml old mode 100755 new mode 100644 index 27d64fe..42a7283 --- a/HomeDicator/user_interface/templates/tiles/sensor/square.yaml +++ b/HomeDicator/user_interface/templates/tiles/sensor/square.yaml @@ -28,6 +28,7 @@ obj: - obj: styles: info_or_button_tile_info width: SIZE_CONTENT + text_color: ${color} layout: type: FLEX flex_flow: ROW