diff --git a/clear-homething.yaml b/clear-homething.yaml new file mode 100644 index 00000000..a557f6b5 --- /dev/null +++ b/clear-homething.yaml @@ -0,0 +1,176 @@ +esphome: + name: "clear-homething" + platform: ESP32 + board: featheresp32 + on_boot: + priority: 600.0 + then: + - delay: 45s + - if: + condition: + not: + - wifi.connected: + then: + - switch.turn_on: sleep_toggle + +wifi: + ssid: !secret wifi_ssid + password: !secret wifi_password + fast_connect: true + id: wifi_id + power_save_mode: HIGH + ap: + ssid: "${friendly_name} Fallback" + password: !secret wifi_fallback_password + +external_components: + - source: + # type: git + # url: https://github.com/landonr/homeThing + # ref: main + # refresh: 0s + type: local + path: components + components: [homeThing] + - source: + # type: git + # url: https://github.com/landonr/esphome-components + # ref: main + # refresh: 0s + type: local + path: ../local_components/components + components: [ + homeassistant_component, + homeassistant_media_player, + media_player_source, + media_player_source_sonos, + media_player_source_spotify, + media_player_source_custom + ] + +packages: + device_base: !include common/device_base.yaml + ipod_control_backlight: !include common/ipod/lilygo_tdisplay_ipod_backlight.yaml + ipod_control_battery: !include common/ipod/lilygo_tdisplay_ipod_battery.yaml + ipod_control_binary_sensor: !include common/ipod/lilygo_tdisplay_ipod_binary_sensor.yaml + ipod_control_rotary: !include common/ipod/lilygo_tdisplay_ipod_rotary.yaml + ipod_control_sleep: !include common/ipod/lilygo_tdisplay_ipod_sleep.yaml + home_media_player: !include homeConfig/media_player.yaml + home_text_sensor: !include homeConfig/text_sensor.yaml + home_light: !include homeConfig/light.yaml + home_switch: !include homeConfig/switch.yaml + fonts: !include common/fonts.yaml + icon_fonts: !include common/icon_fonts.yaml + +substitutions: + friendly_name: "clear homething" + +color: + - id: my_primary_accent + red_int: 75 + green_int: 45 + blue_int: 209 + +homeThing: + id: homeThingMenu + settings: + sleep_after: 14400 + sleep_switch: sleep_toggle + backlight: backlight + battery: + battery_percent: battery_percent + charging: charging + media_player_group: media_group_component + display: my_display + on_redraw: + then: + component.update: my_display + display_state: + colors: + accent_primary: my_primary_accent + draw_battery_level: true + font_small: small_font + font_medium: medium_font + font_large: large_font + font_large_heavy: large_heavy_font + font_material_large: material_font_large + font_material_small: material_font_small + font_logo: home_thing_logo + screens: + - name: Desk Screen + entities: + - type: command + name: "desk nudge up" + command: + - homeassistant.service: + service: button.press + data: + entity_id: "button.desk_position_nudge_up" + - type: command + name: "desk nudge down" + command: + - homeassistant.service: + service: button.press + data: + entity_id: "button.desk_position_nudge_down" + - id: light_desk_lamp + type: light + - name: Settings Screen + show_version: True + entities: + - id: backlight + type: light + - id: "restart_switch" + type: switch + - id: wifi_ssid + type: text_sensor + - id: wifi_signal_percent + type: sensor + - id: wifi_ip + type: text_sensor + +spi: + clk_pin: GPIO18 + mosi_pin: GPIO19 + +display: + - platform: st7789v + model: TTGO_TDisplay_135x240 + id: my_display + cs_pin: GPIO5 + dc_pin: GPIO16 + reset_pin: GPIO23 + rotation: 90 + update_interval: 10s + lambda: |- + id(homeThingMenu)->draw_menu_screen(); + return; + +text_sensor: + - platform: wifi_info + ip_address: + name: IP Address + internal: True + id: wifi_ip + ssid: + name: SSID + internal: True + id: wifi_ssid + +sensor: + - platform: wifi_signal # Reports the WiFi signal strength/RSSI in dB + name: "WiFi Signal dB" + id: wifi_signal_db + update_interval: 60s + entity_category: "diagnostic" + internal: True + + - platform: copy # Reports the WiFi signal strength in % + source_id: wifi_signal_db + name: "WiFi Signal %" + id: wifi_signal_percent + internal: True + filters: + - lambda: return min(max(2 * (x + 100.0), 0.0), 100.0); + unit_of_measurement: "Signal %" + entity_category: "diagnostic" \ No newline at end of file diff --git a/homeThing_0.0.5.tar.gz b/homeThing_0.0.5.tar.gz deleted file mode 100644 index a59db7a4..00000000 Binary files a/homeThing_0.0.5.tar.gz and /dev/null differ diff --git a/homeThing_0.0.6.tar.gz b/homeThing_0.0.6.tar.gz new file mode 100644 index 00000000..bcaad5e7 Binary files /dev/null and b/homeThing_0.0.6.tar.gz differ diff --git a/proto.yaml b/proto.yaml new file mode 100644 index 00000000..07935b0b --- /dev/null +++ b/proto.yaml @@ -0,0 +1,186 @@ +# set up your name +esphome: + name: "homething-proto" + platform: ESP32 + board: featheresp32 + on_boot: + priority: 600.0 + then: + - delay: 45s + - if: + condition: + not: + - wifi.connected: + then: + - switch.turn_on: sleep_toggle + +wifi: + ssid: !secret wifi_ssid + password: !secret wifi_password + fast_connect: true + id: wifi_id + power_save_mode: HIGH + ap: + ssid: "${friendly_name} Fallback" + password: !secret wifi_fallback_password + +external_components: + - source: + # type: git + # url: https://github.com/landonr/homeThing + # ref: main + # refresh: 0s + type: local + path: components + components: [homeThing] + - source: + # type: git + # url: https://github.com/landonr/esphome-components + # ref: main + # refresh: 0s + type: local + path: ../local_components/components + components: [ + homeassistant_component, + homeassistant_media_player, + media_player_source, + media_player_source_sonos, + media_player_source_spotify, + media_player_source_custom, + homeassistant_cover + ] + +packages: + device_base: !include common/device_base.yaml + ipod_control_backlight: !include common/ipod/lilygo_tdisplay_ipod_backlight.yaml + ipod_control_battery: !include common/ipod/lilygo_tdisplay_ipod_battery.yaml + ipod_control_binary_sensor: !include common/ipod/lilygo_tdisplay_ipod_binary_sensor.yaml + ipod_control_rotary: !include common/ipod/lilygo_tdisplay_ipod_rotary.yaml + ipod_control_sleep: !include common/ipod/lilygo_tdisplay_ipod_sleep.yaml + home_media_player: !include homeConfig/media_player.yaml + home_text_sensor: !include homeConfig/text_sensor.yaml + home_light: !include homeConfig/light.yaml + home_switch: !include homeConfig/switch.yaml + fonts: !include common/fonts.yaml + icon_fonts: !include common/icon_fonts.yaml + +substitutions: + friendly_name: "homeThing proto" + +color: + - id: my_primary_accent + red_int: 75 + green_int: 45 + blue_int: 209 + +cover: + - platform: homeassistant_cover + entity_id: "cover.megadesk_cover" + name: "Megadesk" + id: cover_megadesk + +homeThing: + id: homeThingMenu + settings: + sleep_after: 14400 + sleep_switch: sleep_toggle + backlight: backlight + battery: + battery_percent: battery_percent + charging: charging + media_player_group: media_group_component + display: my_display + on_redraw: + then: + component.update: my_display + display_state: + colors: + accent_primary: my_primary_accent + draw_battery_level: true + font_small: small_font + font_medium: medium_font + font_large: large_font + font_large_heavy: large_heavy_font + font_material_large: material_font_large + font_material_small: material_font_small + font_logo: home_thing_logo + screens: + - name: Desk Screen + entities: + - id: cover_megadesk + type: cover + - type: command + name: "desk nudge up" + command: + - homeassistant.service: + service: button.press + data: + entity_id: "button.desk_position_nudge_up" + - type: command + name: "desk nudge down" + command: + - homeassistant.service: + service: button.press + data: + entity_id: "button.desk_position_nudge_down" + - id: light_desk_lamp + type: light + - name: Settings Screen + show_version: True + entities: + - id: backlight + type: light + - id: "restart_switch" + type: switch + - id: wifi_ssid + type: text_sensor + - id: wifi_signal_percent + type: sensor + - id: wifi_ip + type: text_sensor + +spi: + clk_pin: GPIO18 + mosi_pin: GPIO19 + +display: + - platform: st7789v + model: TTGO_TDisplay_135x240 + id: my_display + cs_pin: GPIO5 + dc_pin: GPIO16 + reset_pin: GPIO23 + rotation: 90 + update_interval: 10s + lambda: |- + id(homeThingMenu)->draw_menu_screen(); + return; + +text_sensor: + - platform: wifi_info + ip_address: + name: IP Address + internal: True + id: wifi_ip + ssid: + name: SSID + internal: True + id: wifi_ssid + +sensor: + - platform: wifi_signal # Reports the WiFi signal strength/RSSI in dB + name: "WiFi Signal dB" + id: wifi_signal_db + update_interval: 60s + entity_category: "diagnostic" + internal: True + + - platform: copy # Reports the WiFi signal strength in % + source_id: wifi_signal_db + name: "WiFi Signal %" + id: wifi_signal_percent + internal: True + filters: + - lambda: return min(max(2 * (x + 100.0), 0.0), 100.0); + unit_of_measurement: "Signal %" + entity_category: "diagnostic" diff --git a/release.sh b/release.sh old mode 100644 new mode 100755