108 Commits

Author SHA1 Message Date
Blackymas
53cf4f1371 Merge pull request #298 from Blackymas/beta
v.3.1.0 - New features and US Version
2023-02-05 11:55:37 +01:00
Blackymas
6ab6892f5b Merge pull request #297 from Blackymas/dev
rdy for Release
2023-02-05 11:53:52 +01:00
Blackymas
a38948ad2f US Version dry 2023-02-05 11:52:55 +01:00
Blackymas
0f56e859db tft dry for stable 2023-02-04 00:55:43 +01:00
Blackymas
365f863fc2 Add files via upload 2023-02-04 00:47:58 +01:00
Blackymas
cf2e648a21 old TFT and hmi shifted 2023-02-04 00:46:56 +01:00
Chris
b7c077faad Merge pull request #295 from deejaybeam/dev
upd: change entity icon description
2023-02-03 22:09:49 +01:00
deejaybeam
44d65c3cd7 upd: change entity icon description 2023-02-03 22:08:46 +01:00
Chris
069cece05e Merge pull request #289 from deejaybeam/dev
upd: hw-button hold
2023-02-02 17:53:25 +01:00
deejaybeam
276524686a upd: hw-button hold 2023-02-02 17:52:41 +01:00
Chris
a46b3ad20b Merge pull request #284 from deejaybeam/dev
fix: unavailable entity
2023-02-01 21:49:14 +01:00
deejaybeam
295096a9d7 fix: unavailable entity 2023-02-01 21:48:26 +01:00
Chris
0c6b994161 Merge pull request #283 from deejaybeam/dev
fix: new tft ids
2023-02-01 21:15:07 +01:00
deejaybeam
63e1ab4947 fix: new tft ids 2023-02-01 21:14:27 +01:00
Chris
9ec2bac284 Merge pull request #282 from deejaybeam/dev
upd: HW-buttons hold
2023-02-01 21:08:40 +01:00
Chris
6fdbec1486 Merge branch 'Blackymas:dev' into dev 2023-02-01 21:08:03 +01:00
deejaybeam
f11215c097 upd: HW-buttons hold 2023-02-01 21:07:00 +01:00
Blackymas
7ec5bb6a04 Add files via upload 2023-02-01 20:52:32 +01:00
Blackymas
aae9bd8d8a Add files via upload 2023-02-01 20:36:37 +01:00
Chris
cdf980ee8f Merge pull request #279 from deejaybeam/dev
upd: remove global variable touchevent
2023-02-01 19:22:56 +01:00
deejaybeam
7b23050791 upd: remove global variable touchevent 2023-02-01 19:20:37 +01:00
Chris
faaa698e46 Merge pull request #278 from deejaybeam/dev
fix: exclude screensaver
2023-02-01 18:54:02 +01:00
deejaybeam
4b5c10a68e fix: exclude screensaver 2023-02-01 18:52:33 +01:00
Blackymas
b00720d465 touchevent 2023-01-31 21:43:34 +01:00
Blackymas
c4cf3049b2 chnage default delay to 1 2023-01-31 21:15:04 +01:00
Blackymas
f7e76bdbd8 dry for home timer es-home 2023-01-31 21:10:02 +01:00
Blackymas
4294fb39b2 Add files via upload 2023-01-31 00:05:05 +01:00
Blackymas
eb2f810161 Add files via upload 2023-01-30 23:51:05 +01:00
Blackymas
17e11063e3 Add files via upload 2023-01-30 23:45:21 +01:00
Blackymas
70e2f724f7 Add files via upload 2023-01-30 23:37:01 +01:00
Blackymas
f3787c812a Add files via upload 2023-01-30 23:31:50 +01:00
Blackymas
a056a13f0b Add files via upload 2023-01-30 23:28:34 +01:00
Blackymas
13d5b7a1d2 Add files via upload 2023-01-30 23:21:17 +01:00
Blackymas
2c8a45153b Add files via upload 2023-01-30 23:03:46 +01:00
Blackymas
be12633af1 Add files via upload 2023-01-30 22:02:00 +01:00
Blackymas
81e4149b11 delete home timer 2023-01-30 21:56:58 +01:00
Blackymas
4b98f4a80a Add files via upload 2023-01-30 21:08:54 +01:00
Chris
d83f37962d Merge pull request #272 from deejaybeam/dev
upd: page-timer esphome
2023-01-30 18:03:26 +01:00
Chris
33b0d0674a Merge branch 'Blackymas:dev' into dev 2023-01-30 18:02:39 +01:00
Chris
b7f2c18c85 upd: page-timer esphome 2023-01-30 18:01:42 +01:00
Blackymas
cda0e0c1d6 Add files via upload 2023-01-30 17:51:30 +01:00
Blackymas
42eb9b5d71 Add files via upload 2023-01-30 17:01:38 +01:00
Blackymas
35be40fb93 change txt_max Page label to 30 2023-01-30 11:09:31 +01:00
Blackymas
1d5c40d7a8 change lastclick 2023-01-30 11:01:23 +01:00
Blackymas
c1ea2e1810 Merge pull request #270 from Blackymas/Blackymas-patch-1
Blackymas test sponsor
2023-01-30 01:11:59 +01:00
Blackymas
f9562d495a Create FUNDING.yml 2023-01-30 01:11:25 +01:00
Blackymas
58ad89ee4e wrong entities_entity27 2023-01-29 23:27:28 +01:00
Blackymas
b4a0800929 Merge branch 'dev' of https://github.com/Blackymas/NSPanel_HA_Blueprint into dev 2023-01-29 21:38:19 +01:00
Blackymas
e27c92ef0e change delay to 0 2023-01-29 21:38:14 +01:00
Blackymas
936c152ca6 entity card and home icon 2023-01-29 21:35:25 +01:00
Blackymas
fadd725662 Merge branch 'dev' of https://github.com/Blackymas/NSPanel_HA_Blueprint into dev 2023-01-29 21:12:51 +01:00
Blackymas
ab5d30d0ce wrong entity icon, UKR trans., version to 3.1.0 2023-01-29 21:12:47 +01:00
Blackymas
12ecc30e1f Add files via upload 2023-01-29 12:13:02 +01:00
Blackymas
985cf69f0b change home entity icon mapping 2023-01-29 12:11:27 +01:00
Chris
ffa9deaf54 Merge pull request #264 from deejaybeam/dev
upd: instant update of home-buttons
2023-01-28 15:07:11 +01:00
deejaybeam
8613208b5f upd: instant update of home-buttons 2023-01-28 14:07:20 +01:00
Chris
7b1bbb704a Merge pull request #261 from deejaybeam/dev
upd: entities
2023-01-28 00:59:44 +01:00
Chris
5acbdef022 upd: entities 2023-01-28 00:58:59 +01:00
Blackymas
96f855e930 entitycards dry 2023-01-25 23:46:25 +01:00
Blackymas
c504ade7d4 Add files via upload 2023-01-25 23:42:38 +01:00
Blackymas
5941b6dab4 Add files via upload 2023-01-25 23:37:37 +01:00
Blackymas
33416b498c Add files via upload 2023-01-25 23:11:53 +01:00
Chris
beb8941c80 Merge pull request #250 from deejaybeam/dev
small changes
2023-01-25 22:05:44 +01:00
Chris
33d8487adf Merge branch 'Blackymas:dev' into dev 2023-01-25 22:02:49 +01:00
deejaybeam
cb5e9a2afe upd: add delay on boot 2023-01-25 22:00:38 +01:00
Blackymas
802a089c16 Add files via upload 2023-01-25 21:50:50 +01:00
deejaybeam
edad480e4f internal temperature sensor change upd_interval 2023-01-25 21:42:14 +01:00
Blackymas
6181cbca97 change to entitypage01 2023-01-25 09:56:30 +01:00
Blackymas
572fb9e934 Add files via upload 2023-01-25 00:10:38 +01:00
Blackymas
52dabed6ee Add files via upload 2023-01-24 23:13:36 +01:00
Blackymas
d12d8fbd86 Add files via upload 2023-01-24 23:00:59 +01:00
Chris
b0d57e63e3 Merge pull request #240 from deejaybeam/dev
upd: trigger on automation-reload
2023-01-24 16:37:50 +01:00
Chris
baf3ff4e95 Merge branch 'dev' of https://github.com/deejaybeam/NSPanel_HA_Blueprint into dev 2023-01-24 16:34:03 +01:00
Chris
c061c0bae1 upd: trigger on automation-reload 2023-01-24 16:33:56 +01:00
Chris
797c7d1a32 Merge pull request #239 from deejaybeam/dev
upd: set boot-infos
2023-01-24 13:28:08 +01:00
Chris
b1b63b11cd upd: set boot-infos 2023-01-24 13:26:37 +01:00
Chris
2ac8305eff Merge pull request #233 from deejaybeam/dev
QR-code, local fallback
2023-01-24 01:08:38 +01:00
deejaybeam
eb9d9e0f1e upd: set local fallback via blueprint 2023-01-24 01:05:09 +01:00
deejaybeam
9a1b447087 upd: change qr-code-call 2023-01-24 00:21:12 +01:00
Chris
7fb8480138 Merge pull request #231 from danwright87/dev
Update nspanel_esphome.yaml
2023-01-23 22:39:25 +01:00
danwright87
ad26272524 Update nspanel_esphome.yaml
Add relay local fallback
2023-01-23 21:16:23 +00:00
Blackymas
147cf0f497 Merge branch 'dev' of https://github.com/Blackymas/NSPanel_HA_Blueprint into dev 2023-01-23 00:14:04 +01:00
Blackymas
fa08f6b54a QR Code rdy 2023-01-23 00:14:00 +01:00
Blackymas
0f2d5fbd29 qr code 2023-01-22 23:38:28 +01:00
Blackymas
d645f4c02e Add files via upload 2023-01-22 16:34:55 +01:00
Blackymas
f0af3f1562 add blueprint jump qrcode page 2023-01-22 16:33:39 +01:00
Blackymas
b78699c9d5 add qrcode service 2023-01-22 16:22:33 +01:00
Blackymas
c3f2ddd499 Add files via upload 2023-01-22 01:04:57 +01:00
Blackymas
6f962ebfd0 test icon font 2023-01-22 00:40:43 +01:00
Blackymas
7f768ced45 fix entity card current page 2023-01-22 00:15:53 +01:00
Chris
37e287d253 Merge pull request #207 from X-Ryl669/dev
Simplify and remove useless code in ESP32
2023-01-21 23:19:32 +01:00
X-Ryl669
298e67a29d Fix build issue since std namespace is missing
Also fix some spelling mistakes
2023-01-21 11:58:10 +01:00
X-Ryl669
f1af69581e Remove useless test
Faster boot up by removing one useless line in UART communication
2023-01-20 14:49:13 +01:00
X-Ryl669
351b84ad96 Simplify the left/mid/right compute chain. 2023-01-20 14:46:42 +01:00
Blackymas
e050bce77e Update README.md 2023-01-19 23:56:11 +01:00
Blackymas
01de27059d first entity card page rdy 2023-01-19 23:52:25 +01:00
Blackymas
7407a2841b test design entity 2023-01-19 22:37:53 +01:00
Blackymas
2f1a947cfc test design entity 2023-01-19 22:03:06 +01:00
Blackymas
f26e5e33cc test design Entity Card 2023-01-19 21:58:44 +01:00
Blackymas
5a040cbd8e test design Entity Card 2023-01-19 21:56:53 +01:00
Blackymas
d2c383ef82 Merge pull request #199 from Blackymas/beta
change tft baud to bauds
2023-01-19 08:55:46 +01:00
Blackymas
ffc89d07e9 Merge pull request #198 from Blackymas/dev
change tft baud to bauds
2023-01-19 08:54:51 +01:00
Blackymas
2bae66f6fe new blank aft - baud -> bauds 2023-01-19 08:54:03 +01:00
Blackymas
09aaabf4c5 rdy new blank tft 2023-01-19 08:52:55 +01:00
Blackymas
5de8c739f8 change baud to bauds 2023-01-19 08:50:44 +01:00
Blackymas
1220715e9b Merge pull request #195 from Blackymas/beta
Update Readme
2023-01-16 22:40:02 +01:00
Blackymas
8cb194b3b9 Merge pull request #194 from Blackymas/dev
Update README.md
2023-01-16 22:39:15 +01:00
Blackymas
dd4f6c3b9e Update README.md 2023-01-16 22:35:18 +01:00
14 changed files with 1563 additions and 172 deletions

