Merge branch 'dev' into nvds-add-esp32-s3-devkitm-1

This commit is contained in:
NP v/d Spek 2024-04-15 05:34:55 +02:00 committed by GitHub
commit f577881bd1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
16 changed files with 129 additions and 259 deletions

View File

@ -32,7 +32,7 @@ void FT63X6Touchscreen::setup() {
if (this->interrupt_pin_ != nullptr) {
this->interrupt_pin_->pin_mode(gpio::FLAG_INPUT | gpio::FLAG_PULLUP);
this->interrupt_pin_->setup();
this->attach_interrupt_(this->interrupt_pin_, gpio::INTERRUPT_FALLING_EDGE);
this->attach_interrupt_(this->interrupt_pin_, gpio::INTERRUPT_ANY_EDGE);
}
if (this->reset_pin_ != nullptr) {
@ -78,13 +78,12 @@ void FT63X6Touchscreen::update_touches() {
uint16_t touch_id, x, y;
uint8_t touches = this->read_touch_number_();
ESP_LOGV(TAG, "Touches found: %d", touches);
if ((touches == 0x00) || (touches == 0xff)) {
// ESP_LOGD(TAG, "No touches detected");
return;
}
ESP_LOGV(TAG, "Touches found: %d", touches);
for (auto point = 0; point < touches; point++) {
if (((this->read_touch_event_(point)) & 0x01) == 0) { // checking event flag bit 6 if it is null
touch_id = this->read_touch_id_(point); // id1 = 0 or 1

View File

@ -134,7 +134,7 @@ class ProjectUpdateTrigger : public Trigger<std::string>, public Component {
uint32_t hash = fnv1_hash(ESPHOME_PROJECT_NAME);
ESPPreferenceObject pref = global_preferences->make_preference<char[30]>(hash, true);
char previous_version[30];
char current_version[30] = ESPHOME_PROJECT_VERSION;
char current_version[30] = ESPHOME_PROJECT_VERSION_30;
if (pref.load(&previous_version)) {
int cmp = strcmp(previous_version, current_version);
if (cmp < 0) {

View File

@ -394,6 +394,7 @@ async def to_code(config):
if project_conf := config.get(CONF_PROJECT):
cg.add_define("ESPHOME_PROJECT_NAME", project_conf[CONF_NAME])
cg.add_define("ESPHOME_PROJECT_VERSION", project_conf[CONF_VERSION])
cg.add_define("ESPHOME_PROJECT_VERSION_30", project_conf[CONF_VERSION][:30])
for conf in project_conf.get(CONF_ON_UPDATE, []):
trigger = cg.new_Pvariable(conf[CONF_TRIGGER_ID])
await cg.register_component(trigger, conf)

View File

@ -11,6 +11,7 @@
#define ESPHOME_BOARD "dummy_board"
#define ESPHOME_PROJECT_NAME "dummy project"
#define ESPHOME_PROJECT_VERSION "v2"
#define ESPHOME_PROJECT_VERSION_30 "v2"
#define ESPHOME_VARIANT "ESP32"
// Feature flags

View File

@ -0,0 +1,67 @@
esphome:
on_boot:
then:
- homeassistant.event:
event: esphome.button_pressed
data:
message: Button was pressed
- homeassistant.event:
event: esphome.html5
data:
message: New Humidity
data_template:
message: The humidity is {{ my_variable }}%.
variables:
my_variable: "return id(ha_hello_world_temperature).state;"
- homeassistant.service:
service: notify.html5
data:
message: Button was pressed
- homeassistant.service:
service: notify.html5
data:
title: New Humidity
data_template:
message: The humidity is {{ my_variable }}%.
variables:
my_variable: "return id(ha_hello_world_temperature).state;"
wifi:
ssid: MySSID
password: password1
api:
binary_sensor:
- platform: homeassistant
entity_id: binary_sensor.hello_world
id: ha_hello_world_binary
- platform: homeassistant
entity_id: binary_sensor.hello
attribute: world
id: ha_hello_world_binary_attribute
sensor:
- platform: homeassistant
entity_id: sensor.hello_world
id: ha_hello_world
- platform: homeassistant
entity_id: climate.living_room
attribute: temperature
id: ha_hello_world_temperature
text_sensor:
- platform: homeassistant
entity_id: sensor.hello_world
id: ha_hello_world_text
- platform: homeassistant
entity_id: sensor.hello_world1
id: ha_hello_world_text2
attribute: some_attribute
time:
- platform: homeassistant
on_time:
- at: "16:00:00"
then:
- logger.log: It's 16:00

View File

@ -0,0 +1,2 @@
packages:
common: !include common.yaml

View File

@ -1,39 +1,2 @@
wifi:
ssid: MySSID
password: password1
api:
binary_sensor:
- platform: homeassistant
entity_id: binary_sensor.hello_world
id: ha_hello_world_binary
- platform: homeassistant
entity_id: binary_sensor.hello
attribute: world
id: ha_hello_world_binary_attribute
sensor:
- platform: homeassistant
entity_id: sensor.hello_world
id: ha_hello_world
- platform: homeassistant
entity_id: climate.living_room
attribute: temperature
id: ha_hello_world_temperature
text_sensor:
- platform: homeassistant
entity_id: sensor.hello_world
id: ha_hello_world_text
- platform: homeassistant
entity_id: sensor.hello_world1
id: ha_hello_world_text2
attribute: some_attribute
time:
- platform: homeassistant
on_time:
- at: "16:00:00"
then:
- logger.log: It's 16:00
packages:
common: !include common.yaml

View File

@ -1,39 +1,2 @@
wifi:
ssid: MySSID
password: password1
api:
binary_sensor:
- platform: homeassistant
entity_id: binary_sensor.hello_world
id: ha_hello_world_binary
- platform: homeassistant
entity_id: binary_sensor.hello
attribute: world
id: ha_hello_world_binary_attribute
sensor:
- platform: homeassistant
entity_id: sensor.hello_world
id: ha_hello_world
- platform: homeassistant
entity_id: climate.living_room
attribute: temperature
id: ha_hello_world_temperature
text_sensor:
- platform: homeassistant
entity_id: sensor.hello_world
id: ha_hello_world_text
- platform: homeassistant
entity_id: sensor.hello_world1
id: ha_hello_world_text2
attribute: some_attribute
time:
- platform: homeassistant
on_time:
- at: "16:00:00"
then:
- logger.log: It's 16:00
packages:
common: !include common.yaml

View File

@ -1,39 +1,2 @@
wifi:
ssid: MySSID
password: password1
api:
binary_sensor:
- platform: homeassistant
entity_id: binary_sensor.hello_world
id: ha_hello_world_binary
- platform: homeassistant
entity_id: binary_sensor.hello
attribute: world
id: ha_hello_world_binary_attribute
sensor:
- platform: homeassistant
entity_id: sensor.hello_world
id: ha_hello_world
- platform: homeassistant
entity_id: climate.living_room
attribute: temperature
id: ha_hello_world_temperature
text_sensor:
- platform: homeassistant
entity_id: sensor.hello_world
id: ha_hello_world_text
- platform: homeassistant
entity_id: sensor.hello_world1
id: ha_hello_world_text2
attribute: some_attribute
time:
- platform: homeassistant
on_time:
- at: "16:00:00"
then:
- logger.log: It's 16:00
packages:
common: !include common.yaml

View File

@ -1,39 +1,2 @@
wifi:
ssid: MySSID
password: password1
api:
binary_sensor:
- platform: homeassistant
entity_id: binary_sensor.hello_world
id: ha_hello_world_binary
- platform: homeassistant
entity_id: binary_sensor.hello
attribute: world
id: ha_hello_world_binary_attribute
sensor:
- platform: homeassistant
entity_id: sensor.hello_world
id: ha_hello_world
- platform: homeassistant
entity_id: climate.living_room
attribute: temperature
id: ha_hello_world_temperature
text_sensor:
- platform: homeassistant
entity_id: sensor.hello_world
id: ha_hello_world_text
- platform: homeassistant
entity_id: sensor.hello_world1
id: ha_hello_world_text2
attribute: some_attribute
time:
- platform: homeassistant
on_time:
- at: "16:00:00"
then:
- logger.log: It's 16:00
packages:
common: !include common.yaml

View File

@ -1,39 +1,2 @@
wifi:
ssid: MySSID
password: password1
api:
binary_sensor:
- platform: homeassistant
entity_id: binary_sensor.hello_world
id: ha_hello_world_binary
- platform: homeassistant
entity_id: binary_sensor.hello
attribute: world
id: ha_hello_world_binary_attribute
sensor:
- platform: homeassistant
entity_id: sensor.hello_world
id: ha_hello_world
- platform: homeassistant
entity_id: climate.living_room
attribute: temperature
id: ha_hello_world_temperature
text_sensor:
- platform: homeassistant
entity_id: sensor.hello_world
id: ha_hello_world_text
- platform: homeassistant
entity_id: sensor.hello_world1
id: ha_hello_world_text2
attribute: some_attribute
time:
- platform: homeassistant
on_time:
- at: "16:00:00"
then:
- logger.log: It's 16:00
packages:
common: !include common.yaml

View File

@ -1,39 +1,2 @@
wifi:
ssid: MySSID
password: password1
api:
binary_sensor:
- platform: homeassistant
entity_id: binary_sensor.hello_world
id: ha_hello_world_binary
- platform: homeassistant
entity_id: binary_sensor.hello
attribute: world
id: ha_hello_world_binary_attribute
sensor:
- platform: homeassistant
entity_id: sensor.hello_world
id: ha_hello_world
- platform: homeassistant
entity_id: climate.living_room
attribute: temperature
id: ha_hello_world_temperature
text_sensor:
- platform: homeassistant
entity_id: sensor.hello_world
id: ha_hello_world_text
- platform: homeassistant
entity_id: sensor.hello_world1
id: ha_hello_world_text2
attribute: some_attribute
time:
- platform: homeassistant
on_time:
- at: "16:00:00"
then:
- logger.log: It's 16:00
packages:
common: !include common.yaml

View File

@ -0,0 +1,37 @@
esphome:
on_boot:
then:
- http_request.get:
url: https://esphome.io
headers:
Content-Type: application/json
verify_ssl: false
on_response:
then:
- logger.log:
format: 'Response status: %d, Duration: %u ms'
args:
- status_code
- duration_ms
- http_request.post:
url: https://esphome.io
headers:
Content-Type: application/json
json:
key: value
verify_ssl: false
- http_request.send:
method: PUT
url: https://esphome.io
headers:
Content-Type: application/json
body: "Some data"
verify_ssl: false
wifi:
ssid: MySSID
password: password1
http_request:
useragent: esphome/tagreader
timeout: 10s

View File

@ -1,7 +1,2 @@
wifi:
ssid: MySSID
password: password1
http_request:
useragent: esphome/tagreader
timeout: 10s
packages:
common: !include common.yaml

View File

@ -1,7 +1,2 @@
wifi:
ssid: MySSID
password: password1
http_request:
useragent: esphome/tagreader
timeout: 10s
packages:
common: !include common.yaml

View File

@ -1,7 +1,2 @@
wifi:
ssid: MySSID
password: password1
http_request:
useragent: esphome/tagreader
timeout: 10s
packages:
common: !include common.yaml