From 019a882fe97f6c52ad5b8b5ecb0b5a020a74c10d Mon Sep 17 00:00:00 2001 From: Edward Firmo <94725493+edwardtfn@users.noreply.github.com> Date: Mon, 4 Dec 2023 16:05:26 +0100 Subject: [PATCH] Bump version to 4.1.4 --- ReleaseNotes.md | 10 ++++-- nspanel_blueprint.yaml | 34 ++++++++++++------- nspanel_esphome_addon_climate_base.yaml | 12 ++++--- nspanel_esphome_addon_climate_cool.yaml | 12 ++++--- nspanel_esphome_addon_climate_heat.yaml | 12 ++++--- nspanel_esphome_addon_upload_tft.yaml | 2 ++ nspanel_esphome_advanced.yaml | 2 +- nspanel_esphome_core.yaml | 42 +++++++++++++----------- nspanel_eu.HMI | Bin 14899044 -> 14899044 bytes nspanel_eu.tft | Bin 7247932 -> 7247932 bytes nspanel_eu_code/boot.txt | 2 +- nspanel_us.HMI | Bin 14731244 -> 14731244 bytes nspanel_us.tft | Bin 7255544 -> 7255544 bytes nspanel_us_code/boot.txt | 2 +- nspanel_us_land.HMI | Bin 14515341 -> 14515341 bytes nspanel_us_land.tft | Bin 7247932 -> 7247932 bytes nspanel_us_land_code/boot.txt | 2 +- 17 files changed, 83 insertions(+), 49 deletions(-) diff --git a/ReleaseNotes.md b/ReleaseNotes.md index cee6dc8..c95cf38 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -19,9 +19,9 @@ So at this release we concentrated on cleaning up de code everywhere and shave s Since in this update lots of input to the blueprint changed, we highly recommend you review your settings and make sure all fields have the correct selection. We did our best to support your legacy settings and avoid breaking your system, but please double check your settings if you see something not working as expected. ### Files that need to be reloaded: -1. nspanel_eu.tft, nspanel_us.tft or nspanel_us_land.tft - v4.1.2 -2. nspanel_esphome.yaml - v4.1.2 -3. nspanel_blueprint.yaml - v4.1.2 +1. nspanel_eu.tft, nspanel_us.tft or nspanel_us_land.tft - v4.1.4 +2. nspanel_esphome.yaml - v4.1.4 +3. nspanel_blueprint.yaml - v4.1.4 #### @@ -103,6 +103,10 @@ packages: - Upload TFT remove dependency to from ESPHome Nextion component - Fix light icon color on buttons - Fix climate page not updating properly +- 4.1.4 patch: + - Supports new `weather.get_forecasts` introduced by Home Assistant 2023.12.0 + - Manual line break on multiline text with `\r` +   ## Details of noteworthy changes diff --git a/nspanel_blueprint.yaml b/nspanel_blueprint.yaml index 310252d..a220416 100644 --- a/nspanel_blueprint.yaml +++ b/nspanel_blueprint.yaml @@ -1,6 +1,9 @@ -############################################################# -##### START - INPUT ##### -############################################################# +####################################################################################################### +##### NSPANEL Blueprint created by Blackymas - https://github.com/Blackymas/NSPanel_HA_Blueprint ##### +##### Blueprint ##### +##### PLEASE only make changes if it is necessary and also the required knowledge is available. ##### +##### For normal use with the Blueprint, no changes are necessary. ##### +####################################################################################################### blueprint: name: NSPanel Configuration @@ -33,7 +36,7 @@ blueprint: 🎉 Roadmap can be found here: [Roadmap](https://github.com/Blackymas/NSPanel_HA_Blueprint/labels/roadmap) - ℹ️ Version: v4.1.3 + ℹ️ Version: v4.1.4 source_url: https://github.com/Blackymas/NSPanel_HA_Blueprint/blob/main/nspanel_blueprint.yaml domain: automation @@ -3599,7 +3602,7 @@ trigger_variables: variables: ##### GENERAL ##### - blueprint_version: '4.1.3' + blueprint_version: '4.1.4' date_format_temp: !input 'date_format' #Avoid breaking change for existing users with legacy type format date_format: > @@ -8581,7 +8584,14 @@ action: - *delay-default ##### Display weather data only when available ##### - - service: weather.get_forecast + - variables: + ha_core_update_entity: > + {% for u in integration_entities("hassio") | select("search", "^update[.]") if (device_attr(u, "identifiers") | first)[1] == "core" %} + {{ u }} + {% endfor %} + ha_core_current_version: '{{ state_attr(ha_core_update_entity, "installed_version") }}' + use_new_forecasts: '{{ ha_core_current_version | version >= "2023.12.0b1" if ha_core_current_version else false }}' + - service: '{{ "weather.get_forecasts" if use_new_forecasts else "weather.get_forecast" }}' target: entity_id: '{{ weather_entity }}' data: @@ -8590,11 +8600,13 @@ action: continue_on_error: true - variables: forecast: > - {{ - service_response_var.forecast - if service_response_var is defined and service_response_var.forecast is defined - else state_attr(weather_entity, "forecast") | default(false) - }} + {% if use_new_forecasts and service_response_var is defined and service_response_var[weather_entity] is defined and service_response_var[weather_entity].forecast is defined %} + {{ service_response_var[weather_entity].forecast }} + {% elif service_response_var is defined and service_response_var.forecast is defined %} + {{ service_response_var.forecast }} + {% else %} + {{ state_attr(weather_entity, "forecast") | default(false) }} + {% endif %} - condition: '{{ forecast != false }}' - variables: datetime_is_string: '{{ forecast[0] is defined and forecast[0]["datetime"] is string }}' diff --git a/nspanel_esphome_addon_climate_base.yaml b/nspanel_esphome_addon_climate_base.yaml index 2bf121d..7c6e514 100644 --- a/nspanel_esphome_addon_climate_base.yaml +++ b/nspanel_esphome_addon_climate_base.yaml @@ -1,7 +1,11 @@ -#################################################################################################### -##### NSPanel ESPHome Add-on for Climate control - Shared - This will be called by heat/cool ##### -##### Add-on for https://github.com/Blackymas/NSPanel_HA_Blueprint ##### -#################################################################################################### +##################################################################################################### +##### NSPANEL ESPHOME created by Blackymas - https://github.com/Blackymas/NSPanel_HA_Blueprint ##### +##### ESPHome Add-on for Climate control - Shared - This will be called by heat/cool ##### +##### PLEASE only make changes if it is necessary and also the required knowledge is available. ##### +##### For normal use with the Blueprint, no changes are necessary. ##### +##################################################################################################### +##### ATTENTION: This will add climate elements to the core system and requires the core part. ##### +##################################################################################################### substitutions: ### Local thermostat defaults ### diff --git a/nspanel_esphome_addon_climate_cool.yaml b/nspanel_esphome_addon_climate_cool.yaml index a61fbbc..f887e45 100644 --- a/nspanel_esphome_addon_climate_cool.yaml +++ b/nspanel_esphome_addon_climate_cool.yaml @@ -1,7 +1,11 @@ -#################################################################################################### -##### NSPanel ESPHome Add-on for Climate control - Cool ##### -##### Add-on for https://github.com/Blackymas/NSPanel_HA_Blueprint ##### -#################################################################################################### +##################################################################################################### +##### NSPANEL ESPHOME created by Blackymas - https://github.com/Blackymas/NSPanel_HA_Blueprint ##### +##### ESPHome Add-on for Climate control - Cool ##### +##### PLEASE only make changes if it is necessary and also the required knowledge is available. ##### +##### For normal use with the Blueprint, no changes are necessary. ##### +##################################################################################################### +##### ATTENTION: This will add climate elements to the core system and requires the core part. ##### +##################################################################################################### substitutions: ### Local thermostat defaults ### diff --git a/nspanel_esphome_addon_climate_heat.yaml b/nspanel_esphome_addon_climate_heat.yaml index 4c7ddc3..eab575d 100644 --- a/nspanel_esphome_addon_climate_heat.yaml +++ b/nspanel_esphome_addon_climate_heat.yaml @@ -1,7 +1,11 @@ -#################################################################################################### -##### NSPanel ESPHome Add-on for Climate control - Heat ##### -##### Add-on for https://github.com/Blackymas/NSPanel_HA_Blueprint ##### -#################################################################################################### +##################################################################################################### +##### NSPANEL ESPHOME created by Blackymas - https://github.com/Blackymas/NSPanel_HA_Blueprint ##### +##### ESPHome Add-on for Climate control - Heat ##### +##### PLEASE only make changes if it is necessary and also the required knowledge is available. ##### +##### For normal use with the Blueprint, no changes are necessary. ##### +##################################################################################################### +##### ATTENTION: This will add climate elements to the core system and requires the core part. ##### +##################################################################################################### substitutions: ### Local thermostat defaults ### diff --git a/nspanel_esphome_addon_upload_tft.yaml b/nspanel_esphome_addon_upload_tft.yaml index 5158756..2f149ae 100644 --- a/nspanel_esphome_addon_upload_tft.yaml +++ b/nspanel_esphome_addon_upload_tft.yaml @@ -4,6 +4,8 @@ ##### PLEASE only make changes if it is necessary and also the required knowledge is available. ##### ##### For normal use with the Blueprint, no changes are necessary. ##### ##################################################################################################### +##### ATTENTION: This will add advanced elements to the core system and requires the core part. ##### +##################################################################################################### substitutions: diff --git a/nspanel_esphome_advanced.yaml b/nspanel_esphome_advanced.yaml index dfb2e06..d0b0ab1 100644 --- a/nspanel_esphome_advanced.yaml +++ b/nspanel_esphome_advanced.yaml @@ -1,6 +1,6 @@ ##################################################################################################### ##### NSPANEL ESPHOME created by Blackymas - https://github.com/Blackymas/NSPanel_HA_Blueprint ##### -##### ADVANCED CONFIG + FULL ESPHOME CODE! ##### +##### ESPHOME ADVANCED ##### ##### PLEASE only make changes if it is necessary and also the required knowledge is available. ##### ##### For normal use with the Blueprint, no changes are necessary. ##### ##################################################################################################### diff --git a/nspanel_esphome_core.yaml b/nspanel_esphome_core.yaml index 9959780..a1d4bc2 100644 --- a/nspanel_esphome_core.yaml +++ b/nspanel_esphome_core.yaml @@ -1,13 +1,13 @@ ##################################################################################################### ##### NSPANEL ESPHOME created by Blackymas - https://github.com/Blackymas/NSPanel_HA_Blueprint ##### -##### ADVANCED CONFIG + FULL ESPHOME CODE! ##### +##### ESPHOME CORE ##### ##### PLEASE only make changes if it is necessary and also the required knowledge is available. ##### ##### For normal use with the Blueprint, no changes are necessary. ##### ##################################################################################################### substitutions: ##### DON'T CHANGE THIS ##### - version: "4.1.3" + version: "4.1.4" ############################# #external_components: @@ -2094,23 +2094,27 @@ script: int startPos = 0; int endPos = 0; std::string wrappedText = ""; - while (startPos < text_to_display.length()) { - while (text_to_display[startPos] == ' ' and startPos < text_to_display.length()) { startPos++; } - int endPos = startPos + line_length_limit; - if (endPos >= text_to_display.length()) endPos = text_to_display.length(); - else - { - while (endPos > startPos && text_to_display[endPos] != ' ') { endPos--; } - if (endPos == startPos) endPos = startPos + line_length_limit; // Handle case of long word - } - wrappedText += text_to_display.substr(startPos, endPos-startPos); - if (endPos < text_to_display.length()) - { - while (text_to_display[endPos] == ' ') { endPos--; } - if (endPos >= startPos) wrappedText += "\\r"; - } - startPos = endPos + 1; // Skip the space - while (text_to_display[startPos] == ' ' and startPos < text_to_display.length()) { startPos++; } + if (text_to_display.find("\\r") != std::string::npos) { + wrappedText = text_to_display; + } else { + while (startPos < text_to_display.length()) { + while (text_to_display[startPos] == ' ' and startPos < text_to_display.length()) { startPos++; } + int endPos = startPos + line_length_limit; + if (endPos >= text_to_display.length()) endPos = text_to_display.length(); + else + { + while (endPos > startPos && text_to_display[endPos] != ' ') { endPos--; } + if (endPos == startPos) endPos = startPos + line_length_limit; // Handle case of long word + } + wrappedText += text_to_display.substr(startPos, endPos-startPos); + if (endPos < text_to_display.length()) + { + while (text_to_display[endPos] == ' ') { endPos--; } + if (endPos >= startPos) wrappedText += "\\r"; + } + startPos = endPos + 1; // Skip the space + while (text_to_display[startPos] == ' ' and startPos < text_to_display.length()) { startPos++; } + } } disp1->set_component_text_printf(component.c_str(), "%s", wrappedText.c_str()); diff --git a/nspanel_eu.HMI b/nspanel_eu.HMI index e495a49fc40de7622b939f9456f70f66dfc2282c..10243e1e2c54ea041696cbf01c96360bfdad94ff 100644 GIT binary patch delta 989 zcmd7NS#OMS6vy%B(HUJ5cTdtQ7kVuciKNs{(V`g2*!_#5XtkCO9ZTttQPk4G*tNB9 zZJ9F0-px`wwN`EEmBveu_)5G6agxv7NzV6lRF}nepf=O)Ze``<^-9Y~xBgDFXTDY8 zwk#XD!2&zcw!)=$a-7{eSRbDlV>Q(T+v1yTD_EJ3XxrgvLLlDN@GGUf#Nz}!j*Tve zfeUVQjd+~cn$Dncy4A(~%Znw(2^f+LNrogtk|D{EWSrQF&i`Q{Y@DCj>Z^WAQGX54 zKn>Dh4be~y({QC~ghpzV(v+^z8l$nw&^V3P1bH-3la#5+nj){JYMQ2NhGuG(W^0a& zvNTuoG+)_TpoLnb94*!oEmf}av`qOb&~mNNO0801oiEkvZfs3z@P}Ib{^Urp*O#1R z_X+j*QFu0BihNj&H7J4~Yq1XNu>r-{h)pPguo+trz*dxE8@6Ky%CHl=up4_&jv)48 zANC`J12~97IE*7WieosA3RI#BCvXy{a2jXu=Z|wZj|;enOQ=Q-YH=A?5JnxY;u<2j zjwo*6CT`(2?%*!&p&kurL=&2E9}n;lkI;h0c!H;RhUa*Jmw1KOXvG`6#XG#m2Yf^u TKA|0-@daP;Enc z!*T3ImMqz~WSg!uZu|w_&G;LP@67AsnR#ZO_qVO4+}(z{bgNr#R!&~8lvJg`k|dMsBcnix!ob!rN`27GqVXItom z7{nqDog+TmUEA&$yGuC!UtSCtJ7`EUBpH$nNrogtlCj;D?f=6<$k@NK)mQ!0UjsBy zgEUw}G*rVhTqBgMks77ZN|9G%G*;u3s_~kjiSlWZ(v+^r%21}JXsV`Zx@KsmW@)yJ zvNT6?HBZ@^uLWAD94*pfEm5xWv{d;j&@vTjxmKtsT%4R4m-gG6;jd`&`;#K2nZ-#x ztUeXpe-@nynv!Cy#441)kJVU%wOEHztj7ifAZ)}Y1hE-q*n+LthH`Aj4(!A(?1qCq z*o%FrzLnW$EjpI0hlQ@Ob==jH3oWprsz(v%c7InCU%LpNiE4YdX zt|5x+xPhCvh1X&wYB%AwKqkLy0zy!_;C`C;3*^|5(!@A{_rNglbqN4 z=j7M$T9OZvMWjfTCS8V1A7#mwBiAQ+@)amlWPw6=-S+ delta 273 zcmWN=S56dA006*H7U@!DSrC`rrArZz-g_?!ORwI6k4ZQJ*YLx{M7RT7VDG}4WM2OK zPkRX;q)3$}T||ZtGG)n@BUhe$9~CH6q*#ekpOlFz7gM3qXH~w4t5%~{oq7!#HEGtO zRhxESb?DTkTaR9SzUen$(2(zjjTrUAm~j&(O_?@h)|`0@7A;w}V%3^;8#Zm(wqw_x zeFqNx^vjXszllgPrROP@OvE1J$wYV(o`z@Pd3X_ChF9TrcoW`+cj5iNc=C7jIsL7? G==B{FU1@ay diff --git a/nspanel_eu_code/boot.txt b/nspanel_eu_code/boot.txt index dab95f5..9f168f3 100644 --- a/nspanel_eu_code/boot.txt +++ b/nspanel_eu_code/boot.txt @@ -142,7 +142,7 @@ Text tft_version Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : 4.1.3 + Text : 4.1.4 Max. Text Size : 9 Text esph_version diff --git a/nspanel_us.HMI b/nspanel_us.HMI index 511511b4b93c232d97cce493f89179aec790867b..3f2975fc8d0d77bf843dd9c64d176f8af23d43ed 100644 GIT binary patch delta 1022 zcmd7M=~K*c0LStDsZ|f+iQh08k382*GiGw+zKX&+a`Rgxp=@&QT4XRg6lt1L3Q8AiC&h#AQR z&iulZjOg`YT-nG*E*ySVJ^a!!%qYG*Y9Kp-hd|7-cD2V>M3W<^OdUw%F{ySYmpXfi3(JxrE;lA%T%o8TA`I%rPW#^ zw>(-K@#fUnyH>Pz@dQIn{pfz zIEhm@jWallb2yJ$)ZqdyB8&(w;WDDQf~&ZO>!`;K+{7*1#vR16wG~gi~;W3`z nDW2guUZ4>#@d{07#%sL6TfD=2wBQ3i;uAjOOSHKqmi+w>xi#kG delta 1022 zcmd7M=~K)B9LMqBPpx_okA5?z88c=)G^3e33FW?u!a8#ETMD6Ua+am+$F5w(mK9>% zw_;-*xv!j2u3Y=jgThlYo_L$#f9N~&n(vd(gLg-TH?9NqZqv*U6q-FuBV2Aq%|yeM zSCEvRm0|q5zTezN$YB^}xGd&(yqO&EB>df0Cq&JjMskwd^?%6EuJsrtX>6N%8R5$A z^^Vxonw&mfr{#BACb}R7v2dVk#A(IVwFhjgTSI&&2=UsM-=@^2)TY#?)TY#?)VAV6 z?VVu|wyp2E>aPJBs8pqCkOpgrhH99GYlKE>ltyce(v_jH8mCNUX}l(AqMVwf$(o|6 z%GNYZ*9^_nEX~#&&DA{Fa%sL6C`Y+ks6|?=JT1{uEmOVKrIg95JEVNBRGmTh(~ygCOpAY oJi~Lmz)Lja6<(tSt$2gCc!&4+fHr)@Cw#^ie2uiWMH7Gg0e5rdmjD0& diff --git a/nspanel_us.tft b/nspanel_us.tft index 63e7e5e6132f681d8c8246104c7fbf5dfc10a66b..069d2b74be3c35231266b70fb864fcb01696689b 100644 GIT binary patch delta 273 zcmWN=$4(Pq007{W7KAb^vWp@J%HCzVL1nlY3Y1y)eg_U;;v@JXBqSbq37&w4gNbL7 z9{s=M%l-Qk&4m{t@6OF5PeFw)pp+rQMvNLW?xj~=d*iKl-kUJ#gO5I$GHu4J&%XHToA2h# zTd?SdpO!3Jk+y2hx(%DQE;IMHk<{;aHk167$Y#Rra3|ai_rm?~AUq6@!sGBHJPpsT O64~>+o7mrU?)pDN^lZcc delta 273 zcmWN=M@|$_007X?o50X<6h!GA96+j4EcD*%P*mz2SiHm|xZxNiCftFr-~>$A;nswu z|0VDF=_chlyp$waid1RRWyq8zTaFiU<;fROpiq%wB}$bk_fpg=uT`k@MwPeTsaB&_ zoq7!#HEGtORhxDlI=vUurCW~=diCiyV9=0{J{dM*)R@n{`0AT+6DCcWHe=SDc?%XT zS+-);nspmCZP~VC*WPvf-$PRDcXlEk{S`^X!~O6eJPeP*@8OT|XLuZ*gs0(Ic>X7n NxOluzz5RQ4^&dotZ14a8 diff --git a/nspanel_us_code/boot.txt b/nspanel_us_code/boot.txt index dab95f5..9f168f3 100644 --- a/nspanel_us_code/boot.txt +++ b/nspanel_us_code/boot.txt @@ -142,7 +142,7 @@ Text tft_version Dragging : 0 Send Component ID : disabled Associated Keyboard: none - Text : 4.1.3 + Text : 4.1.4 Max. Text Size : 9 Text esph_version diff --git a/nspanel_us_land.HMI b/nspanel_us_land.HMI index 21fbc4021e57c9ef9cd8bb8fa46ae8b7123a78a2..ceccc36d17bb4db591be42b966281eef97a09ae2 100644 GIT binary patch delta 1046 zcmdVY*;CD79LMqBFQ;WRW6qs1lbim4W}2a~gcG3q?LQR~u|T-@1bhI;qt8RqJq@vXWf#_f-Bn-V77#3kVp;l#KjKezwiuP?FO zeoOHz#j_O8QanrXEXA|jk#+6=!iA9KE=#8${TaYO5*fr`hTtKIp$sFL;f!D;DWo!r z(TpLDv5dnao$*W{gNaNclgUhBD$|(G3}!Nm*?5`5T;?&K1uSF{SuAD=OUWjOT=H1P za`IV00W0ybiq)*4khK(1%sSSyfsK>^o7jw>EtImAZEPpN4t7$;F3PE3H+$GiB~|QW zKLMD_PD_%V8*BEd4A$BOj$P&}@8x{0@p+>C`i^o~j>u6tCdcK3 z)XGUYC8y<#oRxEOUM@(T1f^a=(jXV*k~nf%uE~2#Tkc4sG|64LC->!n qJd|d6B#-5Zw8&F=CeP)Cyp&dHlUMRu-pE^dC-3EhlU)2U_2(~<=W$p7 delta 1064 zcmdtgS#OMC7{>8;s>>u2nZ$wg)R~hemC;xREky_At`dN^qaFiF*Uw5m|=Cc*0nl&X7%xOy}lPE8|i7~#eXO0 zj%8U!l}AHjjYfK0ExWq2W<(u5dL`7jT>-btAqmn=5+zBJZMQ3>t>Zt5QDeFSrgECf zX)33woThS`%4xb%nmhi54^h(<&Z9pA7|0+z3}y&J$s~(m3@4irjARr!cp1$Y#*)i8 z#$%Gl1oD~4Bnl{GGDS>bD$|(G3}!NmVrDakxy)le3s^`Ai&)GOe3Vi~IZIha1q z1%6htiq%xHhP70)j`eI{BQ?M#HWOeALAJ7u?S$CDPQvV>mOAR$%^n)q%RcsVfP);O zk;5%kFvHf?XLe7_|KTmLLm5_CZ%5yTNRw4*TVa1~YCtO~N93p+ljCwiPD+!UlGAcV z&dNDCFBjyZG)qJ-NmN?ovRn~cuF5sJE;r<++>+aJNA60i+>`tAKpx5?c`Q#PCQs#= kw8?XMAur{Xyp}i8E^pFY0_ngh{}{D+Xp#veU#^ud<6;>`K(xpFG`gu7gM29m1;HOYSpRNpiz@%En2l{ z*P+u_UAleKqgS7P0|pHlHe%G6aT6v@nKonAoOuftEm^i=)tYr1Hf`CKuw&PreFwh# z;n0zve);XsQ!<)L>wAc$lCk@EDj6P!C*f)MH#`f^!;A1=co|-W*Wt}`Jat?48kzWC GnRo{iooQ77 delta 273 zcmWN=XEGdM007WYR+Ny{*D6^pg4Lq86ukw}yVWAv9sGDRj^G-8m@$K^>|OG`nfLzm zn)M#u%aAEcwul@b