13
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1,13 @@
# These are supported funding model platforms
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
custom: https://www.paypal.com/donate/?hosted_button_id=S974SWQMB8PB2

View File

@@ -1,5 +1,7 @@
# NSPanel Custom with HA Blueprint
*You use our NSPanel version and are satisfied with it? Then we would be very happy about a donation to support our project.*
[![Paypal](https://user-images.githubusercontent.com/41958506/212499642-b2fd097a-0938-4bfc-b37b-74df64592c58.png)](https://www.paypal.com/donate/?hosted_button_id=S974SWQMB8PB2)
[![Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.](https://my.home-assistant.io/badges/blueprint_import.svg)](https://my.home-assistant.io/redirect/blueprint_import/?blueprint_url=https%3A%2F%2Fgithub.com%2FBlackymas%2FNSPanel_HA_Blueprint%2Fblob%2Fmain%2Fnspanel_blueprint.yaml)
@@ -14,7 +16,7 @@ The goal was to create a version that allows everyone to use the NSpanel fully l
📕 Full documentation and installation is available here [NSPanel Configuration, Setup and HowTo](https://github.com/Blackymas/NSPanel_HA_Blueprint/wiki).
📌 Step by Step - [Setup Video](https://www.youtube.com/watch?v=3afPFg6kUdc)
📌 Step by Step - [Setup and Overview Video´s](https://github.com/Blackymas/NSPanel_HA_Blueprint/wiki)
🚀 How to create "Issues" when I have a problem [WIKI HowTo](https://github.com/Blackymas/NSPanel_HA_Blueprint/wiki)
@@ -27,7 +29,8 @@ The goal was to create a version that allows everyone to use the NSpanel fully l
🙋 WE ARE LOOKING FOR YOU! _**We are always looking for people who would like to support this project. We are looking for help with "programming new features, writing documentation or translating documentation to EN. If you are interested then please contact us :)**_
## NSPanel:
![2 Home](https://user-images.githubusercontent.com/41958506/203653897-cf96a7af-2b92-4ad9-a375-987decad5aa7.png)
![2 Home](https://user-images.githubusercontent.com/41958506/212768891-9610d800-43c5-454f-a8b6-6b7c43677b5d.png)
![3 Buttonpage](https://user-images.githubusercontent.com/41958506/203654022-c6d81263-ce56-4a84-917a-9d4911f19f55.png)
![NEW Domains](https://user-images.githubusercontent.com/41958506/206879659-3aea30c1-b126-4d52-a869-abf6adfc8fa1.png)

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@@ -238,6 +238,17 @@ api:
- rtttl.play:
rtttl: !lambda 'return song_str;'
# Service to show a QR code on the display (ex. for WiFi password)
- service: qr_code
variables:
qrdata: string
then:
- wait_until:
switch.is_on: nextion_init
- lambda: |-
id(disp1).send_command_printf("page qrcode");
id(disp1).set_component_text_printf("qrcode.qrcode_value", "%s", qrdata.c_str());
#### Service to send thermostat cycle state ####
- service: send_thermostat_cycle_state
variables:
@@ -247,126 +258,12 @@ api:
switch.is_on: nextion_init
- lambda: |-
//ESP_LOGD("nextion", "thermostat sendig value %f", value);
int left=16; // 16 is empty left.
int mid=17; // 17 is empty mid.
int right=18; // 18 is empty right.
if (value < 13.5) {
left=16;
mid=17;
right=18;
} else if (value >= 13.5 and value < 14) {
left=19;
mid=17;
right=18;
} else if (value >= 14 and value < 14.5) {
left=20;
mid=17;
right=18;
} else if (value >= 14.5 and value < 15) {
left=21;
mid=17;
right=18;
} else if (value >= 15 and value < 15.5) {
left=22;
mid=17;
right=18;
} else if (value >= 15.5 and value < 16) {
left=23;
mid=17;
right=18;
} else if (value >= 16 and value < 16.5) {
left=24;
mid=17;
right=18;
} else if (value >= 16.5 and value < 17) {
left=25;
mid=17;
right=18;
} else if (value >= 17 and value < 17.5) {
left=26;
mid=17;
right=18;
} else if (value >= 17.5 and value < 18) {
left=27;
mid=17;
right=18;
} else if (value >= 18 and value < 18.5) {
left=28;
mid=17;
right=18;
} else if (value >= 18.5 and value < 19) {
left=29;
mid=30;
right=18;
} else if (value >= 19 and value < 19.5) {
left=29;
mid=31;
right=18;
} else if (value >= 19.5 and value < 20) {
left=29;
mid=32;
right=18;
} else if (value >= 20 and value < 20.5) {
left=29;
mid=33;
right=18;
} else if (value >= 20.5 and value < 21) {
left=29;
mid=34;
right=18;
} else if (value >= 21 and value < 21.5) {
left=29;
mid=35;
right=18;
} else if (value >= 21.5 and value < 22) {
left=29;
mid=36;
right=18;
} else if (value >= 22 and value < 22.5) {
left=29;
mid=37;
right=38;
} else if (value >= 22.5 and value < 23) {
left=29;
mid=37;
right=39;
} else if (value >= 23 and value < 23.5) {
left=29;
mid=37;
right=40;
} else if (value >= 23.5 and value < 24) {
left=29;
mid=37;
right=41;
} else if (value >= 24 and value < 24.5) {
left=29;
mid=37;
right=42;
} else if (value >= 24.5 and value < 25) {
left=29;
mid=37;
right=43;
} else if (value >= 25 and value < 25.5) {
left=29;
mid=37;
right=44;
} else if (value >= 25.5 and value < 26) {
left=29;
mid=37;
right=45;
} else if (value >= 26 and value < 26.5) {
left=29;
mid=37;
right=46;
} else if (value >= 26.5 and value < 27) {
left=29;
mid=37;
right=47;
} else if (value >= 27) {
left=29;
mid=37;
right=48;
}
int v = int(2 * std::min(std::max(value - 13.5, 0.0), 5.0));
int left = v + (v ? 19 : 16); // 16 is empty left.
v = int(2 * std::min(std::max(value - 18.0, 0.0), 4.0));
int mid = v + (v ? 29 : 17); // 17 is empty mid.
v = int(2 * std::min(std::max(value - 21.5, 0.0), 5.5));
int right = v + (v ? 37 : 18); // 18 is empty right.
// sends the 3 images to the display
//ESP_LOGD("nextion", "thermostat left %i", left);
//ESP_LOGD("nextion", "thermostat mid %i", mid);
@@ -430,7 +327,7 @@ globals:
restore_value: no
initial_value: ''
##### lastclick_ccurrentpage State #####
##### lastclick_currentpage State #####
- id: currentpage_global
type: std::string
restore_value: no
@@ -441,23 +338,126 @@ binary_sensor:
###### LEFT BUTTON BELOW DISPLAY TO TOGGLE RELAY#####
- platform: gpio
name: ${device_name} Left Button
# name: ${device_name} Left Button
id: left_button
pin:
number: 14
inverted: true
on_click:
- min_length: 50ms
max_length: 1000ms
then:
- binary_sensor.template.publish:
id: left_button_short
state: ON
- if:
condition:
and:
- switch.is_on: relay1_fallback
- not:
api.connected:
then:
- switch.toggle: relay_1
- lambda: id(disp1).send_command_printf("home.icon_top_01.pic=51");
- lambda: id(disp1).send_command_printf("home.left_bt_pic.pic=98");
- if:
condition:
switch.is_on: relay_1
then:
- lambda: id(disp1).send_command_printf("home.icon_top_01.pic=105");
- delay: 500ms
- binary_sensor.template.publish:
id: left_button_short
state: OFF
on_press:
then:
- lambda: |-
if (id(disp1_currentpage).state == "lightsettings" or id(disp1_currentpage).state == "coversettings") {
ESP_LOGD("nspanel", "settingspage -> no press");
} else {
// ESP_LOGD("nspanel", "release button");
id(disp1_lastclick_general).set_state("pressbuttonleft",true,true);
}
on_release:
then:
- lambda: |-
if (id(disp1_currentpage).state == "lightsettings" or id(disp1_currentpage).state == "coversettings") {
ESP_LOGD("nspanel", "settingspage -> no release");
} else {
// ESP_LOGD("nspanel", "release button");
id(disp1_lastclick_general).set_state("releasebuttonleft",true,true);
}
- platform: template
name: ${device_name} Left Button
id: left_button_short
lambda: |-
return {};
##### RIGHT BUTTON BELOW DISPLAY TO TOGGLE RELAY #####
- platform: gpio
name: ${device_name} Right Button
# name: ${device_name} Right Button
id: right_button
pin:
number: 27
inverted: true
on_click:
- min_length: 50ms
max_length: 1000ms
then:
- binary_sensor.template.publish:
id: right_button_short
state: ON
- if:
condition:
and:
- switch.is_on: relay2_fallback
- not:
api.connected:
then:
- switch.toggle: relay_2
- lambda: id(disp1).send_command_printf("home.icon_top_02.pic=51");
- lambda: id(disp1).send_command_printf("home.right_bt_pic.pic=98");
- if:
condition:
switch.is_on: relay_2
then:
- lambda: id(disp1).send_command_printf("home.icon_top_02.pic=106");
- delay: 500ms
- binary_sensor.template.publish:
id: right_button_short
state: OFF
on_press:
then:
- lambda: |-
if (id(disp1_currentpage).state == "lightsettings" or id(disp1_currentpage).state == "coversettings") {
ESP_LOGD("nspanel", "settingspage -> no press");
} else {
// ESP_LOGD("nspanel", "release button");
id(disp1_lastclick_general).set_state("pressbuttonright",true,true);
}
on_release:
then:
- lambda: |-
if (id(disp1_currentpage).state == "lightsettings" or id(disp1_currentpage).state == "coversettings") {
ESP_LOGD("nspanel", "settingspage -> no release");
} else {
// ESP_LOGD("nspanel", "release button");
id(disp1_lastclick_general).set_state("releasebuttonright",true,true);
}
- platform: template
name: ${device_name} Right Button
id: right_button_short
lambda: |-
return {};
##### Restart NSPanel Button - Setting Page #####
- platform: nextion
name: ${device_name} Restart
page_id: 7
component_id: 9
component_id: 8
internal: true
on_click:
- button.press: restart_nspanel
@@ -475,7 +475,7 @@ binary_sensor:
- platform: nextion
name: ${device_name} Sleep Modus
page_id: 7
component_id: 4
component_id: 3
internal: true
on_click:
- switch.toggle: sleep_modus
@@ -505,21 +505,21 @@ sensor:
name: ${device_name} RSSI
update_interval: 60s
##### INTERNAL TEMPERATUE SENSOR, ADC VALUE #####
##### INTERNAL TEMPERATURE SENSOR, ADC VALUE #####
- platform: adc
id: ntc_source
pin: 38
update_interval: 10s
update_interval: 60s
attenuation: 11db
##### INTERNAL TEMPERATUE SENSOR, adc reading converted to resistance (calculation)#####
##### INTERNAL TEMPERATURE SENSOR, adc reading converted to resistance (calculation)#####
- platform: resistance
id: resistance_sensor
sensor: ntc_source
configuration: DOWNSTREAM
resistor: 11.2kOhm
##### INTERNAL TEMPERATUE SENSOR, resistance to temperature (calculation) #####
##### INTERNAL TEMPERATURE SENSOR, resistance to temperature (calculation) #####
- platform: ntc
name: ${device_name} Temperature
id: temp_nspanel
@@ -600,6 +600,7 @@ text_sensor:
ip_address:
name: ${device_name} IP
disabled_by_default: true
id: ip_address
ssid:
name: ${device_name} SSID
disabled_by_default: true
@@ -635,6 +636,8 @@ text_sensor:
- globals.set:
id: lastclick_general_global
value: !lambda return x;
- lambda: |-
id(page_timer)->execute(int(id(page_timeout).state));
##### last click lightsettings page, the main action variable - push to HA #####
- platform: nextion
@@ -656,6 +659,8 @@ text_sensor:
- globals.set:
id: lastclick_lightsettings_global
value: !lambda return x;
- lambda: |-
id(page_timer)->execute(int(id(page_timeout).state));
##### last click coversettings page, the main action variable - push to HA #####
- platform: nextion
@@ -677,6 +682,8 @@ text_sensor:
- globals.set:
id: lastclick_coversettings_global
value: !lambda return x;
- lambda: |-
id(page_timer)->execute(int(id(page_timeout).state));
##### last click climate page, the main action variable - push to HA #####
- platform: nextion
@@ -698,6 +705,8 @@ text_sensor:
- globals.set:
id: lastclick_climatesettings_global
value: !lambda return x;
- lambda: |-
id(page_timer)->execute(int(id(page_timeout).state));
##### currentpage sensor, the main action variable - push to HA #####
- platform: nextion
@@ -719,6 +728,32 @@ text_sensor:
- globals.set:
id: currentpage_global
value: !lambda return x;
- lambda: |-
id(page_timer)->execute(int(id(page_timeout).state));
##### touchevent sensor, Reset the page timeout #####
- platform: nextion
nextion_id: disp1
#name: ${device_name} touchevent
id: disp1_touchevent
update_interval: 50ms
component_name: touchevent
internal: true
filters:
- lambda: |-
static std::string touchevent_history = "";
if (strcmp(x.c_str(), touchevent_history.c_str()) != 0) {
touchevent_history = x;
return x;
// touchevent_history = "";
} else {
return {};
}
on_value:
then:
- lambda: |-
id(page_timer)->execute(int(id(page_timeout).state));
##### START - SWITCH CONFIGURATION #####
@@ -822,6 +857,20 @@ switch:
value: '1'
- lambda: id(disp1).set_component_value("settings.a02",1);
##### Relay Local control Fallback #####
- platform: template
name: ${device_name} Relay 1 Local Fallback
id: relay1_fallback
entity_category: config
restore_state: true
optimistic: true
- platform: template
name: ${device_name} Relay 2 Local Fallback
id: relay2_fallback
entity_category: config
restore_state: true
optimistic: true
##### START - NUMBER CONFIGURATION #####
number:
@@ -880,6 +929,17 @@ number:
id: temperature_correction_global
value: !lambda 'return x;'
##### page-timeout #####
- platform: template
name: ${device_name} Page Timeout
id: page_timeout
entity_category: config
min_value: 0
max_value: 60
initial_value: 10
step: 1
restore_value: true
optimistic: true
##### START - DISPLAY START CONFIGURATION #####
display:
@@ -890,8 +950,10 @@ display:
on_setup:
then:
- lambda: id(disp1).send_command_printf("page 8");
- lambda: id(disp1).set_component_text_printf("boot.esph_version", "%s", "3.1.0"); ### esphome-version ###
- wait_until:
api.connected
- lambda: id(disp1).set_component_text_printf("boot.ip_addr", "%s", id(ip_address).state.c_str());
- delay: 0.5s
- number.set:
id: display_brightness
@@ -904,13 +966,26 @@ display:
- lambda: id(disp1).send_command_printf("settings.brightslider.val=%i", id(display_brightness_global));
- lambda: id(disp1).send_command_printf("settings.dimslider.val=%i", id(display_dim_brightness_global));
- lambda: id(disp1).send_command_printf("home.sleepmodus.val=%i", id(sleep_modus_global));
- lambda: |-
id(disp1).set_component_value("settings.a02",0);
if (id(sleep_modus_global) == 1)
{
id(disp1).set_component_value("settings.a02",1);
}
- lambda: id(disp1).set_component_value("settings.a02", id(sleep_modus_global) == 1);
- delay: 0.5s
- switch.template.publish:
id: nextion_init
state: on
### Script for page_timer
script:
- id: page_timer
mode: restart
parameters:
delay: int
then:
- lambda: ESP_LOGD("nspanel", "start page-timer delay %i", int(id(page_timeout).state));
- delay: !lambda return delay *1000;
- lambda: |-
if (id(disp1_currentpage).state == "home" or id(disp1_currentpage).state == "screensaver" or id(disp1_currentpage).state == "boot" or int(id(page_timeout).state) == 0) {
ESP_LOGD("nspanel", "no page-jump");
} else {
ESP_LOGD("nspanel", "timer->home");
id(disp1).send_command_printf("page 0");
}

BIN
nspanel_eu.HMI Normal file

Binary file not shown.

BIN
nspanel_eu.tft Normal file

Binary file not shown.

BIN
nspanel_us.HMI Normal file

Binary file not shown.

BIN
nspanel_us.tft Normal file

Binary file not shown.