96 Commits

Author SHA1 Message Date
Blackymas
787f337220 v3.2.2 - fixed some bugs performance improvement
v3.2.2 - fixed some bugs performance improvement
2023-04-04 08:37:14 +02:00
Blackymas
44aaea74ec change weather params
Change order of weather params to fit the screen (#592)
2023-04-04 08:25:30 +02:00
Edward Firmo
4a346ce2d2 Change order of weather params to fit the screen (#592) 2023-04-04 07:11:43 +02:00
Blackymas
4ead4382a2 Merge pull request #591 from Blackymas/dev
fix for wakeup sleep mode
2023-04-03 22:43:19 +02:00
Blackymas
1e64e134f9 fix for wakeup sleep mode 2023-04-03 22:37:57 +02:00
Blackymas
68190ece4b Merge pull request #589 from Blackymas/dev
v.3.2.2 - fixed some bugs
2023-04-03 21:14:34 +02:00
Blackymas
81d0bcf304 change description 2023-04-03 21:13:30 +02:00
Blackymas
94364d711e Merge pull request #585 from Blackymas/dev
v.3.2.2 - fixed some bugs
2023-04-03 16:40:51 +02:00
Chris
2953942fbd Merge pull request #584 from deejaybeam/dev
v3.2.2
2023-04-03 08:28:08 +02:00
Chris
51173352d2 Merge branch 'Blackymas:dev' into dev 2023-04-03 08:26:05 +02:00
Chris
1bec2b1160 upd: v3.2.2 2023-04-03 08:21:35 +02:00
Blackymas
4921453a1b fix variables for v3.2.2 2023-04-02 22:32:42 +02:00
Blackymas
95a4447eeb Update page_id & component_id 2023-04-02 22:30:05 +02:00
deejaybeam
350b3f4ca7 upd: use set_button on all button pages 2023-04-02 08:55:30 +02:00
deejaybeam
a8172a1b06 fix: fallback state 2023-04-02 08:49:02 +02:00
deejaybeam
df10d09736 upd: use current nextion-component 2023-04-01 02:17:04 +02:00
Chris
4f31326b8e Merge pull request #578 from deejaybeam/dev
fix: avoid "0" brightness in some cases
2023-04-01 02:12:20 +02:00
deejaybeam
f0e557b5e4 fix: avoid "0" brightness in some cases 2023-04-01 02:11:00 +02:00
Chris
80d19b1da1 Merge pull request #577 from deejaybeam/dev
upd: service set_button to improve performance
2023-03-31 23:24:33 +02:00
deejaybeam
df0855862f upd: service set_button to improve performance 2023-03-31 23:23:43 +02:00
Edward Firmo
d23fe9616c fix: ignore unassigned indoor sensor
Fix for when sensor is set but unavailable.
2023-03-29 15:49:29 +02:00
Chris
76fee43d3b Merge pull request #561 from deejaybeam/dev
fix: ignore unassigned indoor sensor
2023-03-29 11:01:50 +02:00
deejaybeam
e8fd5e2020 fix: ignore unassigned indoor sensor 2023-03-29 11:00:50 +02:00
Chris
89faeb3ec1 Merge pull request #525 from edwardtfn/patch-19
Code refactoring - Weather & Climate
2023-03-28 22:35:38 +02:00
Chris
a006af2654 Merge pull request #537 from edwardtfn/patch-21
Removing empty sequences
2023-03-28 22:34:07 +02:00
Chris
4ea23c7cf5 Merge pull request #543 from edwardtfn/patch-23
Update clock at the beginning of each minute
2023-03-28 22:33:39 +02:00
Chris
1e7ead8e46 Merge pull request #556 from deejaybeam/dev
fix: typo
2023-03-28 19:16:42 +02:00
deejaybeam
d88290474e fix: typo 2023-03-28 19:11:12 +02:00
Blackymas
75f17f0d3e fix sleep button settings page 2023-03-27 22:05:17 +02:00
Edward Firmo
8a21f88df9 Merge branch 'dev' into patch-19 2023-03-27 00:51:40 +02:00
Edward Firmo
5a01431670 Resolving merging conflicts with #541 2023-03-27 00:46:20 +02:00
Blackymas
7c90677d99 Merge pull request #544 from Blackymas/beta
v3.2.1 - new features and fixes
2023-03-26 22:28:01 +02:00
Blackymas
fe65530eb5 Merge pull request #542 from Blackymas/dev
v3.2.1 - new features and fixes
2023-03-26 22:27:33 +02:00
Edward Firmo
ecd806b1c5 Update clock at the beginning of each minute
As it is now, using `minutes: "/1"`, the time will update every minute, but that could happen when lots of seconds has passed on that minute, making possible the displayed time to be up to 59s late.
By changing that to `seconds: 0` if forces the update in the same rate, but always in the first second of a minute, keeping the displayed time always updated.
2023-03-26 22:26:55 +02:00
Chris
72e59947b6 Merge pull request #541 from deejaybeam/dev
fix: remove unneeded home.hotwater.pic
2023-03-26 21:15:33 +02:00
Chris
8869eb2f67 Merge branch 'Blackymas:dev' into dev 2023-03-26 21:14:55 +02:00
deejaybeam
c7c54261cb Merge branch 'dev' of https://github.com/deejaybeam/NSPanel_HA_Blueprint into dev 2023-03-26 21:14:25 +02:00
deejaybeam
27185ea88c fix: remove unneeded home.hotwater.pic 2023-03-26 21:14:14 +02:00
Chris
bfe2c65bfd Merge pull request #540 from deejaybeam/dev
upd: blank.tft
2023-03-26 21:10:32 +02:00
Chris
45dafc3d0d Merge branch 'Blackymas:dev' into dev 2023-03-26 21:09:41 +02:00
Blackymas
c9c31bba57 size for the Date field 2023-03-26 20:54:13 +02:00
Chris
485e5cc8d2 Merge branch 'dev' of https://github.com/deejaybeam/NSPanel_HA_Blueprint into dev 2023-03-26 19:59:44 +02:00
Chris
175c927ee8 upd: blank.tft 2023-03-26 19:59:38 +02:00
Edward Firmo
4392bf251b Fix variable name hotwater_pic_on -> hotw_bt_on
Trying to avoid merging conflict with #538
2023-03-26 17:54:06 +02:00
Edward Firmo
9616ea4c8f Merging weather01 page into the others
- All the weather pages now shares the same code, increasing standardization
- Support for other forecast parameters when supported by the integration
- Removed empty rows between the forecast parameters
2023-03-26 17:21:10 +02:00
Edward Firmo
2a9162e809 Removing empty sequences
This probably isn't an issue, but a sequence shouldn't be empty.
2023-03-26 16:11:39 +02:00
Blackymas
df976b0a90 Merge pull request #533 from Blackymas/dev
v3.2.1 - new features and fixes
2023-03-26 00:44:23 +01:00
Chris
220b5fb02b Merge pull request #532 from deejaybeam/dev
fix: remove hp-bottons on disable in blueprint
2023-03-26 00:41:11 +01:00
deejaybeam
a0a0d16af7 fix: remove hp-bottons on disable in blueprint 2023-03-26 00:40:42 +01:00
Blackymas
f97b298d00 repositioning date and time 2023-03-26 00:19:18 +01:00
Chris
6feba8a56d Merge pull request #531 from deejaybeam/dev
upd: remove unneeded link
2023-03-25 23:50:25 +01:00
deejaybeam
0ff61a2e4a upd: remove unneeded link 2023-03-25 23:49:53 +01:00
Blackymas
aee6e7bb57 repositioning date 2023-03-25 23:45:05 +01:00
Chris
602a58cc40 Merge pull request #530 from deejaybeam/dev
fix: hw-button hold display
2023-03-25 23:36:57 +01:00
Chris
5e45641687 Merge branch 'Blackymas:dev' into dev 2023-03-25 23:36:19 +01:00
deejaybeam
8b2beec50c fix: hw-button long press display 2023-03-25 23:26:44 +01:00
Blackymas
3278de673a new time format 2023-03-25 23:19:11 +01:00
Blackymas
3cf5fb3eeb new time format 2023-03-25 23:15:56 +01:00
Chris
d53a34b83f Merge pull request #529 from deejaybeam/dev
upd: reload automation triggers page refresh
2023-03-25 15:29:05 +01:00
deejaybeam
e4f0dba8fa upd: reload automation triggers page refresh 2023-03-25 15:28:08 +01:00
Chris
3ea33a6dfa Merge pull request #528 from deejaybeam/dev
upd: blueprint version 3.2.1
2023-03-25 12:42:48 +01:00
deejaybeam
6b11ffb7cf upd: bluleprint version 3.2.1 2023-03-25 12:41:54 +01:00
Chris
3047204272 Merge pull request #527 from edwardtfn/patch-20
Add support to `input_boolean` to chips
2023-03-25 12:37:56 +01:00
Chris
61af338a96 Merge pull request #522 from edwardtfn/patch-18
Fix for warning "list object has no element n"
2023-03-25 12:35:25 +01:00
Chris
729414944b Merge pull request #521 from edwardtfn/patch-17
Fix "Loading..." when selected before RGB picker
2023-03-25 12:34:29 +01:00
Chris
22dbd2814b Merge pull request #519 from bakito/patch-2
Ignore IntelliJ IDEA project directory
2023-03-25 12:34:00 +01:00
Edward Firmo
44836d1e4d Add support to input_boolean to chips
- Chips now supports `input_boolean` entities (Toggle Helpers).

This resolves #479.
2023-03-25 07:37:33 +01:00
Edward Firmo
881c50dd1f Code refactoring - Weather & Climate
Code refactoring on Weather and Climate entities/pages in order to make easier to maintain and understand.
2023-03-24 23:52:45 +01:00
Edward Firmo
ce7dfb1423 Fix for warning "list object has no element n"
Fix for the following error happening when opening climate page (and maybe other pages also):
```
Template variable warning: list object has no element 3 when rendering '{%- if settings_entity_value != "unknown" and settings_entity_value.split(',') | count >= 3 -%} {{ settings_entity_value.split(',')[3] }} {%- else -%} unknown {%- endif -%}'
```
2023-03-24 18:41:41 +01:00
Edward Firmo
c45bd4057f Fix "Loading..." when selected colors before 3.2.1
- Fix for "Loading..." taking forever when a color was selected prior to the new RGB picker and was not updated.

* This is no fixing the input itself, so users still having to pick a color again with the new selector, but the panel won't get stuck on "Loading..." before the new color selection is made.
2023-03-24 11:14:15 +01:00
Marc Brugger
3401340563 Ignore IntelliJ IDEA project directory 2023-03-24 07:36:56 +01:00
Chris
7f7d496beb Merge pull request #476 from bakito/patch-1
Add Home Assistant Icon Page to blueprint
2023-03-23 22:34:38 +01:00
Chris
c7ec9f97b7 Merge pull request #510 from edwardtfn/patch-13
Support to date & time formats
2023-03-23 22:23:24 +01:00
Chris
3c58a29e73 Merge pull request #513 from edwardtfn/patch-15
Fix error related to dict not containing on/off
2023-03-23 22:04:44 +01:00
Chris
7fd5658630 Merge pull request #514 from edwardtfn/patch-16
Fix for "Error rendering data template"
2023-03-23 22:03:28 +01:00
Chris
81f6783ca1 Merge pull request #518 from deejaybeam/dev
fix: Nspanel stays on loading
2023-03-23 21:55:25 +01:00
deejaybeam
cf430fc1a8 fix: Nspanel stays on loading 2023-03-23 21:54:39 +01:00
Chris
7f6c9c696b Merge pull request #516 from deejaybeam/dev
upd: use rgb color-picker
2023-03-23 14:48:29 +01:00
deejaybeam
7580a38b4f upd: use rgb color-picker 2023-03-23 14:47:31 +01:00
Edward Firmo
14532444bc Fix for "Error rendering data template"
This fix the following error which happens when an entity with a non-numeric value ('unknown', 'unavailable', some text, etc.) is sent to the device:

```
Error: Error rendering data template: ValueError: Template error: round got invalid input 'Geen' when rendering template '{{ states(repeat.item.entity) |round(1) }}{{ state_attr(repeat.item.entity, "unit_of_measurement") }}' but no default was specified
```
This may also implement the feature requested in #490
2023-03-23 12:50:49 +01:00
Edward Firmo
f2a424027d Fix error related to dict not containing on/off
Replace dict key names where reserved names (on/off) have been used.
2023-03-23 12:17:22 +01:00
Edward Firmo
f038eaed87 Support to date & time formats
This add the support to user selected date and time formats.
The following formats are supported now:
- Date formats:
  - EU: 22.03
  - UK: 22/03
  - US: 3/22
- Time formats:
  - EU/UK: 13:30
  - US: 1:30 AM/PM (the AM7PM info will be depending on updates on TFT file)
2023-03-23 07:01:31 +01:00
Chris
3f00773927 Merge pull request #509 from edwardtfn/patch-12
Fix for slow response with "Loading..."
2023-03-22 21:44:38 +01:00
Chris
7e63a4cb18 Merge pull request #508 from edwardtfn/patch-11
Removed incorrect instance of `- choice`
2023-03-22 21:44:21 +01:00
Chris
e6fd475947 Merge pull request #498 from edwardtfn/patch-9
Optimizing Multilingual User Interface
2023-03-22 21:44:00 +01:00
Chris
1869f8023d Merge pull request #482 from edwardtfn/patch-8
Simplifying code - Input area
2023-03-22 21:43:25 +01:00
Edward Firmo
860f5ddbba Fix for slow response with "Loading..."
- Fix the error where a missing/invalid entity causes the panel to slow down when opening a new page or keeps with "Loading..." on the screen until it timeouts.

This will probably fix #493
2023-03-22 20:28:01 +01:00
Edward Firmo
218ef94c9c Removed incorrect entry of - choice
This was probably a copy/paste mistake. ;)
2023-03-22 19:39:49 +01:00
Edward Firmo
730e0acd99 Removed multiple instances of list of days 2023-03-22 16:37:16 +01:00
Marc Brugger
c8afa129b5 remove .idea 2023-03-22 11:06:11 +01:00
Blackymas
ee0c21128d Merge pull request #502 from Blackymas/beta
Fix Notifications
2023-03-21 20:29:06 +01:00
Edward Firmo
1aed46b71f Optimizing Multilingual User Interface
- Optimizing MUI (Multilingual User Interface) code in order to make easier add new languages and to read the code. It will probably consume a bit less resources by reducing the number of `if..elif...` and by removing a bunch of `string.replace`.

- Language selection list sorted alphabetically in order to make easier to find
2023-03-21 17:52:02 +01:00
Blackymas
4e38a928fc Merge pull request #488 from Blackymas/dev
Fix Notification
2023-03-20 20:46:33 +01:00
Blackymas
d58ba87dbb Fix Notification 2023-03-20 20:45:31 +01:00
Edward Firmo
640e245cf8 Simplifying code - Input area
Used YAML alias to simplify the code in the `input:` area. This will make easier to maintain as it creates single points of changes, promoting consistence.
2023-03-20 15:23:59 +01:00
Marc Brugger
f056dace88 Add Home Assistant Icon Page and link to color converter to blueprint 2023-03-19 19:16:11 +01:00
8 changed files with 1506 additions and 3237 deletions

3
.gitignore vendored
View File

@@ -1,3 +1,6 @@
# Ignore Mac DS_Store files
.DS_Store
**/.DS_Store
# Ignore IntelliJ IDEA project directory
.idea

File diff suppressed because it is too large Load Diff

View File

@@ -7,7 +7,7 @@
##### ADVANCED CONFIGURATION - activate only when you know what you do ##############################
# substitutions:
# substitutions:
# ## usage of secrets-file ## -> comment in ###### Change ME ######
# device_name: "nspanel-name" # Wird im Blueprint benötigt!
# wifi_ssid: !secret nspanel_wifi_ssid # add in your esphome secrets file.
@@ -36,7 +36,7 @@ wifi:
ssid: ${wifi_ssid}
password: ${wifi_password}
power_save_mode: none
##### advanced config - uncomment to use static IP-Config #####
##### advanced config - uncomment to use static IP-Config #####
# manual_ip:
# static_ip: ${ip}
# gateway: ${gw}
@@ -49,15 +49,19 @@ wifi:
password: ${wifi_password}
##### Functionality for the Nextion display #####
external_components:
- source: github://pr#2956
components: [nextion]
refresh: 1h
# external_components:
# - source: github://pr#2956
# components: [nextion]
# refresh: 1h
##### ESPHOME CONFIGURATION #####
esphome:
name: ${device_name}
min_version: 2022.10.2
on_boot:
priority: 601
then:
- lambda: id(disp1).send_command_printf("DRAKJHSUYDGBNCJHGJKSHBDN");
##### TYPE OF ESP BOARD #####
esp32:
@@ -70,13 +74,13 @@ web_server:
auth:
username: admin
password: ${wifi_password}
##### advanced config - change to use web_password #####
##### advanced config - change to use web_password #####
# password: ${web_password}
##### OTA PASSWORD #####
ota:
password: ${wifi_password}
##### advanced config - change to use ota_password #####
##### advanced config - change to use ota_password #####
# password: ${ota_password}
safe_mode: true
reboot_timeout: 3min
@@ -126,7 +130,7 @@ button:
##### START - API CONFIGURATION #####
api:
##### advanced config - activate to use api_password #####
##### advanced config - activate to use api_password #####
# password: ${api_password}
services:
@@ -142,7 +146,7 @@ api:
then:
- lambda: 'id(disp1)->set_tft_url(url.c_str());'
- lambda: 'id(disp1)->upload_tft();'
##### Service to send a command "printf" directly to the display #####
- service: send_command_printf
variables:
@@ -204,7 +208,7 @@ api:
- wait_until:
switch.is_on: nextion_init
- lambda: 'id(disp1).set_component_font_color(component.c_str(), message);'
##### Service to send a command "background color" directly to the display #####
- service: send_command_background_color
variables:
@@ -263,7 +267,7 @@ api:
song_str: string
then:
- rtttl.play:
rtttl: !lambda 'return song_str;'
rtttl: !lambda 'return song_str;'
# Service to show a QR code on the display (ex. for WiFi password)
- service: qr_code
@@ -302,6 +306,41 @@ api:
id(disp1).set_component_text_printf("target_temp", "%.1f°", value);
id(display_target_temp).publish_state(value);
#### Service to set the buttons ####
- service: set_button
variables:
btn_id: string
btn_pic: int
btn_bg: int
btn_icon_font: int
btn_txt_font: int
btn_bri_font: int
btn_icon: string
btn_label: string
btn_bri_txt: string
then:
- wait_until:
switch.is_on: nextion_init
- lambda: |-
// ESP_LOGD("nextion", "set button %s", btn_id.c_str());
std::string btnicon = btn_id.c_str() + std::string("icon");
std::string btntext = btn_id.c_str() + std::string("text");
std::string btnbri = btn_id.c_str() + std::string("bri");
id(disp1).send_command_printf("%spic.pic=%i", btn_id.c_str(), btn_pic);
id(disp1).set_component_background_color(btnicon.c_str(), btn_bg);
id(disp1).set_component_background_color(btntext.c_str(), btn_bg);
id(disp1).set_component_background_color(btnbri.c_str(), btn_bg);
id(disp1).set_component_font_color(btnicon.c_str(), btn_icon_font);
id(disp1).set_component_font_color(btntext.c_str(), btn_txt_font);
id(disp1).set_component_font_color(btnbri.c_str(), btn_bri_font);
id(disp1).set_component_text_printf(btnicon.c_str(), "%s", btn_icon.c_str());
id(disp1).set_component_text_printf(btntext.c_str(), "%s", btn_label.c_str());
// id(disp1).set_component_text_printf(btnbri.c_str(), "%s", btn_bri_txt.c_str());
if (strcmp(btn_bri_txt.c_str(), "0") != 0) {
id(disp1).set_component_text_printf(btnbri.c_str(), "%s", btn_bri_txt.c_str());
} else {
id(disp1).set_component_text_printf(btnbri.c_str(), " ");
}
##### START - GLOBALS CONFIGURATION #####
globals:
@@ -380,13 +419,15 @@ binary_sensor:
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");
- lambda: id(disp1).send_command_printf("home.left_bt_pic.pic=78");
- lambda: id(disp1).send_command_printf("home.icon_top_01","\U0000E3A5");
else:
- lambda: id(disp1).send_command_printf("home.left_bt_pic.pic=77");
- lambda: id(disp1).send_command_printf("home.icon_top_01","\U0000FFFF");
##### RIGHT BUTTON BELOW DISPLAY TO TOGGLE RELAY #####
@@ -406,19 +447,21 @@ binary_sensor:
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");
- lambda: id(disp1).send_command_printf("home.right_bt_pic.pic=78");
- lambda: id(disp1).send_command_printf("home.icon_top_02","\U0000E3A8");
else:
- lambda: id(disp1).send_command_printf("home.right_bt_pic.pic=77");
- lambda: id(disp1).send_command_printf("home.icon_top_02","\U0000FFFF");
##### JUMP PAGE TO SETTING PAGE #####
- platform: nextion
name: $device_name setting page
page_id: 0
component_id: 53
component_id: 52
internal: true
on_multi_click:
- timing:
@@ -430,7 +473,7 @@ binary_sensor:
- platform: nextion
name: ${device_name} Restart
page_id: 7
component_id: 15
component_id: 13
internal: true
on_click:
- button.press: restart_nspanel
@@ -439,7 +482,7 @@ binary_sensor:
- platform: nextion
name: ${device_name} Restart
page_id: 8
component_id: 5
component_id: 4
internal: true
on_click:
- button.press: restart_nspanel
@@ -448,7 +491,7 @@ binary_sensor:
- platform: nextion
name: ${device_name} Sleep Modus
page_id: 7
component_id: 16
component_id: 14
internal: true
on_click:
- switch.toggle: sleep_modus
@@ -538,7 +581,7 @@ sensor:
- number.set:
id: display_brightness
value: !lambda 'return int(x);'
# send text field percentage of current_lightslider_val
# send text field percentage of current_lightslider_val
- lambda: id(disp1).set_component_text_printf("settings.a03", "%i", id(display_brightness_global));
###### Display DIM Brightness GET VALUE FROM NSPanel SLIDER #####
@@ -554,7 +597,7 @@ sensor:
- number.set:
id: display_dim_brightness
value: !lambda 'return int(x);'
# send text field percentage of current_lightslider_val
# send text field percentage of current_lightslider_val
- lambda: id(disp1).set_component_text_printf("settings.a04", "%i", id(display_dim_brightness_global));
###### Send current page to HA
@@ -623,7 +666,7 @@ text_sensor:
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
nextion_id: disp1
@@ -741,7 +784,7 @@ text_sensor:
id(page_timer)->execute(int(id(page_timeout).state));
##### START - SWITCH CONFIGURATION #####
##### START - SWITCH CONFIGURATION #####
switch:
# ##### Restart switch ######
@@ -798,7 +841,7 @@ switch:
id: relay_2
pin:
number: 19
##### DISPLAY ALWAYS ON #####
- platform: gpio
name: ${device_name} Screen Power
@@ -832,7 +875,7 @@ switch:
value: '1'
- lambda: id(disp1).set_component_value("settings.a02",1);
##### Relay Local control Fallback #####
##### Relay Local control Fallback #####
- platform: template
name: ${device_name} Relay 1 Local Fallback
id: relay1_fallback
@@ -925,7 +968,7 @@ display:
on_setup:
then:
- lambda: id(disp1).send_command_printf("page 8");
- lambda: id(disp1).set_component_text_printf("boot.esph_version", "%s", "3.2"); ### esphome-version ###
- lambda: id(disp1).set_component_text_printf("boot.esph_version", "%s", "3.2.2"); ### esphome-version ###
- wait_until:
api.connected
- lambda: id(disp1).set_component_text_printf("boot.ip_addr", "%s", id(ip_address).state.c_str());

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.