9 Commits

Author SHA1 Message Date
TJ Horner
6a5fbfa383 Firmware 1.1.2 2023-10-31 15:48:47 -07:00
TJ Horner
e334e7004f Add nightly build to ensure it always works with latest ESPHome 2023-05-26 20:02:56 -07:00
TJ Horner
c36fcb5232 Change issue template description 2023-05-26 18:42:22 -07:00
TJ Horner
a4484761cd I hope the template supports markdown in the description 2023-05-26 18:41:02 -07:00
TJ Horner
7bf1275e7d Rearrange bug report template 2023-05-26 18:40:00 -07:00
TJ Horner
b28dcb26ca Add bug report issue template 2023-05-26 18:38:07 -07:00
TJ Horner
0ae038b8b7 Switch to using second repository for project_version component 2023-05-23 10:28:23 -07:00
TJ Horner
543f901d90 Obtain custom component from GitHub instead of relative path 2023-05-23 10:19:57 -07:00
TJ Horner
f3b31ecc61 Version 1.1.1 2023-05-23 09:28:05 -07:00
9 changed files with 98 additions and 73 deletions

50
.github/ISSUE_TEMPLATE/bug_report.yml vendored Normal file
View File

@@ -0,0 +1,50 @@
name: Bug Report
description: File a bug report or get help with an issue.
labels: ["bug"]
assignees:
- tjhorner
body:
- type: checkboxes
id: troubleshooting-followed
attributes:
label: Troubleshooting Guide
description: Please confirm you have followed the [troubleshooting guide](https://upsy-desky.tjhorner.dev/docs/troubleshooting).
options:
- label: I have followed the steps in the troubleshooting guide and my issue is either not listed or is not solved.
required: true
- type: textarea
id: description
attributes:
label: Description
description: Please describe the bug you encountered, and what you expected to happen instead.
validations:
required: true
- type: textarea
id: logs
attributes:
label: Logs
description: Please copy and paste any relevant log output. Learn how to obtain logs [here](https://upsy-desky.tjhorner.dev/docs/troubleshooting/#other-issues).
render: plain text
- type: input
id: config-version
attributes:
label: Which version of the Upsy Desky firmware config are you running?
placeholder: "1.1.1"
- type: dropdown
id: update-management
attributes:
label: How do you manage your Upsy Desky's updates?
options:
- OTA Updates
- ESPHome YAML Config
- type: input
id: esphome-version
attributes:
label: If you're using an ESPHome YAML config, which version of ESPHome are you running?
placeholder: "2023.5.4"
- type: textarea
id: esphome-config
attributes:
label: ESPHome Config
description: If you have your own ESPHome YAML configuration, please paste it here. Remember to redact any sensitive information like encryption keys or passwords.
render: YAML

40
.github/workflows/nightly-build.yaml vendored Normal file
View File

@@ -0,0 +1,40 @@
name: Nightly Stock Firmware Build
on:
schedule:
- cron: "0 0 * * *"
jobs:
build:
name: Build Firmware
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.9"
- name: Install ESPHome
run: pip install --user esphome
- name: Compile Release Firmware
working-directory: firmware
run: |
esphome compile stock.yaml
mkdir -p bin
cp .esphome/build/upsy-desky/.pioenvs/upsy-desky/firmware-factory.bin bin/firmware-factory.bin
cp .esphome/build/upsy-desky/.pioenvs/upsy-desky/firmware.bin bin/firmware.bin
- uses: actions/upload-artifact@v3
with:
name: firmware-bin
path: firmware/bin
- name: Send Discord failure notification
if: failure()
uses: appleboy/discord-action@master
with:
webhook_id: ${{ secrets.DISCORD_WEBHOOK_ID }}
webhook_token: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
color: "#FF6961"
message: "The latest nightly build failed: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"

View File

@@ -12,7 +12,7 @@ esphome:
data: [ 0x0 ]
project:
name: tj_horner.upsy_desky
version: "1.1.0"
version: "1.1.2"
uart:
id: handset_tx
@@ -50,7 +50,6 @@ packages:
addon_presets: !include addons/presets.yaml
addon_stable_ids: !include addons/stable-ids.yaml
addon_runtime_config: !include addons/runtime-config.yaml
addon_bluetooth_proxy: !include addons/bluetooth-proxy.yaml
button:
- platform: restart

View File

@@ -1 +0,0 @@
**/__pycache__

View File

@@ -1,19 +0,0 @@
#include "project_version_text_sensor.h"
#include "esphome/core/log.h"
#include "esphome/core/application.h"
#include "esphome/core/version.h"
namespace esphome {
namespace project_version {
static const char *const TAG = "project_version.text_sensor";
void ProjectVersionTextSensor::setup() {
this->publish_state(ESPHOME_PROJECT_VERSION);
}
float ProjectVersionTextSensor::get_setup_priority() const { return setup_priority::DATA; }
std::string ProjectVersionTextSensor::unique_id() { return get_mac_address() + "-project-version"; }
void ProjectVersionTextSensor::dump_config() { LOG_TEXT_SENSOR("", "Project Version Text Sensor", this); }
} // namespace version
} // namespace esphome

View File

@@ -1,18 +0,0 @@
#pragma once
#include "esphome/core/component.h"
#include "esphome/components/text_sensor/text_sensor.h"
namespace esphome {
namespace project_version {
class ProjectVersionTextSensor : public text_sensor::TextSensor, public Component {
public:
void setup() override;
void dump_config() override;
float get_setup_priority() const override;
std::string unique_id() override;
};
} // namespace version
} // namespace esphome

View File

@@ -1,31 +0,0 @@
import esphome.codegen as cg
import esphome.config_validation as cv
from esphome.components import text_sensor
from esphome.const import (
ENTITY_CATEGORY_DIAGNOSTIC,
ICON_NEW_BOX,
)
project_version = cg.esphome_ns.namespace("project_version")
ProjectVersionTextSensor = project_version.class_(
"ProjectVersionTextSensor", text_sensor.TextSensor, cg.Component
)
CONFIG_SCHEMA = (
text_sensor.text_sensor_schema(
icon=ICON_NEW_BOX,
entity_category=ENTITY_CATEGORY_DIAGNOSTIC,
)
.extend(
{
cv.GenerateID(): cv.declare_id(ProjectVersionTextSensor),
}
)
.extend(cv.COMPONENT_SCHEMA)
)
async def to_code(config):
var = await text_sensor.new_text_sensor(config)
await cg.register_component(var, config)

View File

@@ -1,8 +1,9 @@
packages:
base: !include base.yaml
addon_bluetooth_proxy: !include addons/bluetooth-proxy.yaml
external_components:
- source: ./components
- source: github://tjhorner/esphome-custom-components
components: [ project_version ]
text_sensor:
@@ -21,14 +22,18 @@ captive_portal:
improv_serial:
esp32_improv:
authorizer: false
api:
reboot_timeout: 0s
web_server:
port: 80
js_url: "https://upsy-desky.tjhorner.dev/esphome-webserver/www.js"
ota:
password: ""
dashboard_import:
package_import_url: github://tjhorner/upsy-desky/firmware/stock.yaml@v1.1.0
package_import_url: github://tjhorner/upsy-desky/firmware/stock.yaml@v1.1.1