Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Request... increase icon size on buttons. #960

Closed
Doughboy68 opened this issue Aug 2, 2023 · 32 comments
Closed

New Request... increase icon size on buttons. #960

Doughboy68 opened this issue Aug 2, 2023 · 32 comments
Labels
Enhancement For suggestions that add new features or improve existing functionalities. Page: buttons Concerns specific to the page's interface or functionality.

Comments

@Doughboy68
Copy link

I was playing around with Nextion and I found a larger font that works. Instead of using NotoSans-Regular(h:32..., I found one with h:48.
Here are some screenshots what I did to compare... I had to move both the button over to the left a few pixels and the brightness over to the right a few so a 3-digit 100% would display properly (otherwise the 1 gets hidden by larger button size for icon).

After editing, can easily change to the regular size font and don't really notice the icon shifted left, but the percent is a bit less whitespace on the right but can also set xcen to Center so smaller values look better.

What do people think of this? Would it look better to have a slightly larger icon in the buttons?
This looks like a time consuming job to go change all, unless there is some trick to do it I don't know about!

Original:
image

My modified version with larger font:
image

Original font with modified spacing:
image

@edwardtfn edwardtfn added the Enhancement For suggestions that add new features or improve existing functionalities. label Aug 3, 2023
@edwardtfn
Copy link
Collaborator

I like that, and I think it should be combined with multi-line support (like in #740).

Don't you want to do the change and create a PR?

@Blackymas, any comments here?

@Doughboy68
Copy link
Author

I am concerned about the fonts increasing tft size. This h48 font add 1.74MB to the TFT file, making current dev version 9.06MB in size. I did make a TFT with additional h80 fonts and was 12.2MB which loaded fine. I think the h80 font is too large for the style of this project anyways but h48 is a nice size. Not sure how bit a TFT can be, but have to keep in mind if adding more in-panel control in future this may eat into available storage.

@edwardtfn
Copy link
Collaborator

We have áreas to save storage. Those components with multiple pages can be replaces by a single page (just have to figure out how to handle the lage Indicator) and remove some pictures.
ESPHome memory is more a concern right now.

@edwardtfn
Copy link
Collaborator

But I've called @Blackymas to the discussion more to hear about the new visual of this, usability, etc. I want to hear more opinions.

@edwardtfn
Copy link
Collaborator

I've cleaned up unused pics and added NotoSans h64, so maybe you wanna play a bit with this again. 😉

@Doughboy68
Copy link
Author

I tired this and noticed you used the bigger font for speed control. The right speed up/down buttons are "invisible" on my us panel but I can still press them since I remember their location and they work. Think is issue with wrong color settings.

@Doughboy68
Copy link
Author

Doughboy68 commented Aug 31, 2023

Oh and buttons on the buttons pages are not updating status in real time when pressing, but show correct state when exiting and going back into screen. Probably related somehow. (EDIT.. nothing seems to update in real-time including hard button status).

And one more thing, the reboot button has not worked for several dev versions now, I have not mentioned it before thinking may just be a side-effect of some changes being worked on and will get fixed eventually.

And the tomorrow weather screen has a glitch around the temp below icon on left, looks like an incorrect background graphic used.

@edwardtfn
Copy link
Collaborator

It's really nice that you have tested and provided feedback about everything. Thanks a lot for that!!

I tired this and noticed you used the bigger font for speed control. The right speed up/down buttons are "invisible" on my us panel but I can still press them since I remember their location and they work. Think is issue with wrong color settings.

Fixed!

Oh and buttons on the buttons pages are not updating status in real time when pressing, but show correct state when exiting and going back into screen. Probably related somehow. (EDIT.. nothing seems to update in real-time including hard button status).

I have to look at that. On my basic test I couldn't see this, but I've made so much changes recently and possibly broke something.
Are you sure you have the latest blueprint version?

And one more thing, the reboot button has not worked for several dev versions now, I have not mentioned it before thinking may just be a side-effect of some changes being worked on and will get fixed eventually.

Which reboot button are you talking about?

  1. The one at boot page?
  2. The one at settings page?
  3. The one at the device page in Home Assistant?

And the tomorrow weather screen has a glitch around the temp below icon on left, looks like an incorrect background graphic used.

Fixed!

@Doughboy68
Copy link
Author

Sorry, it is the reboot button when long pressing the clock/time, so settings page. The curved arrow icon just toggles on/off blue/cyan color but does not reboot. The reboot with HA works.

Ill watch for update in dev and load panel to test.

edwardtfn added a commit that referenced this issue Sep 1, 2023
Solves #960 (comment)

And also remove all the unnecessary `wait_until`
@edwardtfn
Copy link
Collaborator

I've just pushed the latest code to GItHub.

@Doughboy68
Copy link
Author

Loaded new tft and recompiled., Fan fixed, temperature fixed. Still but same issue with icons not updating in real time.
I confirmed I have latest blueprint, downloaded again to make sure and even fully restarted HA.

Also sleep mode doesn't seem to work initiated from panel, but updates on panel when set in HA.
Brightness and Dim also have issues - they update correctly in HA when set on the panel, but not really correctly when done from HA, the brightness changes but the values do not seem to sync with ones in panel.

@edwardtfn
Copy link
Collaborator

Also sleep mode doesn't seem to work initiated from panel, but updates on panel when set in HA.
Brightness and Dim also have issues - they update correctly in HA when set on the panel, but not really correctly when done from HA, the brightness changes but the values do not seem to sync with ones in panel.

Do you see any error message on your ESPHome logs?

@edwardtfn
Copy link
Collaborator

I found the bug with Settings page. Working in a fix.

edwardtfn added a commit that referenced this issue Sep 1, 2023
@edwardtfn
Copy link
Collaborator

Settings page fixed!
You have to update ESPHome only.

@edwardtfn
Copy link
Collaborator

I will look at the live update thing later today.

@Doughboy68
Copy link
Author

Ok that latest updated fixed the reboot and sleep button.

One minor issue is if changing the brightness and dimming with HA sliders, it updates the nspanel display brightness correctly, but the values of sliders and the percentage value do not update in the panel. A reboot of nspanel sets those values to what was last set in HA. Setting the sliders directly in nspanel does update HA correctly so the issue is updating from HA->Nspanel

@edwardtfn
Copy link
Collaborator

One minor issue is if changing the brightness and dimming with HA sliders, it updates the nspanel display brightness correctly, but the values of sliders and the percentage value do not update in the panel. A reboot of nspanel sets those values to what was last set in HA. Setting the sliders directly in nspanel does update HA correctly so the issue is updating from HA->Nspanel

Fixed!

@edwardtfn
Copy link
Collaborator

About the issue with the live update of the screen, I've tested both US and EU models, Home page, Buttons pages, etc. and it is working fine.
Could you please take a look at your logs (both ESPHome and Home Assistant) for some error message?

@Doughboy68
Copy link
Author

About the issue with the live update of the screen, I've tested both US and EU models, Home page, Buttons pages, etc. and it is working fine. Could you please take a look at your logs (both ESPHome and Home Assistant) for some error message?

I do not see any errors. This morning I recompiled my NSPanel used for dev test, re-downloaded blueprint. I deleted the nspanel from home assistant and the automation and created a new device. Still the same issue - nothing updates unless I change screens.
I have four other NSPanels - three on the main version, and one on an older dev version and they all work fine.

@edwardtfn
Copy link
Collaborator

Ok. I will investigate more. Which values specifically are not updating?

By the way, I think I will have to revert back the icons size 64 as all the changes on HMI are making the files big again. :(

@Doughboy68
Copy link
Author

Ok. I will investigate more. Which values specifically are not updating?

By the way, I think I will have to revert back the icons size 64 as all the changes on HMI are making the files big again. :(

Seems like nothing is updating without a forced refresh (eg. selecting another screen then going back)
Main screen: chips for thermostat modes, alarm mode, hard button rectangular on/off indicators at bottom.
Buttons screens: buttons do not update even when pressed on panel.
Thermostat does not update (eg. if change modes from cool to heat does not change icons).
Fan page does not correct to the actual correct speed reported back from fan (eg. when changing from low to medium I think the setting is 66% but then mine changes to 74%, Low set to 33% but changes to 25%). Exiting fan page and going back in shows correct values.
I did not check entities screens, light screens, or alarm screens, will do later when at home.

The problem seems to be system-wide so I bet once found then everything will be fixed.

Do you think it may help if I flashed the blank.tft again and reload with correct one?

@edwardtfn
Copy link
Collaborator

Do you think it may help if I flashed the blank.tft again and reload with correct one?

No. I don't think this is related to the TFT.
I haven't tested all those itens you mentioned, but I've tested values on Home page and also buttons pages and everything looks fine.

When you go to your device page (Settings > Devices and Services > ESPHome), are the sensors "Current page" and "Nextion display" showing correct values?

@edwardtfn
Copy link
Collaborator

I have tried disabling the sensor "Current page" and I got exactly the same behavior you described. Please take a bloke at that one.

@edwardtfn
Copy link
Collaborator

That sensor was disabled by default on ESPHome. I will fix that and push to dev, but now as the sensor was already created in your system you have either to enable it manually or remove/add your panel to Home Assistant again.

@Doughboy68
Copy link
Author

Doughboy68 commented Sep 2, 2023

This one...
image
I will enable and try when home

Update... resolved the issue :)

@Doughboy68
Copy link
Author

Resolved the issue enabling service.

@Doughboy68
Copy link
Author

Settings page fixed! You have to update ESPHome only.

Just downloaded the latest dev today and this seems broken again... cannot restart.

Also all the buttons pages are blank, and adding entities pages does not enable the entities button. Maybe you are making some significant changes and this is a work in progress, will look for updates later.

I updated blueprint and esphome.

@edwardtfn
Copy link
Collaborator

I'm not making any big change and this is not my intention until the next release, but sometimes the small changes have huge consequences. ;)

this seems broken again... cannot restart.

Any message in your logs?
It's starting fine on my panels.

Also all the buttons pages are blank,

Fixed!

and adding entities pages does not enable the entities button

There is an specific toggle on the blueprint settings to enable that icon, regardless if you have entities selected.
Is that enabled?

@Doughboy68
Copy link
Author

Updating fixed the buttons for me. I did not see the new entity toggle so that is working now.

The settings page acts a bit like it did prior to you fixing a few days ago... Reboot doesn't work pressing in nspanel, and sleep toggle pressing in nspanel doesn't update in HA. Sliders for brightness work fine though and update both ways.

@edwardtfn
Copy link
Collaborator

The settings page acts a bit like it did prior to you fixing a few days ago... Reboot doesn't work pressing in nspanel, and sleep toggle pressing in nspanel doesn't update in HA. Sliders for brightness work fine though and update both ways.

Fixed!

edwardtfn added a commit that referenced this issue Sep 8, 2023
* Create ReleaseNotes.md (#879)

* Create ReleaseNotes.md

* sensor display precision

* Filter devices to esp32 only (#881)

* Filter devices to esp32 only

Show only ESP32 devices when selecting the panel

* Filtered device list

* Sensor display precision (#880)

Now the values shown in your panel will follow the [sensor display precision](https://www.home-assistant.io/blog/2023/03/01/release-20233/#sensor-display-precision) provided by Home Assistant.
=> If you have problems with a value exceeding the available space in your panel, please reduce the number of decimals using Home Assistant [sensor display precision](https://www.home-assistant.io/blog/2023/03/01/release-20233/#sensor-display-precision).

* New language selector (#882)

* New language selector

* Update ReleaseNotes.md

* Update ReleaseNotes.md

* Remove `settings_entity` (#887)

* Remove `settings_entity`

- Bump version to 3.5_dev
- Removed references to pictures removed from TFT
- Removed code related to closing settings pages
- Removed trigger `settings_entity`

* Removed `set_settings_entity` service

- Bump version to 3.5_dev
- Removed `set_settings_entity` service - BREAKING CHANGE
- Removed `settings_entity` text-sensor - BREAKING CHANGE
- Added service `open_entity_settings_page` - BREAKING CHANGE

* Removed `settings_entity`

- Bump version to 3.5_dev
- Removed old climate page (climate_backup)
- Removed pics related to old climate page (ids 16-47, 80-83, 95-96 and 125(US only))
- Enforces brightness on any page change (this allows wake-up on settings page with long press on physical buttons) - Pending removing code from Blueprint
- Added `entity` variable on pages `climate`, `lightsettings` and `coversettings`
- Added `entity` info to `nspanelevent` on pages `climate`, `lightsettings` and `coversettings`
- Added `back_page` variable on pages `climate`, `lightsettings` and `coversettings` (default: home)
- Moving to TFT close page logic on pages `climate`, `lightsettings` and `coversettings` - Pending changes on Blueprint and ESPHome
- Standardized name for `page_label` on pages `climate`, `lightsettings` and `coversettings`
- Standardized settings page names: `climate`, `cover` and `light` (Removed `settings` from page name)

* Removed `settings_entity`

* Removed `settings_entity`

* Removed `settings_entity`

* Move `entity` variable to home page (#889)

* Move `entity` variable to home page

This will enable future development of a fallback climate

* Move `entity` variable to home page

* Move `entity` variable to home page

* Move `entity` variable to home page

* Move `entity` variable to home page

* Use `en` as fallback language (#891)

* Use `en` as fallback language

Uses English if a non valid language is selected (like when using legacy language selection).

* Use `en` as fallback language

* Create `nspanel_us_land.tft` (#890)

* Create `nspanel_us_land.tft'

Add `nspanel_us_land.tft' for US panel on landscape mode, fixing the offset on the touch screen when using `nspanel_eu.tft` into a US panel.
Hides the hardware buttons labels, as Nextion cannot support rotated text.

* Created `nspanel_us_land.tft`

* Created `nspanel_us_land.tft`

solves #390
solves #432
solves #299 (comment)

* Created `nspanel_us_land.tft`

* Created `nspanel_us_land.tft`

* Fix "Button confirmation page not working correctly"

Solves #883

* Supports weather forecast with `datetime` not string

This adds support to weather integrations where the `datetime` field under `forecast` attribute is provided as a `datetime` type.
This was seen on Météo-France, while all other weather integrations tested so far used a `text` field for `datetime`.

This solves #893

* Wifi icon to indicate when API offline

This changes the behavior of Wifi icon:

How it was before:
- Wifi icon was visible only when the wifi was connected, nothing was shown when wifi was not connected.

How it is now:
- Wifi icon will have 3 states:
 - Wifi & API connected: Gray wifi icon
 - Wifi disconnected: Red wifi-off icon
 - Wifi connected, but API disconnected (HA is out?): Red api-off icon

* API status indication on the panel

* Limit light & cover to supported settings (#896)

* Limit light to supported settings

When showing light settings, only the supported features will be shown for each light.

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

This partially solves #635

* Limits covers to supported settings

Only show cover settings when `set_position` is supported.

This solves #635

* Limits covers to supported settings

* Update instructions.md

* Add Fan speed settings page (#897)

* Add Fan speed settings page

Add an initial fan speed control page for fans supporting speed control.
Add speed (%) info in the buttons pages.

Solves #404 
Solves #791 
Solves #718 (comment)

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Fix name on confirmation page

Fix the entity name on the confirmation page.

The new order is:
1. Name set on the blueprint settings
2. Entity's `friendly_name` attribute
3. Entity's `name` attribute
4. Entity's `entity_id`

Solves #501

* Select wake-up page (#898)

* Select wake-up page

Users will be able to select the wake-up page on the blueprint inputs.
This selected page will be shown after a boot (after the boot page) and with a touch in the screen when on screen saver page.
After showing this wake-up page, all the previous behavior for closing the page (with a click or after a timeout) will be the same.

Solves #576 
Solves #612 
Solves #801 
Probably improves for #718 (comment)

* Select wake-up page

* Fan update engine

Change the fan update engine to follow the same patter as other settings pages.

* Update ReleaseNotes.md

* Adding vertical bars pics

* Panel offline mode (#900)

* Panel offline mode

Introduces "offline mode" for the panel, which will be used later with a fallback climate.

Pages that are depending on the blueprint (buttons pages, entity pages, settings pages, etc) won't be shown when the API is disconnected.

* Panel offline mode

* Panel offline mode

* Panel offline mode

* Panel offline mode

* "Jump to settings" on tft

Moved "Jump to settings page" routine from ESPHome to TFT in order to reduce complexity.

* Exclude Nextion2Text

Exclude Nextion2Text

* Fix validation issue

* Time engine on ESPHome

* Time engine on ESPHome

* Notification page bigger hotspot

Added hotspots around the buttons (Accept & Clear) on Notification page to make easier to click on those.

Solves #907

* Boot page retry comm

The boot page will retry communication with the blueprint once a minute to avoid the situation where that page is shown until the automation is reloaded.

* Fix call to screen page

Fixes the call to screen page on US panel.
Reconciliate the US landscape model from EU model.

* Fix fan page `button_on`

Fixing rounding on that button.

* Fixed Fan page rounding

* Prevents boot sequence in other pages

* Physical relay local control

We are trying to make your panel as autonomous as possible by moving some of the controls from the Blueprint to ESPHome. This will reduce the load in your network and Home Assistant, but also will make a more reliable system capable to do it's core functionality even when the network is unavailable or Home Assistant is restarting.
With this version, the following engines have been moved to your panel (local control):
- Physical relay control (when hardware left button is connected to relay 1 or right button to relay 2)

Solves #910

* Embedded climate (#917)

* Performance improvements

The main focus here was to reduce the number of calls between Home Assistant and ESPHome, moving logic as much as possible to TFT and ESPHome.
- Service calls moved to ESPHome (in preparation for Alarm Control Panel)
- Page change informed via event call instead of `nspanel_event` sensor (which still in use by other calls, but might be possible to remove in the future)

* Draft embedded climate

This adds an initial version of an embedded climate/thermostat (heating only for now) with support for local control even with Wi-Fi out.

Solves #646
Solves #263

* Update ReleaseNotes.md

* Fix climate slider

Fix for climate slider opening in an incorrect position and sending only the integer part of the new target temperature

* Moving home page to ESPHome

In progress...

* Fix translations - Dutch

* Embedded chip 3

Home page - Chip 3 will be controlled locally when embedded climate is enable.

* Fixed buttons bar

Fixed buttons bar managed on ESPHome when embedded climate is visible.

* Update ReleaseNotes.md

* Services back to the Blueprint

Moving service calls back to the blueprint as latest HA requires user's permissions to call HA services from ESPHome.
This still have to be used for Alarm calls due to security concerns.

* Update ReleaseNotes.md

* support to hidden ssid (#908)

Supports hidden ssid with the use of substitutions `wifi_hidden: "true"`.

This can be breaking change for users with custom/advanced wifi settings.

Solves #906

* Update nspanel_esphome.yaml

* Removed `restore_state`

There is some incomplete work related to alarms on this commit, but the focus here is to fix `restore_state` on ESPHome v2023.7.0.

This solves #939

* US model - Fan page - Redistribute icons

Redistributed icons on Fan page on US model in order to improve usability.

Based on feedback from #791 (reply in thread)

* Align `nspanel_us_land`

Apply all changes from EU to US_Land

* Fix relays chips

Fix relay status indication on chips.

Solves #926 (comment)

* Fix "invalid variable" for "api"

Fix error "Nextion invalid variable name" when setting `api`.

* Default embedded climate to relay_0

* Fix translations - Italian

Based on #940 (comment)

* Fix `set_temperature` for climate

Solves #957

* Fix `fan.turn_off` call

Removed timer call from fan stop button.
This solves #791 (reply in thread)

* Call a `fan.turn_off` when percentage is 0%

Solves #791 (reply in thread)

* Fix call for fan stop button

Solves #791 (reply in thread)

* Icons on ESPHome

Move icons from TFT/HMI to ESPHome to prevent error on Nextion2Text.

* Updated translations - Spanish

Based on #940 (comment)

* Make home page sensor's icons consistent

Make icon selection consistent with chips where the entity's icon is used in case a icon is not set in the blueprint settings.

Solves #963

* Updated translations - Slovenian

Based on:
- #940 (comment)
-  #829 (comment)

* dutch (#974)

* small ducht translations

small ducht translations

* Dutch translations

---------

Co-authored-by: Edward Firmo <[email protected]>

* Add-on support (#977)

Moved climate settings to an add-on.
Updated documentation.

* Fixed link to addon climate docs

* Fix change brightness when sleeping

Prevents the panel to change screen brightness when sleeping.

Solves #975

* Standardize HA service calls

* Bump version to `4.0 dev`

* Create customization.md

This will reduce the need for:
- #920
- #662
- #833

* Clean-up for customizations

Clean up ESPHome in order to make easier the use of customizations.

* Create Alarm page

* Add page Alarm

* Add Alarm docs

Update docs to reflect the current state (new features & changes)

* Creating "install.md" and update add-ons instructions

* Add Alarm page buttons pics

* Add link to Alarm on page Home

* Create Alarm page

* Alarm button font color

* Add `keyb_num` page

* Alarm Control Panel with PIN (#982)

Implements an Alarm Control Panel page on NSPanel.

Solves #66
Solves #227
Solves #672
Partially solves #299 (comment)
Partially solves #64 (comment)
Partially solves #718

* Fix alarm without pin not working

Solves #930 (comment)

* Alarm page UI

Fixed close button
Disabled buttons are darker

* Move Entities button to ESPHome

Move logic behind Entities button (Home page) from Blueprint to ESPHome in order to gain performance on creating home page.

* Human readable Uptime (#986)

* Human readable Uptime

* Uptime from Frenck code

* Uptime with Frenck code

* Updated Human Readable Uptime

* Removed trailing spaces

* Renamed sensor to "Last started"

Sensor renamed
Update moved to the boot process
Clean-up

---------

Co-authored-by: Edward Firmo <[email protected]>
Co-authored-by: Edward Firmo <[email protected]>

* Update alarm icon & color

* Revert `fast_connect` back to `false`

* Extended chars on buttons pages (#988)

Replaces #740
Probably solves #664
Probably solves #738
Probably solves #987

* Removed `fast_connect`

* Support to `code_arm_required`

Only shows the alarm PIN keyboard if a code is required for arming (or when disarming).

* Update alarm icon on home page

Refresh icon when alarm state changes.

* Fix alarm icon not updating on home page

* Home buttons new format - Alarm

Modernise the button Alarm flow on page Home to improve performance.

* Home buttons new format - Entities

Modernise the button "Entities" flow on page Home to improve performance.

* Home buttons new format - QRcode

Modernise the button "QRcode" flow on page Home to improve performance.

* Home buttons new format - Notification

Modernise the button "Notification" flow on page Home to improve performance.

I haven't moved the code from the Blueprint to ESPHome yet, as I will leave this for when we rebuild the Notification flow in the near future (hopefully), so the performance gains may not be perceived now. Just aligning with other buttons format.

* Adding screenshots

* Delete ReleaseNotes.md

Moved to the release

* New entity filter format

This new format was released with HA v2023.4 and the old one will be deprecated soon.

* Fix Alarm page bypass icon

* Bump version to 4.0

* Rename `addon_climate_heat`

* Simplify climate substitutions

* Add support for `addon_climate_cool`

* Removed `${verbose_log}`

Use logger level `VERBOSE` instead

* Fix script call

* Clean up general entities & fallback

Store inputs into variables only when needed.
Removed fallback mode - Replaced by ESPHome local control when the relay is assigned to the button in the blueprint.

* Phase out sensor `nspanel_event` (partially)

This sensor is being replaced by event calls.

* uptime sensors (#998)

* Create ReleaseNotes.md

* Fix Climate page when embedded climate

And also added a lot of logs which should be removed later as it takes from memory.

Solves #995 (reply in thread)

* Move brightness control to global var

Clean up page Home

* Alarm page translations - Finnish

#940 (comment)

* Exported pics

* Clean-up TFT

- Removed a bunch of unused pics
- Changed page indicator to new format (which will allow future development to hide unused pages)
- Standardized close button in most pages

* Fixed background pics

- Entities pages
- Weather pages

* Standardize close button

* Add "Alarm" section

* Support to wake-up page on `wake_up_display` service

This changes the behavior of a service introduced by #734.

* Optimize `wake_up_display` service

* Fix icon font sizes 10 and 64

Solves #960 (comment)

And also remove all the unnecessary `wait_until`

* Fix Settings page element ids

Partially solves #960 (comment)

* Add translation keys for `settings` page

#1002

* Update settings page when brightness changes on HA

Solves #960 (comment)

* Clean-up page settings

* update docs (#1003)

* updated docs

* Update ReleaseNotes.md

---------

Co-authored-by: Edward Firmo <[email protected]>

* Clean-up Cover page

I'm preparing this page to have icons changing based on the device_class selected to a cover.

* Clean-up boot delay

* Enable `current_page` sensor by default

Otherwise the system won´t update values unless the page is reloaded.

* Use `current_page` in blueprint conditions

One more step towards the phase out of `nspanelevent`.

* Move `script.refresh_colors` to `service.global_settings`

As this is called from a single point, there's no meaning of having a separated script.

* Fix climate icon update

Partially solves #995 (reply in thread)

* Fix button show on climate page

Solves #995 (reply in thread)

* Visual improvements on climate page

- Add friendly name when embedded - Solves #995 (reply in thread)
- Make disable icons a bit darker - Solves #995 (reply in thread)
- Add space for page title in EU an US Land versions
- Reset page timer when pressing/releasing on the slider - Partially solves #990

* Don't update values when page home is not visible

To reduce load on Home Assistant and the network

* Cleanup boot sequence

Move some functionalities to ESPHome

* Display internal sensor value when wifi is out

Before it was showing on home page only when API was out. This adds a test for WiFi.

* Fix `default_target_temperature`

It also updates the page home when thermostat status changes (for the chips).
Solves #995 (reply in thread)

* Adding ID to components missing it

* Renamed `wake_up_display` to `wake_up`

* Re-arrange commands list

* Add service `set_component_color`

Deprecates the following services:
- `send_command_font_color`
- `send_command_background_color`

* Fix button pages not showing

* Adjusted time for HW long click

* Fixed buttons on settings page

* Minor adjustments to page climate

And replace font 10 to size 48 (it was 64 since a few days ago).

* Updates to breaking changes list

* Page settings redesign

Clean up the UI of settings page.
Prepare for translations.

* Enable translations of Settings page

* Notification word-wrap

For EU and US_LAND only, for now.

* Notifications page rebuilt

- Notification button processed on ESPHome (as all the info is there)
- Added word-wrap for main text
- Expanded text size
- Handling display mode (used to define the number of chars per line on Notifications)
- Versioning handling - As a consequence of the previous item.

* Word-wrap buttons pages

Taking advantage of the algorithm created for notifications.

* Word-wrap for Alarm page

* Version mismatch notication

* Fix ESPHome not starting with older TFT

* Rebuilt home page status bar update

* Updated translations - Italian

Based on #1002 (comment)

Thanks @MaiPiu

* Fix `Nextion reported variable name invalid!`

* Fix `Nextion variable invalid`

* Handle `embedded_indoor_temperature`

Internal temperature display will be handled locally (ESPHome) when no other sensor is selected.

* Review temperature correction engine

* Fix display climate chip

* update `temp_nspanel` when correction changes

* Fix `Fan` page not open with long press HW button

Solves #1007

* Minor adjustments on settings page

* version 4.0 ready for release

* Clean-up docs

---------

Co-authored-by: bkbartk <[email protected]>
Co-authored-by: w00zy <[email protected]>
edwardtfn added a commit that referenced this issue Sep 12, 2023
* Create ReleaseNotes.md (#879)

* Create ReleaseNotes.md

- Solves #64 

* sensor display precision

* Filter devices to esp32 only (#881)

* Filter devices to esp32 only

Show only ESP32 devices when selecting the panel

* Filtered device list

* Sensor display precision (#880)

Now the values shown in your panel will follow the [sensor display precision](https://www.home-assistant.io/blog/2023/03/01/release-20233/#sensor-display-precision) provided by Home Assistant.
=> If you have problems with a value exceeding the available space in your panel, please reduce the number of decimals using Home Assistant [sensor display precision](https://www.home-assistant.io/blog/2023/03/01/release-20233/#sensor-display-precision).

* New language selector (#882)

* New language selector

* Update ReleaseNotes.md

* Update ReleaseNotes.md

* Remove `settings_entity` (#887)

* Remove `settings_entity`

- Bump version to 3.5_dev
- Removed references to pictures removed from TFT
- Removed code related to closing settings pages
- Removed trigger `settings_entity`

* Removed `set_settings_entity` service

- Bump version to 3.5_dev
- Removed `set_settings_entity` service - BREAKING CHANGE
- Removed `settings_entity` text-sensor - BREAKING CHANGE
- Added service `open_entity_settings_page` - BREAKING CHANGE

* Removed `settings_entity`

- Bump version to 3.5_dev
- Removed old climate page (climate_backup)
- Removed pics related to old climate page (ids 16-47, 80-83, 95-96 and 125(US only))
- Enforces brightness on any page change (this allows wake-up on settings page with long press on physical buttons) - Pending removing code from Blueprint
- Added `entity` variable on pages `climate`, `lightsettings` and `coversettings`
- Added `entity` info to `nspanelevent` on pages `climate`, `lightsettings` and `coversettings`
- Added `back_page` variable on pages `climate`, `lightsettings` and `coversettings` (default: home)
- Moving to TFT close page logic on pages `climate`, `lightsettings` and `coversettings` - Pending changes on Blueprint and ESPHome
- Standardized name for `page_label` on pages `climate`, `lightsettings` and `coversettings`
- Standardized settings page names: `climate`, `cover` and `light` (Removed `settings` from page name)

* Removed `settings_entity`

* Removed `settings_entity`

* Removed `settings_entity`

* Move `entity` variable to home page (#889)

* Move `entity` variable to home page

This will enable future development of a fallback climate

* Move `entity` variable to home page

* Move `entity` variable to home page

* Move `entity` variable to home page

* Move `entity` variable to home page

* Use `en` as fallback language (#891)

* Use `en` as fallback language

Uses English if a non valid language is selected (like when using legacy language selection).

* Use `en` as fallback language

* Create `nspanel_us_land.tft` (#890)

* Create `nspanel_us_land.tft'

Add `nspanel_us_land.tft' for US panel on landscape mode, fixing the offset on the touch screen when using `nspanel_eu.tft` into a US panel.
Hides the hardware buttons labels, as Nextion cannot support rotated text.

* Created `nspanel_us_land.tft`

* Created `nspanel_us_land.tft`

solves #390
solves #432
solves #299 (comment)

* Created `nspanel_us_land.tft`

* Created `nspanel_us_land.tft`

* Fix "Button confirmation page not working correctly"

Solves #883

* Supports weather forecast with `datetime` not string

This adds support to weather integrations where the `datetime` field under `forecast` attribute is provided as a `datetime` type.
This was seen on Météo-France, while all other weather integrations tested so far used a `text` field for `datetime`.

This solves #893

* Wifi icon to indicate when API offline

This changes the behavior of Wifi icon:

How it was before:
- Wifi icon was visible only when the wifi was connected, nothing was shown when wifi was not connected.

How it is now:
- Wifi icon will have 3 states:
 - Wifi & API connected: Gray wifi icon
 - Wifi disconnected: Red wifi-off icon
 - Wifi connected, but API disconnected (HA is out?): Red api-off icon

* API status indication on the panel

* Limit light & cover to supported settings (#896)

* Limit light to supported settings

When showing light settings, only the supported features will be shown for each light.

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

This partially solves #635

* Limits covers to supported settings

Only show cover settings when `set_position` is supported.

This solves #635

* Limits covers to supported settings

* Update instructions.md

* Add Fan speed settings page (#897)

* Add Fan speed settings page

Add an initial fan speed control page for fans supporting speed control.
Add speed (%) info in the buttons pages.

Solves #404 
Solves #791 
Solves #718 (comment)

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Fix name on confirmation page

Fix the entity name on the confirmation page.

The new order is:
1. Name set on the blueprint settings
2. Entity's `friendly_name` attribute
3. Entity's `name` attribute
4. Entity's `entity_id`

Solves #501

* Select wake-up page (#898)

* Select wake-up page

Users will be able to select the wake-up page on the blueprint inputs.
This selected page will be shown after a boot (after the boot page) and with a touch in the screen when on screen saver page.
After showing this wake-up page, all the previous behavior for closing the page (with a click or after a timeout) will be the same.

Solves #576 
Solves #612 
Solves #801 
Probably improves for #718 (comment)

* Select wake-up page

* Fan update engine

Change the fan update engine to follow the same patter as other settings pages.

* Update ReleaseNotes.md

* Adding vertical bars pics

* Panel offline mode (#900)

* Panel offline mode

Introduces "offline mode" for the panel, which will be used later with a fallback climate.

Pages that are depending on the blueprint (buttons pages, entity pages, settings pages, etc) won't be shown when the API is disconnected.

* Panel offline mode

* Panel offline mode

* Panel offline mode

* Panel offline mode

* "Jump to settings" on tft

Moved "Jump to settings page" routine from ESPHome to TFT in order to reduce complexity.

* Exclude Nextion2Text

Exclude Nextion2Text

* Fix validation issue

* Time engine on ESPHome

* Time engine on ESPHome

* Notification page bigger hotspot

Added hotspots around the buttons (Accept & Clear) on Notification page to make easier to click on those.

Solves #907

* Boot page retry comm

The boot page will retry communication with the blueprint once a minute to avoid the situation where that page is shown until the automation is reloaded.

* Fix call to screen page

Fixes the call to screen page on US panel.
Reconciliate the US landscape model from EU model.

* Fix fan page `button_on`

Fixing rounding on that button.

* Fixed Fan page rounding

* Prevents boot sequence in other pages

* Physical relay local control

We are trying to make your panel as autonomous as possible by moving some of the controls from the Blueprint to ESPHome. This will reduce the load in your network and Home Assistant, but also will make a more reliable system capable to do it's core functionality even when the network is unavailable or Home Assistant is restarting.
With this version, the following engines have been moved to your panel (local control):
- Physical relay control (when hardware left button is connected to relay 1 or right button to relay 2)

Solves #910

* Embedded climate (#917)

* Performance improvements

The main focus here was to reduce the number of calls between Home Assistant and ESPHome, moving logic as much as possible to TFT and ESPHome.
- Service calls moved to ESPHome (in preparation for Alarm Control Panel)
- Page change informed via event call instead of `nspanel_event` sensor (which still in use by other calls, but might be possible to remove in the future)

* Draft embedded climate

This adds an initial version of an embedded climate/thermostat (heating only for now) with support for local control even with Wi-Fi out.

Solves #646
Solves #263

* Update ReleaseNotes.md

* Fix climate slider

Fix for climate slider opening in an incorrect position and sending only the integer part of the new target temperature

* Moving home page to ESPHome

In progress...

* Fix translations - Dutch

* Embedded chip 3

Home page - Chip 3 will be controlled locally when embedded climate is enable.

* Fixed buttons bar

Fixed buttons bar managed on ESPHome when embedded climate is visible.

* Update ReleaseNotes.md

* Services back to the Blueprint

Moving service calls back to the blueprint as latest HA requires user's permissions to call HA services from ESPHome.
This still have to be used for Alarm calls due to security concerns.

* Update ReleaseNotes.md

* support to hidden ssid (#908)

Supports hidden ssid with the use of substitutions `wifi_hidden: "true"`.

This can be breaking change for users with custom/advanced wifi settings.

Solves #906

* Update nspanel_esphome.yaml

* Removed `restore_state`

There is some incomplete work related to alarms on this commit, but the focus here is to fix `restore_state` on ESPHome v2023.7.0.

This solves #939

* US model - Fan page - Redistribute icons

Redistributed icons on Fan page on US model in order to improve usability.

Based on feedback from #791 (reply in thread)

* Align `nspanel_us_land`

Apply all changes from EU to US_Land

* Fix relays chips

Fix relay status indication on chips.

Solves #926 (comment)

* Fix "invalid variable" for "api"

Fix error "Nextion invalid variable name" when setting `api`.

* Default embedded climate to relay_0

* Fix translations - Italian

Based on #940 (comment)

* Fix `set_temperature` for climate

Solves #957

* Fix `fan.turn_off` call

Removed timer call from fan stop button.
This solves #791 (reply in thread)

* Call a `fan.turn_off` when percentage is 0%

Solves #791 (reply in thread)

* Fix call for fan stop button

Solves #791 (reply in thread)

* Icons on ESPHome

Move icons from TFT/HMI to ESPHome to prevent error on Nextion2Text.

* Updated translations - Spanish

Based on #940 (comment)

* Make home page sensor's icons consistent

Make icon selection consistent with chips where the entity's icon is used in case a icon is not set in the blueprint settings.

Solves #963

* Updated translations - Slovenian

Based on:
- #940 (comment)
-  #829 (comment)

* dutch (#974)

* small ducht translations

small ducht translations

* Dutch translations

---------

Co-authored-by: Edward Firmo <[email protected]>

* Add-on support (#977)

Moved climate settings to an add-on.
Updated documentation.

* Fixed link to addon climate docs

* Fix change brightness when sleeping

Prevents the panel to change screen brightness when sleeping.

Solves #975

* Standardize HA service calls

* Bump version to `4.0 dev`

* Create customization.md

This will reduce the need for:
- #920
- #662
- #833

* Clean-up for customizations

Clean up ESPHome in order to make easier the use of customizations.

* Create Alarm page

* Add page Alarm

* Add Alarm docs

Update docs to reflect the current state (new features & changes)

* Creating "install.md" and update add-ons instructions

* Add Alarm page buttons pics

* Add link to Alarm on page Home

* Create Alarm page

* Alarm button font color

* Add `keyb_num` page

* Alarm Control Panel with PIN (#982)

Implements an Alarm Control Panel page on NSPanel.

Solves #66
Solves #227
Solves #672
Partially solves #299 (comment)
Partially solves #64 (comment)
Partially solves #718

* Fix alarm without pin not working

Solves #930 (comment)

* Alarm page UI

Fixed close button
Disabled buttons are darker

* Move Entities button to ESPHome

Move logic behind Entities button (Home page) from Blueprint to ESPHome in order to gain performance on creating home page.

* Human readable Uptime (#986)

* Human readable Uptime

* Uptime from Frenck code

* Uptime with Frenck code

* Updated Human Readable Uptime

* Removed trailing spaces

* Renamed sensor to "Last started"

Sensor renamed
Update moved to the boot process
Clean-up

---------

Co-authored-by: Edward Firmo <[email protected]>
Co-authored-by: Edward Firmo <[email protected]>

* Update alarm icon & color

* Revert `fast_connect` back to `false`

* Extended chars on buttons pages (#988)

Replaces #740
Probably solves #664
Probably solves #738
Probably solves #987

* Removed `fast_connect`

* Support to `code_arm_required`

Only shows the alarm PIN keyboard if a code is required for arming (or when disarming).

* Update alarm icon on home page

Refresh icon when alarm state changes.

* Fix alarm icon not updating on home page

* Home buttons new format - Alarm

Modernise the button Alarm flow on page Home to improve performance.

* Home buttons new format - Entities

Modernise the button "Entities" flow on page Home to improve performance.

* Home buttons new format - QRcode

Modernise the button "QRcode" flow on page Home to improve performance.

* Home buttons new format - Notification

Modernise the button "Notification" flow on page Home to improve performance.

I haven't moved the code from the Blueprint to ESPHome yet, as I will leave this for when we rebuild the Notification flow in the near future (hopefully), so the performance gains may not be perceived now. Just aligning with other buttons format.

* Adding screenshots

* Delete ReleaseNotes.md

Moved to the release

* New entity filter format

This new format was released with HA v2023.4 and the old one will be deprecated soon.

* Fix Alarm page bypass icon

* Bump version to 4.0

* Rename `addon_climate_heat`

* Simplify climate substitutions

* Add support for `addon_climate_cool`

* Removed `${verbose_log}`

Use logger level `VERBOSE` instead

* Fix script call

* Clean up general entities & fallback

Store inputs into variables only when needed.
Removed fallback mode - Replaced by ESPHome local control when the relay is assigned to the button in the blueprint.

* Phase out sensor `nspanel_event` (partially)

This sensor is being replaced by event calls.

* uptime sensors (#998)

* Create ReleaseNotes.md

* Fix Climate page when embedded climate

And also added a lot of logs which should be removed later as it takes from memory.

Solves #995 (reply in thread)

* Move brightness control to global var

Clean up page Home

* Alarm page translations - Finnish

#940 (comment)

* Exported pics

* Clean-up TFT

- Removed a bunch of unused pics
- Changed page indicator to new format (which will allow future development to hide unused pages)
- Standardized close button in most pages

* Fixed background pics

- Entities pages
- Weather pages

* Standardize close button

* Add "Alarm" section

* Support to wake-up page on `wake_up_display` service

This changes the behavior of a service introduced by #734.

* Optimize `wake_up_display` service

* Fix icon font sizes 10 and 64

Solves #960 (comment)

And also remove all the unnecessary `wait_until`

* Fix Settings page element ids

Partially solves #960 (comment)

* Add translation keys for `settings` page

#1002

* Update settings page when brightness changes on HA

Solves #960 (comment)

* Clean-up page settings

* update docs (#1003)

* updated docs

* Update ReleaseNotes.md

---------

Co-authored-by: Edward Firmo <[email protected]>

* Clean-up Cover page

I'm preparing this page to have icons changing based on the device_class selected to a cover.

* Clean-up boot delay

* Enable `current_page` sensor by default

Otherwise the system won´t update values unless the page is reloaded.

* Use `current_page` in blueprint conditions

One more step towards the phase out of `nspanelevent`.

* Move `script.refresh_colors` to `service.global_settings`

As this is called from a single point, there's no meaning of having a separated script.

* Fix climate icon update

Partially solves #995 (reply in thread)

* Fix button show on climate page

Solves #995 (reply in thread)

* Visual improvements on climate page

- Add friendly name when embedded - Solves #995 (reply in thread)
- Make disable icons a bit darker - Solves #995 (reply in thread)
- Add space for page title in EU an US Land versions
- Reset page timer when pressing/releasing on the slider - Partially solves #990

* Don't update values when page home is not visible

To reduce load on Home Assistant and the network

* Cleanup boot sequence

Move some functionalities to ESPHome

* Display internal sensor value when wifi is out

Before it was showing on home page only when API was out. This adds a test for WiFi.

* Fix `default_target_temperature`

It also updates the page home when thermostat status changes (for the chips).
Solves #995 (reply in thread)

* Adding ID to components missing it

* Renamed `wake_up_display` to `wake_up`

* Re-arrange commands list

* Add service `set_component_color`

Deprecates the following services:
- `send_command_font_color`
- `send_command_background_color`

* Fix button pages not showing

* Adjusted time for HW long click

* Fixed buttons on settings page

* Minor adjustments to page climate

And replace font 10 to size 48 (it was 64 since a few days ago).

* Updates to breaking changes list

* Page settings redesign

Clean up the UI of settings page.
Prepare for translations.

* Enable translations of Settings page

* Notification word-wrap

For EU and US_LAND only, for now.

* Notifications page rebuilt

- Notification button processed on ESPHome (as all the info is there)
- Added word-wrap for main text
- Expanded text size
- Handling display mode (used to define the number of chars per line on Notifications)
- Versioning handling - As a consequence of the previous item.

* Word-wrap buttons pages

Taking advantage of the algorithm created for notifications.

* Word-wrap for Alarm page

* Version mismatch notication

* Fix ESPHome not starting with older TFT

* Rebuilt home page status bar update

* Updated translations - Italian

Based on #1002 (comment)

Thanks @MaiPiu

* Fix `Nextion reported variable name invalid!`

* Fix `Nextion variable invalid`

* Handle `embedded_indoor_temperature`

Internal temperature display will be handled locally (ESPHome) when no other sensor is selected.

* Review temperature correction engine

* Fix display climate chip

* update `temp_nspanel` when correction changes

* Fix `Fan` page not open with long press HW button

Solves #1007

* Minor adjustments on settings page

* version 4.0 ready for release

* Clean-up docs

* Improve version notification

* Disable restore `notification_unread`

This must be changed to a binary sensor in the future.

* Fix Fan page button colors when opening

Solves #1017

* Translations (#1023)

* Translations

* Update nspanel_blueprint.yaml

I've changed `brightness` for now as the new design isn't implemented yet, but that string is already in use with the current design.

---------

Co-authored-by: Edward Firmo <[email protected]>

* Adjustments to settings page

* Fix entity info when calling detailed pages

Solves #1022

* Added `media_player` page (hidden)

* New "Confirm" pop-up

This also removes the sensor "NSPanel Event"

* Fix pages not updating values

Solves #1026

* Media player - Buttons

- Added code to buttons on media_player page.
- Clean-up:
  - Moved wake-up select from Blueprint to ESPHome component
  - Removed `switch.xxxxx_confirmation_message`

* Fix logging for global_settings

It was logging wakeup_page, which is deprecated

* Improved version notification

* Removed trailing spaces

* Notification for `sensor.xxxxx_current_page` missing

This might be a common issue for users migrating from v3.4 to v3.5.
This information is part of the release notes, but I believe it worth having a guide to support closely any user who miss that in the release notes.

* Simplify `touchevent` engine

The touch event is used only for the sleeping engine (it will be used for dimming later) and it was transferring all the json info with page name, component, entity, etc.
This was replaced by a simple random integer with no meaning other than "the screen was touched, reset the timer".

* Media player first buttons actions

* Fix unknown service: `media_player.null`

* Media Player control

You will be able to add a Media Player entity to any of the buttons pages and with a long press you will see the media player page.

* Remove dimming timer for now

The funcionality isn't completed.

* Home page - Custom buttons

On the blueprint you can now set up to 3 buttons to be shown on Home page.
It will show the detailed settings page, so the entity must be compatible.

---------

Co-authored-by: bkbartk <[email protected]>
Co-authored-by: w00zy <[email protected]>
Co-authored-by: w00zy <[email protected]>
edwardtfn added a commit that referenced this issue Sep 13, 2023
…t panel (#1033)

* Create ReleaseNotes.md (#879)

* Create ReleaseNotes.md

* sensor display precision

* Filter devices to esp32 only (#881)

* Filter devices to esp32 only

Show only ESP32 devices when selecting the panel

* Filtered device list

* Sensor display precision (#880)

Now the values shown in your panel will follow the [sensor display precision](https://www.home-assistant.io/blog/2023/03/01/release-20233/#sensor-display-precision) provided by Home Assistant.
=> If you have problems with a value exceeding the available space in your panel, please reduce the number of decimals using Home Assistant [sensor display precision](https://www.home-assistant.io/blog/2023/03/01/release-20233/#sensor-display-precision).

* New language selector (#882)

* New language selector

* Update ReleaseNotes.md

* Update ReleaseNotes.md

* Remove `settings_entity` (#887)

* Remove `settings_entity`

- Bump version to 3.5_dev
- Removed references to pictures removed from TFT
- Removed code related to closing settings pages
- Removed trigger `settings_entity`

* Removed `set_settings_entity` service

- Bump version to 3.5_dev
- Removed `set_settings_entity` service - BREAKING CHANGE
- Removed `settings_entity` text-sensor - BREAKING CHANGE
- Added service `open_entity_settings_page` - BREAKING CHANGE

* Removed `settings_entity`

- Bump version to 3.5_dev
- Removed old climate page (climate_backup)
- Removed pics related to old climate page (ids 16-47, 80-83, 95-96 and 125(US only))
- Enforces brightness on any page change (this allows wake-up on settings page with long press on physical buttons) - Pending removing code from Blueprint
- Added `entity` variable on pages `climate`, `lightsettings` and `coversettings`
- Added `entity` info to `nspanelevent` on pages `climate`, `lightsettings` and `coversettings`
- Added `back_page` variable on pages `climate`, `lightsettings` and `coversettings` (default: home)
- Moving to TFT close page logic on pages `climate`, `lightsettings` and `coversettings` - Pending changes on Blueprint and ESPHome
- Standardized name for `page_label` on pages `climate`, `lightsettings` and `coversettings`
- Standardized settings page names: `climate`, `cover` and `light` (Removed `settings` from page name)

* Removed `settings_entity`

* Removed `settings_entity`

* Removed `settings_entity`

* Move `entity` variable to home page (#889)

* Move `entity` variable to home page

This will enable future development of a fallback climate

* Move `entity` variable to home page

* Move `entity` variable to home page

* Move `entity` variable to home page

* Move `entity` variable to home page

* Use `en` as fallback language (#891)

* Use `en` as fallback language

Uses English if a non valid language is selected (like when using legacy language selection).

* Use `en` as fallback language

* Create `nspanel_us_land.tft` (#890)

* Create `nspanel_us_land.tft'

Add `nspanel_us_land.tft' for US panel on landscape mode, fixing the offset on the touch screen when using `nspanel_eu.tft` into a US panel.
Hides the hardware buttons labels, as Nextion cannot support rotated text.

* Created `nspanel_us_land.tft`

* Created `nspanel_us_land.tft`

solves #390
solves #432
solves #299 (comment)

* Created `nspanel_us_land.tft`

* Created `nspanel_us_land.tft`

* Fix "Button confirmation page not working correctly"

Solves #883

* Supports weather forecast with `datetime` not string

This adds support to weather integrations where the `datetime` field under `forecast` attribute is provided as a `datetime` type.
This was seen on Météo-France, while all other weather integrations tested so far used a `text` field for `datetime`.

This solves #893

* Wifi icon to indicate when API offline

This changes the behavior of Wifi icon:

How it was before:
- Wifi icon was visible only when the wifi was connected, nothing was shown when wifi was not connected.

How it is now:
- Wifi icon will have 3 states:
 - Wifi & API connected: Gray wifi icon
 - Wifi disconnected: Red wifi-off icon
 - Wifi connected, but API disconnected (HA is out?): Red api-off icon

* API status indication on the panel

* Limit light & cover to supported settings (#896)

* Limit light to supported settings

When showing light settings, only the supported features will be shown for each light.

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

This partially solves #635

* Limits covers to supported settings

Only show cover settings when `set_position` is supported.

This solves #635

* Limits covers to supported settings

* Update instructions.md

* Add Fan speed settings page (#897)

* Add Fan speed settings page

Add an initial fan speed control page for fans supporting speed control.
Add speed (%) info in the buttons pages.

Solves #404 
Solves #791 
Solves #718 (comment)

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Fix name on confirmation page

Fix the entity name on the confirmation page.

The new order is:
1. Name set on the blueprint settings
2. Entity's `friendly_name` attribute
3. Entity's `name` attribute
4. Entity's `entity_id`

Solves #501

* Select wake-up page (#898)

* Select wake-up page

Users will be able to select the wake-up page on the blueprint inputs.
This selected page will be shown after a boot (after the boot page) and with a touch in the screen when on screen saver page.
After showing this wake-up page, all the previous behavior for closing the page (with a click or after a timeout) will be the same.

Solves #576 
Solves #612 
Solves #801 
Probably improves for #718 (comment)

* Select wake-up page

* Fan update engine

Change the fan update engine to follow the same patter as other settings pages.

* Update ReleaseNotes.md

* Adding vertical bars pics

* Panel offline mode (#900)

* Panel offline mode

Introduces "offline mode" for the panel, which will be used later with a fallback climate.

Pages that are depending on the blueprint (buttons pages, entity pages, settings pages, etc) won't be shown when the API is disconnected.

* Panel offline mode

* Panel offline mode

* Panel offline mode

* Panel offline mode

* "Jump to settings" on tft

Moved "Jump to settings page" routine from ESPHome to TFT in order to reduce complexity.

* Exclude Nextion2Text

Exclude Nextion2Text

* Fix validation issue

* Time engine on ESPHome

* Time engine on ESPHome

* Notification page bigger hotspot

Added hotspots around the buttons (Accept & Clear) on Notification page to make easier to click on those.

Solves #907

* Boot page retry comm

The boot page will retry communication with the blueprint once a minute to avoid the situation where that page is shown until the automation is reloaded.

* Fix call to screen page

Fixes the call to screen page on US panel.
Reconciliate the US landscape model from EU model.

* Fix fan page `button_on`

Fixing rounding on that button.

* Fixed Fan page rounding

* Prevents boot sequence in other pages

* Physical relay local control

We are trying to make your panel as autonomous as possible by moving some of the controls from the Blueprint to ESPHome. This will reduce the load in your network and Home Assistant, but also will make a more reliable system capable to do it's core functionality even when the network is unavailable or Home Assistant is restarting.
With this version, the following engines have been moved to your panel (local control):
- Physical relay control (when hardware left button is connected to relay 1 or right button to relay 2)

Solves #910

* Embedded climate (#917)

* Performance improvements

The main focus here was to reduce the number of calls between Home Assistant and ESPHome, moving logic as much as possible to TFT and ESPHome.
- Service calls moved to ESPHome (in preparation for Alarm Control Panel)
- Page change informed via event call instead of `nspanel_event` sensor (which still in use by other calls, but might be possible to remove in the future)

* Draft embedded climate

This adds an initial version of an embedded climate/thermostat (heating only for now) with support for local control even with Wi-Fi out.

Solves #646
Solves #263

* Update ReleaseNotes.md

* Fix climate slider

Fix for climate slider opening in an incorrect position and sending only the integer part of the new target temperature

* Moving home page to ESPHome

In progress...

* Fix translations - Dutch

* Embedded chip 3

Home page - Chip 3 will be controlled locally when embedded climate is enable.

* Fixed buttons bar

Fixed buttons bar managed on ESPHome when embedded climate is visible.

* Update ReleaseNotes.md

* Services back to the Blueprint

Moving service calls back to the blueprint as latest HA requires user's permissions to call HA services from ESPHome.
This still have to be used for Alarm calls due to security concerns.

* Update ReleaseNotes.md

* support to hidden ssid (#908)

Supports hidden ssid with the use of substitutions `wifi_hidden: "true"`.

This can be breaking change for users with custom/advanced wifi settings.

Solves #906

* Update nspanel_esphome.yaml

* Removed `restore_state`

There is some incomplete work related to alarms on this commit, but the focus here is to fix `restore_state` on ESPHome v2023.7.0.

This solves #939

* US model - Fan page - Redistribute icons

Redistributed icons on Fan page on US model in order to improve usability.

Based on feedback from #791 (reply in thread)

* Align `nspanel_us_land`

Apply all changes from EU to US_Land

* Fix relays chips

Fix relay status indication on chips.

Solves #926 (comment)

* Fix "invalid variable" for "api"

Fix error "Nextion invalid variable name" when setting `api`.

* Default embedded climate to relay_0

* Fix issue with `restore_state` and ESPHome v2023.7.0 (#941)

Solves #939

* Fix translations - Italian

Based on #940 (comment)

* Fix `set_temperature` for climate

Solves #957

* Fix `fan.turn_off` call

Removed timer call from fan stop button.
This solves #791 (reply in thread)

* Call a `fan.turn_off` when percentage is 0%

Solves #791 (reply in thread)

* Fix call for fan stop button

Solves #791 (reply in thread)

* Icons on ESPHome

Move icons from TFT/HMI to ESPHome to prevent error on Nextion2Text.

* Updated translations - Spanish

Based on #940 (comment)

* Make home page sensor's icons consistent

Make icon selection consistent with chips where the entity's icon is used in case a icon is not set in the blueprint settings.

Solves #963

* Updated translations - Slovenian

Based on:
- #940 (comment)
-  #829 (comment)

* dutch (#974)

* small ducht translations

small ducht translations

* Dutch translations

---------

Co-authored-by: Edward Firmo <[email protected]>

* Add-on support (#977)

Moved climate settings to an add-on.
Updated documentation.

* Fixed link to addon climate docs

* Fix change brightness when sleeping

Prevents the panel to change screen brightness when sleeping.

Solves #975

* Standardize HA service calls

* Bump version to `4.0 dev`

* Create customization.md

This will reduce the need for:
- #920
- #662
- #833

* Clean-up for customizations

Clean up ESPHome in order to make easier the use of customizations.

* Create Alarm page

* Add page Alarm

* Add Alarm docs

Update docs to reflect the current state (new features & changes)

* Creating "install.md" and update add-ons instructions

* Add Alarm page buttons pics

* Add link to Alarm on page Home

* Create Alarm page

* Alarm button font color

* Add `keyb_num` page

* Alarm Control Panel with PIN (#982)

Implements an Alarm Control Panel page on NSPanel.

Solves #66
Solves #227
Solves #672
Partially solves #299 (comment)
Partially solves #64 (comment)
Partially solves #718

* Fix alarm without pin not working

Solves #930 (comment)

* Alarm page UI

Fixed close button
Disabled buttons are darker

* Move Entities button to ESPHome

Move logic behind Entities button (Home page) from Blueprint to ESPHome in order to gain performance on creating home page.

* Human readable Uptime (#986)

* Human readable Uptime

* Uptime from Frenck code

* Uptime with Frenck code

* Updated Human Readable Uptime

* Removed trailing spaces

* Renamed sensor to "Last started"

Sensor renamed
Update moved to the boot process
Clean-up

---------

Co-authored-by: Edward Firmo <[email protected]>
Co-authored-by: Edward Firmo <[email protected]>

* Update alarm icon & color

* Revert `fast_connect` back to `false`

* Extended chars on buttons pages (#988)

Replaces #740
Probably solves #664
Probably solves #738
Probably solves #987

* Removed `fast_connect`

* Support to `code_arm_required`

Only shows the alarm PIN keyboard if a code is required for arming (or when disarming).

* Update alarm icon on home page

Refresh icon when alarm state changes.

* Fix alarm icon not updating on home page

* Home buttons new format - Alarm

Modernise the button Alarm flow on page Home to improve performance.

* Home buttons new format - Entities

Modernise the button "Entities" flow on page Home to improve performance.

* Home buttons new format - QRcode

Modernise the button "QRcode" flow on page Home to improve performance.

* Home buttons new format - Notification

Modernise the button "Notification" flow on page Home to improve performance.

I haven't moved the code from the Blueprint to ESPHome yet, as I will leave this for when we rebuild the Notification flow in the near future (hopefully), so the performance gains may not be perceived now. Just aligning with other buttons format.

* Adding screenshots

* Delete ReleaseNotes.md

Moved to the release

* New entity filter format

This new format was released with HA v2023.4 and the old one will be deprecated soon.

* Fix Alarm page bypass icon

* Bump version to 4.0

* Rename `addon_climate_heat`

* Simplify climate substitutions

* Add support for `addon_climate_cool`

* Removed `${verbose_log}`

Use logger level `VERBOSE` instead

* Fix script call

* Clean up general entities & fallback

Store inputs into variables only when needed.
Removed fallback mode - Replaced by ESPHome local control when the relay is assigned to the button in the blueprint.

* Phase out sensor `nspanel_event` (partially)

This sensor is being replaced by event calls.

* uptime sensors (#998)

* Create ReleaseNotes.md

* Fix Climate page when embedded climate

And also added a lot of logs which should be removed later as it takes from memory.

Solves #995 (reply in thread)

* Move brightness control to global var

Clean up page Home

* Alarm page translations - Finnish

#940 (comment)

* Exported pics

* Clean-up TFT

- Removed a bunch of unused pics
- Changed page indicator to new format (which will allow future development to hide unused pages)
- Standardized close button in most pages

* Fixed background pics

- Entities pages
- Weather pages

* Standardize close button

* Add "Alarm" section

* Support to wake-up page on `wake_up_display` service

This changes the behavior of a service introduced by #734.

* Optimize `wake_up_display` service

* Fix icon font sizes 10 and 64

Solves #960 (comment)

And also remove all the unnecessary `wait_until`

* Fix Settings page element ids

Partially solves #960 (comment)

* Add translation keys for `settings` page

#1002

* Update settings page when brightness changes on HA

Solves #960 (comment)

* Clean-up page settings

* update docs (#1003)

* updated docs

* Update ReleaseNotes.md

---------

Co-authored-by: Edward Firmo <[email protected]>

* Clean-up Cover page

I'm preparing this page to have icons changing based on the device_class selected to a cover.

* Clean-up boot delay

* Enable `current_page` sensor by default

Otherwise the system won´t update values unless the page is reloaded.

* Use `current_page` in blueprint conditions

One more step towards the phase out of `nspanelevent`.

* Move `script.refresh_colors` to `service.global_settings`

As this is called from a single point, there's no meaning of having a separated script.

* Fix climate icon update

Partially solves #995 (reply in thread)

* Fix button show on climate page

Solves #995 (reply in thread)

* Visual improvements on climate page

- Add friendly name when embedded - Solves #995 (reply in thread)
- Make disable icons a bit darker - Solves #995 (reply in thread)
- Add space for page title in EU an US Land versions
- Reset page timer when pressing/releasing on the slider - Partially solves #990

* Don't update values when page home is not visible

To reduce load on Home Assistant and the network

* Cleanup boot sequence

Move some functionalities to ESPHome

* Display internal sensor value when wifi is out

Before it was showing on home page only when API was out. This adds a test for WiFi.

* Fix `default_target_temperature`

It also updates the page home when thermostat status changes (for the chips).
Solves #995 (reply in thread)

* Adding ID to components missing it

* Renamed `wake_up_display` to `wake_up`

* Re-arrange commands list

* Add service `set_component_color`

Deprecates the following services:
- `send_command_font_color`
- `send_command_background_color`

* Fix button pages not showing

* Adjusted time for HW long click

* Fixed buttons on settings page

* Minor adjustments to page climate

And replace font 10 to size 48 (it was 64 since a few days ago).

* Updates to breaking changes list

* Page settings redesign

Clean up the UI of settings page.
Prepare for translations.

* Enable translations of Settings page

* Notification word-wrap

For EU and US_LAND only, for now.

* Notifications page rebuilt

- Notification button processed on ESPHome (as all the info is there)
- Added word-wrap for main text
- Expanded text size
- Handling display mode (used to define the number of chars per line on Notifications)
- Versioning handling - As a consequence of the previous item.

* Word-wrap buttons pages

Taking advantage of the algorithm created for notifications.

* Word-wrap for Alarm page

* Version mismatch notication

* Fix ESPHome not starting with older TFT

* Rebuilt home page status bar update

* Updated translations - Italian

Based on #1002 (comment)

Thanks @MaiPiu

* Fix `Nextion reported variable name invalid!`

* Fix `Nextion variable invalid`

* Handle `embedded_indoor_temperature`

Internal temperature display will be handled locally (ESPHome) when no other sensor is selected.

* Review temperature correction engine

* Fix display climate chip

* update `temp_nspanel` when correction changes

* Fix `Fan` page not open with long press HW button

Solves #1007

* Minor adjustments on settings page

* version 4.0 ready for release

* Clean-up docs

* Improve version notification

* Disable restore `notification_unread`

This must be changed to a binary sensor in the future.

* Beta v4.0 (#1012)

* Create ReleaseNotes.md (#879)

* Create ReleaseNotes.md

* sensor display precision

* Filter devices to esp32 only (#881)

* Filter devices to esp32 only

Show only ESP32 devices when selecting the panel

* Filtered device list

* Sensor display precision (#880)

Now the values shown in your panel will follow the [sensor display precision](https://www.home-assistant.io/blog/2023/03/01/release-20233/#sensor-display-precision) provided by Home Assistant.
=> If you have problems with a value exceeding the available space in your panel, please reduce the number of decimals using Home Assistant [sensor display precision](https://www.home-assistant.io/blog/2023/03/01/release-20233/#sensor-display-precision).

* New language selector (#882)

* New language selector

* Update ReleaseNotes.md

* Update ReleaseNotes.md

* Remove `settings_entity` (#887)

* Remove `settings_entity`

- Bump version to 3.5_dev
- Removed references to pictures removed from TFT
- Removed code related to closing settings pages
- Removed trigger `settings_entity`

* Removed `set_settings_entity` service

- Bump version to 3.5_dev
- Removed `set_settings_entity` service - BREAKING CHANGE
- Removed `settings_entity` text-sensor - BREAKING CHANGE
- Added service `open_entity_settings_page` - BREAKING CHANGE

* Removed `settings_entity`

- Bump version to 3.5_dev
- Removed old climate page (climate_backup)
- Removed pics related to old climate page (ids 16-47, 80-83, 95-96 and 125(US only))
- Enforces brightness on any page change (this allows wake-up on settings page with long press on physical buttons) - Pending removing code from Blueprint
- Added `entity` variable on pages `climate`, `lightsettings` and `coversettings`
- Added `entity` info to `nspanelevent` on pages `climate`, `lightsettings` and `coversettings`
- Added `back_page` variable on pages `climate`, `lightsettings` and `coversettings` (default: home)
- Moving to TFT close page logic on pages `climate`, `lightsettings` and `coversettings` - Pending changes on Blueprint and ESPHome
- Standardized name for `page_label` on pages `climate`, `lightsettings` and `coversettings`
- Standardized settings page names: `climate`, `cover` and `light` (Removed `settings` from page name)

* Removed `settings_entity`

* Removed `settings_entity`

* Removed `settings_entity`

* Move `entity` variable to home page (#889)

* Move `entity` variable to home page

This will enable future development of a fallback climate

* Move `entity` variable to home page

* Move `entity` variable to home page

* Move `entity` variable to home page

* Move `entity` variable to home page

* Use `en` as fallback language (#891)

* Use `en` as fallback language

Uses English if a non valid language is selected (like when using legacy language selection).

* Use `en` as fallback language

* Create `nspanel_us_land.tft` (#890)

* Create `nspanel_us_land.tft'

Add `nspanel_us_land.tft' for US panel on landscape mode, fixing the offset on the touch screen when using `nspanel_eu.tft` into a US panel.
Hides the hardware buttons labels, as Nextion cannot support rotated text.

* Created `nspanel_us_land.tft`

* Created `nspanel_us_land.tft`

solves #390
solves #432
solves #299 (comment)

* Created `nspanel_us_land.tft`

* Created `nspanel_us_land.tft`

* Fix "Button confirmation page not working correctly"

Solves #883

* Supports weather forecast with `datetime` not string

This adds support to weather integrations where the `datetime` field under `forecast` attribute is provided as a `datetime` type.
This was seen on Météo-France, while all other weather integrations tested so far used a `text` field for `datetime`.

This solves #893

* Wifi icon to indicate when API offline

This changes the behavior of Wifi icon:

How it was before:
- Wifi icon was visible only when the wifi was connected, nothing was shown when wifi was not connected.

How it is now:
- Wifi icon will have 3 states:
 - Wifi & API connected: Gray wifi icon
 - Wifi disconnected: Red wifi-off icon
 - Wifi connected, but API disconnected (HA is out?): Red api-off icon

* API status indication on the panel

* Limit light & cover to supported settings (#896)

* Limit light to supported settings

When showing light settings, only the supported features will be shown for each light.

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

This partially solves #635

* Limits covers to supported settings

Only show cover settings when `set_position` is supported.

This solves #635

* Limits covers to supported settings

* Update instructions.md

* Add Fan speed settings page (#897)

* Add Fan speed settings page

Add an initial fan speed control page for fans supporting speed control.
Add speed (%) info in the buttons pages.

Solves #404 
Solves #791 
Solves #718 (comment)

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Fix name on confirmation page

Fix the entity name on the confirmation page.

The new order is:
1. Name set on the blueprint settings
2. Entity's `friendly_name` attribute
3. Entity's `name` attribute
4. Entity's `entity_id`

Solves #501

* Select wake-up page (#898)

* Select wake-up page

Users will be able to select the wake-up page on the blueprint inputs.
This selected page will be shown after a boot (after the boot page) and with a touch in the screen when on screen saver page.
After showing this wake-up page, all the previous behavior for closing the page (with a click or after a timeout) will be the same.

Solves #576 
Solves #612 
Solves #801 
Probably improves for #718 (comment)

* Select wake-up page

* Fan update engine

Change the fan update engine to follow the same patter as other settings pages.

* Update ReleaseNotes.md

* Adding vertical bars pics

* Panel offline mode (#900)

* Panel offline mode

Introduces "offline mode" for the panel, which will be used later with a fallback climate.

Pages that are depending on the blueprint (buttons pages, entity pages, settings pages, etc) won't be shown when the API is disconnected.

* Panel offline mode

* Panel offline mode

* Panel offline mode

* Panel offline mode

* "Jump to settings" on tft

Moved "Jump to settings page" routine from ESPHome to TFT in order to reduce complexity.

* Exclude Nextion2Text

Exclude Nextion2Text

* Fix validation issue

* Time engine on ESPHome

* Time engine on ESPHome

* Notification page bigger hotspot

Added hotspots around the buttons (Accept & Clear) on Notification page to make easier to click on those.

Solves #907

* Boot page retry comm

The boot page will retry communication with the blueprint once a minute to avoid the situation where that page is shown until the automation is reloaded.

* Fix call to screen page

Fixes the call to screen page on US panel.
Reconciliate the US landscape model from EU model.

* Fix fan page `button_on`

Fixing rounding on that button.

* Fixed Fan page rounding

* Prevents boot sequence in other pages

* Physical relay local control

We are trying to make your panel as autonomous as possible by moving some of the controls from the Blueprint to ESPHome. This will reduce the load in your network and Home Assistant, but also will make a more reliable system capable to do it's core functionality even when the network is unavailable or Home Assistant is restarting.
With this version, the following engines have been moved to your panel (local control):
- Physical relay control (when hardware left button is connected to relay 1 or right button to relay 2)

Solves #910

* Embedded climate (#917)

* Performance improvements

The main focus here was to reduce the number of calls between Home Assistant and ESPHome, moving logic as much as possible to TFT and ESPHome.
- Service calls moved to ESPHome (in preparation for Alarm Control Panel)
- Page change informed via event call instead of `nspanel_event` sensor (which still in use by other calls, but might be possible to remove in the future)

* Draft embedded climate

This adds an initial version of an embedded climate/thermostat (heating only for now) with support for local control even with Wi-Fi out.

Solves #646
Solves #263

* Update ReleaseNotes.md

* Fix climate slider

Fix for climate slider opening in an incorrect position and sending only the integer part of the new target temperature

* Moving home page to ESPHome

In progress...

* Fix translations - Dutch

* Embedded chip 3

Home page - Chip 3 will be controlled locally when embedded climate is enable.

* Fixed buttons bar

Fixed buttons bar managed on ESPHome when embedded climate is visible.

* Update ReleaseNotes.md

* Services back to the Blueprint

Moving service calls back to the blueprint as latest HA requires user's permissions to call HA services from ESPHome.
This still have to be used for Alarm calls due to security concerns.

* Update ReleaseNotes.md

* support to hidden ssid (#908)

Supports hidden ssid with the use of substitutions `wifi_hidden: "true"`.

This can be breaking change for users with custom/advanced wifi settings.

Solves #906

* Update nspanel_esphome.yaml

* Removed `restore_state`

There is some incomplete work related to alarms on this commit, but the focus here is to fix `restore_state` on ESPHome v2023.7.0.

This solves #939

* US model - Fan page - Redistribute icons

Redistributed icons on Fan page on US model in order to improve usability.

Based on feedback from #791 (reply in thread)

* Align `nspanel_us_land`

Apply all changes from EU to US_Land

* Fix relays chips

Fix relay status indication on chips.

Solves #926 (comment)

* Fix "invalid variable" for "api"

Fix error "Nextion invalid variable name" when setting `api`.

* Default embedded climate to relay_0

* Fix translations - Italian

Based on #940 (comment)

* Fix `set_temperature` for climate

Solves #957

* Fix `fan.turn_off` call

Removed timer call from fan stop button.
This solves #791 (reply in thread)

* Call a `fan.turn_off` when percentage is 0%

Solves #791 (reply in thread)

* Fix call for fan stop button

Solves #791 (reply in thread)

* Icons on ESPHome

Move icons from TFT/HMI to ESPHome to prevent error on Nextion2Text.

* Updated translations - Spanish

Based on #940 (comment)

* Make home page sensor's icons consistent

Make icon selection consistent with chips where the entity's icon is used in case a icon is not set in the blueprint settings.

Solves #963

* Updated translations - Slovenian

Based on:
- #940 (comment)
-  #829 (comment)

* dutch (#974)

* small ducht translations

small ducht translations

* Dutch translations

---------

Co-authored-by: Edward Firmo <[email protected]>

* Add-on support (#977)

Moved climate settings to an add-on.
Updated documentation.

* Fixed link to addon climate docs

* Fix change brightness when sleeping

Prevents the panel to change screen brightness when sleeping.

Solves #975

* Standardize HA service calls

* Bump version to `4.0 dev`

* Create customization.md

This will reduce the need for:
- #920
- #662
- #833

* Clean-up for customizations

Clean up ESPHome in order to make easier the use of customizations.

* Create Alarm page

* Add page Alarm

* Add Alarm docs

Update docs to reflect the current state (new features & changes)

* Creating "install.md" and update add-ons instructions

* Add Alarm page buttons pics

* Add link to Alarm on page Home

* Create Alarm page

* Alarm button font color

* Add `keyb_num` page

* Alarm Control Panel with PIN (#982)

Implements an Alarm Control Panel page on NSPanel.

Solves #66
Solves #227
Solves #672
Partially solves #299 (comment)
Partially solves #64 (comment)
Partially solves #718

* Fix alarm without pin not working

Solves #930 (comment)

* Alarm page UI

Fixed close button
Disabled buttons are darker

* Move Entities button to ESPHome

Move logic behind Entities button (Home page) from Blueprint to ESPHome in order to gain performance on creating home page.

* Human readable Uptime (#986)

* Human readable Uptime

* Uptime from Frenck code

* Uptime with Frenck code

* Updated Human Readable Uptime

* Removed trailing spaces

* Renamed sensor to "Last started"

Sensor renamed
Update moved to the boot process
Clean-up

---------

Co-authored-by: Edward Firmo <[email protected]>
Co-authored-by: Edward Firmo <[email protected]>

* Update alarm icon & color

* Revert `fast_connect` back to `false`

* Extended chars on buttons pages (#988)

Replaces #740
Probably solves #664
Probably solves #738
Probably solves #987

* Removed `fast_connect`

* Support to `code_arm_required`

Only shows the alarm PIN keyboard if a code is required for arming (or when disarming).

* Update alarm icon on home page

Refresh icon when alarm state changes.

* Fix alarm icon not updating on home page

* Home buttons new format - Alarm

Modernise the button Alarm flow on page Home to improve performance.

* Home buttons new format - Entities

Modernise the button "Entities" flow on page Home to improve performance.

* Home buttons new format - QRcode

Modernise the button "QRcode" flow on page Home to improve performance.

* Home buttons new format - Notification

Modernise the button "Notification" flow on page Home to improve performance.

I haven't moved the code from the Blueprint to ESPHome yet, as I will leave this for when we rebuild the Notification flow in the near future (hopefully), so the performance gains may not be perceived now. Just aligning with other buttons format.

* Adding screenshots

* Delete ReleaseNotes.md

Moved to the release

* New entity filter format

This new format was released with HA v2023.4 and the old one will be deprecated soon.

* Fix Alarm page bypass icon

* Bump version to 4.0

* Rename `addon_climate_heat`

* Simplify climate substitutions

* Add support for `addon_climate_cool`

* Removed `${verbose_log}`

Use logger level `VERBOSE` instead

* Fix script call

* Clean up general entities & fallback

Store inputs into variables only when needed.
Removed fallback mode - Replaced by ESPHome local control when the relay is assigned to the button in the blueprint.

* Phase out sensor `nspanel_event` (partially)

This sensor is being replaced by event calls.

* uptime sensors (#998)

* Create ReleaseNotes.md

* Fix Climate page when embedded climate

And also added a lot of logs which should be removed later as it takes from memory.

Solves #995 (reply in thread)

* Move brightness control to global var

Clean up page Home

* Alarm page translations - Finnish

#940 (comment)

* Exported pics

* Clean-up TFT

- Removed a bunch of unused pics
- Changed page indicator to new format (which will allow future development to hide unused pages)
- Standardized close button in most pages

* Fixed background pics

- Entities pages
- Weather pages

* Standardize close button

* Add "Alarm" section

* Support to wake-up page on `wake_up_display` service

This changes the behavior of a service introduced by #734.

* Optimize `wake_up_display` service

* Fix icon font sizes 10 and 64

Solves #960 (comment)

And also remove all the unnecessary `wait_until`

* Fix Settings page element ids

Partially solves #960 (comment)

* Add translation keys for `settings` page

#1002

* Update settings page when brightness changes on HA

Solves #960 (comment)

* Clean-up page settings

* update docs (#1003)

* updated docs

* Update ReleaseNotes.md

---------

Co-authored-by: Edward Firmo <[email protected]>

* Clean-up Cover page

I'm preparing this page to have icons changing based on the device_class selected to a cover.

* Clean-up boot delay

* Enable `current_page` sensor by default

Otherwise the system won´t update values unless the page is reloaded.

* Use `current_page` in blueprint conditions

One more step towards the phase out of `nspanelevent`.

* Move `script.refresh_colors` to `service.global_settings`

As this is called from a single point, there's no meaning of having a separated script.

* Fix climate icon update

Partially solves #995 (reply in thread)

* Fix button show on climate page

Solves #995 (reply in thread)

* Visual improvements on climate page

- Add friendly name when embedded - Solves #995 (reply in thread)
- Make disable icons a bit darker - Solves #995 (reply in thread)
- Add space for page title in EU an US Land versions
- Reset page timer when pressing/releasing on the slider - Partially solves #990

* Don't update values when page home is not visible

To reduce load on Home Assistant and the network

* Cleanup boot sequence

Move some functionalities to ESPHome

* Display internal sensor value when wifi is out

Before it was showing on home page only when API was out. This adds a test for WiFi.

* Fix `default_target_temperature`

It also updates the page home when thermostat status changes (for the chips).
Solves #995 (reply in thread)

* Adding ID to components missing it

* Renamed `wake_up_display` to `wake_up`

* Re-arrange commands list

* Add service `set_component_color`

Deprecates the following services:
- `send_command_font_color`
- `send_command_background_color`

* Fix button pages not showing

* Adjusted time for HW long click

* Fixed buttons on settings page

* Minor adjustments to page climate

And replace font 10 to size 48 (it was 64 since a few days ago).

* Updates to breaking changes list

* Page settings redesign

Clean up the UI of settings page.
Prepare for translations.

* Enable translations of Settings page

* Notification word-wrap

For EU and US_LAND only, for now.

* Notifications page rebuilt

- Notification button processed on ESPHome (as all the info is there)
- Added word-wrap for main text
- Expanded text size
- Handling display mode (used to define the number of chars per line on Notifications)
- Versioning handling - As a consequence of the previous item.

* Word-wrap buttons pages

Taking advantage of the algorithm created for notifications.

* Word-wrap for Alarm page

* Version mismatch notication

* Fix ESPHome not starting with older TFT

* Rebuilt home page status bar update

* Updated translations - Italian

Based on #1002 (comment)

Thanks @MaiPiu

* Fix `Nextion reported variable name invalid!`

* Fix `Nextion variable invalid`

* Handle `embedded_indoor_temperature`

Internal temperature display will be handled locally (ESPHome) when no other sensor is selected.

* Review temperature correction engine

* Fix display climate chip

* update `temp_nspanel` when correction changes

* Fix `Fan` page not open with long press HW button

Solves #1007

* Minor adjustments on settings page

* version 4.0 ready for release

* Clean-up docs

---------

Co-authored-by: bkbartk <[email protected]>
Co-authored-by: w00zy <[email protected]>

* Fix Fan page button colors when opening

Solves #1017

* Translations (#1023)

* Translations

* Update nspanel_blueprint.yaml

I've changed `brightness` for now as the new design isn't implemented yet, but that string is already in use with the current design.

---------

Co-authored-by: Edward Firmo <[email protected]>

* Adjustments to settings page

* Fix entity info when calling detailed pages

Solves #1022

* Added `media_player` page (hidden)

* New "Confirm" pop-up

This also removes the sensor "NSPanel Event"

* Fix pages not updating values

Solves #1026

* Media player - Buttons

- Added code to buttons on media_player page.
- Clean-up:
  - Moved wake-up select from Blueprint to ESPHome component
  - Removed `switch.xxxxx_confirmation_message`

* Fix logging for global_settings

It was logging wakeup_page, which is deprecated

* Improved version notification

* Removed trailing spaces

* Notification for `sensor.xxxxx_current_page` missing

This might be a common issue for users migrating from v3.4 to v3.5.
This information is part of the release notes, but I believe it worth having a guide to support closely any user who miss that in the release notes.

* Simplify `touchevent` engine

The touch event is used only for the sleeping engine (it will be used for dimming later) and it was transferring all the json info with page name, component, entity, etc.
This was replaced by a simple random integer with no meaning other than "the screen was touched, reset the timer".

* Media player first buttons actions

* Fix unknown service: `media_player.null`

* Media Player control

You will be able to add a Media Player entity to any of the buttons pages and with a long press you will see the media player page.

* Remove dimming timer for now

The funcionality isn't completed.

* Home page - Custom buttons

On the blueprint you can now set up to 3 buttons to be shown on Home page.
It will show the detailed settings page, so the entity must be compatible.

* Fix Media player missing parameters

Possibly solves #1030 (comment)

* Prevents calls to `media_player.null`

* Remove `entity` info from pages on TFT

Since v3.4, the info about entity_id shown was going all the way to Nextion and then sent back in the json return, however this requires a long (100-char) global var and the way it was implemented, it was one of those per settings page, as climate should be also recorded at the same time in case the embedded climate was installed.
This was taking too much memory, so I've moved this info to a global variable (string) in ESPHome.
There is now lots of space for code cleaning (and still pending to do the same with climate entity, as it could be only a bool to inform if embedded), but this brings the functionality.

This enabled the return to global for some components, so it probably solves #1031

---------

Co-authored-by: bkbartk <[email protected]>
Co-authored-by: w00zy <[email protected]>
Co-authored-by: w00zy <[email protected]>
edwardtfn added a commit that referenced this issue Sep 18, 2023
* Create ReleaseNotes.md (#879)

* Create ReleaseNotes.md

* sensor display precision

* Filter devices to esp32 only (#881)

* Filter devices to esp32 only

Show only ESP32 devices when selecting the panel

* Filtered device list

* Sensor display precision (#880)

Now the values shown in your panel will follow the [sensor display precision](https://www.home-assistant.io/blog/2023/03/01/release-20233/#sensor-display-precision) provided by Home Assistant.
=> If you have problems with a value exceeding the available space in your panel, please reduce the number of decimals using Home Assistant [sensor display precision](https://www.home-assistant.io/blog/2023/03/01/release-20233/#sensor-display-precision).

* New language selector (#882)

* New language selector

* Update ReleaseNotes.md

* Update ReleaseNotes.md

* Remove `settings_entity` (#887)

* Remove `settings_entity`

- Bump version to 3.5_dev
- Removed references to pictures removed from TFT
- Removed code related to closing settings pages
- Removed trigger `settings_entity`

* Removed `set_settings_entity` service

- Bump version to 3.5_dev
- Removed `set_settings_entity` service - BREAKING CHANGE
- Removed `settings_entity` text-sensor - BREAKING CHANGE
- Added service `open_entity_settings_page` - BREAKING CHANGE

* Removed `settings_entity`

- Bump version to 3.5_dev
- Removed old climate page (climate_backup)
- Removed pics related to old climate page (ids 16-47, 80-83, 95-96 and 125(US only))
- Enforces brightness on any page change (this allows wake-up on settings page with long press on physical buttons) - Pending removing code from Blueprint
- Added `entity` variable on pages `climate`, `lightsettings` and `coversettings`
- Added `entity` info to `nspanelevent` on pages `climate`, `lightsettings` and `coversettings`
- Added `back_page` variable on pages `climate`, `lightsettings` and `coversettings` (default: home)
- Moving to TFT close page logic on pages `climate`, `lightsettings` and `coversettings` - Pending changes on Blueprint and ESPHome
- Standardized name for `page_label` on pages `climate`, `lightsettings` and `coversettings`
- Standardized settings page names: `climate`, `cover` and `light` (Removed `settings` from page name)

* Removed `settings_entity`

* Removed `settings_entity`

* Removed `settings_entity`

* Move `entity` variable to home page (#889)

* Move `entity` variable to home page

This will enable future development of a fallback climate

* Move `entity` variable to home page

* Move `entity` variable to home page

* Move `entity` variable to home page

* Move `entity` variable to home page

* Use `en` as fallback language (#891)

* Use `en` as fallback language

Uses English if a non valid language is selected (like when using legacy language selection).

* Use `en` as fallback language

* Create `nspanel_us_land.tft` (#890)

* Create `nspanel_us_land.tft'

Add `nspanel_us_land.tft' for US panel on landscape mode, fixing the offset on the touch screen when using `nspanel_eu.tft` into a US panel.
Hides the hardware buttons labels, as Nextion cannot support rotated text.

* Created `nspanel_us_land.tft`

* Created `nspanel_us_land.tft`

solves #390
solves #432
solves #299 (comment)

* Created `nspanel_us_land.tft`

* Created `nspanel_us_land.tft`

* Fix "Button confirmation page not working correctly"

Solves #883

* Supports weather forecast with `datetime` not string

This adds support to weather integrations where the `datetime` field under `forecast` attribute is provided as a `datetime` type.
This was seen on Météo-France, while all other weather integrations tested so far used a `text` field for `datetime`.

This solves #893

* Wifi icon to indicate when API offline

This changes the behavior of Wifi icon:

How it was before:
- Wifi icon was visible only when the wifi was connected, nothing was shown when wifi was not connected.

How it is now:
- Wifi icon will have 3 states:
 - Wifi & API connected: Gray wifi icon
 - Wifi disconnected: Red wifi-off icon
 - Wifi connected, but API disconnected (HA is out?): Red api-off icon

* API status indication on the panel

* Limit light & cover to supported settings (#896)

* Limit light to supported settings

When showing light settings, only the supported features will be shown for each light.

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

This partially solves #635

* Limits covers to supported settings

Only show cover settings when `set_position` is supported.

This solves #635

* Limits covers to supported settings

* Update instructions.md

* Add Fan speed settings page (#897)

* Add Fan speed settings page

Add an initial fan speed control page for fans supporting speed control.
Add speed (%) info in the buttons pages.

Solves #404 
Solves #791 
Solves #718 (comment)

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Fix name on confirmation page

Fix the entity name on the confirmation page.

The new order is:
1. Name set on the blueprint settings
2. Entity's `friendly_name` attribute
3. Entity's `name` attribute
4. Entity's `entity_id`

Solves #501

* Select wake-up page (#898)

* Select wake-up page

Users will be able to select the wake-up page on the blueprint inputs.
This selected page will be shown after a boot (after the boot page) and with a touch in the screen when on screen saver page.
After showing this wake-up page, all the previous behavior for closing the page (with a click or after a timeout) will be the same.

Solves #576 
Solves #612 
Solves #801 
Probably improves for #718 (comment)

* Select wake-up page

* Fan update engine

Change the fan update engine to follow the same patter as other settings pages.

* Update ReleaseNotes.md

* Adding vertical bars pics

* Panel offline mode (#900)

* Panel offline mode

Introduces "offline mode" for the panel, which will be used later with a fallback climate.

Pages that are depending on the blueprint (buttons pages, entity pages, settings pages, etc) won't be shown when the API is disconnected.

* Panel offline mode

* Panel offline mode

* Panel offline mode

* Panel offline mode

* "Jump to settings" on tft

Moved "Jump to settings page" routine from ESPHome to TFT in order to reduce complexity.

* Exclude Nextion2Text

Exclude Nextion2Text

* Fix validation issue

* Time engine on ESPHome

* Time engine on ESPHome

* Notification page bigger hotspot

Added hotspots around the buttons (Accept & Clear) on Notification page to make easier to click on those.

Solves #907

* Boot page retry comm

The boot page will retry communication with the blueprint once a minute to avoid the situation where that page is shown until the automation is reloaded.

* Fix call to screen page

Fixes the call to screen page on US panel.
Reconciliate the US landscape model from EU model.

* Fix fan page `button_on`

Fixing rounding on that button.

* Fixed Fan page rounding

* Prevents boot sequence in other pages

* Physical relay local control

We are trying to make your panel as autonomous as possible by moving some of the controls from the Blueprint to ESPHome. This will reduce the load in your network and Home Assistant, but also will make a more reliable system capable to do it's core functionality even when the network is unavailable or Home Assistant is restarting.
With this version, the following engines have been moved to your panel (local control):
- Physical relay control (when hardware left button is connected to relay 1 or right button to relay 2)

Solves #910

* Embedded climate (#917)

* Performance improvements

The main focus here was to reduce the number of calls between Home Assistant and ESPHome, moving logic as much as possible to TFT and ESPHome.
- Service calls moved to ESPHome (in preparation for Alarm Control Panel)
- Page change informed via event call instead of `nspanel_event` sensor (which still in use by other calls, but might be possible to remove in the future)

* Draft embedded climate

This adds an initial version of an embedded climate/thermostat (heating only for now) with support for local control even with Wi-Fi out.

Solves #646
Solves #263

* Update ReleaseNotes.md

* Fix climate slider

Fix for climate slider opening in an incorrect position and sending only the integer part of the new target temperature

* Moving home page to ESPHome

In progress...

* Fix translations - Dutch

* Embedded chip 3

Home page - Chip 3 will be controlled locally when embedded climate is enable.

* Fixed buttons bar

Fixed buttons bar managed on ESPHome when embedded climate is visible.

* Update ReleaseNotes.md

* Services back to the Blueprint

Moving service calls back to the blueprint as latest HA requires user's permissions to call HA services from ESPHome.
This still have to be used for Alarm calls due to security concerns.

* Update ReleaseNotes.md

* support to hidden ssid (#908)

Supports hidden ssid with the use of substitutions `wifi_hidden: "true"`.

This can be breaking change for users with custom/advanced wifi settings.

Solves #906

* Update nspanel_esphome.yaml

* Removed `restore_state`

There is some incomplete work related to alarms on this commit, but the focus here is to fix `restore_state` on ESPHome v2023.7.0.

This solves #939

* US model - Fan page - Redistribute icons

Redistributed icons on Fan page on US model in order to improve usability.

Based on feedback from #791 (reply in thread)

* Align `nspanel_us_land`

Apply all changes from EU to US_Land

* Fix relays chips

Fix relay status indication on chips.

Solves #926 (comment)

* Fix "invalid variable" for "api"

Fix error "Nextion invalid variable name" when setting `api`.

* Default embedded climate to relay_0

* Fix issue with `restore_state` and ESPHome v2023.7.0 (#941)

Solves #939

* Fix translations - Italian

Based on #940 (comment)

* Fix `set_temperature` for climate

Solves #957

* Fix `fan.turn_off` call

Removed timer call from fan stop button.
This solves #791 (reply in thread)

* Call a `fan.turn_off` when percentage is 0%

Solves #791 (reply in thread)

* Fix call for fan stop button

Solves #791 (reply in thread)

* Icons on ESPHome

Move icons from TFT/HMI to ESPHome to prevent error on Nextion2Text.

* Updated translations - Spanish

Based on #940 (comment)

* Make home page sensor's icons consistent

Make icon selection consistent with chips where the entity's icon is used in case a icon is not set in the blueprint settings.

Solves #963

* Updated translations - Slovenian

Based on:
- #940 (comment)
-  #829 (comment)

* dutch (#974)

* small ducht translations

small ducht translations

* Dutch translations

---------

Co-authored-by: Edward Firmo <[email protected]>

* Add-on support (#977)

Moved climate settings to an add-on.
Updated documentation.

* Fixed link to addon climate docs

* Fix change brightness when sleeping

Prevents the panel to change screen brightness when sleeping.

Solves #975

* Standardize HA service calls

* Bump version to `4.0 dev`

* Create customization.md

This will reduce the need for:
- #920
- #662
- #833

* Clean-up for customizations

Clean up ESPHome in order to make easier the use of customizations.

* Create Alarm page

* Add page Alarm

* Add Alarm docs

Update docs to reflect the current state (new features & changes)

* Creating "install.md" and update add-ons instructions

* Add Alarm page buttons pics

* Add link to Alarm on page Home

* Create Alarm page

* Alarm button font color

* Add `keyb_num` page

* Alarm Control Panel with PIN (#982)

Implements an Alarm Control Panel page on NSPanel.

Solves #66
Solves #227
Solves #672
Partially solves #299 (comment)
Partially solves #64 (comment)
Partially solves #718

* Fix alarm without pin not working

Solves #930 (comment)

* Alarm page UI

Fixed close button
Disabled buttons are darker

* Move Entities button to ESPHome

Move logic behind Entities button (Home page) from Blueprint to ESPHome in order to gain performance on creating home page.

* Human readable Uptime (#986)

* Human readable Uptime

* Uptime from Frenck code

* Uptime with Frenck code

* Updated Human Readable Uptime

* Removed trailing spaces

* Renamed sensor to "Last started"

Sensor renamed
Update moved to the boot process
Clean-up

---------

Co-authored-by: Edward Firmo <[email protected]>
Co-authored-by: Edward Firmo <[email protected]>

* Update alarm icon & color

* Revert `fast_connect` back to `false`

* Extended chars on buttons pages (#988)

Replaces #740
Probably solves #664
Probably solves #738
Probably solves #987

* Removed `fast_connect`

* Support to `code_arm_required`

Only shows the alarm PIN keyboard if a code is required for arming (or when disarming).

* Update alarm icon on home page

Refresh icon when alarm state changes.

* Fix alarm icon not updating on home page

* Home buttons new format - Alarm

Modernise the button Alarm flow on page Home to improve performance.

* Home buttons new format - Entities

Modernise the button "Entities" flow on page Home to improve performance.

* Home buttons new format - QRcode

Modernise the button "QRcode" flow on page Home to improve performance.

* Home buttons new format - Notification

Modernise the button "Notification" flow on page Home to improve performance.

I haven't moved the code from the Blueprint to ESPHome yet, as I will leave this for when we rebuild the Notification flow in the near future (hopefully), so the performance gains may not be perceived now. Just aligning with other buttons format.

* Adding screenshots

* Delete ReleaseNotes.md

Moved to the release

* New entity filter format

This new format was released with HA v2023.4 and the old one will be deprecated soon.

* Fix Alarm page bypass icon

* Bump version to 4.0

* Rename `addon_climate_heat`

* Simplify climate substitutions

* Add support for `addon_climate_cool`

* Removed `${verbose_log}`

Use logger level `VERBOSE` instead

* Fix script call

* Clean up general entities & fallback

Store inputs into variables only when needed.
Removed fallback mode - Replaced by ESPHome local control when the relay is assigned to the button in the blueprint.

* Phase out sensor `nspanel_event` (partially)

This sensor is being replaced by event calls.

* uptime sensors (#998)

* Create ReleaseNotes.md

* Fix Climate page when embedded climate

And also added a lot of logs which should be removed later as it takes from memory.

Solves #995 (reply in thread)

* Move brightness control to global var

Clean up page Home

* Alarm page translations - Finnish

#940 (comment)

* Exported pics

* Clean-up TFT

- Removed a bunch of unused pics
- Changed page indicator to new format (which will allow future development to hide unused pages)
- Standardized close button in most pages

* Fixed background pics

- Entities pages
- Weather pages

* Standardize close button

* Add "Alarm" section

* Support to wake-up page on `wake_up_display` service

This changes the behavior of a service introduced by #734.

* Optimize `wake_up_display` service

* Fix icon font sizes 10 and 64

Solves #960 (comment)

And also remove all the unnecessary `wait_until`

* Fix Settings page element ids

Partially solves #960 (comment)

* Add translation keys for `settings` page

#1002

* Update settings page when brightness changes on HA

Solves #960 (comment)

* Clean-up page settings

* update docs (#1003)

* updated docs

* Update ReleaseNotes.md

---------

Co-authored-by: Edward Firmo <[email protected]>

* Clean-up Cover page

I'm preparing this page to have icons changing based on the device_class selected to a cover.

* Clean-up boot delay

* Enable `current_page` sensor by default

Otherwise the system won´t update values unless the page is reloaded.

* Use `current_page` in blueprint conditions

One more step towards the phase out of `nspanelevent`.

* Move `script.refresh_colors` to `service.global_settings`

As this is called from a single point, there's no meaning of having a separated script.

* Fix climate icon update

Partially solves #995 (reply in thread)

* Fix button show on climate page

Solves #995 (reply in thread)

* Visual improvements on climate page

- Add friendly name when embedded - Solves #995 (reply in thread)
- Make disable icons a bit darker - Solves #995 (reply in thread)
- Add space for page title in EU an US Land versions
- Reset page timer when pressing/releasing on the slider - Partially solves #990

* Don't update values when page home is not visible

To reduce load on Home Assistant and the network

* Cleanup boot sequence

Move some functionalities to ESPHome

* Display internal sensor value when wifi is out

Before it was showing on home page only when API was out. This adds a test for WiFi.

* Fix `default_target_temperature`

It also updates the page home when thermostat status changes (for the chips).
Solves #995 (reply in thread)

* Adding ID to components missing it

* Renamed `wake_up_display` to `wake_up`

* Re-arrange commands list

* Add service `set_component_color`

Deprecates the following services:
- `send_command_font_color`
- `send_command_background_color`

* Fix button pages not showing

* Adjusted time for HW long click

* Fixed buttons on settings page

* Minor adjustments to page climate

And replace font 10 to size 48 (it was 64 since a few days ago).

* Updates to breaking changes list

* Page settings redesign

Clean up the UI of settings page.
Prepare for translations.

* Enable translations of Settings page

* Notification word-wrap

For EU and US_LAND only, for now.

* Notifications page rebuilt

- Notification button processed on ESPHome (as all the info is there)
- Added word-wrap for main text
- Expanded text size
- Handling display mode (used to define the number of chars per line on Notifications)
- Versioning handling - As a consequence of the previous item.

* Word-wrap buttons pages

Taking advantage of the algorithm created for notifications.

* Word-wrap for Alarm page

* Version mismatch notication

* Fix ESPHome not starting with older TFT

* Rebuilt home page status bar update

* Updated translations - Italian

Based on #1002 (comment)

Thanks @MaiPiu

* Fix `Nextion reported variable name invalid!`

* Fix `Nextion variable invalid`

* Handle `embedded_indoor_temperature`

Internal temperature display will be handled locally (ESPHome) when no other sensor is selected.

* Review temperature correction engine

* Fix display climate chip

* update `temp_nspanel` when correction changes

* Fix `Fan` page not open with long press HW button

Solves #1007

* Minor adjustments on settings page

* version 4.0 ready for release

* Clean-up docs

* Improve version notification

* Disable restore `notification_unread`

This must be changed to a binary sensor in the future.

* Beta v4.0 (#1012)

* Create ReleaseNotes.md (#879)

* Create ReleaseNotes.md

* sensor display precision

* Filter devices to esp32 only (#881)

* Filter devices to esp32 only

Show only ESP32 devices when selecting the panel

* Filtered device list

* Sensor display precision (#880)

Now the values shown in your panel will follow the [sensor display precision](https://www.home-assistant.io/blog/2023/03/01/release-20233/#sensor-display-precision) provided by Home Assistant.
=> If you have problems with a value exceeding the available space in your panel, please reduce the number of decimals using Home Assistant [sensor display precision](https://www.home-assistant.io/blog/2023/03/01/release-20233/#sensor-display-precision).

* New language selector (#882)

* New language selector

* Update ReleaseNotes.md

* Update ReleaseNotes.md

* Remove `settings_entity` (#887)

* Remove `settings_entity`

- Bump version to 3.5_dev
- Removed references to pictures removed from TFT
- Removed code related to closing settings pages
- Removed trigger `settings_entity`

* Removed `set_settings_entity` service

- Bump version to 3.5_dev
- Removed `set_settings_entity` service - BREAKING CHANGE
- Removed `settings_entity` text-sensor - BREAKING CHANGE
- Added service `open_entity_settings_page` - BREAKING CHANGE

* Removed `settings_entity`

- Bump version to 3.5_dev
- Removed old climate page (climate_backup)
- Removed pics related to old climate page (ids 16-47, 80-83, 95-96 and 125(US only))
- Enforces brightness on any page change (this allows wake-up on settings page with long press on physical buttons) - Pending removing code from Blueprint
- Added `entity` variable on pages `climate`, `lightsettings` and `coversettings`
- Added `entity` info to `nspanelevent` on pages `climate`, `lightsettings` and `coversettings`
- Added `back_page` variable on pages `climate`, `lightsettings` and `coversettings` (default: home)
- Moving to TFT close page logic on pages `climate`, `lightsettings` and `coversettings` - Pending changes on Blueprint and ESPHome
- Standardized name for `page_label` on pages `climate`, `lightsettings` and `coversettings`
- Standardized settings page names: `climate`, `cover` and `light` (Removed `settings` from page name)

* Removed `settings_entity`

* Removed `settings_entity`

* Removed `settings_entity`

* Move `entity` variable to home page (#889)

* Move `entity` variable to home page

This will enable future development of a fallback climate

* Move `entity` variable to home page

* Move `entity` variable to home page

* Move `entity` variable to home page

* Move `entity` variable to home page

* Use `en` as fallback language (#891)

* Use `en` as fallback language

Uses English if a non valid language is selected (like when using legacy language selection).

* Use `en` as fallback language

* Create `nspanel_us_land.tft` (#890)

* Create `nspanel_us_land.tft'

Add `nspanel_us_land.tft' for US panel on landscape mode, fixing the offset on the touch screen when using `nspanel_eu.tft` into a US panel.
Hides the hardware buttons labels, as Nextion cannot support rotated text.

* Created `nspanel_us_land.tft`

* Created `nspanel_us_land.tft`

solves #390
solves #432
solves #299 (comment)

* Created `nspanel_us_land.tft`

* Created `nspanel_us_land.tft`

* Fix "Button confirmation page not working correctly"

Solves #883

* Supports weather forecast with `datetime` not string

This adds support to weather integrations where the `datetime` field under `forecast` attribute is provided as a `datetime` type.
This was seen on Météo-France, while all other weather integrations tested so far used a `text` field for `datetime`.

This solves #893

* Wifi icon to indicate when API offline

This changes the behavior of Wifi icon:

How it was before:
- Wifi icon was visible only when the wifi was connected, nothing was shown when wifi was not connected.

How it is now:
- Wifi icon will have 3 states:
 - Wifi & API connected: Gray wifi icon
 - Wifi disconnected: Red wifi-off icon
 - Wifi connected, but API disconnected (HA is out?): Red api-off icon

* API status indication on the panel

* Limit light & cover to supported settings (#896)

* Limit light to supported settings

When showing light settings, only the supported features will be shown for each light.

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

This partially solves #635

* Limits covers to supported settings

Only show cover settings when `set_position` is supported.

This solves #635

* Limits covers to supported settings

* Update instructions.md

* Add Fan speed settings page (#897)

* Add Fan speed settings page

Add an initial fan speed control page for fans supporting speed control.
Add speed (%) info in the buttons pages.

Solves #404 
Solves #791 
Solves #718 (comment)

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Fix name on confirmation page

Fix the entity name on the confirmation page.

The new order is:
1. Name set on the blueprint settings
2. Entity's `friendly_name` attribute
3. Entity's `name` attribute
4. Entity's `entity_id`

Solves #501

* Select wake-up page (#898)

* Select wake-up page

Users will be able to select the wake-up page on the blueprint inputs.
This selected page will be shown after a boot (after the boot page) and with a touch in the screen when on screen saver page.
After showing this wake-up page, all the previous behavior for closing the page (with a click or after a timeout) will be the same.

Solves #576 
Solves #612 
Solves #801 
Probably improves for #718 (comment)

* Select wake-up page

* Fan update engine

Change the fan update engine to follow the same patter as other settings pages.

* Update ReleaseNotes.md

* Adding vertical bars pics

* Panel offline mode (#900)

* Panel offline mode

Introduces "offline mode" for the panel, which will be used later with a fallback climate.

Pages that are depending on the blueprint (buttons pages, entity pages, settings pages, etc) won't be shown when the API is disconnected.

* Panel offline mode

* Panel offline mode

* Panel offline mode

* Panel offline mode

* "Jump to settings" on tft

Moved "Jump to settings page" routine from ESPHome to TFT in order to reduce complexity.

* Exclude Nextion2Text

Exclude Nextion2Text

* Fix validation issue

* Time engine on ESPHome

* Time engine on ESPHome

* Notification page bigger hotspot

Added hotspots around the buttons (Accept & Clear) on Notification page to make easier to click on those.

Solves #907

* Boot page retry comm

The boot page will retry communication with the blueprint once a minute to avoid the situation where that page is shown until the automation is reloaded.

* Fix call to screen page

Fixes the call to screen page on US panel.
Reconciliate the US landscape model from EU model.

* Fix fan page `button_on`

Fixing rounding on that button.

* Fixed Fan page rounding

* Prevents boot sequence in other pages

* Physical relay local control

We are trying to make your panel as autonomous as possible by moving some of the controls from the Blueprint to ESPHome. This will reduce the load in your network and Home Assistant, but also will make a more reliable system capable to do it's core functionality even when the network is unavailable or Home Assistant is restarting.
With this version, the following engines have been moved to your panel (local control):
- Physical relay control (when hardware left button is connected to relay 1 or right button to relay 2)

Solves #910

* Embedded climate (#917)

* Performance improvements

The main focus here was to reduce the number of calls between Home Assistant and ESPHome, moving logic as much as possible to TFT and ESPHome.
- Service calls moved to ESPHome (in preparation for Alarm Control Panel)
- Page change informed via event call instead of `nspanel_event` sensor (which still in use by other calls, but might be possible to remove in the future)

* Draft embedded climate

This adds an initial version of an embedded climate/thermostat (heating only for now) with support for local control even with Wi-Fi out.

Solves #646
Solves #263

* Update ReleaseNotes.md

* Fix climate slider

Fix for climate slider opening in an incorrect position and sending only the integer part of the new target temperature

* Moving home page to ESPHome

In progress...

* Fix translations - Dutch

* Embedded chip 3

Home page - Chip 3 will be controlled locally when embedded climate is enable.

* Fixed buttons bar

Fixed buttons bar managed on ESPHome when embedded climate is visible.

* Update ReleaseNotes.md

* Services back to the Blueprint

Moving service calls back to the blueprint as latest HA requires user's permissions to call HA services from ESPHome.
This still have to be used for Alarm calls due to security concerns.

* Update ReleaseNotes.md

* support to hidden ssid (#908)

Supports hidden ssid with the use of substitutions `wifi_hidden: "true"`.

This can be breaking change for users with custom/advanced wifi settings.

Solves #906

* Update nspanel_esphome.yaml

* Removed `restore_state`

There is some incomplete work related to alarms on this commit, but the focus here is to fix `restore_state` on ESPHome v2023.7.0.

This solves #939

* US model - Fan page - Redistribute icons

Redistributed icons on Fan page on US model in order to improve usability.

Based on feedback from #791 (reply in thread)

* Align `nspanel_us_land`

Apply all changes from EU to US_Land

* Fix relays chips

Fix relay status indication on chips.

Solves #926 (comment)

* Fix "invalid variable" for "api"

Fix error "Nextion invalid variable name" when setting `api`.

* Default embedded climate to relay_0

* Fix translations - Italian

Based on #940 (comment)

* Fix `set_temperature` for climate

Solves #957

* Fix `fan.turn_off` call

Removed timer call from fan stop button.
This solves #791 (reply in thread)

* Call a `fan.turn_off` when percentage is 0%

Solves #791 (reply in thread)

* Fix call for fan stop button

Solves #791 (reply in thread)

* Icons on ESPHome

Move icons from TFT/HMI to ESPHome to prevent error on Nextion2Text.

* Updated translations - Spanish

Based on #940 (comment)

* Make home page sensor's icons consistent

Make icon selection consistent with chips where the entity's icon is used in case a icon is not set in the blueprint settings.

Solves #963

* Updated translations - Slovenian

Based on:
- #940 (comment)
-  #829 (comment)

* dutch (#974)

* small ducht translations

small ducht translations

* Dutch translations

---------

Co-authored-by: Edward Firmo <[email protected]>

* Add-on support (#977)

Moved climate settings to an add-on.
Updated documentation.

* Fixed link to addon climate docs

* Fix change brightness when sleeping

Prevents the panel to change screen brightness when sleeping.

Solves #975

* Standardize HA service calls

* Bump version to `4.0 dev`

* Create customization.md

This will reduce the need for:
- #920
- #662
- #833

* Clean-up for customizations

Clean up ESPHome in order to make easier the use of customizations.

* Create Alarm page

* Add page Alarm

* Add Alarm docs

Update docs to reflect the current state (new features & changes)

* Creating "install.md" and update add-ons instructions

* Add Alarm page buttons pics

* Add link to Alarm on page Home

* Create Alarm page

* Alarm button font color

* Add `keyb_num` page

* Alarm Control Panel with PIN (#982)

Implements an Alarm Control Panel page on NSPanel.

Solves #66
Solves #227
Solves #672
Partially solves #299 (comment)
Partially solves #64 (comment)
Partially solves #718

* Fix alarm without pin not working

Solves #930 (comment)

* Alarm page UI

Fixed close button
Disabled buttons are darker

* Move Entities button to ESPHome

Move logic behind Entities button (Home page) from Blueprint to ESPHome in order to gain performance on creating home page.

* Human readable Uptime (#986)

* Human readable Uptime

* Uptime from Frenck code

* Uptime with Frenck code

* Updated Human Readable Uptime

* Removed trailing spaces

* Renamed sensor to "Last started"

Sensor renamed
Update moved to the boot process
Clean-up

---------

Co-authored-by: Edward Firmo <[email protected]>
Co-authored-by: Edward Firmo <[email protected]>

* Update alarm icon & color

* Revert `fast_connect` back to `false`

* Extended chars on buttons pages (#988)

Replaces #740
Probably solves #664
Probably solves #738
Probably solves #987

* Removed `fast_connect`

* Support to `code_arm_required`

Only shows the alarm PIN keyboard if a code is required for arming (or when disarming).

* Update alarm icon on home page

Refresh icon when alarm state changes.

* Fix alarm icon not updating on home page

* Home buttons new format - Alarm

Modernise the button Alarm flow on page Home to improve performance.

* Home buttons new format - Entities

Modernise the button "Entities" flow on page Home to improve performance.

* Home buttons new format - QRcode

Modernise the button "QRcode" flow on page Home to improve performance.

* Home buttons new format - Notification

Modernise the button "Notification" flow on page Home to improve performance.

I haven't moved the code from the Blueprint to ESPHome yet, as I will leave this for when we rebuild the Notification flow in the near future (hopefully), so the performance gains may not be perceived now. Just aligning with other buttons format.

* Adding screenshots

* Delete ReleaseNotes.md

Moved to the release

* New entity filter format

This new format was released with HA v2023.4 and the old one will be deprecated soon.

* Fix Alarm page bypass icon

* Bump version to 4.0

* Rename `addon_climate_heat`

* Simplify climate substitutions

* Add support for `addon_climate_cool`

* Removed `${verbose_log}`

Use logger level `VERBOSE` instead

* Fix script call

* Clean up general entities & fallback

Store inputs into variables only when needed.
Removed fallback mode - Replaced by ESPHome local control when the relay is assigned to the button in the blueprint.

* Phase out sensor `nspanel_event` (partially)

This sensor is being replaced by event calls.

* uptime sensors (#998)

* Create ReleaseNotes.md

* Fix Climate page when embedded climate

And also added a lot of logs which should be removed later as it takes from memory.

Solves #995 (reply in thread)

* Move brightness control to global var

Clean up page Home

* Alarm page translations - Finnish

#940 (comment)

* Exported pics

* Clean-up TFT

- Removed a bunch of unused pics
- Changed page indicator to new format (which will allow future development to hide unused pages)
- Standardized close button in most pages

* Fixed background pics

- Entities pages
- Weather pages

* Standardize close button

* Add "Alarm" section

* Support to wake-up page on `wake_up_display` service

This changes the behavior of a service introduced by #734.

* Optimize `wake_up_display` service

* Fix icon font sizes 10 and 64

Solves #960 (comment)

And also remove all the unnecessary `wait_until`

* Fix Settings page element ids

Partially solves #960 (comment)

* Add translation keys for `settings` page

#1002

* Update settings page when brightness changes on HA

Solves #960 (comment)

* Clean-up page settings

* update docs (#1003)

* updated docs

* Update ReleaseNotes.md

---------

Co-authored-by: Edward Firmo <[email protected]>

* Clean-up Cover page

I'm preparing this page to have icons changing based on the device_class selected to a cover.

* Clean-up boot delay

* Enable `current_page` sensor by default

Otherwise the system won´t update values unless the page is reloaded.

* Use `current_page` in blueprint conditions

One more step towards the phase out of `nspanelevent`.

* Move `script.refresh_colors` to `service.global_settings`

As this is called from a single point, there's no meaning of having a separated script.

* Fix climate icon update

Partially solves #995 (reply in thread)

* Fix button show on climate page

Solves #995 (reply in thread)

* Visual improvements on climate page

- Add friendly name when embedded - Solves #995 (reply in thread)
- Make disable icons a bit darker - Solves #995 (reply in thread)
- Add space for page title in EU an US Land versions
- Reset page timer when pressing/releasing on the slider - Partially solves #990

* Don't update values when page home is not visible

To reduce load on Home Assistant and the network

* Cleanup boot sequence

Move some functionalities to ESPHome

* Display internal sensor value when wifi is out

Before it was showing on home page only when API was out. This adds a test for WiFi.

* Fix `default_target_temperature`

It also updates the page home when thermostat status changes (for the chips).
Solves #995 (reply in thread)

* Adding ID to components missing it

* Renamed `wake_up_display` to `wake_up`

* Re-arrange commands list

* Add service `set_component_color`

Deprecates the following services:
- `send_command_font_color`
- `send_command_background_color`

* Fix button pages not showing

* Adjusted time for HW long click

* Fixed buttons on settings page

* Minor adjustments to page climate

And replace font 10 to size 48 (it was 64 since a few days ago).

* Updates to breaking changes list

* Page settings redesign

Clean up the UI of settings page.
Prepare for translations.

* Enable translations of Settings page

* Notification word-wrap

For EU and US_LAND only, for now.

* Notifications page rebuilt

- Notification button processed on ESPHome (as all the info is there)
- Added word-wrap for main text
- Expanded text size
- Handling display mode (used to define the number of chars per line on Notifications)
- Versioning handling - As a consequence of the previous item.

* Word-wrap buttons pages

Taking advantage of the algorithm created for notifications.

* Word-wrap for Alarm page

* Version mismatch notication

* Fix ESPHome not starting with older TFT

* Rebuilt home page status bar update

* Updated translations - Italian

Based on #1002 (comment)

Thanks @MaiPiu

* Fix `Nextion reported variable name invalid!`

* Fix `Nextion variable invalid`

* Handle `embedded_indoor_temperature`

Internal temperature display will be handled locally (ESPHome) when no other sensor is selected.

* Review temperature correction engine

* Fix display climate chip

* update `temp_nspanel` when correction changes

* Fix `Fan` page not open with long press HW button

Solves #1007

* Minor adjustments on settings page

* version 4.0 ready for release

* Clean-up docs

---------

Co-authored-by: bkbartk <[email protected]>
Co-authored-by: w00zy <[email protected]>

* Fix Fan page button colors when opening

Solves #1017

* Translations (#1023)

* Translations

* Update nspanel_blueprint.yaml

I've changed `brightness` for now as the new design isn't implemented yet, but that string is already in use with the current design.

---------

Co-authored-by: Edward Firmo <[email protected]>

* Adjustments to settings page

* Fix entity info when calling detailed pages

Solves #1022

* Added `media_player` page (hidden)

* New "Confirm" pop-up

This also removes the sensor "NSPanel Event"

* Fix pages not updating values

Solves #1026

* Media player - Buttons

- Added code to buttons on media_player page.
- Clean-up:
  - Moved wake-up select from Blueprint to ESPHome component
  - Removed `switch.xxxxx_confirmation_message`

* Fix logging for global_settings

It was logging wakeup_page, which is deprecated

* Improved version notification

* Removed trailing spaces

* Notification for `sensor.xxxxx_current_page` missing

This might be a common issue for users migrating from v3.4 to v3.5.
This information is part of the release notes, but I believe it worth having a guide to support closely any user who miss that in the release notes.

* Simplify `touchevent` engine

The touch event is used only for the sleeping engine (it will be used for dimming later) and it was transferring all the json info with page name, component, entity, etc.
This was replaced by a simple random integer with no meaning other than "the screen was touched, reset the timer".

* Media player first buttons actions

* Fix unknown service: `media_player.null`

* Media Player control

You will be able to add a Media Player entity to any of the buttons pages and with a long press you will see the media player page.

* Remove dimming timer for now

The funcionality isn't completed.

* Home page - Custom buttons

On the blueprint you can now set up to 3 buttons to be shown on Home page.
It will show the detailed settings page, so the entity must be compatible.

* Fix Media player missing parameters

Possibly solves #1030 (comment)

* Prevents calls to `media_player.null`

* Remove `entity` info from pages on TFT

Since v3.4, the info about entity_id shown was going all the way to Nextion and then sent back in the json return, however this requires a long (100-char) global var and the way it was implemented, it was one of those per settings page, as climate should be also recorded at the same time in case the embedded climate was installed.
This was taking too much memory, so I've moved this info to a global variable (string) in ESPHome.
There is now lots of space for code cleaning (and still pending to do the same with climate entity, as it could be only a bool to inform if embedded), but this brings the functionality.

This enabled the return to global for some components, so it probably solves #1031

* Prototyping `power` page

Thanks @Floppe for doing the design
#838

* Prototyping `power` page

* New sleep flow

* Removed trailing spaces

* Fix empty page climate

* Fix names on button pages

Fix names when a name is not provided in the blueprint settings.

* Fix call to sleep routine when timeout changes

Solves #1037

* Replace `confirm` var on buttons pages

Simpler and saves some memory.

* Clean-up

* Align the code for the 3 timers

* Extend domains supported by home page custom buttons

Based on #1034

* Fix error when btn_label is `None`

* Fix `Variable invalid` on buttons pages

* Fix constructor of Entity pages

* Fallback even when button is assigned to another entity

Solves #1013 (comment)

* Add inputs for media player refresh time

* Adjustments to Media Player refresh interval default values

* Use panel's events to reset timers

Possibly solves #1040
Possibly solves #995 (reply in thread)

* State based colors to home page custom buttons

* Fix alarm not changing status

Do not clear `entity_id` when opening keyboard page, so the info can be used when sending commands.

Solves #1039

* Missing `nspanel_us.tft`

* add `touchevents` to pages `media_player` and `confirm`

To avoid panel going back to Home page while user is playing with the page.
Solves #1040

* Media player minor layout changes

* Media player - Volume timer & icon size

Volume timer changed from 1000 to 500ms
Icon change from font 9 to 10

* Media player roll back font 9 and timer 1s

* Don't send to Nextion obsolete volume settings

If the volume is the same as the last one sent to the screen, don't send again, so if changes are being made on the screen it didn't receive the update all the time, making the slider unresponsive.

* Media player - Layout improvement

- Removed button "Stop"
- Increase touch area for buttons
- Redistributed buttons on page

* Add touchevents to page climate

Possibly solves #995

* Resolve validation

* Correct playing time based on `updated_at` attribute

* Prepare for when attribute is not available

* Fix attribute `media_position`

* Fix time duration when HA isn't updating position

* Fix climate page not opening when offline

Solves #995 (reply in thread)

* Clean-up release notes

* Clean up code

- Removed commented out lines
- Removed temporary logs

Getting prepared to release

---------

Co-authored-by: bkbartk <[email protected]>
Co-authored-by: w00zy <[email protected]>
Co-authored-by: w00zy <[email protected]>
edwardtfn added a commit that referenced this issue Sep 18, 2023
* Create ReleaseNotes.md (#879)

* Create ReleaseNotes.md

* sensor display precision

* Filter devices to esp32 only (#881)

* Filter devices to esp32 only

Show only ESP32 devices when selecting the panel

* Filtered device list

* Sensor display precision (#880)

Now the values shown in your panel will follow the [sensor display precision](https://www.home-assistant.io/blog/2023/03/01/release-20233/#sensor-display-precision) provided by Home Assistant.
=> If you have problems with a value exceeding the available space in your panel, please reduce the number of decimals using Home Assistant [sensor display precision](https://www.home-assistant.io/blog/2023/03/01/release-20233/#sensor-display-precision).

* New language selector (#882)

* New language selector

* Update ReleaseNotes.md

* Update ReleaseNotes.md

* Remove `settings_entity` (#887)

* Remove `settings_entity`

- Bump version to 3.5_dev
- Removed references to pictures removed from TFT
- Removed code related to closing settings pages
- Removed trigger `settings_entity`

* Removed `set_settings_entity` service

- Bump version to 3.5_dev
- Removed `set_settings_entity` service - BREAKING CHANGE
- Removed `settings_entity` text-sensor - BREAKING CHANGE
- Added service `open_entity_settings_page` - BREAKING CHANGE

* Removed `settings_entity`

- Bump version to 3.5_dev
- Removed old climate page (climate_backup)
- Removed pics related to old climate page (ids 16-47, 80-83, 95-96 and 125(US only))
- Enforces brightness on any page change (this allows wake-up on settings page with long press on physical buttons) - Pending removing code from Blueprint
- Added `entity` variable on pages `climate`, `lightsettings` and `coversettings`
- Added `entity` info to `nspanelevent` on pages `climate`, `lightsettings` and `coversettings`
- Added `back_page` variable on pages `climate`, `lightsettings` and `coversettings` (default: home)
- Moving to TFT close page logic on pages `climate`, `lightsettings` and `coversettings` - Pending changes on Blueprint and ESPHome
- Standardized name for `page_label` on pages `climate`, `lightsettings` and `coversettings`
- Standardized settings page names: `climate`, `cover` and `light` (Removed `settings` from page name)

* Removed `settings_entity`

* Removed `settings_entity`

* Removed `settings_entity`

* Move `entity` variable to home page (#889)

* Move `entity` variable to home page

This will enable future development of a fallback climate

* Move `entity` variable to home page

* Move `entity` variable to home page

* Move `entity` variable to home page

* Move `entity` variable to home page

* Use `en` as fallback language (#891)

* Use `en` as fallback language

Uses English if a non valid language is selected (like when using legacy language selection).

* Use `en` as fallback language

* Create `nspanel_us_land.tft` (#890)

* Create `nspanel_us_land.tft'

Add `nspanel_us_land.tft' for US panel on landscape mode, fixing the offset on the touch screen when using `nspanel_eu.tft` into a US panel.
Hides the hardware buttons labels, as Nextion cannot support rotated text.

* Created `nspanel_us_land.tft`

* Created `nspanel_us_land.tft`

solves #390
solves #432
solves #299 (comment)

* Created `nspanel_us_land.tft`

* Created `nspanel_us_land.tft`

* Fix "Button confirmation page not working correctly"

Solves #883

* Supports weather forecast with `datetime` not string

This adds support to weather integrations where the `datetime` field under `forecast` attribute is provided as a `datetime` type.
This was seen on Météo-France, while all other weather integrations tested so far used a `text` field for `datetime`.

This solves #893

* Wifi icon to indicate when API offline

This changes the behavior of Wifi icon:

How it was before:
- Wifi icon was visible only when the wifi was connected, nothing was shown when wifi was not connected.

How it is now:
- Wifi icon will have 3 states:
 - Wifi & API connected: Gray wifi icon
 - Wifi disconnected: Red wifi-off icon
 - Wifi connected, but API disconnected (HA is out?): Red api-off icon

* API status indication on the panel

* Limit light & cover to supported settings (#896)

* Limit light to supported settings

When showing light settings, only the supported features will be shown for each light.

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

This partially solves #635

* Limits covers to supported settings

Only show cover settings when `set_position` is supported.

This solves #635

* Limits covers to supported settings

* Update instructions.md

* Add Fan speed settings page (#897)

* Add Fan speed settings page

Add an initial fan speed control page for fans supporting speed control.
Add speed (%) info in the buttons pages.

Solves #404 
Solves #791 
Solves #718 (comment)

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Fix name on confirmation page

Fix the entity name on the confirmation page.

The new order is:
1. Name set on the blueprint settings
2. Entity's `friendly_name` attribute
3. Entity's `name` attribute
4. Entity's `entity_id`

Solves #501

* Select wake-up page (#898)

* Select wake-up page

Users will be able to select the wake-up page on the blueprint inputs.
This selected page will be shown after a boot (after the boot page) and with a touch in the screen when on screen saver page.
After showing this wake-up page, all the previous behavior for closing the page (with a click or after a timeout) will be the same.

Solves #576 
Solves #612 
Solves #801 
Probably improves for #718 (comment)

* Select wake-up page

* Fan update engine

Change the fan update engine to follow the same patter as other settings pages.

* Update ReleaseNotes.md

* Adding vertical bars pics

* Panel offline mode (#900)

* Panel offline mode

Introduces "offline mode" for the panel, which will be used later with a fallback climate.

Pages that are depending on the blueprint (buttons pages, entity pages, settings pages, etc) won't be shown when the API is disconnected.

* Panel offline mode

* Panel offline mode

* Panel offline mode

* Panel offline mode

* "Jump to settings" on tft

Moved "Jump to settings page" routine from ESPHome to TFT in order to reduce complexity.

* Exclude Nextion2Text

Exclude Nextion2Text

* Fix validation issue

* Time engine on ESPHome

* Time engine on ESPHome

* Notification page bigger hotspot

Added hotspots around the buttons (Accept & Clear) on Notification page to make easier to click on those.

Solves #907

* Boot page retry comm

The boot page will retry communication with the blueprint once a minute to avoid the situation where that page is shown until the automation is reloaded.

* Fix call to screen page

Fixes the call to screen page on US panel.
Reconciliate the US landscape model from EU model.

* Fix fan page `button_on`

Fixing rounding on that button.

* Fixed Fan page rounding

* Prevents boot sequence in other pages

* Physical relay local control

We are trying to make your panel as autonomous as possible by moving some of the controls from the Blueprint to ESPHome. This will reduce the load in your network and Home Assistant, but also will make a more reliable system capable to do it's core functionality even when the network is unavailable or Home Assistant is restarting.
With this version, the following engines have been moved to your panel (local control):
- Physical relay control (when hardware left button is connected to relay 1 or right button to relay 2)

Solves #910

* Embedded climate (#917)

* Performance improvements

The main focus here was to reduce the number of calls between Home Assistant and ESPHome, moving logic as much as possible to TFT and ESPHome.
- Service calls moved to ESPHome (in preparation for Alarm Control Panel)
- Page change informed via event call instead of `nspanel_event` sensor (which still in use by other calls, but might be possible to remove in the future)

* Draft embedded climate

This adds an initial version of an embedded climate/thermostat (heating only for now) with support for local control even with Wi-Fi out.

Solves #646
Solves #263

* Update ReleaseNotes.md

* Fix climate slider

Fix for climate slider opening in an incorrect position and sending only the integer part of the new target temperature

* Moving home page to ESPHome

In progress...

* Fix translations - Dutch

* Embedded chip 3

Home page - Chip 3 will be controlled locally when embedded climate is enable.

* Fixed buttons bar

Fixed buttons bar managed on ESPHome when embedded climate is visible.

* Update ReleaseNotes.md

* Services back to the Blueprint

Moving service calls back to the blueprint as latest HA requires user's permissions to call HA services from ESPHome.
This still have to be used for Alarm calls due to security concerns.

* Update ReleaseNotes.md

* support to hidden ssid (#908)

Supports hidden ssid with the use of substitutions `wifi_hidden: "true"`.

This can be breaking change for users with custom/advanced wifi settings.

Solves #906

* Update nspanel_esphome.yaml

* Removed `restore_state`

There is some incomplete work related to alarms on this commit, but the focus here is to fix `restore_state` on ESPHome v2023.7.0.

This solves #939

* US model - Fan page - Redistribute icons

Redistributed icons on Fan page on US model in order to improve usability.

Based on feedback from #791 (reply in thread)

* Align `nspanel_us_land`

Apply all changes from EU to US_Land

* Fix relays chips

Fix relay status indication on chips.

Solves #926 (comment)

* Fix "invalid variable" for "api"

Fix error "Nextion invalid variable name" when setting `api`.

* Default embedded climate to relay_0

* Fix issue with `restore_state` and ESPHome v2023.7.0 (#941)

Solves #939

* Fix translations - Italian

Based on #940 (comment)

* Fix `set_temperature` for climate

Solves #957

* Fix `fan.turn_off` call

Removed timer call from fan stop button.
This solves #791 (reply in thread)

* Call a `fan.turn_off` when percentage is 0%

Solves #791 (reply in thread)

* Fix call for fan stop button

Solves #791 (reply in thread)

* Icons on ESPHome

Move icons from TFT/HMI to ESPHome to prevent error on Nextion2Text.

* Updated translations - Spanish

Based on #940 (comment)

* Make home page sensor's icons consistent

Make icon selection consistent with chips where the entity's icon is used in case a icon is not set in the blueprint settings.

Solves #963

* Updated translations - Slovenian

Based on:
- #940 (comment)
-  #829 (comment)

* dutch (#974)

* small ducht translations

small ducht translations

* Dutch translations

---------

Co-authored-by: Edward Firmo <[email protected]>

* Add-on support (#977)

Moved climate settings to an add-on.
Updated documentation.

* Fixed link to addon climate docs

* Fix change brightness when sleeping

Prevents the panel to change screen brightness when sleeping.

Solves #975

* Standardize HA service calls

* Bump version to `4.0 dev`

* Create customization.md

This will reduce the need for:
- #920
- #662
- #833

* Clean-up for customizations

Clean up ESPHome in order to make easier the use of customizations.

* Create Alarm page

* Add page Alarm

* Add Alarm docs

Update docs to reflect the current state (new features & changes)

* Creating "install.md" and update add-ons instructions

* Add Alarm page buttons pics

* Add link to Alarm on page Home

* Create Alarm page

* Alarm button font color

* Add `keyb_num` page

* Alarm Control Panel with PIN (#982)

Implements an Alarm Control Panel page on NSPanel.

Solves #66
Solves #227
Solves #672
Partially solves #299 (comment)
Partially solves #64 (comment)
Partially solves #718

* Fix alarm without pin not working

Solves #930 (comment)

* Alarm page UI

Fixed close button
Disabled buttons are darker

* Move Entities button to ESPHome

Move logic behind Entities button (Home page) from Blueprint to ESPHome in order to gain performance on creating home page.

* Human readable Uptime (#986)

* Human readable Uptime

* Uptime from Frenck code

* Uptime with Frenck code

* Updated Human Readable Uptime

* Removed trailing spaces

* Renamed sensor to "Last started"

Sensor renamed
Update moved to the boot process
Clean-up

---------

Co-authored-by: Edward Firmo <[email protected]>
Co-authored-by: Edward Firmo <[email protected]>

* Update alarm icon & color

* Revert `fast_connect` back to `false`

* Extended chars on buttons pages (#988)

Replaces #740
Probably solves #664
Probably solves #738
Probably solves #987

* Removed `fast_connect`

* Support to `code_arm_required`

Only shows the alarm PIN keyboard if a code is required for arming (or when disarming).

* Update alarm icon on home page

Refresh icon when alarm state changes.

* Fix alarm icon not updating on home page

* Home buttons new format - Alarm

Modernise the button Alarm flow on page Home to improve performance.

* Home buttons new format - Entities

Modernise the button "Entities" flow on page Home to improve performance.

* Home buttons new format - QRcode

Modernise the button "QRcode" flow on page Home to improve performance.

* Home buttons new format - Notification

Modernise the button "Notification" flow on page Home to improve performance.

I haven't moved the code from the Blueprint to ESPHome yet, as I will leave this for when we rebuild the Notification flow in the near future (hopefully), so the performance gains may not be perceived now. Just aligning with other buttons format.

* Adding screenshots

* Delete ReleaseNotes.md

Moved to the release

* New entity filter format

This new format was released with HA v2023.4 and the old one will be deprecated soon.

* Fix Alarm page bypass icon

* Bump version to 4.0

* Rename `addon_climate_heat`

* Simplify climate substitutions

* Add support for `addon_climate_cool`

* Removed `${verbose_log}`

Use logger level `VERBOSE` instead

* Fix script call

* Clean up general entities & fallback

Store inputs into variables only when needed.
Removed fallback mode - Replaced by ESPHome local control when the relay is assigned to the button in the blueprint.

* Phase out sensor `nspanel_event` (partially)

This sensor is being replaced by event calls.

* uptime sensors (#998)

* Create ReleaseNotes.md

* Fix Climate page when embedded climate

And also added a lot of logs which should be removed later as it takes from memory.

Solves #995 (reply in thread)

* Move brightness control to global var

Clean up page Home

* Alarm page translations - Finnish

#940 (comment)

* Exported pics

* Clean-up TFT

- Removed a bunch of unused pics
- Changed page indicator to new format (which will allow future development to hide unused pages)
- Standardized close button in most pages

* Fixed background pics

- Entities pages
- Weather pages

* Standardize close button

* Add "Alarm" section

* Support to wake-up page on `wake_up_display` service

This changes the behavior of a service introduced by #734.

* Optimize `wake_up_display` service

* Fix icon font sizes 10 and 64

Solves #960 (comment)

And also remove all the unnecessary `wait_until`

* Fix Settings page element ids

Partially solves #960 (comment)

* Add translation keys for `settings` page

#1002

* Update settings page when brightness changes on HA

Solves #960 (comment)

* Clean-up page settings

* update docs (#1003)

* updated docs

* Update ReleaseNotes.md

---------

Co-authored-by: Edward Firmo <[email protected]>

* Clean-up Cover page

I'm preparing this page to have icons changing based on the device_class selected to a cover.

* Clean-up boot delay

* Enable `current_page` sensor by default

Otherwise the system won´t update values unless the page is reloaded.

* Use `current_page` in blueprint conditions

One more step towards the phase out of `nspanelevent`.

* Move `script.refresh_colors` to `service.global_settings`

As this is called from a single point, there's no meaning of having a separated script.

* Fix climate icon update

Partially solves #995 (reply in thread)

* Fix button show on climate page

Solves #995 (reply in thread)

* Visual improvements on climate page

- Add friendly name when embedded - Solves #995 (reply in thread)
- Make disable icons a bit darker - Solves #995 (reply in thread)
- Add space for page title in EU an US Land versions
- Reset page timer when pressing/releasing on the slider - Partially solves #990

* Don't update values when page home is not visible

To reduce load on Home Assistant and the network

* Cleanup boot sequence

Move some functionalities to ESPHome

* Display internal sensor value when wifi is out

Before it was showing on home page only when API was out. This adds a test for WiFi.

* Fix `default_target_temperature`

It also updates the page home when thermostat status changes (for the chips).
Solves #995 (reply in thread)

* Adding ID to components missing it

* Renamed `wake_up_display` to `wake_up`

* Re-arrange commands list

* Add service `set_component_color`

Deprecates the following services:
- `send_command_font_color`
- `send_command_background_color`

* Fix button pages not showing

* Adjusted time for HW long click

* Fixed buttons on settings page

* Minor adjustments to page climate

And replace font 10 to size 48 (it was 64 since a few days ago).

* Updates to breaking changes list

* Page settings redesign

Clean up the UI of settings page.
Prepare for translations.

* Enable translations of Settings page

* Notification word-wrap

For EU and US_LAND only, for now.

* Notifications page rebuilt

- Notification button processed on ESPHome (as all the info is there)
- Added word-wrap for main text
- Expanded text size
- Handling display mode (used to define the number of chars per line on Notifications)
- Versioning handling - As a consequence of the previous item.

* Word-wrap buttons pages

Taking advantage of the algorithm created for notifications.

* Word-wrap for Alarm page

* Version mismatch notication

* Fix ESPHome not starting with older TFT

* Rebuilt home page status bar update

* Updated translations - Italian

Based on #1002 (comment)

Thanks @MaiPiu

* Fix `Nextion reported variable name invalid!`

* Fix `Nextion variable invalid`

* Handle `embedded_indoor_temperature`

Internal temperature display will be handled locally (ESPHome) when no other sensor is selected.

* Review temperature correction engine

* Fix display climate chip

* update `temp_nspanel` when correction changes

* Fix `Fan` page not open with long press HW button

Solves #1007

* Minor adjustments on settings page

* version 4.0 ready for release

* Clean-up docs

* Improve version notification

* Disable restore `notification_unread`

This must be changed to a binary sensor in the future.

* Beta v4.0 (#1012)

* Create ReleaseNotes.md (#879)

* Create ReleaseNotes.md

* sensor display precision

* Filter devices to esp32 only (#881)

* Filter devices to esp32 only

Show only ESP32 devices when selecting the panel

* Filtered device list

* Sensor display precision (#880)

Now the values shown in your panel will follow the [sensor display precision](https://www.home-assistant.io/blog/2023/03/01/release-20233/#sensor-display-precision) provided by Home Assistant.
=> If you have problems with a value exceeding the available space in your panel, please reduce the number of decimals using Home Assistant [sensor display precision](https://www.home-assistant.io/blog/2023/03/01/release-20233/#sensor-display-precision).

* New language selector (#882)

* New language selector

* Update ReleaseNotes.md

* Update ReleaseNotes.md

* Remove `settings_entity` (#887)

* Remove `settings_entity`

- Bump version to 3.5_dev
- Removed references to pictures removed from TFT
- Removed code related to closing settings pages
- Removed trigger `settings_entity`

* Removed `set_settings_entity` service

- Bump version to 3.5_dev
- Removed `set_settings_entity` service - BREAKING CHANGE
- Removed `settings_entity` text-sensor - BREAKING CHANGE
- Added service `open_entity_settings_page` - BREAKING CHANGE

* Removed `settings_entity`

- Bump version to 3.5_dev
- Removed old climate page (climate_backup)
- Removed pics related to old climate page (ids 16-47, 80-83, 95-96 and 125(US only))
- Enforces brightness on any page change (this allows wake-up on settings page with long press on physical buttons) - Pending removing code from Blueprint
- Added `entity` variable on pages `climate`, `lightsettings` and `coversettings`
- Added `entity` info to `nspanelevent` on pages `climate`, `lightsettings` and `coversettings`
- Added `back_page` variable on pages `climate`, `lightsettings` and `coversettings` (default: home)
- Moving to TFT close page logic on pages `climate`, `lightsettings` and `coversettings` - Pending changes on Blueprint and ESPHome
- Standardized name for `page_label` on pages `climate`, `lightsettings` and `coversettings`
- Standardized settings page names: `climate`, `cover` and `light` (Removed `settings` from page name)

* Removed `settings_entity`

* Removed `settings_entity`

* Removed `settings_entity`

* Move `entity` variable to home page (#889)

* Move `entity` variable to home page

This will enable future development of a fallback climate

* Move `entity` variable to home page

* Move `entity` variable to home page

* Move `entity` variable to home page

* Move `entity` variable to home page

* Use `en` as fallback language (#891)

* Use `en` as fallback language

Uses English if a non valid language is selected (like when using legacy language selection).

* Use `en` as fallback language

* Create `nspanel_us_land.tft` (#890)

* Create `nspanel_us_land.tft'

Add `nspanel_us_land.tft' for US panel on landscape mode, fixing the offset on the touch screen when using `nspanel_eu.tft` into a US panel.
Hides the hardware buttons labels, as Nextion cannot support rotated text.

* Created `nspanel_us_land.tft`

* Created `nspanel_us_land.tft`

solves #390
solves #432
solves #299 (comment)

* Created `nspanel_us_land.tft`

* Created `nspanel_us_land.tft`

* Fix "Button confirmation page not working correctly"

Solves #883

* Supports weather forecast with `datetime` not string

This adds support to weather integrations where the `datetime` field under `forecast` attribute is provided as a `datetime` type.
This was seen on Météo-France, while all other weather integrations tested so far used a `text` field for `datetime`.

This solves #893

* Wifi icon to indicate when API offline

This changes the behavior of Wifi icon:

How it was before:
- Wifi icon was visible only when the wifi was connected, nothing was shown when wifi was not connected.

How it is now:
- Wifi icon will have 3 states:
 - Wifi & API connected: Gray wifi icon
 - Wifi disconnected: Red wifi-off icon
 - Wifi connected, but API disconnected (HA is out?): Red api-off icon

* API status indication on the panel

* Limit light & cover to supported settings (#896)

* Limit light to supported settings

When showing light settings, only the supported features will be shown for each light.

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

This partially solves #635

* Limits covers to supported settings

Only show cover settings when `set_position` is supported.

This solves #635

* Limits covers to supported settings

* Update instructions.md

* Add Fan speed settings page (#897)

* Add Fan speed settings page

Add an initial fan speed control page for fans supporting speed control.
Add speed (%) info in the buttons pages.

Solves #404 
Solves #791 
Solves #718 (comment)

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Fix name on confirmation page

Fix the entity name on the confirmation page.

The new order is:
1. Name set on the blueprint settings
2. Entity's `friendly_name` attribute
3. Entity's `name` attribute
4. Entity's `entity_id`

Solves #501

* Select wake-up page (#898)

* Select wake-up page

Users will be able to select the wake-up page on the blueprint inputs.
This selected page will be shown after a boot (after the boot page) and with a touch in the screen when on screen saver page.
After showing this wake-up page, all the previous behavior for closing the page (with a click or after a timeout) will be the same.

Solves #576 
Solves #612 
Solves #801 
Probably improves for #718 (comment)

* Select wake-up page

* Fan update engine

Change the fan update engine to follow the same patter as other settings pages.

* Update ReleaseNotes.md

* Adding vertical bars pics

* Panel offline mode (#900)

* Panel offline mode

Introduces "offline mode" for the panel, which will be used later with a fallback climate.

Pages that are depending on the blueprint (buttons pages, entity pages, settings pages, etc) won't be shown when the API is disconnected.

* Panel offline mode

* Panel offline mode

* Panel offline mode

* Panel offline mode

* "Jump to settings" on tft

Moved "Jump to settings page" routine from ESPHome to TFT in order to reduce complexity.

* Exclude Nextion2Text

Exclude Nextion2Text

* Fix validation issue

* Time engine on ESPHome

* Time engine on ESPHome

* Notification page bigger hotspot

Added hotspots around the buttons (Accept & Clear) on Notification page to make easier to click on those.

Solves #907

* Boot page retry comm

The boot page will retry communication with the blueprint once a minute to avoid the situation where that page is shown until the automation is reloaded.

* Fix call to screen page

Fixes the call to screen page on US panel.
Reconciliate the US landscape model from EU model.

* Fix fan page `button_on`

Fixing rounding on that button.

* Fixed Fan page rounding

* Prevents boot sequence in other pages

* Physical relay local control

We are trying to make your panel as autonomous as possible by moving some of the controls from the Blueprint to ESPHome. This will reduce the load in your network and Home Assistant, but also will make a more reliable system capable to do it's core functionality even when the network is unavailable or Home Assistant is restarting.
With this version, the following engines have been moved to your panel (local control):
- Physical relay control (when hardware left button is connected to relay 1 or right button to relay 2)

Solves #910

* Embedded climate (#917)

* Performance improvements

The main focus here was to reduce the number of calls between Home Assistant and ESPHome, moving logic as much as possible to TFT and ESPHome.
- Service calls moved to ESPHome (in preparation for Alarm Control Panel)
- Page change informed via event call instead of `nspanel_event` sensor (which still in use by other calls, but might be possible to remove in the future)

* Draft embedded climate

This adds an initial version of an embedded climate/thermostat (heating only for now) with support for local control even with Wi-Fi out.

Solves #646
Solves #263

* Update ReleaseNotes.md

* Fix climate slider

Fix for climate slider opening in an incorrect position and sending only the integer part of the new target temperature

* Moving home page to ESPHome

In progress...

* Fix translations - Dutch

* Embedded chip 3

Home page - Chip 3 will be controlled locally when embedded climate is enable.

* Fixed buttons bar

Fixed buttons bar managed on ESPHome when embedded climate is visible.

* Update ReleaseNotes.md

* Services back to the Blueprint

Moving service calls back to the blueprint as latest HA requires user's permissions to call HA services from ESPHome.
This still have to be used for Alarm calls due to security concerns.

* Update ReleaseNotes.md

* support to hidden ssid (#908)

Supports hidden ssid with the use of substitutions `wifi_hidden: "true"`.

This can be breaking change for users with custom/advanced wifi settings.

Solves #906

* Update nspanel_esphome.yaml

* Removed `restore_state`

There is some incomplete work related to alarms on this commit, but the focus here is to fix `restore_state` on ESPHome v2023.7.0.

This solves #939

* US model - Fan page - Redistribute icons

Redistributed icons on Fan page on US model in order to improve usability.

Based on feedback from #791 (reply in thread)

* Align `nspanel_us_land`

Apply all changes from EU to US_Land

* Fix relays chips

Fix relay status indication on chips.

Solves #926 (comment)

* Fix "invalid variable" for "api"

Fix error "Nextion invalid variable name" when setting `api`.

* Default embedded climate to relay_0

* Fix translations - Italian

Based on #940 (comment)

* Fix `set_temperature` for climate

Solves #957

* Fix `fan.turn_off` call

Removed timer call from fan stop button.
This solves #791 (reply in thread)

* Call a `fan.turn_off` when percentage is 0%

Solves #791 (reply in thread)

* Fix call for fan stop button

Solves #791 (reply in thread)

* Icons on ESPHome

Move icons from TFT/HMI to ESPHome to prevent error on Nextion2Text.

* Updated translations - Spanish

Based on #940 (comment)

* Make home page sensor's icons consistent

Make icon selection consistent with chips where the entity's icon is used in case a icon is not set in the blueprint settings.

Solves #963

* Updated translations - Slovenian

Based on:
- #940 (comment)
-  #829 (comment)

* dutch (#974)

* small ducht translations

small ducht translations

* Dutch translations

---------

Co-authored-by: Edward Firmo <[email protected]>

* Add-on support (#977)

Moved climate settings to an add-on.
Updated documentation.

* Fixed link to addon climate docs

* Fix change brightness when sleeping

Prevents the panel to change screen brightness when sleeping.

Solves #975

* Standardize HA service calls

* Bump version to `4.0 dev`

* Create customization.md

This will reduce the need for:
- #920
- #662
- #833

* Clean-up for customizations

Clean up ESPHome in order to make easier the use of customizations.

* Create Alarm page

* Add page Alarm

* Add Alarm docs

Update docs to reflect the current state (new features & changes)

* Creating "install.md" and update add-ons instructions

* Add Alarm page buttons pics

* Add link to Alarm on page Home

* Create Alarm page

* Alarm button font color

* Add `keyb_num` page

* Alarm Control Panel with PIN (#982)

Implements an Alarm Control Panel page on NSPanel.

Solves #66
Solves #227
Solves #672
Partially solves #299 (comment)
Partially solves #64 (comment)
Partially solves #718

* Fix alarm without pin not working

Solves #930 (comment)

* Alarm page UI

Fixed close button
Disabled buttons are darker

* Move Entities button to ESPHome

Move logic behind Entities button (Home page) from Blueprint to ESPHome in order to gain performance on creating home page.

* Human readable Uptime (#986)

* Human readable Uptime

* Uptime from Frenck code

* Uptime with Frenck code

* Updated Human Readable Uptime

* Removed trailing spaces

* Renamed sensor to "Last started"

Sensor renamed
Update moved to the boot process
Clean-up

---------

Co-authored-by: Edward Firmo <[email protected]>
Co-authored-by: Edward Firmo <[email protected]>

* Update alarm icon & color

* Revert `fast_connect` back to `false`

* Extended chars on buttons pages (#988)

Replaces #740
Probably solves #664
Probably solves #738
Probably solves #987

* Removed `fast_connect`

* Support to `code_arm_required`

Only shows the alarm PIN keyboard if a code is required for arming (or when disarming).

* Update alarm icon on home page

Refresh icon when alarm state changes.

* Fix alarm icon not updating on home page

* Home buttons new format - Alarm

Modernise the button Alarm flow on page Home to improve performance.

* Home buttons new format - Entities

Modernise the button "Entities" flow on page Home to improve performance.

* Home buttons new format - QRcode

Modernise the button "QRcode" flow on page Home to improve performance.

* Home buttons new format - Notification

Modernise the button "Notification" flow on page Home to improve performance.

I haven't moved the code from the Blueprint to ESPHome yet, as I will leave this for when we rebuild the Notification flow in the near future (hopefully), so the performance gains may not be perceived now. Just aligning with other buttons format.

* Adding screenshots

* Delete ReleaseNotes.md

Moved to the release

* New entity filter format

This new format was released with HA v2023.4 and the old one will be deprecated soon.

* Fix Alarm page bypass icon

* Bump version to 4.0

* Rename `addon_climate_heat`

* Simplify climate substitutions

* Add support for `addon_climate_cool`

* Removed `${verbose_log}`

Use logger level `VERBOSE` instead

* Fix script call

* Clean up general entities & fallback

Store inputs into variables only when needed.
Removed fallback mode - Replaced by ESPHome local control when the relay is assigned to the button in the blueprint.

* Phase out sensor `nspanel_event` (partially)

This sensor is being replaced by event calls.

* uptime sensors (#998)

* Create ReleaseNotes.md

* Fix Climate page when embedded climate

And also added a lot of logs which should be removed later as it takes from memory.

Solves #995 (reply in thread)

* Move brightness control to global var

Clean up page Home

* Alarm page translations - Finnish

#940 (comment)

* Exported pics

* Clean-up TFT

- Removed a bunch of unused pics
- Changed page indicator to new format (which will allow future development to hide unused pages)
- Standardized close button in most pages

* Fixed background pics

- Entities pages
- Weather pages

* Standardize close button

* Add "Alarm" section

* Support to wake-up page on `wake_up_display` service

This changes the behavior of a service introduced by #734.

* Optimize `wake_up_display` service

* Fix icon font sizes 10 and 64

Solves #960 (comment)

And also remove all the unnecessary `wait_until`

* Fix Settings page element ids

Partially solves #960 (comment)

* Add translation keys for `settings` page

#1002

* Update settings page when brightness changes on HA

Solves #960 (comment)

* Clean-up page settings

* update docs (#1003)

* updated docs

* Update ReleaseNotes.md

---------

Co-authored-by: Edward Firmo <[email protected]>

* Clean-up Cover page

I'm preparing this page to have icons changing based on the device_class selected to a cover.

* Clean-up boot delay

* Enable `current_page` sensor by default

Otherwise the system won´t update values unless the page is reloaded.

* Use `current_page` in blueprint conditions

One more step towards the phase out of `nspanelevent`.

* Move `script.refresh_colors` to `service.global_settings`

As this is called from a single point, there's no meaning of having a separated script.

* Fix climate icon update

Partially solves #995 (reply in thread)

* Fix button show on climate page

Solves #995 (reply in thread)

* Visual improvements on climate page

- Add friendly name when embedded - Solves #995 (reply in thread)
- Make disable icons a bit darker - Solves #995 (reply in thread)
- Add space for page title in EU an US Land versions
- Reset page timer when pressing/releasing on the slider - Partially solves #990

* Don't update values when page home is not visible

To reduce load on Home Assistant and the network

* Cleanup boot sequence

Move some functionalities to ESPHome

* Display internal sensor value when wifi is out

Before it was showing on home page only when API was out. This adds a test for WiFi.

* Fix `default_target_temperature`

It also updates the page home when thermostat status changes (for the chips).
Solves #995 (reply in thread)

* Adding ID to components missing it

* Renamed `wake_up_display` to `wake_up`

* Re-arrange commands list

* Add service `set_component_color`

Deprecates the following services:
- `send_command_font_color`
- `send_command_background_color`

* Fix button pages not showing

* Adjusted time for HW long click

* Fixed buttons on settings page

* Minor adjustments to page climate

And replace font 10 to size 48 (it was 64 since a few days ago).

* Updates to breaking changes list

* Page settings redesign

Clean up the UI of settings page.
Prepare for translations.

* Enable translations of Settings page

* Notification word-wrap

For EU and US_LAND only, for now.

* Notifications page rebuilt

- Notification button processed on ESPHome (as all the info is there)
- Added word-wrap for main text
- Expanded text size
- Handling display mode (used to define the number of chars per line on Notifications)
- Versioning handling - As a consequence of the previous item.

* Word-wrap buttons pages

Taking advantage of the algorithm created for notifications.

* Word-wrap for Alarm page

* Version mismatch notication

* Fix ESPHome not starting with older TFT

* Rebuilt home page status bar update

* Updated translations - Italian

Based on #1002 (comment)

Thanks @MaiPiu

* Fix `Nextion reported variable name invalid!`

* Fix `Nextion variable invalid`

* Handle `embedded_indoor_temperature`

Internal temperature display will be handled locally (ESPHome) when no other sensor is selected.

* Review temperature correction engine

* Fix display climate chip

* update `temp_nspanel` when correction changes

* Fix `Fan` page not open with long press HW button

Solves #1007

* Minor adjustments on settings page

* version 4.0 ready for release

* Clean-up docs

---------

Co-authored-by: bkbartk <[email protected]>
Co-authored-by: w00zy <[email protected]>

* Fix Fan page button colors when opening

Solves #1017

* Translations (#1023)

* Translations

* Update nspanel_blueprint.yaml

I've changed `brightness` for now as the new design isn't implemented yet, but that string is already in use with the current design.

---------

Co-authored-by: Edward Firmo <[email protected]>

* Adjustments to settings page

* Fix entity info when calling detailed pages

Solves #1022

* Added `media_player` page (hidden)

* New "Confirm" pop-up

This also removes the sensor "NSPanel Event"

* Fix pages not updating values

Solves #1026

* Media player - Buttons

- Added code to buttons on media_player page.
- Clean-up:
  - Moved wake-up select from Blueprint to ESPHome component
  - Removed `switch.xxxxx_confirmation_message`

* Fix logging for global_settings

It was logging wakeup_page, which is deprecated

* Improved version notification

* Removed trailing spaces

* Notification for `sensor.xxxxx_current_page` missing

This might be a common issue for users migrating from v3.4 to v3.5.
This information is part of the release notes, but I believe it worth having a guide to support closely any user who miss that in the release notes.

* Simplify `touchevent` engine

The touch event is used only for the sleeping engine (it will be used for dimming later) and it was transferring all the json info with page name, component, entity, etc.
This was replaced by a simple random integer with no meaning other than "the screen was touched, reset the timer".

* Media player first buttons actions

* Fix unknown service: `media_player.null`

* Media Player control

You will be able to add a Media Player entity to any of the buttons pages and with a long press you will see the media player page.

* Remove dimming timer for now

The funcionality isn't completed.

* Home page - Custom buttons

On the blueprint you can now set up to 3 buttons to be shown on Home page.
It will show the detailed settings page, so the entity must be compatible.

* Fix Media player missing parameters

Possibly solves #1030 (comment)

* Prevents calls to `media_player.null`

* Remove `entity` info from pages on TFT

Since v3.4, the info about entity_id shown was going all the way to Nextion and then sent back in the json return, however this requires a long (100-char) global var and the way it was implemented, it was one of those per settings page, as climate should be also recorded at the same time in case the embedded climate was installed.
This was taking too much memory, so I've moved this info to a global variable (string) in ESPHome.
There is now lots of space for code cleaning (and still pending to do the same with climate entity, as it could be only a bool to inform if embedded), but this brings the functionality.

This enabled the return to global for some components, so it probably solves #1031

* Prototyping `power` page

Thanks @Floppe for doing the design
#838

* Prototyping `power` page

* New sleep flow

* Removed trailing spaces

* Fix empty page climate

* Fix names on button pages

Fix names when a name is not provided in the blueprint settings.

* Fix call to sleep routine when timeout changes

Solves #1037

* Replace `confirm` var on buttons pages

Simpler and saves some memory.

* Clean-up

* Align the code for the 3 timers

* Extend domains supported by home page custom buttons

Based on #1034

* Fix error when btn_label is `None`

* Fix `Variable invalid` on buttons pages

* Fix constructor of Entity pages

* Fallback even when button is assigned to another entity

Solves #1013 (comment)

* Add inputs for media player refresh time

* Adjustments to Media Player refresh interval default values

* Use panel's events to reset timers

Possibly solves #1040
Possibly solves #995 (reply in thread)

* State based colors to home page custom buttons

* Fix alarm not changing status

Do not clear `entity_id` when opening keyboard page, so the info can be used when sending commands.

Solves #1039

* Missing `nspanel_us.tft`

* add `touchevents` to pages `media_player` and `confirm`

To avoid panel going back to Home page while user is playing with the page.
Solves #1040

* Media player minor layout changes

* Media player - Volume timer & icon size

Volume timer changed from 1000 to 500ms
Icon change from font 9 to 10

* Media player roll back font 9 and timer 1s

* Don't send to Nextion obsolete volume settings

If the volume is the same as the last one sent to the screen, don't send again, so if changes are being made on the screen it didn't receive the update all the time, making the slider unresponsive.

* Media player - Layout improvement

- Removed button "Stop"
- Increase touch area for buttons
- Redistributed buttons on page

* Add touchevents to page climate

Possibly solves #995

* Resolve validation

* Correct playing time based on `updated_at` attribute

* Prepare for when attribute is not available

* Fix attribute `media_position`

* Fix time duration when HA isn't updating position

* Fix climate page not opening when offline

Solves #995 (reply in thread)

* Clean-up release notes

* Clean up code

- Removed commented out lines
- Removed temporary logs

Getting prepared to release

* Bump version to 4.0beta

To reduce the chance of an obsolete file in use after the release.

---------

Co-authored-by: bkbartk <[email protected]>
Co-authored-by: w00zy <[email protected]>
Co-authored-by: w00zy <[email protected]>
edwardtfn added a commit that referenced this issue Sep 20, 2023
* Create ReleaseNotes.md (#879)

* Create ReleaseNotes.md

* sensor display precision

* Filter devices to esp32 only (#881)

* Filter devices to esp32 only

Show only ESP32 devices when selecting the panel

* Filtered device list

* Sensor display precision (#880)

Now the values shown in your panel will follow the [sensor display precision](https://www.home-assistant.io/blog/2023/03/01/release-20233/#sensor-display-precision) provided by Home Assistant.
=> If you have problems with a value exceeding the available space in your panel, please reduce the number of decimals using Home Assistant [sensor display precision](https://www.home-assistant.io/blog/2023/03/01/release-20233/#sensor-display-precision).

* New language selector (#882)

* New language selector

* Update ReleaseNotes.md

* Update ReleaseNotes.md

* Remove `settings_entity` (#887)

* Remove `settings_entity`

- Bump version to 3.5_dev
- Removed references to pictures removed from TFT
- Removed code related to closing settings pages
- Removed trigger `settings_entity`

* Removed `set_settings_entity` service

- Bump version to 3.5_dev
- Removed `set_settings_entity` service - BREAKING CHANGE
- Removed `settings_entity` text-sensor - BREAKING CHANGE
- Added service `open_entity_settings_page` - BREAKING CHANGE

* Removed `settings_entity`

- Bump version to 3.5_dev
- Removed old climate page (climate_backup)
- Removed pics related to old climate page (ids 16-47, 80-83, 95-96 and 125(US only))
- Enforces brightness on any page change (this allows wake-up on settings page with long press on physical buttons) - Pending removing code from Blueprint
- Added `entity` variable on pages `climate`, `lightsettings` and `coversettings`
- Added `entity` info to `nspanelevent` on pages `climate`, `lightsettings` and `coversettings`
- Added `back_page` variable on pages `climate`, `lightsettings` and `coversettings` (default: home)
- Moving to TFT close page logic on pages `climate`, `lightsettings` and `coversettings` - Pending changes on Blueprint and ESPHome
- Standardized name for `page_label` on pages `climate`, `lightsettings` and `coversettings`
- Standardized settings page names: `climate`, `cover` and `light` (Removed `settings` from page name)

* Removed `settings_entity`

* Removed `settings_entity`

* Removed `settings_entity`

* Move `entity` variable to home page (#889)

* Move `entity` variable to home page

This will enable future development of a fallback climate

* Move `entity` variable to home page

* Move `entity` variable to home page

* Move `entity` variable to home page

* Move `entity` variable to home page

* Use `en` as fallback language (#891)

* Use `en` as fallback language

Uses English if a non valid language is selected (like when using legacy language selection).

* Use `en` as fallback language

* Create `nspanel_us_land.tft` (#890)

* Create `nspanel_us_land.tft'

Add `nspanel_us_land.tft' for US panel on landscape mode, fixing the offset on the touch screen when using `nspanel_eu.tft` into a US panel.
Hides the hardware buttons labels, as Nextion cannot support rotated text.

* Created `nspanel_us_land.tft`

* Created `nspanel_us_land.tft`

solves #390
solves #432
solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/299#discussioncomment-4933716

* Created `nspanel_us_land.tft`

* Created `nspanel_us_land.tft`

* Fix "Button confirmation page not working correctly"

Solves #883

* Supports weather forecast with `datetime` not string

This adds support to weather integrations where the `datetime` field under `forecast` attribute is provided as a `datetime` type.
This was seen on Météo-France, while all other weather integrations tested so far used a `text` field for `datetime`.

This solves #893

* Wifi icon to indicate when API offline

This changes the behavior of Wifi icon:

How it was before:
- Wifi icon was visible only when the wifi was connected, nothing was shown when wifi was not connected.

How it is now:
- Wifi icon will have 3 states:
 - Wifi & API connected: Gray wifi icon
 - Wifi disconnected: Red wifi-off icon
 - Wifi connected, but API disconnected (HA is out?): Red api-off icon

* API status indication on the panel

* Limit light & cover to supported settings (#896)

* Limit light to supported settings

When showing light settings, only the supported features will be shown for each light.

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

This partially solves #635

* Limits covers to supported settings

Only show cover settings when `set_position` is supported.

This solves #635

* Limits covers to supported settings

* Update instructions.md

* Add Fan speed settings page (#897)

* Add Fan speed settings page

Add an initial fan speed control page for fans supporting speed control.
Add speed (%) info in the buttons pages.

Solves #404 
Solves #791 
Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/718#discussioncomment-5786106

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Fix name on confirmation page

Fix the entity name on the confirmation page.

The new order is:
1. Name set on the blueprint settings
2. Entity's `friendly_name` attribute
3. Entity's `name` attribute
4. Entity's `entity_id`

Solves #501

* Select wake-up page (#898)

* Select wake-up page

Users will be able to select the wake-up page on the blueprint inputs.
This selected page will be shown after a boot (after the boot page) and with a touch in the screen when on screen saver page.
After showing this wake-up page, all the previous behavior for closing the page (with a click or after a timeout) will be the same.

Solves #576 
Solves #612 
Solves #801 
Probably improves for https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/718#discussioncomment-5715670

* Select wake-up page

* Fan update engine

Change the fan update engine to follow the same patter as other settings pages.

* Update ReleaseNotes.md

* Adding vertical bars pics

* Panel offline mode (#900)

* Panel offline mode

Introduces "offline mode" for the panel, which will be used later with a fallback climate.

Pages that are depending on the blueprint (buttons pages, entity pages, settings pages, etc) won't be shown when the API is disconnected.

* Panel offline mode

* Panel offline mode

* Panel offline mode

* Panel offline mode

* "Jump to settings" on tft

Moved "Jump to settings page" routine from ESPHome to TFT in order to reduce complexity.

* Exclude Nextion2Text

Exclude Nextion2Text

* Fix validation issue

* Time engine on ESPHome

* Time engine on ESPHome

* Notification page bigger hotspot

Added hotspots around the buttons (Accept & Clear) on Notification page to make easier to click on those.

Solves #907

* Boot page retry comm

The boot page will retry communication with the blueprint once a minute to avoid the situation where that page is shown until the automation is reloaded.

* Fix call to screen page

Fixes the call to screen page on US panel.
Reconciliate the US landscape model from EU model.

* Fix fan page `button_on`

Fixing rounding on that button.

* Fixed Fan page rounding

* Prevents boot sequence in other pages

* Physical relay local control

We are trying to make your panel as autonomous as possible by moving some of the controls from the Blueprint to ESPHome. This will reduce the load in your network and Home Assistant, but also will make a more reliable system capable to do it's core functionality even when the network is unavailable or Home Assistant is restarting.
With this version, the following engines have been moved to your panel (local control):
- Physical relay control (when hardware left button is connected to relay 1 or right button to relay 2)

Solves #910

* Embedded climate (#917)

* Performance improvements

The main focus here was to reduce the number of calls between Home Assistant and ESPHome, moving logic as much as possible to TFT and ESPHome.
- Service calls moved to ESPHome (in preparation for Alarm Control Panel)
- Page change informed via event call instead of `nspanel_event` sensor (which still in use by other calls, but might be possible to remove in the future)

* Draft embedded climate

This adds an initial version of an embedded climate/thermostat (heating only for now) with support for local control even with Wi-Fi out.

Solves #646
Solves #263

* Update ReleaseNotes.md

* Fix climate slider

Fix for climate slider opening in an incorrect position and sending only the integer part of the new target temperature

* Moving home page to ESPHome

In progress...

* Fix translations - Dutch

* Embedded chip 3

Home page - Chip 3 will be controlled locally when embedded climate is enable.

* Fixed buttons bar

Fixed buttons bar managed on ESPHome when embedded climate is visible.

* Update ReleaseNotes.md

* Services back to the Blueprint

Moving service calls back to the blueprint as latest HA requires user's permissions to call HA services from ESPHome.
This still have to be used for Alarm calls due to security concerns.

* Update ReleaseNotes.md

* support to hidden ssid (#908)

Supports hidden ssid with the use of substitutions `wifi_hidden: "true"`.

This can be breaking change for users with custom/advanced wifi settings.

Solves #906

* Update nspanel_esphome.yaml

* Removed `restore_state`

There is some incomplete work related to alarms on this commit, but the focus here is to fix `restore_state` on ESPHome v2023.7.0.

This solves #939

* US model - Fan page - Redistribute icons

Redistributed icons on Fan page on US model in order to improve usability.

Based on feedback from https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/791#discussioncomment-6338706

* Align `nspanel_us_land`

Apply all changes from EU to US_Land

* Fix relays chips

Fix relay status indication on chips.

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/926#issuecomment-1627660273

* Fix "invalid variable" for "api"

Fix error "Nextion invalid variable name" when setting `api`.

* Default embedded climate to relay_0

* Fix issue with `restore_state` and ESPHome v2023.7.0 (#941)

Solves #939

* Fix translations - Italian

Based on https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/940#discussioncomment-6511043

* Fix `set_temperature` for climate

Solves #957

* Fix `fan.turn_off` call

Removed timer call from fan stop button.
This solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/791#discussioncomment-6494535

* Call a `fan.turn_off` when percentage is 0%

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/791#discussioncomment-6621756

* Fix call for fan stop button

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/791#discussioncomment-6622377

* Icons on ESPHome

Move icons from TFT/HMI to ESPHome to prevent error on Nextion2Text.

* Updated translations - Spanish

Based on https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/940#discussioncomment-6548961

* Make home page sensor's icons consistent

Make icon selection consistent with chips where the entity's icon is used in case a icon is not set in the blueprint settings.

Solves #963

* Updated translations - Slovenian

Based on:
- https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/940#discussioncomment-6665723
-  https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/829#discussioncomment-6665751

* dutch (#974)

* small ducht translations

small ducht translations

* Dutch translations

---------

Co-authored-by: Edward Firmo <[email protected]>

* Add-on support (#977)

Moved climate settings to an add-on.
Updated documentation.

* Fixed link to addon climate docs

* Fix change brightness when sleeping

Prevents the panel to change screen brightness when sleeping.

Solves #975

* Standardize HA service calls

* Bump version to `4.0 dev`

* Create customization.md

This will reduce the need for:
- #920
- #662
- #833

* Clean-up for customizations

Clean up ESPHome in order to make easier the use of customizations.

* Create Alarm page

* Add page Alarm

* Add Alarm docs

Update docs to reflect the current state (new features & changes)

* Creating "install.md" and update add-ons instructions

* Add Alarm page buttons pics

* Add link to Alarm on page Home

* Create Alarm page

* Alarm button font color

* Add `keyb_num` page

* Alarm Control Panel with PIN (#982)

Implements an Alarm Control Panel page on NSPanel.

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/66
Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/227
Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/672
Partially solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/299#discussioncomment-4874612
Partially solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/64#issuecomment-1566204490
Partially solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/718

* Fix alarm without pin not working

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/pull/930#issuecomment-1680981977

* Alarm page UI

Fixed close button
Disabled buttons are darker

* Move Entities button to ESPHome

Move logic behind Entities button (Home page) from Blueprint to ESPHome in order to gain performance on creating home page.

* Human readable Uptime (#986)

* Human readable Uptime

* Uptime from Frenck code

* Uptime with Frenck code

* Updated Human Readable Uptime

* Removed trailing spaces

* Renamed sensor to "Last started"

Sensor renamed
Update moved to the boot process
Clean-up

---------

Co-authored-by: Edward Firmo <[email protected]>
Co-authored-by: Edward Firmo <[email protected]>

* Update alarm icon & color

* Revert `fast_connect` back to `false`

* Extended chars on buttons pages (#988)

Replaces #740
Probably solves #664
Probably solves #738
Probably solves #987

* Removed `fast_connect`

* Support to `code_arm_required`

Only shows the alarm PIN keyboard if a code is required for arming (or when disarming).

* Update alarm icon on home page

Refresh icon when alarm state changes.

* Fix alarm icon not updating on home page

* Home buttons new format - Alarm

Modernise the button Alarm flow on page Home to improve performance.

* Home buttons new format - Entities

Modernise the button "Entities" flow on page Home to improve performance.

* Home buttons new format - QRcode

Modernise the button "QRcode" flow on page Home to improve performance.

* Home buttons new format - Notification

Modernise the button "Notification" flow on page Home to improve performance.

I haven't moved the code from the Blueprint to ESPHome yet, as I will leave this for when we rebuild the Notification flow in the near future (hopefully), so the performance gains may not be perceived now. Just aligning with other buttons format.

* Adding screenshots

* Delete ReleaseNotes.md

Moved to the release

* New entity filter format

This new format was released with HA v2023.4 and the old one will be deprecated soon.

* Fix Alarm page bypass icon

* Bump version to 4.0

* Rename `addon_climate_heat`

* Simplify climate substitutions

* Add support for `addon_climate_cool`

* Removed `${verbose_log}`

Use logger level `VERBOSE` instead

* Fix script call

* Clean up general entities & fallback

Store inputs into variables only when needed.
Removed fallback mode - Replaced by ESPHome local control when the relay is assigned to the button in the blueprint.

* Phase out sensor `nspanel_event` (partially)

This sensor is being replaced by event calls.

* uptime sensors (#998)

* Create ReleaseNotes.md

* Fix Climate page when embedded climate

And also added a lot of logs which should be removed later as it takes from memory.

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/995#discussioncomment-6835260

* Move brightness control to global var

Clean up page Home

* Alarm page translations - Finnish

https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/940#discussioncomment-6857262

* Exported pics

* Clean-up TFT

- Removed a bunch of unused pics
- Changed page indicator to new format (which will allow future development to hide unused pages)
- Standardized close button in most pages

* Fixed background pics

- Entities pages
- Weather pages

* Standardize close button

* Add "Alarm" section

* Support to wake-up page on `wake_up_display` service

This changes the behavior of a service introduced by #734.

* Optimize `wake_up_display` service

* Fix icon font sizes 10 and 64

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/960#issuecomment-1701903604

And also remove all the unnecessary `wait_until`

* Fix Settings page element ids

Partially solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/960#issuecomment-1702109668

* Add translation keys for `settings` page

#1002

* Update settings page when brightness changes on HA

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/960#issuecomment-1702149796

* Clean-up page settings

* update docs (#1003)

* updated docs

* Update ReleaseNotes.md

---------

Co-authored-by: Edward Firmo <[email protected]>

* Clean-up Cover page

I'm preparing this page to have icons changing based on the device_class selected to a cover.

* Clean-up boot delay

* Enable `current_page` sensor by default

Otherwise the system won´t update values unless the page is reloaded.

* Use `current_page` in blueprint conditions

One more step towards the phase out of `nspanelevent`.

* Move `script.refresh_colors` to `service.global_settings`

As this is called from a single point, there's no meaning of having a separated script.

* Fix climate icon update

Partially solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/995#discussioncomment-6891454

* Fix button show on climate page

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/995#discussioncomment-6891335

* Visual improvements on climate page

- Add friendly name when embedded - Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/995#discussioncomment-6891465
- Make disable icons a bit darker - Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/995#discussioncomment-6893440
- Add space for page title in EU an US Land versions
- Reset page timer when pressing/releasing on the slider - Partially solves #990

* Don't update values when page home is not visible

To reduce load on Home Assistant and the network

* Cleanup boot sequence

Move some functionalities to ESPHome

* Display internal sensor value when wifi is out

Before it was showing on home page only when API was out. This adds a test for WiFi.

* Fix `default_target_temperature`

It also updates the page home when thermostat status changes (for the chips).
Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/995#discussioncomment-6897727

* Adding ID to components missing it

* Renamed `wake_up_display` to `wake_up`

* Re-arrange commands list

* Add service `set_component_color`

Deprecates the following services:
- `send_command_font_color`
- `send_command_background_color`

* Fix button pages not showing

* Adjusted time for HW long click

* Fixed buttons on settings page

* Minor adjustments to page climate

And replace font 10 to size 48 (it was 64 since a few days ago).

* Updates to breaking changes list

* Page settings redesign

Clean up the UI of settings page.
Prepare for translations.

* Enable translations of Settings page

* Notification word-wrap

For EU and US_LAND only, for now.

* Notifications page rebuilt

- Notification button processed on ESPHome (as all the info is there)
- Added word-wrap for main text
- Expanded text size
- Handling display mode (used to define the number of chars per line on Notifications)
- Versioning handling - As a consequence of the previous item.

* Word-wrap buttons pages

Taking advantage of the algorithm created for notifications.

* Word-wrap for Alarm page

* Version mismatch notication

* Fix ESPHome not starting with older TFT

* Rebuilt home page status bar update

* Updated translations - Italian

Based on https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/1002#discussioncomment-6926846

Thanks @MaiPiu

* Fix `Nextion reported variable name invalid!`

* Fix `Nextion variable invalid`

* Handle `embedded_indoor_temperature`

Internal temperature display will be handled locally (ESPHome) when no other sensor is selected.

* Review temperature correction engine

* Fix display climate chip

* update `temp_nspanel` when correction changes

* Fix `Fan` page not open with long press HW button

Solves #1007

* Minor adjustments on settings page

* version 4.0 ready for release

* Clean-up docs

* Improve version notification

* Disable restore `notification_unread`

This must be changed to a binary sensor in the future.

* Beta v4.0 (#1012)

* Create ReleaseNotes.md (#879)

* Create ReleaseNotes.md

* sensor display precision

* Filter devices to esp32 only (#881)

* Filter devices to esp32 only

Show only ESP32 devices when selecting the panel

* Filtered device list

* Sensor display precision (#880)

Now the values shown in your panel will follow the [sensor display precision](https://www.home-assistant.io/blog/2023/03/01/release-20233/#sensor-display-precision) provided by Home Assistant.
=> If you have problems with a value exceeding the available space in your panel, please reduce the number of decimals using Home Assistant [sensor display precision](https://www.home-assistant.io/blog/2023/03/01/release-20233/#sensor-display-precision).

* New language selector (#882)

* New language selector

* Update ReleaseNotes.md

* Update ReleaseNotes.md

* Remove `settings_entity` (#887)

* Remove `settings_entity`

- Bump version to 3.5_dev
- Removed references to pictures removed from TFT
- Removed code related to closing settings pages
- Removed trigger `settings_entity`

* Removed `set_settings_entity` service

- Bump version to 3.5_dev
- Removed `set_settings_entity` service - BREAKING CHANGE
- Removed `settings_entity` text-sensor - BREAKING CHANGE
- Added service `open_entity_settings_page` - BREAKING CHANGE

* Removed `settings_entity`

- Bump version to 3.5_dev
- Removed old climate page (climate_backup)
- Removed pics related to old climate page (ids 16-47, 80-83, 95-96 and 125(US only))
- Enforces brightness on any page change (this allows wake-up on settings page with long press on physical buttons) - Pending removing code from Blueprint
- Added `entity` variable on pages `climate`, `lightsettings` and `coversettings`
- Added `entity` info to `nspanelevent` on pages `climate`, `lightsettings` and `coversettings`
- Added `back_page` variable on pages `climate`, `lightsettings` and `coversettings` (default: home)
- Moving to TFT close page logic on pages `climate`, `lightsettings` and `coversettings` - Pending changes on Blueprint and ESPHome
- Standardized name for `page_label` on pages `climate`, `lightsettings` and `coversettings`
- Standardized settings page names: `climate`, `cover` and `light` (Removed `settings` from page name)

* Removed `settings_entity`

* Removed `settings_entity`

* Removed `settings_entity`

* Move `entity` variable to home page (#889)

* Move `entity` variable to home page

This will enable future development of a fallback climate

* Move `entity` variable to home page

* Move `entity` variable to home page

* Move `entity` variable to home page

* Move `entity` variable to home page

* Use `en` as fallback language (#891)

* Use `en` as fallback language

Uses English if a non valid language is selected (like when using legacy language selection).

* Use `en` as fallback language

* Create `nspanel_us_land.tft` (#890)

* Create `nspanel_us_land.tft'

Add `nspanel_us_land.tft' for US panel on landscape mode, fixing the offset on the touch screen when using `nspanel_eu.tft` into a US panel.
Hides the hardware buttons labels, as Nextion cannot support rotated text.

* Created `nspanel_us_land.tft`

* Created `nspanel_us_land.tft`

solves #390
solves #432
solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/299#discussioncomment-4933716

* Created `nspanel_us_land.tft`

* Created `nspanel_us_land.tft`

* Fix "Button confirmation page not working correctly"

Solves #883

* Supports weather forecast with `datetime` not string

This adds support to weather integrations where the `datetime` field under `forecast` attribute is provided as a `datetime` type.
This was seen on Météo-France, while all other weather integrations tested so far used a `text` field for `datetime`.

This solves #893

* Wifi icon to indicate when API offline

This changes the behavior of Wifi icon:

How it was before:
- Wifi icon was visible only when the wifi was connected, nothing was shown when wifi was not connected.

How it is now:
- Wifi icon will have 3 states:
 - Wifi & API connected: Gray wifi icon
 - Wifi disconnected: Red wifi-off icon
 - Wifi connected, but API disconnected (HA is out?): Red api-off icon

* API status indication on the panel

* Limit light & cover to supported settings (#896)

* Limit light to supported settings

When showing light settings, only the supported features will be shown for each light.

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

This partially solves #635

* Limits covers to supported settings

Only show cover settings when `set_position` is supported.

This solves #635

* Limits covers to supported settings

* Update instructions.md

* Add Fan speed settings page (#897)

* Add Fan speed settings page

Add an initial fan speed control page for fans supporting speed control.
Add speed (%) info in the buttons pages.

Solves #404 
Solves #791 
Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/718#discussioncomment-5786106

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Fix name on confirmation page

Fix the entity name on the confirmation page.

The new order is:
1. Name set on the blueprint settings
2. Entity's `friendly_name` attribute
3. Entity's `name` attribute
4. Entity's `entity_id`

Solves #501

* Select wake-up page (#898)

* Select wake-up page

Users will be able to select the wake-up page on the blueprint inputs.
This selected page will be shown after a boot (after the boot page) and with a touch in the screen when on screen saver page.
After showing this wake-up page, all the previous behavior for closing the page (with a click or after a timeout) will be the same.

Solves #576 
Solves #612 
Solves #801 
Probably improves for https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/718#discussioncomment-5715670

* Select wake-up page

* Fan update engine

Change the fan update engine to follow the same patter as other settings pages.

* Update ReleaseNotes.md

* Adding vertical bars pics

* Panel offline mode (#900)

* Panel offline mode

Introduces "offline mode" for the panel, which will be used later with a fallback climate.

Pages that are depending on the blueprint (buttons pages, entity pages, settings pages, etc) won't be shown when the API is disconnected.

* Panel offline mode

* Panel offline mode

* Panel offline mode

* Panel offline mode

* "Jump to settings" on tft

Moved "Jump to settings page" routine from ESPHome to TFT in order to reduce complexity.

* Exclude Nextion2Text

Exclude Nextion2Text

* Fix validation issue

* Time engine on ESPHome

* Time engine on ESPHome

* Notification page bigger hotspot

Added hotspots around the buttons (Accept & Clear) on Notification page to make easier to click on those.

Solves #907

* Boot page retry comm

The boot page will retry communication with the blueprint once a minute to avoid the situation where that page is shown until the automation is reloaded.

* Fix call to screen page

Fixes the call to screen page on US panel.
Reconciliate the US landscape model from EU model.

* Fix fan page `button_on`

Fixing rounding on that button.

* Fixed Fan page rounding

* Prevents boot sequence in other pages

* Physical relay local control

We are trying to make your panel as autonomous as possible by moving some of the controls from the Blueprint to ESPHome. This will reduce the load in your network and Home Assistant, but also will make a more reliable system capable to do it's core functionality even when the network is unavailable or Home Assistant is restarting.
With this version, the following engines have been moved to your panel (local control):
- Physical relay control (when hardware left button is connected to relay 1 or right button to relay 2)

Solves #910

* Embedded climate (#917)

* Performance improvements

The main focus here was to reduce the number of calls between Home Assistant and ESPHome, moving logic as much as possible to TFT and ESPHome.
- Service calls moved to ESPHome (in preparation for Alarm Control Panel)
- Page change informed via event call instead of `nspanel_event` sensor (which still in use by other calls, but might be possible to remove in the future)

* Draft embedded climate

This adds an initial version of an embedded climate/thermostat (heating only for now) with support for local control even with Wi-Fi out.

Solves #646
Solves #263

* Update ReleaseNotes.md

* Fix climate slider

Fix for climate slider opening in an incorrect position and sending only the integer part of the new target temperature

* Moving home page to ESPHome

In progress...

* Fix translations - Dutch

* Embedded chip 3

Home page - Chip 3 will be controlled locally when embedded climate is enable.

* Fixed buttons bar

Fixed buttons bar managed on ESPHome when embedded climate is visible.

* Update ReleaseNotes.md

* Services back to the Blueprint

Moving service calls back to the blueprint as latest HA requires user's permissions to call HA services from ESPHome.
This still have to be used for Alarm calls due to security concerns.

* Update ReleaseNotes.md

* support to hidden ssid (#908)

Supports hidden ssid with the use of substitutions `wifi_hidden: "true"`.

This can be breaking change for users with custom/advanced wifi settings.

Solves #906

* Update nspanel_esphome.yaml

* Removed `restore_state`

There is some incomplete work related to alarms on this commit, but the focus here is to fix `restore_state` on ESPHome v2023.7.0.

This solves #939

* US model - Fan page - Redistribute icons

Redistributed icons on Fan page on US model in order to improve usability.

Based on feedback from https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/791#discussioncomment-6338706

* Align `nspanel_us_land`

Apply all changes from EU to US_Land

* Fix relays chips

Fix relay status indication on chips.

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/926#issuecomment-1627660273

* Fix "invalid variable" for "api"

Fix error "Nextion invalid variable name" when setting `api`.

* Default embedded climate to relay_0

* Fix translations - Italian

Based on https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/940#discussioncomment-6511043

* Fix `set_temperature` for climate

Solves #957

* Fix `fan.turn_off` call

Removed timer call from fan stop button.
This solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/791#discussioncomment-6494535

* Call a `fan.turn_off` when percentage is 0%

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/791#discussioncomment-6621756

* Fix call for fan stop button

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/791#discussioncomment-6622377

* Icons on ESPHome

Move icons from TFT/HMI to ESPHome to prevent error on Nextion2Text.

* Updated translations - Spanish

Based on https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/940#discussioncomment-6548961

* Make home page sensor's icons consistent

Make icon selection consistent with chips where the entity's icon is used in case a icon is not set in the blueprint settings.

Solves #963

* Updated translations - Slovenian

Based on:
- https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/940#discussioncomment-6665723
-  https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/829#discussioncomment-6665751

* dutch (#974)

* small ducht translations

small ducht translations

* Dutch translations

---------

Co-authored-by: Edward Firmo <[email protected]>

* Add-on support (#977)

Moved climate settings to an add-on.
Updated documentation.

* Fixed link to addon climate docs

* Fix change brightness when sleeping

Prevents the panel to change screen brightness when sleeping.

Solves #975

* Standardize HA service calls

* Bump version to `4.0 dev`

* Create customization.md

This will reduce the need for:
- #920
- #662
- #833

* Clean-up for customizations

Clean up ESPHome in order to make easier the use of customizations.

* Create Alarm page

* Add page Alarm

* Add Alarm docs

Update docs to reflect the current state (new features & changes)

* Creating "install.md" and update add-ons instructions

* Add Alarm page buttons pics

* Add link to Alarm on page Home

* Create Alarm page

* Alarm button font color

* Add `keyb_num` page

* Alarm Control Panel with PIN (#982)

Implements an Alarm Control Panel page on NSPanel.

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/66
Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/227
Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/672
Partially solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/299#discussioncomment-4874612
Partially solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/64#issuecomment-1566204490
Partially solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/718

* Fix alarm without pin not working

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/pull/930#issuecomment-1680981977

* Alarm page UI

Fixed close button
Disabled buttons are darker

* Move Entities button to ESPHome

Move logic behind Entities button (Home page) from Blueprint to ESPHome in order to gain performance on creating home page.

* Human readable Uptime (#986)

* Human readable Uptime

* Uptime from Frenck code

* Uptime with Frenck code

* Updated Human Readable Uptime

* Removed trailing spaces

* Renamed sensor to "Last started"

Sensor renamed
Update moved to the boot process
Clean-up

---------

Co-authored-by: Edward Firmo <[email protected]>
Co-authored-by: Edward Firmo <[email protected]>

* Update alarm icon & color

* Revert `fast_connect` back to `false`

* Extended chars on buttons pages (#988)

Replaces #740
Probably solves #664
Probably solves #738
Probably solves #987

* Removed `fast_connect`

* Support to `code_arm_required`

Only shows the alarm PIN keyboard if a code is required for arming (or when disarming).

* Update alarm icon on home page

Refresh icon when alarm state changes.

* Fix alarm icon not updating on home page

* Home buttons new format - Alarm

Modernise the button Alarm flow on page Home to improve performance.

* Home buttons new format - Entities

Modernise the button "Entities" flow on page Home to improve performance.

* Home buttons new format - QRcode

Modernise the button "QRcode" flow on page Home to improve performance.

* Home buttons new format - Notification

Modernise the button "Notification" flow on page Home to improve performance.

I haven't moved the code from the Blueprint to ESPHome yet, as I will leave this for when we rebuild the Notification flow in the near future (hopefully), so the performance gains may not be perceived now. Just aligning with other buttons format.

* Adding screenshots

* Delete ReleaseNotes.md

Moved to the release

* New entity filter format

This new format was released with HA v2023.4 and the old one will be deprecated soon.

* Fix Alarm page bypass icon

* Bump version to 4.0

* Rename `addon_climate_heat`

* Simplify climate substitutions

* Add support for `addon_climate_cool`

* Removed `${verbose_log}`

Use logger level `VERBOSE` instead

* Fix script call

* Clean up general entities & fallback

Store inputs into variables only when needed.
Removed fallback mode - Replaced by ESPHome local control when the relay is assigned to the button in the blueprint.

* Phase out sensor `nspanel_event` (partially)

This sensor is being replaced by event calls.

* uptime sensors (#998)

* Create ReleaseNotes.md

* Fix Climate page when embedded climate

And also added a lot of logs which should be removed later as it takes from memory.

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/995#discussioncomment-6835260

* Move brightness control to global var

Clean up page Home

* Alarm page translations - Finnish

https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/940#discussioncomment-6857262

* Exported pics

* Clean-up TFT

- Removed a bunch of unused pics
- Changed page indicator to new format (which will allow future development to hide unused pages)
- Standardized close button in most pages

* Fixed background pics

- Entities pages
- Weather pages

* Standardize close button

* Add "Alarm" section

* Support to wake-up page on `wake_up_display` service

This changes the behavior of a service introduced by #734.

* Optimize `wake_up_display` service

* Fix icon font sizes 10 and 64

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/960#issuecomment-1701903604

And also remove all the unnecessary `wait_until`

* Fix Settings page element ids

Partially solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/960#issuecomment-1702109668

* Add translation keys for `settings` page

#1002

* Update settings page when brightness changes on HA

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/960#issuecomment-1702149796

* Clean-up page settings

* update docs (#1003)

* updated docs

* Update ReleaseNotes.md

---------

Co-authored-by: Edward Firmo <[email protected]>

* Clean-up Cover page

I'm preparing this page to have icons changing based on the device_class selected to a cover.

* Clean-up boot delay

* Enable `current_page` sensor by default

Otherwise the system won´t update values unless the page is reloaded.

* Use `current_page` in blueprint conditions

One more step towards the phase out of `nspanelevent`.

* Move `script.refresh_colors` to `service.global_settings`

As this is called from a single point, there's no meaning of having a separated script.

* Fix climate icon update

Partially solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/995#discussioncomment-6891454

* Fix button show on climate page

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/995#discussioncomment-6891335

* Visual improvements on climate page

- Add friendly name when embedded - Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/995#discussioncomment-6891465
- Make disable icons a bit darker - Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/995#discussioncomment-6893440
- Add space for page title in EU an US Land versions
- Reset page timer when pressing/releasing on the slider - Partially solves #990

* Don't update values when page home is not visible

To reduce load on Home Assistant and the network

* Cleanup boot sequence

Move some functionalities to ESPHome

* Display internal sensor value when wifi is out

Before it was showing on home page only when API was out. This adds a test for WiFi.

* Fix `default_target_temperature`

It also updates the page home when thermostat status changes (for the chips).
Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/995#discussioncomment-6897727

* Adding ID to components missing it

* Renamed `wake_up_display` to `wake_up`

* Re-arrange commands list

* Add service `set_component_color`

Deprecates the following services:
- `send_command_font_color`
- `send_command_background_color`

* Fix button pages not showing

* Adjusted time for HW long click

* Fixed buttons on settings page

* Minor adjustments to page climate

And replace font 10 to size 48 (it was 64 since a few days ago).

* Updates to breaking changes list

* Page settings redesign

Clean up the UI of settings page.
Prepare for translations.

* Enable translations of Settings page

* Notification word-wrap

For EU and US_LAND only, for now.

* Notifications page rebuilt

- Notification button processed on ESPHome (as all the info is there)
- Added word-wrap for main text
- Expanded text size
- Handling display mode (used to define the number of chars per line on Notifications)
- Versioning handling - As a consequence of the previous item.

* Word-wrap buttons pages

Taking advantage of the algorithm created for notifications.

* Word-wrap for Alarm page

* Version mismatch notication

* Fix ESPHome not starting with older TFT

* Rebuilt home page status bar update

* Updated translations - Italian

Based on https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/1002#discussioncomment-6926846

Thanks @MaiPiu

* Fix `Nextion reported variable name invalid!`

* Fix `Nextion variable invalid`

* Handle `embedded_indoor_temperature`

Internal temperature display will be handled locally (ESPHome) when no other sensor is selected.

* Review temperature correction engine

* Fix display climate chip

* update `temp_nspanel` when correction changes

* Fix `Fan` page not open with long press HW button

Solves #1007

* Minor adjustments on settings page

* version 4.0 ready for release

* Clean-up docs

---------

Co-authored-by: bkbartk <[email protected]>
Co-authored-by: w00zy <[email protected]>

* Fix Fan page button colors when opening

Solves #1017

* Translations (#1023)

* Translations

* Update nspanel_blueprint.yaml

I've changed `brightness` for now as the new design isn't implemented yet, but that string is already in use with the current design.

---------

Co-authored-by: Edward Firmo <[email protected]>

* Adjustments to settings page

* Fix entity info when calling detailed pages

Solves #1022

* Added `media_player` page (hidden)

* New "Confirm" pop-up

This also removes the sensor "NSPanel Event"

* Fix pages not updating values

Solves #1026

* Media player - Buttons

- Added code to buttons on media_player page.
- Clean-up:
  - Moved wake-up select from Blueprint to ESPHome component
  - Removed `switch.xxxxx_confirmation_message`

* Fix logging for global_settings

It was logging wakeup_page, which is deprecated

* Improved version notification

* Removed trailing spaces

* Notification for `sensor.xxxxx_current_page` missing

This might be a common issue for users migrating from v3.4 to v3.5.
This information is part of the release notes, but I believe it worth having a guide to support closely any user who miss that in the release notes.

* Simplify `touchevent` engine

The touch event is used only for the sleeping engine (it will be used for dimming later) and it was transferring all the json info with page name, component, entity, etc.
This was replaced by a simple random integer with no meaning other than "the screen was touched, reset the timer".

* Media player first buttons actions

* Fix unknown service: `media_player.null`

* Media Player control

You will be able to add a Media Player entity to any of the buttons pages and with a long press you will see the media player page.

* Remove dimming timer for now

The funcionality isn't completed.

* Home page - Custom buttons

On the blueprint you can now set up to 3 buttons to be shown on Home page.
It will show the detailed settings page, so the entity must be compatible.

* Fix Media player missing parameters

Possibly solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/1030#discussioncomment-6984573

* Prevents calls to `media_player.null`

* Remove `entity` info from pages on TFT

Since v3.4, the info about entity_id shown was going all the way to Nextion and then sent back in the json return, however this requires a long (100-char) global var and the way it was implemented, it was one of those per settings page, as climate should be also recorded at the same time in case the embedded climate was installed.
This was taking too much memory, so I've moved this info to a global variable (string) in ESPHome.
There is now lots of space for code cleaning (and still pending to do the same with climate entity, as it could be only a bool to inform if embedded), but this brings the functionality.

This enabled the return to global for some components, so it probably solves #1031

* Prototyping `power` page

Thanks @Floppe for doing the design
#838

* Prototyping `power` page

* New sleep flow

* Removed trailing spaces

* Fix empty page climate

* Fix names on button pages

Fix names when a name is not provided in the blueprint settings.

* Fix call to sleep routine when timeout changes

Solves #1037

* Replace `confirm` var on buttons pages

Simpler and saves some memory.

* Clean-up

* Align the code for the 3 timers

* Extend domains supported by home page custom buttons

Based on #1034

* Fix error when btn_label is `None`

* Fix `Variable invalid` on buttons pages

* Fix constructor of Entity pages

* Fallback even when button is assigned to another entity

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/1013#issuecomment-1720107844

* Add inputs for media player refresh time

* Adjustments to Media Player refresh interval default values

* Use panel's events to reset timers

Possibly solves #1040
Possibly solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/995#discussioncomment-7020153

* State based colors to home page custom buttons

* Fix alarm not changing status

Do not clear `entity_id` when opening keyboard page, so the info can be used when sending commands.

Solves #1039

* Missing `nspanel_us.tft`

* add `touchevents` to pages `media_player` and `confirm`

To avoid panel going back to Home page while user is playing with the page.
Solves #1040

* Media player minor layout changes

* Media player - Volume timer & icon size

Volume timer changed from 1000 to 500ms
Icon change from font 9 to 10

* Media player roll back font 9 and timer 1s

* Don't send to Nextion obsolete volume settings

If the volume is the same as the last one sent to the screen, don't send again, so if changes are being made on the screen it didn't receive the update all the time, making the slider unresponsive.

* Media player - Layout improvement

- Removed button "Stop"
- Increase touch area for buttons
- Redistributed buttons on page

* Add touchevents to page climate

Possibly solves #995

* Resolve validation

* Correct playing time based on `updated_at` attribute

* Prepare for when attribute is not available

* Fix attribute `media_position`

* Fix time duration when HA isn't updating position

* Fix climate page not opening when offline

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/995#discussioncomment-6834067

* Clean-up release notes

* Clean up code

- Removed commented out lines
- Removed temporary logs

Getting prepared to release

* Bump version to 4.0beta

To reduce the chance of an obsolete file in use after the release.

* Change version to 4.0dev

To differentiate from beta.

* Added missing translations (#1047)

* Added missing translations

Added missing translations for the Swedish translation.

* Caption first char

---------

Co-authored-by: Edward Firmo <[email protected]>

* Translations to Slovak on Settings page

* Refresh docs

* Update nspanel_blank.md

* Update nspanel_blank.md

* Add screensaver to `nspanel_blank.tft`

And build a new tft with latest firmware and url for instructions.

* Update nspanel_blank.md

* Fix to Slovenian translation

https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/1002#discussioncomment-7041796

* Settings page - Translations to French

From https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/1002#discussioncomment-7045452

* Alarm page - Translations to French

https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/940#discussioncomment-7046479

* Add customization for display sleeping/awake

Probably solves #1035

* Customizations - Blank TFT button

Probably solves #1048

* Customizations - Deep sleep

Solves #955

* Customization - Deep sleep - Fix broken link

* Translations - Slovak

- https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/829#discussioncomment-7054153
- https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/940#discussioncomment-7054142

* New versioning - not implemented

* Bump version to `4.0b2`

---------

Co-authored-by: bkbartk <[email protected]>
Co-authored-by: w00zy <[email protected]>
Co-authored-by: w00zy <[email protected]>
Co-authored-by: Erik Larsson <[email protected]>
edwardtfn added a commit that referenced this issue Sep 20, 2023
* Sensor display precision (#880)

Now the values shown in your panel will follow the [sensor display precision](https://www.home-assistant.io/blog/2023/03/01/release-20233/#sensor-display-precision) provided by Home Assistant.
=> If you have problems with a value exceeding the available space in your panel, please reduce the number of decimals using Home Assistant [sensor display precision](https://www.home-assistant.io/blog/2023/03/01/release-20233/#sensor-display-precision).

* New language selector (#882)

* New language selector

* Update ReleaseNotes.md

* Update ReleaseNotes.md

* Remove `settings_entity` (#887)

* Remove `settings_entity`

- Bump version to 3.5_dev
- Removed references to pictures removed from TFT
- Removed code related to closing settings pages
- Removed trigger `settings_entity`

* Removed `set_settings_entity` service

- Bump version to 3.5_dev
- Removed `set_settings_entity` service - BREAKING CHANGE
- Removed `settings_entity` text-sensor - BREAKING CHANGE
- Added service `open_entity_settings_page` - BREAKING CHANGE

* Removed `settings_entity`

- Bump version to 3.5_dev
- Removed old climate page (climate_backup)
- Removed pics related to old climate page (ids 16-47, 80-83, 95-96 and 125(US only))
- Enforces brightness on any page change (this allows wake-up on settings page with long press on physical buttons) - Pending removing code from Blueprint
- Added `entity` variable on pages `climate`, `lightsettings` and `coversettings`
- Added `entity` info to `nspanelevent` on pages `climate`, `lightsettings` and `coversettings`
- Added `back_page` variable on pages `climate`, `lightsettings` and `coversettings` (default: home)
- Moving to TFT close page logic on pages `climate`, `lightsettings` and `coversettings` - Pending changes on Blueprint and ESPHome
- Standardized name for `page_label` on pages `climate`, `lightsettings` and `coversettings`
- Standardized settings page names: `climate`, `cover` and `light` (Removed `settings` from page name)

* Removed `settings_entity`

* Removed `settings_entity`

* Removed `settings_entity`

* Move `entity` variable to home page (#889)

* Move `entity` variable to home page

This will enable future development of a fallback climate

* Move `entity` variable to home page

* Move `entity` variable to home page

* Move `entity` variable to home page

* Move `entity` variable to home page

* Use `en` as fallback language (#891)

* Use `en` as fallback language

Uses English if a non valid language is selected (like when using legacy language selection).

* Use `en` as fallback language

* Create `nspanel_us_land.tft` (#890)

* Create `nspanel_us_land.tft'

Add `nspanel_us_land.tft' for US panel on landscape mode, fixing the offset on the touch screen when using `nspanel_eu.tft` into a US panel.
Hides the hardware buttons labels, as Nextion cannot support rotated text.

* Created `nspanel_us_land.tft`

* Created `nspanel_us_land.tft`

solves #390
solves #432
solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/299#discussioncomment-4933716

* Created `nspanel_us_land.tft`

* Created `nspanel_us_land.tft`

* Fix "Button confirmation page not working correctly"

Solves #883

* Supports weather forecast with `datetime` not string

This adds support to weather integrations where the `datetime` field under `forecast` attribute is provided as a `datetime` type.
This was seen on Météo-France, while all other weather integrations tested so far used a `text` field for `datetime`.

This solves #893

* Wifi icon to indicate when API offline

This changes the behavior of Wifi icon:

How it was before:
- Wifi icon was visible only when the wifi was connected, nothing was shown when wifi was not connected.

How it is now:
- Wifi icon will have 3 states:
 - Wifi & API connected: Gray wifi icon
 - Wifi disconnected: Red wifi-off icon
 - Wifi connected, but API disconnected (HA is out?): Red api-off icon

* API status indication on the panel

* Limit light & cover to supported settings (#896)

* Limit light to supported settings

When showing light settings, only the supported features will be shown for each light.

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

This partially solves #635

* Limits covers to supported settings

Only show cover settings when `set_position` is supported.

This solves #635

* Limits covers to supported settings

* Update instructions.md

* Add Fan speed settings page (#897)

* Add Fan speed settings page

Add an initial fan speed control page for fans supporting speed control.
Add speed (%) info in the buttons pages.

Solves #404 
Solves #791 
Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/718#discussioncomment-5786106

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Fix name on confirmation page

Fix the entity name on the confirmation page.

The new order is:
1. Name set on the blueprint settings
2. Entity's `friendly_name` attribute
3. Entity's `name` attribute
4. Entity's `entity_id`

Solves #501

* Select wake-up page (#898)

* Select wake-up page

Users will be able to select the wake-up page on the blueprint inputs.
This selected page will be shown after a boot (after the boot page) and with a touch in the screen when on screen saver page.
After showing this wake-up page, all the previous behavior for closing the page (with a click or after a timeout) will be the same.

Solves #576 
Solves #612 
Solves #801 
Probably improves for https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/718#discussioncomment-5715670

* Select wake-up page

* Fan update engine

Change the fan update engine to follow the same patter as other settings pages.

* Update ReleaseNotes.md

* Adding vertical bars pics

* Panel offline mode (#900)

* Panel offline mode

Introduces "offline mode" for the panel, which will be used later with a fallback climate.

Pages that are depending on the blueprint (buttons pages, entity pages, settings pages, etc) won't be shown when the API is disconnected.

* Panel offline mode

* Panel offline mode

* Panel offline mode

* Panel offline mode

* "Jump to settings" on tft

Moved "Jump to settings page" routine from ESPHome to TFT in order to reduce complexity.

* Exclude Nextion2Text

Exclude Nextion2Text

* Fix validation issue

* Time engine on ESPHome

* Time engine on ESPHome

* Notification page bigger hotspot

Added hotspots around the buttons (Accept & Clear) on Notification page to make easier to click on those.

Solves #907

* Boot page retry comm

The boot page will retry communication with the blueprint once a minute to avoid the situation where that page is shown until the automation is reloaded.

* Fix call to screen page

Fixes the call to screen page on US panel.
Reconciliate the US landscape model from EU model.

* Fix fan page `button_on`

Fixing rounding on that button.

* Fixed Fan page rounding

* Prevents boot sequence in other pages

* Physical relay local control

We are trying to make your panel as autonomous as possible by moving some of the controls from the Blueprint to ESPHome. This will reduce the load in your network and Home Assistant, but also will make a more reliable system capable to do it's core functionality even when the network is unavailable or Home Assistant is restarting.
With this version, the following engines have been moved to your panel (local control):
- Physical relay control (when hardware left button is connected to relay 1 or right button to relay 2)

Solves #910

* Embedded climate (#917)

* Performance improvements

The main focus here was to reduce the number of calls between Home Assistant and ESPHome, moving logic as much as possible to TFT and ESPHome.
- Service calls moved to ESPHome (in preparation for Alarm Control Panel)
- Page change informed via event call instead of `nspanel_event` sensor (which still in use by other calls, but might be possible to remove in the future)

* Draft embedded climate

This adds an initial version of an embedded climate/thermostat (heating only for now) with support for local control even with Wi-Fi out.

Solves #646
Solves #263

* Update ReleaseNotes.md

* Fix climate slider

Fix for climate slider opening in an incorrect position and sending only the integer part of the new target temperature

* Moving home page to ESPHome

In progress...

* Fix translations - Dutch

* Embedded chip 3

Home page - Chip 3 will be controlled locally when embedded climate is enable.

* Fixed buttons bar

Fixed buttons bar managed on ESPHome when embedded climate is visible.

* Update ReleaseNotes.md

* Services back to the Blueprint

Moving service calls back to the blueprint as latest HA requires user's permissions to call HA services from ESPHome.
This still have to be used for Alarm calls due to security concerns.

* Update ReleaseNotes.md

* support to hidden ssid (#908)

Supports hidden ssid with the use of substitutions `wifi_hidden: "true"`.

This can be breaking change for users with custom/advanced wifi settings.

Solves #906

* Update nspanel_esphome.yaml

* Removed `restore_state`

There is some incomplete work related to alarms on this commit, but the focus here is to fix `restore_state` on ESPHome v2023.7.0.

This solves #939

* US model - Fan page - Redistribute icons

Redistributed icons on Fan page on US model in order to improve usability.

Based on feedback from https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/791#discussioncomment-6338706

* Align `nspanel_us_land`

Apply all changes from EU to US_Land

* Fix relays chips

Fix relay status indication on chips.

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/926#issuecomment-1627660273

* Fix "invalid variable" for "api"

Fix error "Nextion invalid variable name" when setting `api`.

* Default embedded climate to relay_0

* Fix issue with `restore_state` and ESPHome v2023.7.0 (#941)

Solves #939

* Fix translations - Italian

Based on https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/940#discussioncomment-6511043

* Fix `set_temperature` for climate

Solves #957

* Fix `fan.turn_off` call

Removed timer call from fan stop button.
This solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/791#discussioncomment-6494535

* Call a `fan.turn_off` when percentage is 0%

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/791#discussioncomment-6621756

* Fix call for fan stop button

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/791#discussioncomment-6622377

* Icons on ESPHome

Move icons from TFT/HMI to ESPHome to prevent error on Nextion2Text.

* Updated translations - Spanish

Based on https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/940#discussioncomment-6548961

* Make home page sensor's icons consistent

Make icon selection consistent with chips where the entity's icon is used in case a icon is not set in the blueprint settings.

Solves #963

* Updated translations - Slovenian

Based on:
- https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/940#discussioncomment-6665723
-  https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/829#discussioncomment-6665751

* dutch (#974)

* small ducht translations

small ducht translations

* Dutch translations

---------

Co-authored-by: Edward Firmo <[email protected]>

* Add-on support (#977)

Moved climate settings to an add-on.
Updated documentation.

* Fixed link to addon climate docs

* Fix change brightness when sleeping

Prevents the panel to change screen brightness when sleeping.

Solves #975

* Standardize HA service calls

* Bump version to `4.0 dev`

* Create customization.md

This will reduce the need for:
- #920
- #662
- #833

* Clean-up for customizations

Clean up ESPHome in order to make easier the use of customizations.

* Create Alarm page

* Add page Alarm

* Add Alarm docs

Update docs to reflect the current state (new features & changes)

* Creating "install.md" and update add-ons instructions

* Add Alarm page buttons pics

* Add link to Alarm on page Home

* Create Alarm page

* Alarm button font color

* Add `keyb_num` page

* Alarm Control Panel with PIN (#982)

Implements an Alarm Control Panel page on NSPanel.

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/66
Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/227
Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/672
Partially solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/299#discussioncomment-4874612
Partially solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/64#issuecomment-1566204490
Partially solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/718

* Fix alarm without pin not working

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/pull/930#issuecomment-1680981977

* Alarm page UI

Fixed close button
Disabled buttons are darker

* Move Entities button to ESPHome

Move logic behind Entities button (Home page) from Blueprint to ESPHome in order to gain performance on creating home page.

* Human readable Uptime (#986)

* Human readable Uptime

* Uptime from Frenck code

* Uptime with Frenck code

* Updated Human Readable Uptime

* Removed trailing spaces

* Renamed sensor to "Last started"

Sensor renamed
Update moved to the boot process
Clean-up

---------

Co-authored-by: Edward Firmo <[email protected]>
Co-authored-by: Edward Firmo <[email protected]>

* Update alarm icon & color

* Revert `fast_connect` back to `false`

* Extended chars on buttons pages (#988)

Replaces #740
Probably solves #664
Probably solves #738
Probably solves #987

* Removed `fast_connect`

* Support to `code_arm_required`

Only shows the alarm PIN keyboard if a code is required for arming (or when disarming).

* Update alarm icon on home page

Refresh icon when alarm state changes.

* Fix alarm icon not updating on home page

* Home buttons new format - Alarm

Modernise the button Alarm flow on page Home to improve performance.

* Home buttons new format - Entities

Modernise the button "Entities" flow on page Home to improve performance.

* Home buttons new format - QRcode

Modernise the button "QRcode" flow on page Home to improve performance.

* Home buttons new format - Notification

Modernise the button "Notification" flow on page Home to improve performance.

I haven't moved the code from the Blueprint to ESPHome yet, as I will leave this for when we rebuild the Notification flow in the near future (hopefully), so the performance gains may not be perceived now. Just aligning with other buttons format.

* Adding screenshots

* Delete ReleaseNotes.md

Moved to the release

* New entity filter format

This new format was released with HA v2023.4 and the old one will be deprecated soon.

* Fix Alarm page bypass icon

* Bump version to 4.0

* Rename `addon_climate_heat`

* Simplify climate substitutions

* Add support for `addon_climate_cool`

* Removed `${verbose_log}`

Use logger level `VERBOSE` instead

* Fix script call

* Clean up general entities & fallback

Store inputs into variables only when needed.
Removed fallback mode - Replaced by ESPHome local control when the relay is assigned to the button in the blueprint.

* Phase out sensor `nspanel_event` (partially)

This sensor is being replaced by event calls.

* uptime sensors (#998)

* Create ReleaseNotes.md

* Fix Climate page when embedded climate

And also added a lot of logs which should be removed later as it takes from memory.

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/995#discussioncomment-6835260

* Move brightness control to global var

Clean up page Home

* Alarm page translations - Finnish

https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/940#discussioncomment-6857262

* Exported pics

* Clean-up TFT

- Removed a bunch of unused pics
- Changed page indicator to new format (which will allow future development to hide unused pages)
- Standardized close button in most pages

* Fixed background pics

- Entities pages
- Weather pages

* Standardize close button

* Add "Alarm" section

* Support to wake-up page on `wake_up_display` service

This changes the behavior of a service introduced by #734.

* Optimize `wake_up_display` service

* Fix icon font sizes 10 and 64

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/960#issuecomment-1701903604

And also remove all the unnecessary `wait_until`

* Fix Settings page element ids

Partially solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/960#issuecomment-1702109668

* Add translation keys for `settings` page

#1002

* Update settings page when brightness changes on HA

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/960#issuecomment-1702149796

* Clean-up page settings

* update docs (#1003)

* updated docs

* Update ReleaseNotes.md

---------

Co-authored-by: Edward Firmo <[email protected]>

* Clean-up Cover page

I'm preparing this page to have icons changing based on the device_class selected to a cover.

* Clean-up boot delay

* Enable `current_page` sensor by default

Otherwise the system won´t update values unless the page is reloaded.

* Use `current_page` in blueprint conditions

One more step towards the phase out of `nspanelevent`.

* Move `script.refresh_colors` to `service.global_settings`

As this is called from a single point, there's no meaning of having a separated script.

* Fix climate icon update

Partially solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/995#discussioncomment-6891454

* Fix button show on climate page

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/995#discussioncomment-6891335

* Visual improvements on climate page

- Add friendly name when embedded - Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/995#discussioncomment-6891465
- Make disable icons a bit darker - Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/995#discussioncomment-6893440
- Add space for page title in EU an US Land versions
- Reset page timer when pressing/releasing on the slider - Partially solves #990

* Don't update values when page home is not visible

To reduce load on Home Assistant and the network

* Cleanup boot sequence

Move some functionalities to ESPHome

* Display internal sensor value when wifi is out

Before it was showing on home page only when API was out. This adds a test for WiFi.

* Fix `default_target_temperature`

It also updates the page home when thermostat status changes (for the chips).
Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/995#discussioncomment-6897727

* Adding ID to components missing it

* Renamed `wake_up_display` to `wake_up`

* Re-arrange commands list

* Add service `set_component_color`

Deprecates the following services:
- `send_command_font_color`
- `send_command_background_color`

* Fix button pages not showing

* Adjusted time for HW long click

* Fixed buttons on settings page

* Minor adjustments to page climate

And replace font 10 to size 48 (it was 64 since a few days ago).

* Updates to breaking changes list

* Page settings redesign

Clean up the UI of settings page.
Prepare for translations.

* Enable translations of Settings page

* Notification word-wrap

For EU and US_LAND only, for now.

* Notifications page rebuilt

- Notification button processed on ESPHome (as all the info is there)
- Added word-wrap for main text
- Expanded text size
- Handling display mode (used to define the number of chars per line on Notifications)
- Versioning handling - As a consequence of the previous item.

* Word-wrap buttons pages

Taking advantage of the algorithm created for notifications.

* Word-wrap for Alarm page

* Version mismatch notication

* Fix ESPHome not starting with older TFT

* Rebuilt home page status bar update

* Updated translations - Italian

Based on https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/1002#discussioncomment-6926846

Thanks @MaiPiu

* Fix `Nextion reported variable name invalid!`

* Fix `Nextion variable invalid`

* Handle `embedded_indoor_temperature`

Internal temperature display will be handled locally (ESPHome) when no other sensor is selected.

* Review temperature correction engine

* Fix display climate chip

* update `temp_nspanel` when correction changes

* Fix `Fan` page not open with long press HW button

Solves #1007

* Minor adjustments on settings page

* version 4.0 ready for release

* Clean-up docs

* Improve version notification

* Disable restore `notification_unread`

This must be changed to a binary sensor in the future.

* Beta v4.0 (#1012)

* Create ReleaseNotes.md (#879)

* Create ReleaseNotes.md

* sensor display precision

* Filter devices to esp32 only (#881)

* Filter devices to esp32 only

Show only ESP32 devices when selecting the panel

* Filtered device list

* Sensor display precision (#880)

Now the values shown in your panel will follow the [sensor display precision](https://www.home-assistant.io/blog/2023/03/01/release-20233/#sensor-display-precision) provided by Home Assistant.
=> If you have problems with a value exceeding the available space in your panel, please reduce the number of decimals using Home Assistant [sensor display precision](https://www.home-assistant.io/blog/2023/03/01/release-20233/#sensor-display-precision).

* New language selector (#882)

* New language selector

* Update ReleaseNotes.md

* Update ReleaseNotes.md

* Remove `settings_entity` (#887)

* Remove `settings_entity`

- Bump version to 3.5_dev
- Removed references to pictures removed from TFT
- Removed code related to closing settings pages
- Removed trigger `settings_entity`

* Removed `set_settings_entity` service

- Bump version to 3.5_dev
- Removed `set_settings_entity` service - BREAKING CHANGE
- Removed `settings_entity` text-sensor - BREAKING CHANGE
- Added service `open_entity_settings_page` - BREAKING CHANGE

* Removed `settings_entity`

- Bump version to 3.5_dev
- Removed old climate page (climate_backup)
- Removed pics related to old climate page (ids 16-47, 80-83, 95-96 and 125(US only))
- Enforces brightness on any page change (this allows wake-up on settings page with long press on physical buttons) - Pending removing code from Blueprint
- Added `entity` variable on pages `climate`, `lightsettings` and `coversettings`
- Added `entity` info to `nspanelevent` on pages `climate`, `lightsettings` and `coversettings`
- Added `back_page` variable on pages `climate`, `lightsettings` and `coversettings` (default: home)
- Moving to TFT close page logic on pages `climate`, `lightsettings` and `coversettings` - Pending changes on Blueprint and ESPHome
- Standardized name for `page_label` on pages `climate`, `lightsettings` and `coversettings`
- Standardized settings page names: `climate`, `cover` and `light` (Removed `settings` from page name)

* Removed `settings_entity`

* Removed `settings_entity`

* Removed `settings_entity`

* Move `entity` variable to home page (#889)

* Move `entity` variable to home page

This will enable future development of a fallback climate

* Move `entity` variable to home page

* Move `entity` variable to home page

* Move `entity` variable to home page

* Move `entity` variable to home page

* Use `en` as fallback language (#891)

* Use `en` as fallback language

Uses English if a non valid language is selected (like when using legacy language selection).

* Use `en` as fallback language

* Create `nspanel_us_land.tft` (#890)

* Create `nspanel_us_land.tft'

Add `nspanel_us_land.tft' for US panel on landscape mode, fixing the offset on the touch screen when using `nspanel_eu.tft` into a US panel.
Hides the hardware buttons labels, as Nextion cannot support rotated text.

* Created `nspanel_us_land.tft`

* Created `nspanel_us_land.tft`

solves #390
solves #432
solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/299#discussioncomment-4933716

* Created `nspanel_us_land.tft`

* Created `nspanel_us_land.tft`

* Fix "Button confirmation page not working correctly"

Solves #883

* Supports weather forecast with `datetime` not string

This adds support to weather integrations where the `datetime` field under `forecast` attribute is provided as a `datetime` type.
This was seen on Météo-France, while all other weather integrations tested so far used a `text` field for `datetime`.

This solves #893

* Wifi icon to indicate when API offline

This changes the behavior of Wifi icon:

How it was before:
- Wifi icon was visible only when the wifi was connected, nothing was shown when wifi was not connected.

How it is now:
- Wifi icon will have 3 states:
 - Wifi & API connected: Gray wifi icon
 - Wifi disconnected: Red wifi-off icon
 - Wifi connected, but API disconnected (HA is out?): Red api-off icon

* API status indication on the panel

* Limit light & cover to supported settings (#896)

* Limit light to supported settings

When showing light settings, only the supported features will be shown for each light.

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

This partially solves #635

* Limits covers to supported settings

Only show cover settings when `set_position` is supported.

This solves #635

* Limits covers to supported settings

* Update instructions.md

* Add Fan speed settings page (#897)

* Add Fan speed settings page

Add an initial fan speed control page for fans supporting speed control.
Add speed (%) info in the buttons pages.

Solves #404 
Solves #791 
Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/718#discussioncomment-5786106

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Fix name on confirmation page

Fix the entity name on the confirmation page.

The new order is:
1. Name set on the blueprint settings
2. Entity's `friendly_name` attribute
3. Entity's `name` attribute
4. Entity's `entity_id`

Solves #501

* Select wake-up page (#898)

* Select wake-up page

Users will be able to select the wake-up page on the blueprint inputs.
This selected page will be shown after a boot (after the boot page) and with a touch in the screen when on screen saver page.
After showing this wake-up page, all the previous behavior for closing the page (with a click or after a timeout) will be the same.

Solves #576 
Solves #612 
Solves #801 
Probably improves for https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/718#discussioncomment-5715670

* Select wake-up page

* Fan update engine

Change the fan update engine to follow the same patter as other settings pages.

* Update ReleaseNotes.md

* Adding vertical bars pics

* Panel offline mode (#900)

* Panel offline mode

Introduces "offline mode" for the panel, which will be used later with a fallback climate.

Pages that are depending on the blueprint (buttons pages, entity pages, settings pages, etc) won't be shown when the API is disconnected.

* Panel offline mode

* Panel offline mode

* Panel offline mode

* Panel offline mode

* "Jump to settings" on tft

Moved "Jump to settings page" routine from ESPHome to TFT in order to reduce complexity.

* Exclude Nextion2Text

Exclude Nextion2Text

* Fix validation issue

* Time engine on ESPHome

* Time engine on ESPHome

* Notification page bigger hotspot

Added hotspots around the buttons (Accept & Clear) on Notification page to make easier to click on those.

Solves #907

* Boot page retry comm

The boot page will retry communication with the blueprint once a minute to avoid the situation where that page is shown until the automation is reloaded.

* Fix call to screen page

Fixes the call to screen page on US panel.
Reconciliate the US landscape model from EU model.

* Fix fan page `button_on`

Fixing rounding on that button.

* Fixed Fan page rounding

* Prevents boot sequence in other pages

* Physical relay local control

We are trying to make your panel as autonomous as possible by moving some of the controls from the Blueprint to ESPHome. This will reduce the load in your network and Home Assistant, but also will make a more reliable system capable to do it's core functionality even when the network is unavailable or Home Assistant is restarting.
With this version, the following engines have been moved to your panel (local control):
- Physical relay control (when hardware left button is connected to relay 1 or right button to relay 2)

Solves #910

* Embedded climate (#917)

* Performance improvements

The main focus here was to reduce the number of calls between Home Assistant and ESPHome, moving logic as much as possible to TFT and ESPHome.
- Service calls moved to ESPHome (in preparation for Alarm Control Panel)
- Page change informed via event call instead of `nspanel_event` sensor (which still in use by other calls, but might be possible to remove in the future)

* Draft embedded climate

This adds an initial version of an embedded climate/thermostat (heating only for now) with support for local control even with Wi-Fi out.

Solves #646
Solves #263

* Update ReleaseNotes.md

* Fix climate slider

Fix for climate slider opening in an incorrect position and sending only the integer part of the new target temperature

* Moving home page to ESPHome

In progress...

* Fix translations - Dutch

* Embedded chip 3

Home page - Chip 3 will be controlled locally when embedded climate is enable.

* Fixed buttons bar

Fixed buttons bar managed on ESPHome when embedded climate is visible.

* Update ReleaseNotes.md

* Services back to the Blueprint

Moving service calls back to the blueprint as latest HA requires user's permissions to call HA services from ESPHome.
This still have to be used for Alarm calls due to security concerns.

* Update ReleaseNotes.md

* support to hidden ssid (#908)

Supports hidden ssid with the use of substitutions `wifi_hidden: "true"`.

This can be breaking change for users with custom/advanced wifi settings.

Solves #906

* Update nspanel_esphome.yaml

* Removed `restore_state`

There is some incomplete work related to alarms on this commit, but the focus here is to fix `restore_state` on ESPHome v2023.7.0.

This solves #939

* US model - Fan page - Redistribute icons

Redistributed icons on Fan page on US model in order to improve usability.

Based on feedback from https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/791#discussioncomment-6338706

* Align `nspanel_us_land`

Apply all changes from EU to US_Land

* Fix relays chips

Fix relay status indication on chips.

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/926#issuecomment-1627660273

* Fix "invalid variable" for "api"

Fix error "Nextion invalid variable name" when setting `api`.

* Default embedded climate to relay_0

* Fix translations - Italian

Based on https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/940#discussioncomment-6511043

* Fix `set_temperature` for climate

Solves #957

* Fix `fan.turn_off` call

Removed timer call from fan stop button.
This solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/791#discussioncomment-6494535

* Call a `fan.turn_off` when percentage is 0%

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/791#discussioncomment-6621756

* Fix call for fan stop button

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/791#discussioncomment-6622377

* Icons on ESPHome

Move icons from TFT/HMI to ESPHome to prevent error on Nextion2Text.

* Updated translations - Spanish

Based on https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/940#discussioncomment-6548961

* Make home page sensor's icons consistent

Make icon selection consistent with chips where the entity's icon is used in case a icon is not set in the blueprint settings.

Solves #963

* Updated translations - Slovenian

Based on:
- https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/940#discussioncomment-6665723
-  https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/829#discussioncomment-6665751

* dutch (#974)

* small ducht translations

small ducht translations

* Dutch translations

---------

Co-authored-by: Edward Firmo <[email protected]>

* Add-on support (#977)

Moved climate settings to an add-on.
Updated documentation.

* Fixed link to addon climate docs

* Fix change brightness when sleeping

Prevents the panel to change screen brightness when sleeping.

Solves #975

* Standardize HA service calls

* Bump version to `4.0 dev`

* Create customization.md

This will reduce the need for:
- #920
- #662
- #833

* Clean-up for customizations

Clean up ESPHome in order to make easier the use of customizations.

* Create Alarm page

* Add page Alarm

* Add Alarm docs

Update docs to reflect the current state (new features & changes)

* Creating "install.md" and update add-ons instructions

* Add Alarm page buttons pics

* Add link to Alarm on page Home

* Create Alarm page

* Alarm button font color

* Add `keyb_num` page

* Alarm Control Panel with PIN (#982)

Implements an Alarm Control Panel page on NSPanel.

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/66
Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/227
Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/672
Partially solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/299#discussioncomment-4874612
Partially solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/64#issuecomment-1566204490
Partially solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/718

* Fix alarm without pin not working

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/pull/930#issuecomment-1680981977

* Alarm page UI

Fixed close button
Disabled buttons are darker

* Move Entities button to ESPHome

Move logic behind Entities button (Home page) from Blueprint to ESPHome in order to gain performance on creating home page.

* Human readable Uptime (#986)

* Human readable Uptime

* Uptime from Frenck code

* Uptime with Frenck code

* Updated Human Readable Uptime

* Removed trailing spaces

* Renamed sensor to "Last started"

Sensor renamed
Update moved to the boot process
Clean-up

---------

Co-authored-by: Edward Firmo <[email protected]>
Co-authored-by: Edward Firmo <[email protected]>

* Update alarm icon & color

* Revert `fast_connect` back to `false`

* Extended chars on buttons pages (#988)

Replaces #740
Probably solves #664
Probably solves #738
Probably solves #987

* Removed `fast_connect`

* Support to `code_arm_required`

Only shows the alarm PIN keyboard if a code is required for arming (or when disarming).

* Update alarm icon on home page

Refresh icon when alarm state changes.

* Fix alarm icon not updating on home page

* Home buttons new format - Alarm

Modernise the button Alarm flow on page Home to improve performance.

* Home buttons new format - Entities

Modernise the button "Entities" flow on page Home to improve performance.

* Home buttons new format - QRcode

Modernise the button "QRcode" flow on page Home to improve performance.

* Home buttons new format - Notification

Modernise the button "Notification" flow on page Home to improve performance.

I haven't moved the code from the Blueprint to ESPHome yet, as I will leave this for when we rebuild the Notification flow in the near future (hopefully), so the performance gains may not be perceived now. Just aligning with other buttons format.

* Adding screenshots

* Delete ReleaseNotes.md

Moved to the release

* New entity filter format

This new format was released with HA v2023.4 and the old one will be deprecated soon.

* Fix Alarm page bypass icon

* Bump version to 4.0

* Rename `addon_climate_heat`

* Simplify climate substitutions

* Add support for `addon_climate_cool`

* Removed `${verbose_log}`

Use logger level `VERBOSE` instead

* Fix script call

* Clean up general entities & fallback

Store inputs into variables only when needed.
Removed fallback mode - Replaced by ESPHome local control when the relay is assigned to the button in the blueprint.

* Phase out sensor `nspanel_event` (partially)

This sensor is being replaced by event calls.

* uptime sensors (#998)

* Create ReleaseNotes.md

* Fix Climate page when embedded climate

And also added a lot of logs which should be removed later as it takes from memory.

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/995#discussioncomment-6835260

* Move brightness control to global var

Clean up page Home

* Alarm page translations - Finnish

https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/940#discussioncomment-6857262

* Exported pics

* Clean-up TFT

- Removed a bunch of unused pics
- Changed page indicator to new format (which will allow future development to hide unused pages)
- Standardized close button in most pages

* Fixed background pics

- Entities pages
- Weather pages

* Standardize close button

* Add "Alarm" section

* Support to wake-up page on `wake_up_display` service

This changes the behavior of a service introduced by #734.

* Optimize `wake_up_display` service

* Fix icon font sizes 10 and 64

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/960#issuecomment-1701903604

And also remove all the unnecessary `wait_until`

* Fix Settings page element ids

Partially solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/960#issuecomment-1702109668

* Add translation keys for `settings` page

#1002

* Update settings page when brightness changes on HA

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/960#issuecomment-1702149796

* Clean-up page settings

* update docs (#1003)

* updated docs

* Update ReleaseNotes.md

---------

Co-authored-by: Edward Firmo <[email protected]>

* Clean-up Cover page

I'm preparing this page to have icons changing based on the device_class selected to a cover.

* Clean-up boot delay

* Enable `current_page` sensor by default

Otherwise the system won´t update values unless the page is reloaded.

* Use `current_page` in blueprint conditions

One more step towards the phase out of `nspanelevent`.

* Move `script.refresh_colors` to `service.global_settings`

As this is called from a single point, there's no meaning of having a separated script.

* Fix climate icon update

Partially solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/995#discussioncomment-6891454

* Fix button show on climate page

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/995#discussioncomment-6891335

* Visual improvements on climate page

- Add friendly name when embedded - Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/995#discussioncomment-6891465
- Make disable icons a bit darker - Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/995#discussioncomment-6893440
- Add space for page title in EU an US Land versions
- Reset page timer when pressing/releasing on the slider - Partially solves #990

* Don't update values when page home is not visible

To reduce load on Home Assistant and the network

* Cleanup boot sequence

Move some functionalities to ESPHome

* Display internal sensor value when wifi is out

Before it was showing on home page only when API was out. This adds a test for WiFi.

* Fix `default_target_temperature`

It also updates the page home when thermostat status changes (for the chips).
Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/995#discussioncomment-6897727

* Adding ID to components missing it

* Renamed `wake_up_display` to `wake_up`

* Re-arrange commands list

* Add service `set_component_color`

Deprecates the following services:
- `send_command_font_color`
- `send_command_background_color`

* Fix button pages not showing

* Adjusted time for HW long click

* Fixed buttons on settings page

* Minor adjustments to page climate

And replace font 10 to size 48 (it was 64 since a few days ago).

* Updates to breaking changes list

* Page settings redesign

Clean up the UI of settings page.
Prepare for translations.

* Enable translations of Settings page

* Notification word-wrap

For EU and US_LAND only, for now.

* Notifications page rebuilt

- Notification button processed on ESPHome (as all the info is there)
- Added word-wrap for main text
- Expanded text size
- Handling display mode (used to define the number of chars per line on Notifications)
- Versioning handling - As a consequence of the previous item.

* Word-wrap buttons pages

Taking advantage of the algorithm created for notifications.

* Word-wrap for Alarm page

* Version mismatch notication

* Fix ESPHome not starting with older TFT

* Rebuilt home page status bar update

* Updated translations - Italian

Based on https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/1002#discussioncomment-6926846

Thanks @MaiPiu

* Fix `Nextion reported variable name invalid!`

* Fix `Nextion variable invalid`

* Handle `embedded_indoor_temperature`

Internal temperature display will be handled locally (ESPHome) when no other sensor is selected.

* Review temperature correction engine

* Fix display climate chip

* update `temp_nspanel` when correction changes

* Fix `Fan` page not open with long press HW button

Solves #1007

* Minor adjustments on settings page

* version 4.0 ready for release

* Clean-up docs

---------

Co-authored-by: bkbartk <[email protected]>
Co-authored-by: w00zy <[email protected]>

* Fix Fan page button colors when opening

Solves #1017

* Translations (#1023)

* Translations

* Update nspanel_blueprint.yaml

I've changed `brightness` for now as the new design isn't implemented yet, but that string is already in use with the current design.

---------

Co-authored-by: Edward Firmo <[email protected]>

* Adjustments to settings page

* Fix entity info when calling detailed pages

Solves #1022

* Added `media_player` page (hidden)

* New "Confirm" pop-up

This also removes the sensor "NSPanel Event"

* Fix pages not updating values

Solves #1026

* Media player - Buttons

- Added code to buttons on media_player page.
- Clean-up:
  - Moved wake-up select from Blueprint to ESPHome component
  - Removed `switch.xxxxx_confirmation_message`

* Fix logging for global_settings

It was logging wakeup_page, which is deprecated

* Improved version notification

* Removed trailing spaces

* Notification for `sensor.xxxxx_current_page` missing

This might be a common issue for users migrating from v3.4 to v3.5.
This information is part of the release notes, but I believe it worth having a guide to support closely any user who miss that in the release notes.

* Simplify `touchevent` engine

The touch event is used only for the sleeping engine (it will be used for dimming later) and it was transferring all the json info with page name, component, entity, etc.
This was replaced by a simple random integer with no meaning other than "the screen was touched, reset the timer".

* Media player first buttons actions

* Fix unknown service: `media_player.null`

* Media Player control

You will be able to add a Media Player entity to any of the buttons pages and with a long press you will see the media player page.

* Remove dimming timer for now

The funcionality isn't completed.

* Home page - Custom buttons

On the blueprint you can now set up to 3 buttons to be shown on Home page.
It will show the detailed settings page, so the entity must be compatible.

* Fix Media player missing parameters

Possibly solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/1030#discussioncomment-6984573

* Prevents calls to `media_player.null`

* Remove `entity` info from pages on TFT

Since v3.4, the info about entity_id shown was going all the way to Nextion and then sent back in the json return, however this requires a long (100-char) global var and the way it was implemented, it was one of those per settings page, as climate should be also recorded at the same time in case the embedded climate was installed.
This was taking too much memory, so I've moved this info to a global variable (string) in ESPHome.
There is now lots of space for code cleaning (and still pending to do the same with climate entity, as it could be only a bool to inform if embedded), but this brings the functionality.

This enabled the return to global for some components, so it probably solves #1031

* Prototyping `power` page

Thanks @Floppe for doing the design
#838

* Prototyping `power` page

* New sleep flow

* Removed trailing spaces

* Fix empty page climate

* Fix names on button pages

Fix names when a name is not provided in the blueprint settings.

* Fix call to sleep routine when timeout changes

Solves #1037

* Replace `confirm` var on buttons pages

Simpler and saves some memory.

* Clean-up

* Align the code for the 3 timers

* Extend domains supported by home page custom buttons

Based on #1034

* Fix error when btn_label is `None`

* Fix `Variable invalid` on buttons pages

* Fix constructor of Entity pages

* Fallback even when button is assigned to another entity

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/1013#issuecomment-1720107844

* Add inputs for media player refresh time

* Adjustments to Media Player refresh interval default values

* Use panel's events to reset timers

Possibly solves #1040
Possibly solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/995#discussioncomment-7020153

* State based colors to home page custom buttons

* Fix alarm not changing status

Do not clear `entity_id` when opening keyboard page, so the info can be used when sending commands.

Solves #1039

* Missing `nspanel_us.tft`

* add `touchevents` to pages `media_player` and `confirm`

To avoid panel going back to Home page while user is playing with the page.
Solves #1040

* Media player minor layout changes

* Media player - Volume timer & icon size

Volume timer changed from 1000 to 500ms
Icon change from font 9 to 10

* Media player roll back font 9 and timer 1s

* Don't send to Nextion obsolete volume settings

If the volume is the same as the last one sent to the screen, don't send again, so if changes are being made on the screen it didn't receive the update all the time, making the slider unresponsive.

* Media player - Layout improvement

- Removed button "Stop"
- Increase touch area for buttons
- Redistributed buttons on page

* Add touchevents to page climate

Possibly solves #995

* Resolve validation

* Correct playing time based on `updated_at` attribute

* Prepare for when attribute is not available

* Fix attribute `media_position`

* Fix time duration when HA isn't updating position

* Fix climate page not opening when offline

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/995#discussioncomment-6834067

* Clean-up release notes

* Clean up code

- Removed commented out lines
- Removed temporary logs

Getting prepared to release

* Bump version to 4.0beta

To reduce the chance of an obsolete file in use after the release.

* Change version to 4.0dev

To differentiate from beta.

* Added missing translations (#1047)

* Added missing translations

Added missing translations for the Swedish translation.

* Caption first char

---------

Co-authored-by: Edward Firmo <[email protected]>

* Translations to Slovak on Settings page

* Refresh docs

* Update nspanel_blank.md

* Update nspanel_blank.md

* Add screensaver to `nspanel_blank.tft`

And build a new tft with latest firmware and url for instructions.

* Update nspanel_blank.md

* Fix to Slovenian translation

https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/1002#discussioncomment-7041796

* Settings page - Translations to French

From https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/1002#discussioncomment-7045452

* Alarm page - Translations to French

https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/940#discussioncomment-7046479

* Add customization for display sleeping/awake

Probably solves #1035

* Customizations - Blank TFT button

Probably solves #1048

* Customizations - Deep sleep

Solves #955

* Customization - Deep sleep - Fix broken link

* Translations - Slovak

- https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/829#discussioncomment-7054153
- https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/940#discussioncomment-7054142

* New versioning - not implemented

* Bump version to `4.0b2`

* v4.0 release

---------

Co-authored-by: bkbartk <[email protected]>
Co-authored-by: w00zy <[email protected]>
Co-authored-by: w00zy <[email protected]>
Co-authored-by: Erik Larsson <[email protected]>
edwardtfn added a commit that referenced this issue Sep 20, 2023
* v4.0 - Alarm and Media player pages, Climate add-ons and a more robust panel (#1033)

* Create ReleaseNotes.md (#879)

* Create ReleaseNotes.md

* sensor display precision

* Filter devices to esp32 only (#881)

* Filter devices to esp32 only

Show only ESP32 devices when selecting the panel

* Filtered device list

* Sensor display precision (#880)

Now the values shown in your panel will follow the [sensor display precision](https://www.home-assistant.io/blog/2023/03/01/release-20233/#sensor-display-precision) provided by Home Assistant.
=> If you have problems with a value exceeding the available space in your panel, please reduce the number of decimals using Home Assistant [sensor display precision](https://www.home-assistant.io/blog/2023/03/01/release-20233/#sensor-display-precision).

* New language selector (#882)

* New language selector

* Update ReleaseNotes.md

* Update ReleaseNotes.md

* Remove `settings_entity` (#887)

* Remove `settings_entity`

- Bump version to 3.5_dev
- Removed references to pictures removed from TFT
- Removed code related to closing settings pages
- Removed trigger `settings_entity`

* Removed `set_settings_entity` service

- Bump version to 3.5_dev
- Removed `set_settings_entity` service - BREAKING CHANGE
- Removed `settings_entity` text-sensor - BREAKING CHANGE
- Added service `open_entity_settings_page` - BREAKING CHANGE

* Removed `settings_entity`

- Bump version to 3.5_dev
- Removed old climate page (climate_backup)
- Removed pics related to old climate page (ids 16-47, 80-83, 95-96 and 125(US only))
- Enforces brightness on any page change (this allows wake-up on settings page with long press on physical buttons) - Pending removing code from Blueprint
- Added `entity` variable on pages `climate`, `lightsettings` and `coversettings`
- Added `entity` info to `nspanelevent` on pages `climate`, `lightsettings` and `coversettings`
- Added `back_page` variable on pages `climate`, `lightsettings` and `coversettings` (default: home)
- Moving to TFT close page logic on pages `climate`, `lightsettings` and `coversettings` - Pending changes on Blueprint and ESPHome
- Standardized name for `page_label` on pages `climate`, `lightsettings` and `coversettings`
- Standardized settings page names: `climate`, `cover` and `light` (Removed `settings` from page name)

* Removed `settings_entity`

* Removed `settings_entity`

* Removed `settings_entity`

* Move `entity` variable to home page (#889)

* Move `entity` variable to home page

This will enable future development of a fallback climate

* Move `entity` variable to home page

* Move `entity` variable to home page

* Move `entity` variable to home page

* Move `entity` variable to home page

* Use `en` as fallback language (#891)

* Use `en` as fallback language

Uses English if a non valid language is selected (like when using legacy language selection).

* Use `en` as fallback language

* Create `nspanel_us_land.tft` (#890)

* Create `nspanel_us_land.tft'

Add `nspanel_us_land.tft' for US panel on landscape mode, fixing the offset on the touch screen when using `nspanel_eu.tft` into a US panel.
Hides the hardware buttons labels, as Nextion cannot support rotated text.

* Created `nspanel_us_land.tft`

* Created `nspanel_us_land.tft`

solves #390
solves #432
solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/299#discussioncomment-4933716

* Created `nspanel_us_land.tft`

* Created `nspanel_us_land.tft`

* Fix "Button confirmation page not working correctly"

Solves #883

* Supports weather forecast with `datetime` not string

This adds support to weather integrations where the `datetime` field under `forecast` attribute is provided as a `datetime` type.
This was seen on Météo-France, while all other weather integrations tested so far used a `text` field for `datetime`.

This solves #893

* Wifi icon to indicate when API offline

This changes the behavior of Wifi icon:

How it was before:
- Wifi icon was visible only when the wifi was connected, nothing was shown when wifi was not connected.

How it is now:
- Wifi icon will have 3 states:
 - Wifi & API connected: Gray wifi icon
 - Wifi disconnected: Red wifi-off icon
 - Wifi connected, but API disconnected (HA is out?): Red api-off icon

* API status indication on the panel

* Limit light & cover to supported settings (#896)

* Limit light to supported settings

When showing light settings, only the supported features will be shown for each light.

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

This partially solves #635

* Limits covers to supported settings

Only show cover settings when `set_position` is supported.

This solves #635

* Limits covers to supported settings

* Update instructions.md

* Add Fan speed settings page (#897)

* Add Fan speed settings page

Add an initial fan speed control page for fans supporting speed control.
Add speed (%) info in the buttons pages.

Solves #404 
Solves #791 
Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/718#discussioncomment-5786106

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Fix name on confirmation page

Fix the entity name on the confirmation page.

The new order is:
1. Name set on the blueprint settings
2. Entity's `friendly_name` attribute
3. Entity's `name` attribute
4. Entity's `entity_id`

Solves #501

* Select wake-up page (#898)

* Select wake-up page

Users will be able to select the wake-up page on the blueprint inputs.
This selected page will be shown after a boot (after the boot page) and with a touch in the screen when on screen saver page.
After showing this wake-up page, all the previous behavior for closing the page (with a click or after a timeout) will be the same.

Solves #576 
Solves #612 
Solves #801 
Probably improves for https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/718#discussioncomment-5715670

* Select wake-up page

* Fan update engine

Change the fan update engine to follow the same patter as other settings pages.

* Update ReleaseNotes.md

* Adding vertical bars pics

* Panel offline mode (#900)

* Panel offline mode

Introduces "offline mode" for the panel, which will be used later with a fallback climate.

Pages that are depending on the blueprint (buttons pages, entity pages, settings pages, etc) won't be shown when the API is disconnected.

* Panel offline mode

* Panel offline mode

* Panel offline mode

* Panel offline mode

* "Jump to settings" on tft

Moved "Jump to settings page" routine from ESPHome to TFT in order to reduce complexity.

* Exclude Nextion2Text

Exclude Nextion2Text

* Fix validation issue

* Time engine on ESPHome

* Time engine on ESPHome

* Notification page bigger hotspot

Added hotspots around the buttons (Accept & Clear) on Notification page to make easier to click on those.

Solves #907

* Boot page retry comm

The boot page will retry communication with the blueprint once a minute to avoid the situation where that page is shown until the automation is reloaded.

* Fix call to screen page

Fixes the call to screen page on US panel.
Reconciliate the US landscape model from EU model.

* Fix fan page `button_on`

Fixing rounding on that button.

* Fixed Fan page rounding

* Prevents boot sequence in other pages

* Physical relay local control

We are trying to make your panel as autonomous as possible by moving some of the controls from the Blueprint to ESPHome. This will reduce the load in your network and Home Assistant, but also will make a more reliable system capable to do it's core functionality even when the network is unavailable or Home Assistant is restarting.
With this version, the following engines have been moved to your panel (local control):
- Physical relay control (when hardware left button is connected to relay 1 or right button to relay 2)

Solves #910

* Embedded climate (#917)

* Performance improvements

The main focus here was to reduce the number of calls between Home Assistant and ESPHome, moving logic as much as possible to TFT and ESPHome.
- Service calls moved to ESPHome (in preparation for Alarm Control Panel)
- Page change informed via event call instead of `nspanel_event` sensor (which still in use by other calls, but might be possible to remove in the future)

* Draft embedded climate

This adds an initial version of an embedded climate/thermostat (heating only for now) with support for local control even with Wi-Fi out.

Solves #646
Solves #263

* Update ReleaseNotes.md

* Fix climate slider

Fix for climate slider opening in an incorrect position and sending only the integer part of the new target temperature

* Moving home page to ESPHome

In progress...

* Fix translations - Dutch

* Embedded chip 3

Home page - Chip 3 will be controlled locally when embedded climate is enable.

* Fixed buttons bar

Fixed buttons bar managed on ESPHome when embedded climate is visible.

* Update ReleaseNotes.md

* Services back to the Blueprint

Moving service calls back to the blueprint as latest HA requires user's permissions to call HA services from ESPHome.
This still have to be used for Alarm calls due to security concerns.

* Update ReleaseNotes.md

* support to hidden ssid (#908)

Supports hidden ssid with the use of substitutions `wifi_hidden: "true"`.

This can be breaking change for users with custom/advanced wifi settings.

Solves #906

* Update nspanel_esphome.yaml

* Removed `restore_state`

There is some incomplete work related to alarms on this commit, but the focus here is to fix `restore_state` on ESPHome v2023.7.0.

This solves #939

* US model - Fan page - Redistribute icons

Redistributed icons on Fan page on US model in order to improve usability.

Based on feedback from https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/791#discussioncomment-6338706

* Align `nspanel_us_land`

Apply all changes from EU to US_Land

* Fix relays chips

Fix relay status indication on chips.

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/926#issuecomment-1627660273

* Fix "invalid variable" for "api"

Fix error "Nextion invalid variable name" when setting `api`.

* Default embedded climate to relay_0

* Fix issue with `restore_state` and ESPHome v2023.7.0 (#941)

Solves #939

* Fix translations - Italian

Based on https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/940#discussioncomment-6511043

* Fix `set_temperature` for climate

Solves #957

* Fix `fan.turn_off` call

Removed timer call from fan stop button.
This solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/791#discussioncomment-6494535

* Call a `fan.turn_off` when percentage is 0%

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/791#discussioncomment-6621756

* Fix call for fan stop button

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/791#discussioncomment-6622377

* Icons on ESPHome

Move icons from TFT/HMI to ESPHome to prevent error on Nextion2Text.

* Updated translations - Spanish

Based on https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/940#discussioncomment-6548961

* Make home page sensor's icons consistent

Make icon selection consistent with chips where the entity's icon is used in case a icon is not set in the blueprint settings.

Solves #963

* Updated translations - Slovenian

Based on:
- https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/940#discussioncomment-6665723
-  https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/829#discussioncomment-6665751

* dutch (#974)

* small ducht translations

small ducht translations

* Dutch translations

---------

Co-authored-by: Edward Firmo <[email protected]>

* Add-on support (#977)

Moved climate settings to an add-on.
Updated documentation.

* Fixed link to addon climate docs

* Fix change brightness when sleeping

Prevents the panel to change screen brightness when sleeping.

Solves #975

* Standardize HA service calls

* Bump version to `4.0 dev`

* Create customization.md

This will reduce the need for:
- #920
- #662
- #833

* Clean-up for customizations

Clean up ESPHome in order to make easier the use of customizations.

* Create Alarm page

* Add page Alarm

* Add Alarm docs

Update docs to reflect the current state (new features & changes)

* Creating "install.md" and update add-ons instructions

* Add Alarm page buttons pics

* Add link to Alarm on page Home

* Create Alarm page

* Alarm button font color

* Add `keyb_num` page

* Alarm Control Panel with PIN (#982)

Implements an Alarm Control Panel page on NSPanel.

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/66
Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/227
Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/672
Partially solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/299#discussioncomment-4874612
Partially solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/64#issuecomment-1566204490
Partially solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/718

* Fix alarm without pin not working

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/pull/930#issuecomment-1680981977

* Alarm page UI

Fixed close button
Disabled buttons are darker

* Move Entities button to ESPHome

Move logic behind Entities button (Home page) from Blueprint to ESPHome in order to gain performance on creating home page.

* Human readable Uptime (#986)

* Human readable Uptime

* Uptime from Frenck code

* Uptime with Frenck code

* Updated Human Readable Uptime

* Removed trailing spaces

* Renamed sensor to "Last started"

Sensor renamed
Update moved to the boot process
Clean-up

---------

Co-authored-by: Edward Firmo <[email protected]>
Co-authored-by: Edward Firmo <[email protected]>

* Update alarm icon & color

* Revert `fast_connect` back to `false`

* Extended chars on buttons pages (#988)

Replaces #740
Probably solves #664
Probably solves #738
Probably solves #987

* Removed `fast_connect`

* Support to `code_arm_required`

Only shows the alarm PIN keyboard if a code is required for arming (or when disarming).

* Update alarm icon on home page

Refresh icon when alarm state changes.

* Fix alarm icon not updating on home page

* Home buttons new format - Alarm

Modernise the button Alarm flow on page Home to improve performance.

* Home buttons new format - Entities

Modernise the button "Entities" flow on page Home to improve performance.

* Home buttons new format - QRcode

Modernise the button "QRcode" flow on page Home to improve performance.

* Home buttons new format - Notification

Modernise the button "Notification" flow on page Home to improve performance.

I haven't moved the code from the Blueprint to ESPHome yet, as I will leave this for when we rebuild the Notification flow in the near future (hopefully), so the performance gains may not be perceived now. Just aligning with other buttons format.

* Adding screenshots

* Delete ReleaseNotes.md

Moved to the release

* New entity filter format

This new format was released with HA v2023.4 and the old one will be deprecated soon.

* Fix Alarm page bypass icon

* Bump version to 4.0

* Rename `addon_climate_heat`

* Simplify climate substitutions

* Add support for `addon_climate_cool`

* Removed `${verbose_log}`

Use logger level `VERBOSE` instead

* Fix script call

* Clean up general entities & fallback

Store inputs into variables only when needed.
Removed fallback mode - Replaced by ESPHome local control when the relay is assigned to the button in the blueprint.

* Phase out sensor `nspanel_event` (partially)

This sensor is being replaced by event calls.

* uptime sensors (#998)

* Create ReleaseNotes.md

* Fix Climate page when embedded climate

And also added a lot of logs which should be removed later as it takes from memory.

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/995#discussioncomment-6835260

* Move brightness control to global var

Clean up page Home

* Alarm page translations - Finnish

https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/940#discussioncomment-6857262

* Exported pics

* Clean-up TFT

- Removed a bunch of unused pics
- Changed page indicator to new format (which will allow future development to hide unused pages)
- Standardized close button in most pages

* Fixed background pics

- Entities pages
- Weather pages

* Standardize close button

* Add "Alarm" section

* Support to wake-up page on `wake_up_display` service

This changes the behavior of a service introduced by #734.

* Optimize `wake_up_display` service

* Fix icon font sizes 10 and 64

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/960#issuecomment-1701903604

And also remove all the unnecessary `wait_until`

* Fix Settings page element ids

Partially solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/960#issuecomment-1702109668

* Add translation keys for `settings` page

#1002

* Update settings page when brightness changes on HA

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/960#issuecomment-1702149796

* Clean-up page settings

* update docs (#1003)

* updated docs

* Update ReleaseNotes.md

---------

Co-authored-by: Edward Firmo <[email protected]>

* Clean-up Cover page

I'm preparing this page to have icons changing based on the device_class selected to a cover.

* Clean-up boot delay

* Enable `current_page` sensor by default

Otherwise the system won´t update values unless the page is reloaded.

* Use `current_page` in blueprint conditions

One more step towards the phase out of `nspanelevent`.

* Move `script.refresh_colors` to `service.global_settings`

As this is called from a single point, there's no meaning of having a separated script.

* Fix climate icon update

Partially solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/995#discussioncomment-6891454

* Fix button show on climate page

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/995#discussioncomment-6891335

* Visual improvements on climate page

- Add friendly name when embedded - Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/995#discussioncomment-6891465
- Make disable icons a bit darker - Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/995#discussioncomment-6893440
- Add space for page title in EU an US Land versions
- Reset page timer when pressing/releasing on the slider - Partially solves #990

* Don't update values when page home is not visible

To reduce load on Home Assistant and the network

* Cleanup boot sequence

Move some functionalities to ESPHome

* Display internal sensor value when wifi is out

Before it was showing on home page only when API was out. This adds a test for WiFi.

* Fix `default_target_temperature`

It also updates the page home when thermostat status changes (for the chips).
Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/995#discussioncomment-6897727

* Adding ID to components missing it

* Renamed `wake_up_display` to `wake_up`

* Re-arrange commands list

* Add service `set_component_color`

Deprecates the following services:
- `send_command_font_color`
- `send_command_background_color`

* Fix button pages not showing

* Adjusted time for HW long click

* Fixed buttons on settings page

* Minor adjustments to page climate

And replace font 10 to size 48 (it was 64 since a few days ago).

* Updates to breaking changes list

* Page settings redesign

Clean up the UI of settings page.
Prepare for translations.

* Enable translations of Settings page

* Notification word-wrap

For EU and US_LAND only, for now.

* Notifications page rebuilt

- Notification button processed on ESPHome (as all the info is there)
- Added word-wrap for main text
- Expanded text size
- Handling display mode (used to define the number of chars per line on Notifications)
- Versioning handling - As a consequence of the previous item.

* Word-wrap buttons pages

Taking advantage of the algorithm created for notifications.

* Word-wrap for Alarm page

* Version mismatch notication

* Fix ESPHome not starting with older TFT

* Rebuilt home page status bar update

* Updated translations - Italian

Based on https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/1002#discussioncomment-6926846

Thanks @MaiPiu

* Fix `Nextion reported variable name invalid!`

* Fix `Nextion variable invalid`

* Handle `embedded_indoor_temperature`

Internal temperature display will be handled locally (ESPHome) when no other sensor is selected.

* Review temperature correction engine

* Fix display climate chip

* update `temp_nspanel` when correction changes

* Fix `Fan` page not open with long press HW button

Solves #1007

* Minor adjustments on settings page

* version 4.0 ready for release

* Clean-up docs

* Improve version notification

* Disable restore `notification_unread`

This must be changed to a binary sensor in the future.

* Beta v4.0 (#1012)

* Create ReleaseNotes.md (#879)

* Create ReleaseNotes.md

* sensor display precision

* Filter devices to esp32 only (#881)

* Filter devices to esp32 only

Show only ESP32 devices when selecting the panel

* Filtered device list

* Sensor display precision (#880)

Now the values shown in your panel will follow the [sensor display precision](https://www.home-assistant.io/blog/2023/03/01/release-20233/#sensor-display-precision) provided by Home Assistant.
=> If you have problems with a value exceeding the available space in your panel, please reduce the number of decimals using Home Assistant [sensor display precision](https://www.home-assistant.io/blog/2023/03/01/release-20233/#sensor-display-precision).

* New language selector (#882)

* New language selector

* Update ReleaseNotes.md

* Update ReleaseNotes.md

* Remove `settings_entity` (#887)

* Remove `settings_entity`

- Bump version to 3.5_dev
- Removed references to pictures removed from TFT
- Removed code related to closing settings pages
- Removed trigger `settings_entity`

* Removed `set_settings_entity` service

- Bump version to 3.5_dev
- Removed `set_settings_entity` service - BREAKING CHANGE
- Removed `settings_entity` text-sensor - BREAKING CHANGE
- Added service `open_entity_settings_page` - BREAKING CHANGE

* Removed `settings_entity`

- Bump version to 3.5_dev
- Removed old climate page (climate_backup)
- Removed pics related to old climate page (ids 16-47, 80-83, 95-96 and 125(US only))
- Enforces brightness on any page change (this allows wake-up on settings page with long press on physical buttons) - Pending removing code from Blueprint
- Added `entity` variable on pages `climate`, `lightsettings` and `coversettings`
- Added `entity` info to `nspanelevent` on pages `climate`, `lightsettings` and `coversettings`
- Added `back_page` variable on pages `climate`, `lightsettings` and `coversettings` (default: home)
- Moving to TFT close page logic on pages `climate`, `lightsettings` and `coversettings` - Pending changes on Blueprint and ESPHome
- Standardized name for `page_label` on pages `climate`, `lightsettings` and `coversettings`
- Standardized settings page names: `climate`, `cover` and `light` (Removed `settings` from page name)

* Removed `settings_entity`

* Removed `settings_entity`

* Removed `settings_entity`

* Move `entity` variable to home page (#889)

* Move `entity` variable to home page

This will enable future development of a fallback climate

* Move `entity` variable to home page

* Move `entity` variable to home page

* Move `entity` variable to home page

* Move `entity` variable to home page

* Use `en` as fallback language (#891)

* Use `en` as fallback language

Uses English if a non valid language is selected (like when using legacy language selection).

* Use `en` as fallback language

* Create `nspanel_us_land.tft` (#890)

* Create `nspanel_us_land.tft'

Add `nspanel_us_land.tft' for US panel on landscape mode, fixing the offset on the touch screen when using `nspanel_eu.tft` into a US panel.
Hides the hardware buttons labels, as Nextion cannot support rotated text.

* Created `nspanel_us_land.tft`

* Created `nspanel_us_land.tft`

solves #390
solves #432
solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/299#discussioncomment-4933716

* Created `nspanel_us_land.tft`

* Created `nspanel_us_land.tft`

* Fix "Button confirmation page not working correctly"

Solves #883

* Supports weather forecast with `datetime` not string

This adds support to weather integrations where the `datetime` field under `forecast` attribute is provided as a `datetime` type.
This was seen on Météo-France, while all other weather integrations tested so far used a `text` field for `datetime`.

This solves #893

* Wifi icon to indicate when API offline

This changes the behavior of Wifi icon:

How it was before:
- Wifi icon was visible only when the wifi was connected, nothing was shown when wifi was not connected.

How it is now:
- Wifi icon will have 3 states:
 - Wifi & API connected: Gray wifi icon
 - Wifi disconnected: Red wifi-off icon
 - Wifi connected, but API disconnected (HA is out?): Red api-off icon

* API status indication on the panel

* Limit light & cover to supported settings (#896)

* Limit light to supported settings

When showing light settings, only the supported features will be shown for each light.

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

This partially solves #635

* Limits covers to supported settings

Only show cover settings when `set_position` is supported.

This solves #635

* Limits covers to supported settings

* Update instructions.md

* Add Fan speed settings page (#897)

* Add Fan speed settings page

Add an initial fan speed control page for fans supporting speed control.
Add speed (%) info in the buttons pages.

Solves #404 
Solves #791 
Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/718#discussioncomment-5786106

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Fix name on confirmation page

Fix the entity name on the confirmation page.

The new order is:
1. Name set on the blueprint settings
2. Entity's `friendly_name` attribute
3. Entity's `name` attribute
4. Entity's `entity_id`

Solves #501

* Select wake-up page (#898)

* Select wake-up page

Users will be able to select the wake-up page on the blueprint inputs.
This selected page will be shown after a boot (after the boot page) and with a touch in the screen when on screen saver page.
After showing this wake-up page, all the previous behavior for closing the page (with a click or after a timeout) will be the same.

Solves #576 
Solves #612 
Solves #801 
Probably improves for https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/718#discussioncomment-5715670

* Select wake-up page

* Fan update engine

Change the fan update engine to follow the same patter as other settings pages.

* Update ReleaseNotes.md

* Adding vertical bars pics

* Panel offline mode (#900)

* Panel offline mode

Introduces "offline mode" for the panel, which will be used later with a fallback climate.

Pages that are depending on the blueprint (buttons pages, entity pages, settings pages, etc) won't be shown when the API is disconnected.

* Panel offline mode

* Panel offline mode

* Panel offline mode

* Panel offline mode

* "Jump to settings" on tft

Moved "Jump to settings page" routine from ESPHome to TFT in order to reduce complexity.

* Exclude Nextion2Text

Exclude Nextion2Text

* Fix validation issue

* Time engine on ESPHome

* Time engine on ESPHome

* Notification page bigger hotspot

Added hotspots around the buttons (Accept & Clear) on Notification page to make easier to click on those.

Solves #907

* Boot page retry comm

The boot page will retry communication with the blueprint once a minute to avoid the situation where that page is shown until the automation is reloaded.

* Fix call to screen page

Fixes the call to screen page on US panel.
Reconciliate the US landscape model from EU model.

* Fix fan page `button_on`

Fixing rounding on that button.

* Fixed Fan page rounding

* Prevents boot sequence in other pages

* Physical relay local control

We are trying to make your panel as autonomous as possible by moving some of the controls from the Blueprint to ESPHome. This will reduce the load in your network and Home Assistant, but also will make a more reliable system capable to do it's core functionality even when the network is unavailable or Home Assistant is restarting.
With this version, the following engines have been moved to your panel (local control):
- Physical relay control (when hardware left button is connected to relay 1 or right button to relay 2)

Solves #910

* Embedded climate (#917)

* Performance improvements

The main focus here was to reduce the number of calls between Home Assistant and ESPHome, moving logic as much as possible to TFT and ESPHome.
- Service calls moved to ESPHome (in preparation for Alarm Control Panel)
- Page change informed via event call instead of `nspanel_event` sensor (which still in use by other calls, but might be possible to remove in the future)

* Draft embedded climate

This adds an initial version of an embedded climate/thermostat (heating only for now) with support for local control even with Wi-Fi out.

Solves #646
Solves #263

* Update ReleaseNotes.md

* Fix climate slider

Fix for climate slider opening in an incorrect position and sending only the integer part of the new target temperature

* Moving home page to ESPHome

In progress...

* Fix translations - Dutch

* Embedded chip 3

Home page - Chip 3 will be controlled locally when embedded climate is enable.

* Fixed buttons bar

Fixed buttons bar managed on ESPHome when embedded climate is visible.

* Update ReleaseNotes.md

* Services back to the Blueprint

Moving service calls back to the blueprint as latest HA requires user's permissions to call HA services from ESPHome.
This still have to be used for Alarm calls due to security concerns.

* Update ReleaseNotes.md

* support to hidden ssid (#908)

Supports hidden ssid with the use of substitutions `wifi_hidden: "true"`.

This can be breaking change for users with custom/advanced wifi settings.

Solves #906

* Update nspanel_esphome.yaml

* Removed `restore_state`

There is some incomplete work related to alarms on this commit, but the focus here is to fix `restore_state` on ESPHome v2023.7.0.

This solves #939

* US model - Fan page - Redistribute icons

Redistributed icons on Fan page on US model in order to improve usability.

Based on feedback from https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/791#discussioncomment-6338706

* Align `nspanel_us_land`

Apply all changes from EU to US_Land

* Fix relays chips

Fix relay status indication on chips.

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/926#issuecomment-1627660273

* Fix "invalid variable" for "api"

Fix error "Nextion invalid variable name" when setting `api`.

* Default embedded climate to relay_0

* Fix translations - Italian

Based on https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/940#discussioncomment-6511043

* Fix `set_temperature` for climate

Solves #957

* Fix `fan.turn_off` call

Removed timer call from fan stop button.
This solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/791#discussioncomment-6494535

* Call a `fan.turn_off` when percentage is 0%

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/791#discussioncomment-6621756

* Fix call for fan stop button

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/791#discussioncomment-6622377

* Icons on ESPHome

Move icons from TFT/HMI to ESPHome to prevent error on Nextion2Text.

* Updated translations - Spanish

Based on https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/940#discussioncomment-6548961

* Make home page sensor's icons consistent

Make icon selection consistent with chips where the entity's icon is used in case a icon is not set in the blueprint settings.

Solves #963

* Updated translations - Slovenian

Based on:
- https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/940#discussioncomment-6665723
-  https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/829#discussioncomment-6665751

* dutch (#974)

* small ducht translations

small ducht translations

* Dutch translations

---------

Co-authored-by: Edward Firmo <[email protected]>

* Add-on support (#977)

Moved climate settings to an add-on.
Updated documentation.

* Fixed link to addon climate docs

* Fix change brightness when sleeping

Prevents the panel to change screen brightness when sleeping.

Solves #975

* Standardize HA service calls

* Bump version to `4.0 dev`

* Create customization.md

This will reduce the need for:
- #920
- #662
- #833

* Clean-up for customizations

Clean up ESPHome in order to make easier the use of customizations.

* Create Alarm page

* Add page Alarm

* Add Alarm docs

Update docs to reflect the current state (new features & changes)

* Creating "install.md" and update add-ons instructions

* Add Alarm page buttons pics

* Add link to Alarm on page Home

* Create Alarm page

* Alarm button font color

* Add `keyb_num` page

* Alarm Control Panel with PIN (#982)

Implements an Alarm Control Panel page on NSPanel.

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/66
Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/227
Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/672
Partially solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/299#discussioncomment-4874612
Partially solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/64#issuecomment-1566204490
Partially solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/718

* Fix alarm without pin not working

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/pull/930#issuecomment-1680981977

* Alarm page UI

Fixed close button
Disabled buttons are darker

* Move Entities button to ESPHome

Move logic behind Entities button (Home page) from Blueprint to ESPHome in order to gain performance on creating home page.

* Human readable Uptime (#986)

* Human readable Uptime

* Uptime from Frenck code

* Uptime with Frenck code

* Updated Human Readable Uptime

* Removed trailing spaces

* Renamed sensor to "Last started"

Sensor renamed
Update moved to the boot process
Clean-up

---------

Co-authored-by: Edward Firmo <[email protected]>
Co-authored-by: Edward Firmo <[email protected]>

* Update alarm icon & color

* Revert `fast_connect` back to `false`

* Extended chars on buttons pages (#988)

Replaces #740
Probably solves #664
Probably solves #738
Probably solves #987

* Removed `fast_connect`

* Support to `code_arm_required`

Only shows the alarm PIN keyboard if a code is required for arming (or when disarming).

* Update alarm icon on home page

Refresh icon when alarm state changes.

* Fix alarm icon not updating on home page

* Home buttons new format - Alarm

Modernise the button Alarm flow on page Home to improve performance.

* Home buttons new format - Entities

Modernise the button "Entities" flow on page Home to improve performance.

* Home buttons new format - QRcode

Modernise the button "QRcode" flow on page Home to improve performance.

* Home buttons new format - Notification

Modernise the button "Notification" flow on page Home to improve performance.

I haven't moved the code from the Blueprint to ESPHome yet, as I will leave this for when we rebuild the Notification flow in the near future (hopefully), so the performance gains may not be perceived now. Just aligning with other buttons format.

* Adding screenshots

* Delete ReleaseNotes.md

Moved to the release

* New entity filter format

This new format was released with HA v2023.4 and the old one will be deprecated soon.

* Fix Alarm page bypass icon

* Bump version to 4.0

* Rename `addon_climate_heat`

* Simplify climate substitutions

* Add support for `addon_climate_cool`

* Removed `${verbose_log}`

Use logger level `VERBOSE` instead

* Fix script call

* Clean up general entities & fallback

Store inputs into variables only when needed.
Removed fallback mode - Replaced by ESPHome local control when the relay is assigned to the button in the blueprint.

* Phase out sensor `nspanel_event` (partially)

This sensor is being replaced by event calls.

* uptime sensors (#998)

* Create ReleaseNotes.md

* Fix Climate page when embedded climate

And also added a lot of logs which should be removed later as it takes from memory.

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/995#discussioncomment-6835260

* Move brightness control to global var

Clean up page Home

* Alarm page translations - Finnish

https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/940#discussioncomment-6857262

* Exported pics

* Clean-up TFT

- Removed a bunch of unused pics
- Changed page indicator to new format (which will allow future development to hide unused pages)
- Standardized close button in most pages

* Fixed background pics

- Entities pages
- Weather pages

* Standardize close button

* Add "Alarm" section

* Support to wake-up page on `wake_up_display` service

This changes the behavior of a service introduced by #734.

* Optimize `wake_up_display` service

* Fix icon font sizes 10 and 64

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/960#issuecomment-1701903604

And also remove all the unnecessary `wait_until`

* Fix Settings page element ids

Partially solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/960#issuecomment-1702109668

* Add translation keys for `settings` page

#1002

* Update settings page when brightness changes on HA

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/960#issuecomment-1702149796

* Clean-up page settings

* update docs (#1003)

* updated docs

* Update ReleaseNotes.md

---------

Co-authored-by: Edward Firmo <[email protected]>

* Clean-up Cover page

I'm preparing this page to have icons changing based on the device_class selected to a cover.

* Clean-up boot delay

* Enable `current_page` sensor by default

Otherwise the system won´t update values unless the page is reloaded.

* Use `current_page` in blueprint conditions

One more step towards the phase out of `nspanelevent`.

* Move `script.refresh_colors` to `service.global_settings`

As this is called from a single point, there's no meaning of having a separated script.

* Fix climate icon update

Partially solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/995#discussioncomment-6891454

* Fix button show on climate page

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/995#discussioncomment-6891335

* Visual improvements on climate page

- Add friendly name when embedded - Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/995#discussioncomment-6891465
- Make disable icons a bit darker - Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/995#discussioncomment-6893440
- Add space for page title in EU an US Land versions
- Reset page timer when pressing/releasing on the slider - Partially solves #990

* Don't update values when page home is not visible

To reduce load on Home Assistant and the network

* Cleanup boot sequence

Move some functionalities to ESPHome

* Display internal sensor value when wifi is out

Before it was showing on home page only when API was out. This adds a test for WiFi.

* Fix `default_target_temperature`

It also updates the page home when thermostat status changes (for the chips).
Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/995#discussioncomment-6897727

* Adding ID to components missing it

* Renamed `wake_up_display` to `wake_up`

* Re-arrange commands list

* Add service `set_component_color`

Deprecates the following services:
- `send_command_font_color`
- `send_command_background_color`

* Fix button pages not showing

* Adjusted time for HW long click

* Fixed buttons on settings page

* Minor adjustments to page climate

And replace font 10 to size 48 (it was 64 since a few days ago).

* Updates to breaking changes list

* Page settings redesign

Clean up the UI of settings page.
Prepare for translations.

* Enable translations of Settings page

* Notification word-wrap

For EU and US_LAND only, for now.

* Notifications page rebuilt

- Notification button processed on ESPHome (as all the info is there)
- Added word-wrap for main text
- Expanded text size
- Handling display mode (used to define the number of chars per line on Notifications)
- Versioning handling - As a consequence of the previous item.

* Word-wrap buttons pages

Taking advantage of the algorithm created for notifications.

* Word-wrap for Alarm page

* Version mismatch notication

* Fix ESPHome not starting with older TFT

* Rebuilt home page status bar update

* Updated translations - Italian

Based on https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/1002#discussioncomment-6926846

Thanks @MaiPiu

* Fix `Nextion reported variable name invalid!`

* Fix `Nextion variable invalid`

* Handle `embedded_indoor_temperature`

Internal temperature display will be handled locally (ESPHome) when no other sensor is selected.

* Review temperature correction engine

* Fix display climate chip

* update `temp_nspanel` when correction changes

* Fix `Fan` page not open with long press HW button

Solves #1007

* Minor adjustments on settings page

* version 4.0 ready for release

* Clean-up docs

---------

Co-authored-by: bkbartk <[email protected]>
Co-authored-by: w00zy <[email protected]>

* Fix Fan page button colors when opening

Solves #1017

* Translations (#1023)

* Translations

* Update nspanel_blueprint.yaml

I've changed `brightness` for now as the new design isn't implemented yet, but that string is already in use with the current design.

---------

Co-authored-by: Edward Firmo <[email protected]>

* Adjustments to settings page

* Fix entity info when calling detailed pages

Solves #1022

* Added `media_player` page (hidden)

* New "Confirm" pop-up

This also removes the sensor "NSPanel Event"

* Fix pages not updating values

Solves #1026

* Media player - Buttons

- Added code to buttons on media_player page.
- Clean-up:
  - Moved wake-up select from Blueprint to ESPHome component
  - Removed `switch.xxxxx_confirmation_message`

* Fix logging for global_settings

It was logging wakeup_page, which is deprecated

* Improved version notification

* Removed trailing spaces

* Notification for `sensor.xxxxx_current_page` missing

This might be a common issue for users migrating from v3.4 to v3.5.
This information is part of the release notes, but I believe it worth having a guide to support closely any user who miss that in the release notes.

* Simplify `touchevent` engine

The touch event is used only for the sleeping engine (it will be used for dimming later) and it was transferring all the json info with page name, component, entity, etc.
This was replaced by a simple random integer with no meaning other than "the screen was touched, reset the timer".

* Media player first buttons actions

* Fix unknown service: `media_player.null`

* Media Player control

You will be able to add a Media Player entity to any of the buttons pages and with a long press you will see the media player page.

* Remove dimming timer for now

The funcionality isn't completed.

* Home page - Custom buttons

On the blueprint you can now set up to 3 buttons to be shown on Home page.
It will show the detailed settings page, so the entity must be compatible.

* Fix Media player missing parameters

Possibly solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/1030#discussioncomment-6984573

* Prevents calls to `media_player.null`

* Remove `entity` info from pages on TFT

Since v3.4, the info about entity_id shown was going all the way to Nextion and then sent back in the json return, however this requires a long (100-char) global var and the way it was implemented, it was one of those per settings page, as climate should be also recorded at the same time in case the embedded climate was installed.
This was taking too much memory, so I've moved this info to a global variable (string) in ESPHome.
There is now lots of space for code cleaning (and still pending to do the same with climate entity, as it could be only a bool to inform if embedded), but this brings the functionality.

This enabled the return to global for some components, so it probably solves #1031

---------

Co-authored-by: bkbartk <[email protected]>
Co-authored-by: w00zy <[email protected]>
Co-authored-by: w00zy <[email protected]>

* v4.0 Release Candidate 2 (#1044)

* Create ReleaseNotes.md (#879)

* Create ReleaseNotes.md

* sensor display precision

* Filter devices to esp32 only (#881)

* Filter devices to esp32 only

Show only ESP32 devices when selecting the panel

* Filtered device list

* Sensor display precision (#880)

Now the values shown in your panel will follow the [sensor display precision](https://www.home-assistant.io/blog/2023/03/01/release-20233/#sensor-display-precision) provided by Home Assistant.
=> If you have problems with a value exceeding the available space in your panel, please reduce the number of decimals using Home Assistant [sensor display precision](https://www.home-assistant.io/blog/2023/03/01/release-20233/#sensor-display-precision).

* New language selector (#882)

* New language selector

* Update ReleaseNotes.md

* Update ReleaseNotes.md

* Remove `settings_entity` (#887)

* Remove `settings_entity`

- Bump version to 3.5_dev
- Removed references to pictures removed from TFT
- Removed code related to closing settings pages
- Removed trigger `settings_entity`

* Removed `set_settings_entity` service

- Bump version to 3.5_dev
- Removed `set_settings_entity` service - BREAKING CHANGE
- Removed `settings_entity` text-sensor - BREAKING CHANGE
- Added service `open_entity_settings_page` - BREAKING CHANGE

* Removed `settings_entity`

- Bump version to 3.5_dev
- Removed old climate page (climate_backup)
- Removed pics related to old climate page (ids 16-47, 80-83, 95-96 and 125(US only))
- Enforces brightness on any page change (this allows wake-up on settings page with long press on physical buttons) - Pending removing code from Blueprint
- Added `entity` variable on pages `climate`, `lightsettings` and `coversettings`
- Added `entity` info to `nspanelevent` on pages `climate`, `lightsettings` and `coversettings`
- Added `back_page` variable on pages `climate`, `lightsettings` and `coversettings` (default: home)
- Moving to TFT close page logic on pages `climate`, `lightsettings` and `coversettings` - Pending changes on Blueprint and ESPHome
- Standardized name for `page_label` on pages `climate`, `lightsettings` and `coversettings`
- Standardized settings page names: `climate`, `cover` and `light` (Removed `settings` from page name)

* Removed `settings_entity`

* Removed `settings_entity`

* Removed `settings_entity`

* Move `entity` variable to home page (#889)

* Move `entity` variable to home page

This will enable future development of a fallback climate

* Move `entity` variable to home page

* Move `entity` variable to home page

* Move `entity` variable to home page

* Move `entity` variable to home page

* Use `en` as fallback language (#891)

* Use `en` as fallback language

Uses English if a non valid language is selected (like when using legacy language selection).

* Use `en` as fallback language

* Create `nspanel_us_land.tft` (#890)

* Create `nspanel_us_land.tft'

Add `nspanel_us_land.tft' for US panel on landscape mode, fixing the offset on the touch screen when using `nspanel_eu.tft` into a US panel.
Hides the hardware buttons labels, as Nextion cannot support rotated text.

* Created `nspanel_us_land.tft`

* Created `nspanel_us_land.tft`

solves #390
solves #432
solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/299#discussioncomment-4933716

* Created `nspanel_us_land.tft`

* Created `nspanel_us_land.tft`

* Fix "Button confirmation page not working correctly"

Solves #883

* Supports weather forecast with `datetime` not string

This adds support to weather integrations where the `datetime` field under `forecast` attribute is provided as a `datetime` type.
This was seen on Météo-France, while all other weather integrations tested so far used a `text` field for `datetime`.

This solves #893

* Wifi icon to indicate when API offline

This changes the behavior of Wifi icon:

How it was before:
- Wifi icon was visible only when the wifi was connected, nothing was shown when wifi was not connected.

How it is now:
- Wifi icon will have 3 states:
 - Wifi & API connected: Gray wifi icon
 - Wifi disconnected: Red wifi-off icon
 - Wifi connected, but API disconnected (HA is out?): Red api-off icon

* API status indication on the panel

* Limit light & cover to supported settings (#896)

* Limit light to supported settings

When showing light settings, only the supported features will be shown for each light.

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

This partially solves #635

* Limits covers to supported settings

Only show cover settings when `set_position` is supported.

This solves #635

* Limits covers to supported settings

* Update instructions.md

* Add Fan speed settings page (#897)

* Add Fan speed settings page

Add an initial fan speed control page for fans supporting speed control.
Add speed (%) info in the buttons pages.

Solves #404 
Solves #791 
Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/718#discussioncomment-5786106

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Fix name on confirmation page

Fix the entity name on the confirmation page.

The new order is:
1. Name set on the blueprint settings
2. Entity's `friendly_name` attribute
3. Entity's `name` attribute
4. Entity's `entity_id`

Solves #501

* Select wake-up page (#898)

* Select wake-up page

Users will be able to select the wake-up page on the blueprint inputs.
This selected page will be shown after a boot (after the boot page) and with a touch in the screen when on screen saver page.
After showing this wake-up page, all the previous behavior for closing the page (with a click or after a timeout) will be the same.

Solves #576 
Solves #612 
Solves #801 
Probably improves for https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/718#discussioncomment-5715670

* Select wake-up page

* Fan update engine

Change the fan update engine to follow the same patter as other settings pages.

* Update ReleaseNotes.md

* Adding vertical bars pics

* Panel offline mode (#900)

* Panel offline mode

Introduces "offline mode" for the panel, which will be used later with a fallback climate.

Pages that are depending on the blueprint (buttons pages, entity pages, settings pages, etc) won't be shown when the API is disconnected.

* Panel offline mode

* Panel offline mode

* Panel offline mode

* Panel offline mode

* "Jump to settings" on tft

Moved "Jump to settings page" routine from ESPHome to TFT in order to reduce complexity.

* Exclude Nextion2Text

Exclude Nextion2Text

* Fix validation issue

* Time engine on ESPHome

* Time engine on ESPHome

* Notification page bigger hotspot

Added hotspots around the buttons (Accept & Clear) on Notification page to make easier to click on those.

Solves #907

* Boot page retry comm

The boot page will retry communication with the blueprint once a minute to avoid the situation where that page is shown until the automation is reloaded.

* Fix call to screen page

Fixes the call to screen page on US panel.
Reconciliate the US landscape model from EU model.

* Fix fan page `button_on`

Fixing rounding on that button.

* Fixed Fan page rounding

* Prevents boot sequence in other pages

* Physical relay local control

We are trying to make your panel as autonomous as possible by moving some of the controls from the Blueprint to ESPHome. This will reduce the load in your network and Home Assistant, but also will make a more reliable system capable to do it's core functionality even when the network is unavailable or Home Assistant is restarting.
With this version, the following engines have been moved to your panel (local control):
- Physical relay control (when hardware left button is connected to relay 1 or right button to relay 2)

Solves #910

* Embedded climate (#917)

* Performance improvements

The main focus here was to reduce the number of calls between Home Assistant and ESPHome, moving logic as much as possible to TFT and ESPHome.
- Service calls moved to ESPHome (in preparation for Alarm Control Panel)
- Page change informed via event call instead of `nspanel_event` sensor (which still in use by other calls, but might be possible to remove in the future)

* Draft embedded climate

This adds an initial version of an embedded climate/thermostat (heating only for now) with support for local control even with Wi-Fi out.

Solves #646
Solves #263

* Update ReleaseNotes.md

* Fix climate slider

Fix for climate slider opening in an incorrect position and sending only the integer part of the new target temperature

* Moving home page to ESPHome

In progress...

* Fix translations - Dutch

* Embedded chip 3

Home page - Chip 3 will be controlled locally when embedded climate is enable.

* Fixed buttons bar

Fixed buttons bar managed on ESPHome when embedded climate is visible.

* Update ReleaseNotes.md

* Services back to the Blueprint

Moving service calls back to the blueprint as latest HA requires user's permissions to call HA services from ESPHome.
This still have to be used for Alarm calls due to security concerns.

* Update ReleaseNotes.md

* support to hidden ssid (#908)

Supports hidden ssid with the use of substitutions `wifi_hidden: "true"`.

This can be breaking change for users with custom/advanced wifi settings.

Solves #906

* Update nspanel_esphome.yaml

* Removed `restore_state`

There is some incomplete work related to alarms on this commit, but the focus here is to fix `restore_state` on ESPHome v2023.7.0.

This solves #939

* US model - Fan page - Redistribute icons

Redistributed icons on Fan page on US model in order to improve usability.

Based on feedback from https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/791#discussioncomment-6338706

* Align `nspanel_us_land`

Apply all changes from EU to US_Land

* Fix relays chips

Fix relay status indication on chips.

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/926#issuecomment-1627660273

* Fix "invalid variable" for "api"

Fix error "Nextion invalid variable name" when setting `api`.

* Default embedded climate to relay_0

* Fix issue with `restore_state` and ESPHome v2023.7.0 (#941)

Solves #939

* Fix translations - Italian

Based on https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/940#discussioncomment-6511043

* Fix `set_temperature` for climate

Solves #957

* Fix `fan.turn_off` call

Removed timer call from fan stop button.
This solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/791#discussioncomment-6494535

* Call a `fan.turn_off` when percentage is 0%

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/791#discussioncomment-6621756

* Fix call for fan stop button

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/791#discussioncomment-6622377

* Icons on ESPHome

Move icons from TFT/HMI to ESPHome to prevent error on Nextion2Text.

* Updated translations - Spanish

Based on https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/940#discussioncomment-6548961

* Make home page sensor's icons consistent

Make icon selection consistent with chips where the entity's icon is used in case a icon is not set in the blueprint settings.

Solves #963

* Updated translations - Slovenian

Based on:
- https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/940#discussioncomment-6665723
-  https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/829#discussioncomment-6665751

* dutch (#974)

* small ducht translations

small ducht translations

* Dutch translations

---------

Co-authored-by: Edward Firmo <[email protected]>

* Add-on support (#977)

Moved climate settings to an add-on.
Updated documentation.

* Fixed link to addon climate docs

* Fix change brightness when sleeping

Prevents the panel to change screen brightness when sleeping.

Solves #975

* Standardize HA service calls

* Bump version to `4.0 dev`

* Create customization.md

This will reduce the need for:
- #920
- #662
- #833

* Clean-up for customizations

Clean up ESPHome in order to make easier the use of customizations.

* Create Alarm page

* Add page Alarm

* Add Alarm docs

Update docs to reflect the current state (new features & changes)

* Creating "install.md" and update add-ons instructions

* Add Alarm page buttons pics

* Add link to Alarm on page Home

* Create Alarm page

* Alarm button font color

* Add `keyb_num` page

* Alarm Control Panel with PIN (#982)

Implements an Alarm Control Panel page on NSPanel.

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/66
Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/227
Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/672
Partially solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/299#discussioncomment-4874612
Partially solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/64#issuecomment-1566204490
Partially solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/718

* Fix alarm without pin not working

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/pull/930#issuecomment-1680981977

* Alarm page UI

Fixed close button
Disabled buttons are darker

* Move Entities button to ESPHome

Move logic behind Entities button (Home page) from Blueprint to ESPHome in order to gain performance on creating home page.

* Human readable Uptime (#986)

* Human readable Uptime

* Uptime from Frenck code

* Uptime with Frenck code

* Updated Human Readable Uptime

* Removed trailing spaces

* Renamed sensor to "Last started"

Sensor renamed
Update moved to the boot process
Clean-up

---------

Co-authored-by: Edward Firmo <[email protected]>
Co-authored-by: Edward Firmo <[email protected]>

* Update alarm icon & color

* Revert `fast_connect` back to `false`

* Extended chars on buttons pages (#988)

Replaces #740
Probably solves #664
Probably solves #738
Probably solves #987

* Removed `fast_connect`

* Support to `code_arm_required`

Only shows the alarm PIN keyboard if a code is required for arming (or when disarming).

* Update alarm icon on home page

Refresh icon when alarm state changes.

* Fix alarm icon not updating on home page

* Home buttons new format - Alarm

Modernise the button Alarm flow on page Home to improve performance.

* Home buttons new format - Entities

Modernise the button "Entities" flow on page Home to improve performance.

* Home buttons new format - QRcode

Modernise the button "QRcode" flow on page Home to improve performance.

* Home buttons new format - Notification

Modernise the button "Notification" flow on page Home to improve performance.

I haven't moved the code from the Blueprint to ESPHome yet, as I will leave this for when we rebuild the Notification flow in the near future (hopefully), so the performance gains may not be perceived now. Just aligning with other buttons format.

* Adding screenshots

* Delete ReleaseNotes.md

Moved to the release

* New entity filter format

This new format was released with HA v2023.4 and the old one will be deprecated soon.

* Fix Alarm page bypass icon

* Bump version to 4.0

* Rename `addon_climate_heat`

* Simplify climate substitutions

* Add support for `addon_climate_cool`

* Removed `${verbose_log}`

Use logger level `VERBOSE` instead

* Fix script call

* Clean up general entities & fallback

Store inputs into variables only when needed.
Removed fallback mode - Replaced by ESPHome local control when the relay is assigned to the button in the blueprint.

* Phase out sensor `nspanel_event` (partially)

This sensor is being replaced by event calls.

* uptime sensors (#998)

* Create ReleaseNotes.md

* Fix Climate page when embedded climate

And also added a lot of logs which should be removed later as it takes from memory.

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/995#discussioncomment-6835260

* Move brightness control to global var

Clean up page Home

* Alarm page translations - Finnish

https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/940#discussioncomment-6857262

* Exported pics

* Clean-up TFT

- Removed a bunch of unused pics
- Changed page indicator to new format (which will allow future development to hide unused pages)
- Standardized close button in most pages

* Fixed background pics

- Entities pages
- Weather pages

* Standardize close button

* Add "Alarm" section

* Support to wake-up page on `wake_up_display` service

This changes the behavior of a service introduced by #734.

* Optimize `wake_up_display` service

* Fix icon font sizes 10 and 64

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/960#issuecomment-1701903604

And also remove all the unnecessary `wait_until`

* Fix Settings page element ids

Partially solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/960#issuecomment-1702109668

* Add translation keys for `settings` page

#1002

* Update settings page when brightness changes on HA

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/960#issuecomment-1702149796

* Clean-up page settings

* update docs (#1003)

* updated docs

* Update ReleaseNotes.md

---------

Co-authored-by: Edward Firmo <[email protected]>

* Clean-up Cover page

I'm preparing this page to have icons changing based on the …
edwardtfn added a commit that referenced this issue Sep 24, 2023
* Exclude Nextion2Text

Exclude Nextion2Text

* Fix validation issue

* Time engine on ESPHome

* Time engine on ESPHome

* Notification page bigger hotspot

Added hotspots around the buttons (Accept & Clear) on Notification page to make easier to click on those.

Solves #907

* Boot page retry comm

The boot page will retry communication with the blueprint once a minute to avoid the situation where that page is shown until the automation is reloaded.

* Fix call to screen page

Fixes the call to screen page on US panel.
Reconciliate the US landscape model from EU model.

* Fix fan page `button_on`

Fixing rounding on that button.

* Fixed Fan page rounding

* Prevents boot sequence in other pages

* Physical relay local control

We are trying to make your panel as autonomous as possible by moving some of the controls from the Blueprint to ESPHome. This will reduce the load in your network and Home Assistant, but also will make a more reliable system capable to do it's core functionality even when the network is unavailable or Home Assistant is restarting.
With this version, the following engines have been moved to your panel (local control):
- Physical relay control (when hardware left button is connected to relay 1 or right button to relay 2)

Solves #910

* Embedded climate (#917)

* Performance improvements

The main focus here was to reduce the number of calls between Home Assistant and ESPHome, moving logic as much as possible to TFT and ESPHome.
- Service calls moved to ESPHome (in preparation for Alarm Control Panel)
- Page change informed via event call instead of `nspanel_event` sensor (which still in use by other calls, but might be possible to remove in the future)

* Draft embedded climate

This adds an initial version of an embedded climate/thermostat (heating only for now) with support for local control even with Wi-Fi out.

Solves #646
Solves #263

* Update ReleaseNotes.md

* Fix climate slider

Fix for climate slider opening in an incorrect position and sending only the integer part of the new target temperature

* Moving home page to ESPHome

In progress...

* Fix translations - Dutch

* Embedded chip 3

Home page - Chip 3 will be controlled locally when embedded climate is enable.

* Fixed buttons bar

Fixed buttons bar managed on ESPHome when embedded climate is visible.

* Update ReleaseNotes.md

* Services back to the Blueprint

Moving service calls back to the blueprint as latest HA requires user's permissions to call HA services from ESPHome.
This still have to be used for Alarm calls due to security concerns.

* Update ReleaseNotes.md

* support to hidden ssid (#908)

Supports hidden ssid with the use of substitutions `wifi_hidden: "true"`.

This can be breaking change for users with custom/advanced wifi settings.

Solves #906

* Update nspanel_esphome.yaml

* Removed `restore_state`

There is some incomplete work related to alarms on this commit, but the focus here is to fix `restore_state` on ESPHome v2023.7.0.

This solves #939

* US model - Fan page - Redistribute icons

Redistributed icons on Fan page on US model in order to improve usability.

Based on feedback from #791 (reply in thread)

* Align `nspanel_us_land`

Apply all changes from EU to US_Land

* Fix relays chips

Fix relay status indication on chips.

Solves #926 (comment)

* Fix "invalid variable" for "api"

Fix error "Nextion invalid variable name" when setting `api`.

* Default embedded climate to relay_0

* Fix issue with `restore_state` and ESPHome v2023.7.0 (#941)

Solves #939

* Fix translations - Italian

Based on #940 (comment)

* Fix `set_temperature` for climate

Solves #957

* Fix `fan.turn_off` call

Removed timer call from fan stop button.
This solves #791 (reply in thread)

* Call a `fan.turn_off` when percentage is 0%

Solves #791 (reply in thread)

* Fix call for fan stop button

Solves #791 (reply in thread)

* Icons on ESPHome

Move icons from TFT/HMI to ESPHome to prevent error on Nextion2Text.

* Updated translations - Spanish

Based on #940 (comment)

* Make home page sensor's icons consistent

Make icon selection consistent with chips where the entity's icon is used in case a icon is not set in the blueprint settings.

Solves #963

* Updated translations - Slovenian

Based on:
- #940 (comment)
-  #829 (comment)

* dutch (#974)

* small ducht translations

small ducht translations

* Dutch translations

---------

Co-authored-by: Edward Firmo <[email protected]>

* Add-on support (#977)

Moved climate settings to an add-on.
Updated documentation.

* Fixed link to addon climate docs

* Fix change brightness when sleeping

Prevents the panel to change screen brightness when sleeping.

Solves #975

* Standardize HA service calls

* Bump version to `4.0 dev`

* Create customization.md

This will reduce the need for:
- #920
- #662
- #833

* Clean-up for customizations

Clean up ESPHome in order to make easier the use of customizations.

* Create Alarm page

* Add page Alarm

* Add Alarm docs

Update docs to reflect the current state (new features & changes)

* Creating "install.md" and update add-ons instructions

* Add Alarm page buttons pics

* Add link to Alarm on page Home

* Create Alarm page

* Alarm button font color

* Add `keyb_num` page

* Alarm Control Panel with PIN (#982)

Implements an Alarm Control Panel page on NSPanel.

Solves #66
Solves #227
Solves #672
Partially solves #299 (comment)
Partially solves #64 (comment)
Partially solves #718

* Fix alarm without pin not working

Solves #930 (comment)

* Alarm page UI

Fixed close button
Disabled buttons are darker

* Move Entities button to ESPHome

Move logic behind Entities button (Home page) from Blueprint to ESPHome in order to gain performance on creating home page.

* Human readable Uptime (#986)

* Human readable Uptime

* Uptime from Frenck code

* Uptime with Frenck code

* Updated Human Readable Uptime

* Removed trailing spaces

* Renamed sensor to "Last started"

Sensor renamed
Update moved to the boot process
Clean-up

---------

Co-authored-by: Edward Firmo <[email protected]>
Co-authored-by: Edward Firmo <[email protected]>

* Update alarm icon & color

* Revert `fast_connect` back to `false`

* Extended chars on buttons pages (#988)

Replaces #740
Probably solves #664
Probably solves #738
Probably solves #987

* Removed `fast_connect`

* Support to `code_arm_required`

Only shows the alarm PIN keyboard if a code is required for arming (or when disarming).

* Update alarm icon on home page

Refresh icon when alarm state changes.

* Fix alarm icon not updating on home page

* Home buttons new format - Alarm

Modernise the button Alarm flow on page Home to improve performance.

* Home buttons new format - Entities

Modernise the button "Entities" flow on page Home to improve performance.

* Home buttons new format - QRcode

Modernise the button "QRcode" flow on page Home to improve performance.

* Home buttons new format - Notification

Modernise the button "Notification" flow on page Home to improve performance.

I haven't moved the code from the Blueprint to ESPHome yet, as I will leave this for when we rebuild the Notification flow in the near future (hopefully), so the performance gains may not be perceived now. Just aligning with other buttons format.

* Adding screenshots

* Delete ReleaseNotes.md

Moved to the release

* New entity filter format

This new format was released with HA v2023.4 and the old one will be deprecated soon.

* Fix Alarm page bypass icon

* Bump version to 4.0

* Rename `addon_climate_heat`

* Simplify climate substitutions

* Add support for `addon_climate_cool`

* Removed `${verbose_log}`

Use logger level `VERBOSE` instead

* Fix script call

* Clean up general entities & fallback

Store inputs into variables only when needed.
Removed fallback mode - Replaced by ESPHome local control when the relay is assigned to the button in the blueprint.

* Phase out sensor `nspanel_event` (partially)

This sensor is being replaced by event calls.

* uptime sensors (#998)

* Create ReleaseNotes.md

* Fix Climate page when embedded climate

And also added a lot of logs which should be removed later as it takes from memory.

Solves #995 (reply in thread)

* Move brightness control to global var

Clean up page Home

* Alarm page translations - Finnish

#940 (comment)

* Exported pics

* Clean-up TFT

- Removed a bunch of unused pics
- Changed page indicator to new format (which will allow future development to hide unused pages)
- Standardized close button in most pages

* Fixed background pics

- Entities pages
- Weather pages

* Standardize close button

* Add "Alarm" section

* Support to wake-up page on `wake_up_display` service

This changes the behavior of a service introduced by #734.

* Optimize `wake_up_display` service

* Fix icon font sizes 10 and 64

Solves #960 (comment)

And also remove all the unnecessary `wait_until`

* Fix Settings page element ids

Partially solves #960 (comment)

* Add translation keys for `settings` page

#1002

* Update settings page when brightness changes on HA

Solves #960 (comment)

* Clean-up page settings

* update docs (#1003)

* updated docs

* Update ReleaseNotes.md

---------

Co-authored-by: Edward Firmo <[email protected]>

* Clean-up Cover page

I'm preparing this page to have icons changing based on the device_class selected to a cover.

* Clean-up boot delay

* Enable `current_page` sensor by default

Otherwise the system won´t update values unless the page is reloaded.

* Use `current_page` in blueprint conditions

One more step towards the phase out of `nspanelevent`.

* Move `script.refresh_colors` to `service.global_settings`

As this is called from a single point, there's no meaning of having a separated script.

* Fix climate icon update

Partially solves #995 (reply in thread)

* Fix button show on climate page

Solves #995 (reply in thread)

* Visual improvements on climate page

- Add friendly name when embedded - Solves #995 (reply in thread)
- Make disable icons a bit darker - Solves #995 (reply in thread)
- Add space for page title in EU an US Land versions
- Reset page timer when pressing/releasing on the slider - Partially solves #990

* Don't update values when page home is not visible

To reduce load on Home Assistant and the network

* Cleanup boot sequence

Move some functionalities to ESPHome

* Display internal sensor value when wifi is out

Before it was showing on home page only when API was out. This adds a test for WiFi.

* Fix `default_target_temperature`

It also updates the page home when thermostat status changes (for the chips).
Solves #995 (reply in thread)

* Adding ID to components missing it

* Renamed `wake_up_display` to `wake_up`

* Re-arrange commands list

* Add service `set_component_color`

Deprecates the following services:
- `send_command_font_color`
- `send_command_background_color`

* Fix button pages not showing

* Adjusted time for HW long click

* Fixed buttons on settings page

* Minor adjustments to page climate

And replace font 10 to size 48 (it was 64 since a few days ago).

* Updates to breaking changes list

* Page settings redesign

Clean up the UI of settings page.
Prepare for translations.

* Enable translations of Settings page

* Notification word-wrap

For EU and US_LAND only, for now.

* Notifications page rebuilt

- Notification button processed on ESPHome (as all the info is there)
- Added word-wrap for main text
- Expanded text size
- Handling display mode (used to define the number of chars per line on Notifications)
- Versioning handling - As a consequence of the previous item.

* Word-wrap buttons pages

Taking advantage of the algorithm created for notifications.

* Word-wrap for Alarm page

* Version mismatch notication

* Fix ESPHome not starting with older TFT

* Rebuilt home page status bar update

* Updated translations - Italian

Based on #1002 (comment)

Thanks @MaiPiu

* Fix `Nextion reported variable name invalid!`

* Fix `Nextion variable invalid`

* Handle `embedded_indoor_temperature`

Internal temperature display will be handled locally (ESPHome) when no other sensor is selected.

* Review temperature correction engine

* Fix display climate chip

* update `temp_nspanel` when correction changes

* Fix `Fan` page not open with long press HW button

Solves #1007

* Minor adjustments on settings page

* version 4.0 ready for release

* Clean-up docs

* Improve version notification

* Disable restore `notification_unread`

This must be changed to a binary sensor in the future.

* Beta v4.0 (#1012)

* Create ReleaseNotes.md (#879)

* Create ReleaseNotes.md

* sensor display precision

* Filter devices to esp32 only (#881)

* Filter devices to esp32 only

Show only ESP32 devices when selecting the panel

* Filtered device list

* Sensor display precision (#880)

Now the values shown in your panel will follow the [sensor display precision](https://www.home-assistant.io/blog/2023/03/01/release-20233/#sensor-display-precision) provided by Home Assistant.
=> If you have problems with a value exceeding the available space in your panel, please reduce the number of decimals using Home Assistant [sensor display precision](https://www.home-assistant.io/blog/2023/03/01/release-20233/#sensor-display-precision).

* New language selector (#882)

* New language selector

* Update ReleaseNotes.md

* Update ReleaseNotes.md

* Remove `settings_entity` (#887)

* Remove `settings_entity`

- Bump version to 3.5_dev
- Removed references to pictures removed from TFT
- Removed code related to closing settings pages
- Removed trigger `settings_entity`

* Removed `set_settings_entity` service

- Bump version to 3.5_dev
- Removed `set_settings_entity` service - BREAKING CHANGE
- Removed `settings_entity` text-sensor - BREAKING CHANGE
- Added service `open_entity_settings_page` - BREAKING CHANGE

* Removed `settings_entity`

- Bump version to 3.5_dev
- Removed old climate page (climate_backup)
- Removed pics related to old climate page (ids 16-47, 80-83, 95-96 and 125(US only))
- Enforces brightness on any page change (this allows wake-up on settings page with long press on physical buttons) - Pending removing code from Blueprint
- Added `entity` variable on pages `climate`, `lightsettings` and `coversettings`
- Added `entity` info to `nspanelevent` on pages `climate`, `lightsettings` and `coversettings`
- Added `back_page` variable on pages `climate`, `lightsettings` and `coversettings` (default: home)
- Moving to TFT close page logic on pages `climate`, `lightsettings` and `coversettings` - Pending changes on Blueprint and ESPHome
- Standardized name for `page_label` on pages `climate`, `lightsettings` and `coversettings`
- Standardized settings page names: `climate`, `cover` and `light` (Removed `settings` from page name)

* Removed `settings_entity`

* Removed `settings_entity`

* Removed `settings_entity`

* Move `entity` variable to home page (#889)

* Move `entity` variable to home page

This will enable future development of a fallback climate

* Move `entity` variable to home page

* Move `entity` variable to home page

* Move `entity` variable to home page

* Move `entity` variable to home page

* Use `en` as fallback language (#891)

* Use `en` as fallback language

Uses English if a non valid language is selected (like when using legacy language selection).

* Use `en` as fallback language

* Create `nspanel_us_land.tft` (#890)

* Create `nspanel_us_land.tft'

Add `nspanel_us_land.tft' for US panel on landscape mode, fixing the offset on the touch screen when using `nspanel_eu.tft` into a US panel.
Hides the hardware buttons labels, as Nextion cannot support rotated text.

* Created `nspanel_us_land.tft`

* Created `nspanel_us_land.tft`

solves #390
solves #432
solves #299 (comment)

* Created `nspanel_us_land.tft`

* Created `nspanel_us_land.tft`

* Fix "Button confirmation page not working correctly"

Solves #883

* Supports weather forecast with `datetime` not string

This adds support to weather integrations where the `datetime` field under `forecast` attribute is provided as a `datetime` type.
This was seen on Météo-France, while all other weather integrations tested so far used a `text` field for `datetime`.

This solves #893

* Wifi icon to indicate when API offline

This changes the behavior of Wifi icon:

How it was before:
- Wifi icon was visible only when the wifi was connected, nothing was shown when wifi was not connected.

How it is now:
- Wifi icon will have 3 states:
 - Wifi & API connected: Gray wifi icon
 - Wifi disconnected: Red wifi-off icon
 - Wifi connected, but API disconnected (HA is out?): Red api-off icon

* API status indication on the panel

* Limit light & cover to supported settings (#896)

* Limit light to supported settings

When showing light settings, only the supported features will be shown for each light.

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

This partially solves #635

* Limits covers to supported settings

Only show cover settings when `set_position` is supported.

This solves #635

* Limits covers to supported settings

* Update instructions.md

* Add Fan speed settings page (#897)

* Add Fan speed settings page

Add an initial fan speed control page for fans supporting speed control.
Add speed (%) info in the buttons pages.

Solves #404 
Solves #791 
Solves #718 (comment)

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Fix name on confirmation page

Fix the entity name on the confirmation page.

The new order is:
1. Name set on the blueprint settings
2. Entity's `friendly_name` attribute
3. Entity's `name` attribute
4. Entity's `entity_id`

Solves #501

* Select wake-up page (#898)

* Select wake-up page

Users will be able to select the wake-up page on the blueprint inputs.
This selected page will be shown after a boot (after the boot page) and with a touch in the screen when on screen saver page.
After showing this wake-up page, all the previous behavior for closing the page (with a click or after a timeout) will be the same.

Solves #576 
Solves #612 
Solves #801 
Probably improves for #718 (comment)

* Select wake-up page

* Fan update engine

Change the fan update engine to follow the same patter as other settings pages.

* Update ReleaseNotes.md

* Adding vertical bars pics

* Panel offline mode (#900)

* Panel offline mode

Introduces "offline mode" for the panel, which will be used later with a fallback climate.

Pages that are depending on the blueprint (buttons pages, entity pages, settings pages, etc) won't be shown when the API is disconnected.

* Panel offline mode

* Panel offline mode

* Panel offline mode

* Panel offline mode

* "Jump to settings" on tft

Moved "Jump to settings page" routine from ESPHome to TFT in order to reduce complexity.

* Exclude Nextion2Text

Exclude Nextion2Text

* Fix validation issue

* Time engine on ESPHome

* Time engine on ESPHome

* Notification page bigger hotspot

Added hotspots around the buttons (Accept & Clear) on Notification page to make easier to click on those.

Solves #907

* Boot page retry comm

The boot page will retry communication with the blueprint once a minute to avoid the situation where that page is shown until the automation is reloaded.

* Fix call to screen page

Fixes the call to screen page on US panel.
Reconciliate the US landscape model from EU model.

* Fix fan page `button_on`

Fixing rounding on that button.

* Fixed Fan page rounding

* Prevents boot sequence in other pages

* Physical relay local control

We are trying to make your panel as autonomous as possible by moving some of the controls from the Blueprint to ESPHome. This will reduce the load in your network and Home Assistant, but also will make a more reliable system capable to do it's core functionality even when the network is unavailable or Home Assistant is restarting.
With this version, the following engines have been moved to your panel (local control):
- Physical relay control (when hardware left button is connected to relay 1 or right button to relay 2)

Solves #910

* Embedded climate (#917)

* Performance improvements

The main focus here was to reduce the number of calls between Home Assistant and ESPHome, moving logic as much as possible to TFT and ESPHome.
- Service calls moved to ESPHome (in preparation for Alarm Control Panel)
- Page change informed via event call instead of `nspanel_event` sensor (which still in use by other calls, but might be possible to remove in the future)

* Draft embedded climate

This adds an initial version of an embedded climate/thermostat (heating only for now) with support for local control even with Wi-Fi out.

Solves #646
Solves #263

* Update ReleaseNotes.md

* Fix climate slider

Fix for climate slider opening in an incorrect position and sending only the integer part of the new target temperature

* Moving home page to ESPHome

In progress...

* Fix translations - Dutch

* Embedded chip 3

Home page - Chip 3 will be controlled locally when embedded climate is enable.

* Fixed buttons bar

Fixed buttons bar managed on ESPHome when embedded climate is visible.

* Update ReleaseNotes.md

* Services back to the Blueprint

Moving service calls back to the blueprint as latest HA requires user's permissions to call HA services from ESPHome.
This still have to be used for Alarm calls due to security concerns.

* Update ReleaseNotes.md

* support to hidden ssid (#908)

Supports hidden ssid with the use of substitutions `wifi_hidden: "true"`.

This can be breaking change for users with custom/advanced wifi settings.

Solves #906

* Update nspanel_esphome.yaml

* Removed `restore_state`

There is some incomplete work related to alarms on this commit, but the focus here is to fix `restore_state` on ESPHome v2023.7.0.

This solves #939

* US model - Fan page - Redistribute icons

Redistributed icons on Fan page on US model in order to improve usability.

Based on feedback from #791 (reply in thread)

* Align `nspanel_us_land`

Apply all changes from EU to US_Land

* Fix relays chips

Fix relay status indication on chips.

Solves #926 (comment)

* Fix "invalid variable" for "api"

Fix error "Nextion invalid variable name" when setting `api`.

* Default embedded climate to relay_0

* Fix translations - Italian

Based on #940 (comment)

* Fix `set_temperature` for climate

Solves #957

* Fix `fan.turn_off` call

Removed timer call from fan stop button.
This solves #791 (reply in thread)

* Call a `fan.turn_off` when percentage is 0%

Solves #791 (reply in thread)

* Fix call for fan stop button

Solves #791 (reply in thread)

* Icons on ESPHome

Move icons from TFT/HMI to ESPHome to prevent error on Nextion2Text.

* Updated translations - Spanish

Based on #940 (comment)

* Make home page sensor's icons consistent

Make icon selection consistent with chips where the entity's icon is used in case a icon is not set in the blueprint settings.

Solves #963

* Updated translations - Slovenian

Based on:
- #940 (comment)
-  #829 (comment)

* dutch (#974)

* small ducht translations

small ducht translations

* Dutch translations

---------

Co-authored-by: Edward Firmo <[email protected]>

* Add-on support (#977)

Moved climate settings to an add-on.
Updated documentation.

* Fixed link to addon climate docs

* Fix change brightness when sleeping

Prevents the panel to change screen brightness when sleeping.

Solves #975

* Standardize HA service calls

* Bump version to `4.0 dev`

* Create customization.md

This will reduce the need for:
- #920
- #662
- #833

* Clean-up for customizations

Clean up ESPHome in order to make easier the use of customizations.

* Create Alarm page

* Add page Alarm

* Add Alarm docs

Update docs to reflect the current state (new features & changes)

* Creating "install.md" and update add-ons instructions

* Add Alarm page buttons pics

* Add link to Alarm on page Home

* Create Alarm page

* Alarm button font color

* Add `keyb_num` page

* Alarm Control Panel with PIN (#982)

Implements an Alarm Control Panel page on NSPanel.

Solves #66
Solves #227
Solves #672
Partially solves #299 (comment)
Partially solves #64 (comment)
Partially solves #718

* Fix alarm without pin not working

Solves #930 (comment)

* Alarm page UI

Fixed close button
Disabled buttons are darker

* Move Entities button to ESPHome

Move logic behind Entities button (Home page) from Blueprint to ESPHome in order to gain performance on creating home page.

* Human readable Uptime (#986)

* Human readable Uptime

* Uptime from Frenck code

* Uptime with Frenck code

* Updated Human Readable Uptime

* Removed trailing spaces

* Renamed sensor to "Last started"

Sensor renamed
Update moved to the boot process
Clean-up

---------

Co-authored-by: Edward Firmo <[email protected]>
Co-authored-by: Edward Firmo <[email protected]>

* Update alarm icon & color

* Revert `fast_connect` back to `false`

* Extended chars on buttons pages (#988)

Replaces #740
Probably solves #664
Probably solves #738
Probably solves #987

* Removed `fast_connect`

* Support to `code_arm_required`

Only shows the alarm PIN keyboard if a code is required for arming (or when disarming).

* Update alarm icon on home page

Refresh icon when alarm state changes.

* Fix alarm icon not updating on home page

* Home buttons new format - Alarm

Modernise the button Alarm flow on page Home to improve performance.

* Home buttons new format - Entities

Modernise the button "Entities" flow on page Home to improve performance.

* Home buttons new format - QRcode

Modernise the button "QRcode" flow on page Home to improve performance.

* Home buttons new format - Notification

Modernise the button "Notification" flow on page Home to improve performance.

I haven't moved the code from the Blueprint to ESPHome yet, as I will leave this for when we rebuild the Notification flow in the near future (hopefully), so the performance gains may not be perceived now. Just aligning with other buttons format.

* Adding screenshots

* Delete ReleaseNotes.md

Moved to the release

* New entity filter format

This new format was released with HA v2023.4 and the old one will be deprecated soon.

* Fix Alarm page bypass icon

* Bump version to 4.0

* Rename `addon_climate_heat`

* Simplify climate substitutions

* Add support for `addon_climate_cool`

* Removed `${verbose_log}`

Use logger level `VERBOSE` instead

* Fix script call

* Clean up general entities & fallback

Store inputs into variables only when needed.
Removed fallback mode - Replaced by ESPHome local control when the relay is assigned to the button in the blueprint.

* Phase out sensor `nspanel_event` (partially)

This sensor is being replaced by event calls.

* uptime sensors (#998)

* Create ReleaseNotes.md

* Fix Climate page when embedded climate

And also added a lot of logs which should be removed later as it takes from memory.

Solves #995 (reply in thread)

* Move brightness control to global var

Clean up page Home

* Alarm page translations - Finnish

#940 (comment)

* Exported pics

* Clean-up TFT

- Removed a bunch of unused pics
- Changed page indicator to new format (which will allow future development to hide unused pages)
- Standardized close button in most pages

* Fixed background pics

- Entities pages
- Weather pages

* Standardize close button

* Add "Alarm" section

* Support to wake-up page on `wake_up_display` service

This changes the behavior of a service introduced by #734.

* Optimize `wake_up_display` service

* Fix icon font sizes 10 and 64

Solves #960 (comment)

And also remove all the unnecessary `wait_until`

* Fix Settings page element ids

Partially solves #960 (comment)

* Add translation keys for `settings` page

#1002

* Update settings page when brightness changes on HA

Solves #960 (comment)

* Clean-up page settings

* update docs (#1003)

* updated docs

* Update ReleaseNotes.md

---------

Co-authored-by: Edward Firmo <[email protected]>

* Clean-up Cover page

I'm preparing this page to have icons changing based on the device_class selected to a cover.

* Clean-up boot delay

* Enable `current_page` sensor by default

Otherwise the system won´t update values unless the page is reloaded.

* Use `current_page` in blueprint conditions

One more step towards the phase out of `nspanelevent`.

* Move `script.refresh_colors` to `service.global_settings`

As this is called from a single point, there's no meaning of having a separated script.

* Fix climate icon update

Partially solves #995 (reply in thread)

* Fix button show on climate page

Solves #995 (reply in thread)

* Visual improvements on climate page

- Add friendly name when embedded - Solves #995 (reply in thread)
- Make disable icons a bit darker - Solves #995 (reply in thread)
- Add space for page title in EU an US Land versions
- Reset page timer when pressing/releasing on the slider - Partially solves #990

* Don't update values when page home is not visible

To reduce load on Home Assistant and the network

* Cleanup boot sequence

Move some functionalities to ESPHome

* Display internal sensor value when wifi is out

Before it was showing on home page only when API was out. This adds a test for WiFi.

* Fix `default_target_temperature`

It also updates the page home when thermostat status changes (for the chips).
Solves #995 (reply in thread)

* Adding ID to components missing it

* Renamed `wake_up_display` to `wake_up`

* Re-arrange commands list

* Add service `set_component_color`

Deprecates the following services:
- `send_command_font_color`
- `send_command_background_color`

* Fix button pages not showing

* Adjusted time for HW long click

* Fixed buttons on settings page

* Minor adjustments to page climate

And replace font 10 to size 48 (it was 64 since a few days ago).

* Updates to breaking changes list

* Page settings redesign

Clean up the UI of settings page.
Prepare for translations.

* Enable translations of Settings page

* Notification word-wrap

For EU and US_LAND only, for now.

* Notifications page rebuilt

- Notification button processed on ESPHome (as all the info is there)
- Added word-wrap for main text
- Expanded text size
- Handling display mode (used to define the number of chars per line on Notifications)
- Versioning handling - As a consequence of the previous item.

* Word-wrap buttons pages

Taking advantage of the algorithm created for notifications.

* Word-wrap for Alarm page

* Version mismatch notication

* Fix ESPHome not starting with older TFT

* Rebuilt home page status bar update

* Updated translations - Italian

Based on #1002 (comment)

Thanks @MaiPiu

* Fix `Nextion reported variable name invalid!`

* Fix `Nextion variable invalid`

* Handle `embedded_indoor_temperature`

Internal temperature display will be handled locally (ESPHome) when no other sensor is selected.

* Review temperature correction engine

* Fix display climate chip

* update `temp_nspanel` when correction changes

* Fix `Fan` page not open with long press HW button

Solves #1007

* Minor adjustments on settings page

* version 4.0 ready for release

* Clean-up docs

---------

Co-authored-by: bkbartk <[email protected]>
Co-authored-by: w00zy <[email protected]>

* Fix Fan page button colors when opening

Solves #1017

* Translations (#1023)

* Translations

* Update nspanel_blueprint.yaml

I've changed `brightness` for now as the new design isn't implemented yet, but that string is already in use with the current design.

---------

Co-authored-by: Edward Firmo <[email protected]>

* Adjustments to settings page

* Fix entity info when calling detailed pages

Solves #1022

* Added `media_player` page (hidden)

* New "Confirm" pop-up

This also removes the sensor "NSPanel Event"

* Fix pages not updating values

Solves #1026

* Media player - Buttons

- Added code to buttons on media_player page.
- Clean-up:
  - Moved wake-up select from Blueprint to ESPHome component
  - Removed `switch.xxxxx_confirmation_message`

* Fix logging for global_settings

It was logging wakeup_page, which is deprecated

* Improved version notification

* Removed trailing spaces

* Notification for `sensor.xxxxx_current_page` missing

This might be a common issue for users migrating from v3.4 to v3.5.
This information is part of the release notes, but I believe it worth having a guide to support closely any user who miss that in the release notes.

* Simplify `touchevent` engine

The touch event is used only for the sleeping engine (it will be used for dimming later) and it was transferring all the json info with page name, component, entity, etc.
This was replaced by a simple random integer with no meaning other than "the screen was touched, reset the timer".

* Media player first buttons actions

* Fix unknown service: `media_player.null`

* Media Player control

You will be able to add a Media Player entity to any of the buttons pages and with a long press you will see the media player page.

* Remove dimming timer for now

The funcionality isn't completed.

* Home page - Custom buttons

On the blueprint you can now set up to 3 buttons to be shown on Home page.
It will show the detailed settings page, so the entity must be compatible.

* Fix Media player missing parameters

Possibly solves #1030 (comment)

* Prevents calls to `media_player.null`

* Remove `entity` info from pages on TFT

Since v3.4, the info about entity_id shown was going all the way to Nextion and then sent back in the json return, however this requires a long (100-char) global var and the way it was implemented, it was one of those per settings page, as climate should be also recorded at the same time in case the embedded climate was installed.
This was taking too much memory, so I've moved this info to a global variable (string) in ESPHome.
There is now lots of space for code cleaning (and still pending to do the same with climate entity, as it could be only a bool to inform if embedded), but this brings the functionality.

This enabled the return to global for some components, so it probably solves #1031

* Prototyping `power` page

Thanks @Floppe for doing the design
#838

* Prototyping `power` page

* New sleep flow

* Removed trailing spaces

* Fix empty page climate

* Fix names on button pages

Fix names when a name is not provided in the blueprint settings.

* Fix call to sleep routine when timeout changes

Solves #1037

* Replace `confirm` var on buttons pages

Simpler and saves some memory.

* Clean-up

* Align the code for the 3 timers

* Extend domains supported by home page custom buttons

Based on #1034

* Fix error when btn_label is `None`

* Fix `Variable invalid` on buttons pages

* Fix constructor of Entity pages

* Fallback even when button is assigned to another entity

Solves #1013 (comment)

* Add inputs for media player refresh time

* Adjustments to Media Player refresh interval default values

* Use panel's events to reset timers

Possibly solves #1040
Possibly solves #995 (reply in thread)

* State based colors to home page custom buttons

* Fix alarm not changing status

Do not clear `entity_id` when opening keyboard page, so the info can be used when sending commands.

Solves #1039

* Missing `nspanel_us.tft`

* add `touchevents` to pages `media_player` and `confirm`

To avoid panel going back to Home page while user is playing with the page.
Solves #1040

* Media player minor layout changes

* Media player - Volume timer & icon size

Volume timer changed from 1000 to 500ms
Icon change from font 9 to 10

* Media player roll back font 9 and timer 1s

* Don't send to Nextion obsolete volume settings

If the volume is the same as the last one sent to the screen, don't send again, so if changes are being made on the screen it didn't receive the update all the time, making the slider unresponsive.

* Media player - Layout improvement

- Removed button "Stop"
- Increase touch area for buttons
- Redistributed buttons on page

* Add touchevents to page climate

Possibly solves #995

* Resolve validation

* Correct playing time based on `updated_at` attribute

* Prepare for when attribute is not available

* Fix attribute `media_position`

* Fix time duration when HA isn't updating position

* Fix climate page not opening when offline

Solves #995 (reply in thread)

* Clean-up release notes

* Clean up code

- Removed commented out lines
- Removed temporary logs

Getting prepared to release

* Bump version to 4.0beta

To reduce the chance of an obsolete file in use after the release.

* Change version to 4.0dev

To differentiate from beta.

* Added missing translations (#1047)

* Added missing translations

Added missing translations for the Swedish translation.

* Caption first char

---------

Co-authored-by: Edward Firmo <[email protected]>

* Translations to Slovak on Settings page

* Refresh docs

* Update nspanel_blank.md

* Update nspanel_blank.md

* Add screensaver to `nspanel_blank.tft`

And build a new tft with latest firmware and url for instructions.

* Update nspanel_blank.md

* Fix to Slovenian translation

#1002 (reply in thread)

* Settings page - Translations to French

From #1002 (reply in thread)

* Alarm page - Translations to French

#940 (comment)

* Add customization for display sleeping/awake

Probably solves #1035

* Customizations - Blank TFT button

Probably solves #1048

* Customizations - Deep sleep

Solves #955

* Customization - Deep sleep - Fix broken link

* Translations - Slovak

- #829 (comment)
- #940 (comment)

* New versioning - not implemented

* Bump version to `4.0b2`

* v4.0 release

* Chpego patch 1 (#1059)

* Update nspanel_blueprint.yaml

fix some typo

* Update nspanel_blueprint.yaml

* Update README.md

* Update nspanel_blueprint.yaml

* Update nspanel_blueprint.yaml

* Started Release Notes for v4.1

---------

Co-authored-by: Edward Firmo <[email protected]>

* Prevents media player crash with `media_position_updated_at`

Prevents media player crashing when called before `media_position_updated_at` is able to provide a value.

I believe this solves #1062.

* timezone

* Settings page translations - Dutch

#1002 (comment)

* Typo

* Removed `display_current_brightness`

I've removed this sensor as it was spamming the logs and taking memory without providing real benefit.

* Ignore different patch versions

Change the versioning control to major and minor only, ignoring differences on the patch version.

So components with different patch versions should be able to work with each other as soon the major and minor versions are the same.
This same logic was implemented on the blueprint before the 4.0 release.

* Code clean-up

* Flexible time format selected

Solves #1083 (comment)

* Removed obsolete thermostat page pic

Based on #1076 (reply in thread)

* Add date format for Finnish

* Fix `buttonpage03` long press pointing to page 2

* Fix mute volume not working

Solves #1079 items 2 and 3

* Reset sleep timer when brightness settings changes

Solves #1087

Also removes limit to 10char on "Brightness" on Settings page.

* Bump version to `4.0.1dev`

* Update ReleaseNotes.md

Preparing for patch release.

* Review translations - Finish

Solves #1083

* Update ReleaseNotes.md

* Remove trailing space

* v4.0.1beta

---------

Co-authored-by: bkbartk <[email protected]>
Co-authored-by: w00zy <[email protected]>
Co-authored-by: w00zy <[email protected]>
Co-authored-by: Erik Larsson <[email protected]>
Co-authored-by: chpego <[email protected]>
edwardtfn added a commit that referenced this issue Sep 25, 2023
* Time engine on ESPHome

* Time engine on ESPHome

* Notification page bigger hotspot

Added hotspots around the buttons (Accept & Clear) on Notification page to make easier to click on those.

Solves #907

* Boot page retry comm

The boot page will retry communication with the blueprint once a minute to avoid the situation where that page is shown until the automation is reloaded.

* Fix call to screen page

Fixes the call to screen page on US panel.
Reconciliate the US landscape model from EU model.

* Fix fan page `button_on`

Fixing rounding on that button.

* Fixed Fan page rounding

* Prevents boot sequence in other pages

* Physical relay local control

We are trying to make your panel as autonomous as possible by moving some of the controls from the Blueprint to ESPHome. This will reduce the load in your network and Home Assistant, but also will make a more reliable system capable to do it's core functionality even when the network is unavailable or Home Assistant is restarting.
With this version, the following engines have been moved to your panel (local control):
- Physical relay control (when hardware left button is connected to relay 1 or right button to relay 2)

Solves #910

* Embedded climate (#917)

* Performance improvements

The main focus here was to reduce the number of calls between Home Assistant and ESPHome, moving logic as much as possible to TFT and ESPHome.
- Service calls moved to ESPHome (in preparation for Alarm Control Panel)
- Page change informed via event call instead of `nspanel_event` sensor (which still in use by other calls, but might be possible to remove in the future)

* Draft embedded climate

This adds an initial version of an embedded climate/thermostat (heating only for now) with support for local control even with Wi-Fi out.

Solves #646
Solves #263

* Update ReleaseNotes.md

* Fix climate slider

Fix for climate slider opening in an incorrect position and sending only the integer part of the new target temperature

* Moving home page to ESPHome

In progress...

* Fix translations - Dutch

* Embedded chip 3

Home page - Chip 3 will be controlled locally when embedded climate is enable.

* Fixed buttons bar

Fixed buttons bar managed on ESPHome when embedded climate is visible.

* Update ReleaseNotes.md

* Services back to the Blueprint

Moving service calls back to the blueprint as latest HA requires user's permissions to call HA services from ESPHome.
This still have to be used for Alarm calls due to security concerns.

* Update ReleaseNotes.md

* support to hidden ssid (#908)

Supports hidden ssid with the use of substitutions `wifi_hidden: "true"`.

This can be breaking change for users with custom/advanced wifi settings.

Solves #906

* Update nspanel_esphome.yaml

* Removed `restore_state`

There is some incomplete work related to alarms on this commit, but the focus here is to fix `restore_state` on ESPHome v2023.7.0.

This solves #939

* US model - Fan page - Redistribute icons

Redistributed icons on Fan page on US model in order to improve usability.

Based on feedback from #791 (reply in thread)

* Align `nspanel_us_land`

Apply all changes from EU to US_Land

* Fix relays chips

Fix relay status indication on chips.

Solves #926 (comment)

* Fix "invalid variable" for "api"

Fix error "Nextion invalid variable name" when setting `api`.

* Default embedded climate to relay_0

* Fix issue with `restore_state` and ESPHome v2023.7.0 (#941)

Solves #939

* Fix translations - Italian

Based on #940 (comment)

* Fix `set_temperature` for climate

Solves #957

* Fix `fan.turn_off` call

Removed timer call from fan stop button.
This solves #791 (reply in thread)

* Call a `fan.turn_off` when percentage is 0%

Solves #791 (reply in thread)

* Fix call for fan stop button

Solves #791 (reply in thread)

* Icons on ESPHome

Move icons from TFT/HMI to ESPHome to prevent error on Nextion2Text.

* Updated translations - Spanish

Based on #940 (comment)

* Make home page sensor's icons consistent

Make icon selection consistent with chips where the entity's icon is used in case a icon is not set in the blueprint settings.

Solves #963

* Updated translations - Slovenian

Based on:
- #940 (comment)
-  #829 (comment)

* dutch (#974)

* small ducht translations

small ducht translations

* Dutch translations

---------

Co-authored-by: Edward Firmo <[email protected]>

* Add-on support (#977)

Moved climate settings to an add-on.
Updated documentation.

* Fixed link to addon climate docs

* Fix change brightness when sleeping

Prevents the panel to change screen brightness when sleeping.

Solves #975

* Standardize HA service calls

* Bump version to `4.0 dev`

* Create customization.md

This will reduce the need for:
- #920
- #662
- #833

* Clean-up for customizations

Clean up ESPHome in order to make easier the use of customizations.

* Create Alarm page

* Add page Alarm

* Add Alarm docs

Update docs to reflect the current state (new features & changes)

* Creating "install.md" and update add-ons instructions

* Add Alarm page buttons pics

* Add link to Alarm on page Home

* Create Alarm page

* Alarm button font color

* Add `keyb_num` page

* Alarm Control Panel with PIN (#982)

Implements an Alarm Control Panel page on NSPanel.

Solves #66
Solves #227
Solves #672
Partially solves #299 (comment)
Partially solves #64 (comment)
Partially solves #718

* Fix alarm without pin not working

Solves #930 (comment)

* Alarm page UI

Fixed close button
Disabled buttons are darker

* Move Entities button to ESPHome

Move logic behind Entities button (Home page) from Blueprint to ESPHome in order to gain performance on creating home page.

* Human readable Uptime (#986)

* Human readable Uptime

* Uptime from Frenck code

* Uptime with Frenck code

* Updated Human Readable Uptime

* Removed trailing spaces

* Renamed sensor to "Last started"

Sensor renamed
Update moved to the boot process
Clean-up

---------

Co-authored-by: Edward Firmo <[email protected]>
Co-authored-by: Edward Firmo <[email protected]>

* Update alarm icon & color

* Revert `fast_connect` back to `false`

* Extended chars on buttons pages (#988)

Replaces #740
Probably solves #664
Probably solves #738
Probably solves #987

* Removed `fast_connect`

* Support to `code_arm_required`

Only shows the alarm PIN keyboard if a code is required for arming (or when disarming).

* Update alarm icon on home page

Refresh icon when alarm state changes.

* Fix alarm icon not updating on home page

* Home buttons new format - Alarm

Modernise the button Alarm flow on page Home to improve performance.

* Home buttons new format - Entities

Modernise the button "Entities" flow on page Home to improve performance.

* Home buttons new format - QRcode

Modernise the button "QRcode" flow on page Home to improve performance.

* Home buttons new format - Notification

Modernise the button "Notification" flow on page Home to improve performance.

I haven't moved the code from the Blueprint to ESPHome yet, as I will leave this for when we rebuild the Notification flow in the near future (hopefully), so the performance gains may not be perceived now. Just aligning with other buttons format.

* Adding screenshots

* Delete ReleaseNotes.md

Moved to the release

* New entity filter format

This new format was released with HA v2023.4 and the old one will be deprecated soon.

* Fix Alarm page bypass icon

* Bump version to 4.0

* Rename `addon_climate_heat`

* Simplify climate substitutions

* Add support for `addon_climate_cool`

* Removed `${verbose_log}`

Use logger level `VERBOSE` instead

* Fix script call

* Clean up general entities & fallback

Store inputs into variables only when needed.
Removed fallback mode - Replaced by ESPHome local control when the relay is assigned to the button in the blueprint.

* Phase out sensor `nspanel_event` (partially)

This sensor is being replaced by event calls.

* uptime sensors (#998)

* Create ReleaseNotes.md

* Fix Climate page when embedded climate

And also added a lot of logs which should be removed later as it takes from memory.

Solves #995 (reply in thread)

* Move brightness control to global var

Clean up page Home

* Alarm page translations - Finnish

#940 (comment)

* Exported pics

* Clean-up TFT

- Removed a bunch of unused pics
- Changed page indicator to new format (which will allow future development to hide unused pages)
- Standardized close button in most pages

* Fixed background pics

- Entities pages
- Weather pages

* Standardize close button

* Add "Alarm" section

* Support to wake-up page on `wake_up_display` service

This changes the behavior of a service introduced by #734.

* Optimize `wake_up_display` service

* Fix icon font sizes 10 and 64

Solves #960 (comment)

And also remove all the unnecessary `wait_until`

* Fix Settings page element ids

Partially solves #960 (comment)

* Add translation keys for `settings` page

#1002

* Update settings page when brightness changes on HA

Solves #960 (comment)

* Clean-up page settings

* update docs (#1003)

* updated docs

* Update ReleaseNotes.md

---------

Co-authored-by: Edward Firmo <[email protected]>

* Clean-up Cover page

I'm preparing this page to have icons changing based on the device_class selected to a cover.

* Clean-up boot delay

* Enable `current_page` sensor by default

Otherwise the system won´t update values unless the page is reloaded.

* Use `current_page` in blueprint conditions

One more step towards the phase out of `nspanelevent`.

* Move `script.refresh_colors` to `service.global_settings`

As this is called from a single point, there's no meaning of having a separated script.

* Fix climate icon update

Partially solves #995 (reply in thread)

* Fix button show on climate page

Solves #995 (reply in thread)

* Visual improvements on climate page

- Add friendly name when embedded - Solves #995 (reply in thread)
- Make disable icons a bit darker - Solves #995 (reply in thread)
- Add space for page title in EU an US Land versions
- Reset page timer when pressing/releasing on the slider - Partially solves #990

* Don't update values when page home is not visible

To reduce load on Home Assistant and the network

* Cleanup boot sequence

Move some functionalities to ESPHome

* Display internal sensor value when wifi is out

Before it was showing on home page only when API was out. This adds a test for WiFi.

* Fix `default_target_temperature`

It also updates the page home when thermostat status changes (for the chips).
Solves #995 (reply in thread)

* Adding ID to components missing it

* Renamed `wake_up_display` to `wake_up`

* Re-arrange commands list

* Add service `set_component_color`

Deprecates the following services:
- `send_command_font_color`
- `send_command_background_color`

* Fix button pages not showing

* Adjusted time for HW long click

* Fixed buttons on settings page

* Minor adjustments to page climate

And replace font 10 to size 48 (it was 64 since a few days ago).

* Updates to breaking changes list

* Page settings redesign

Clean up the UI of settings page.
Prepare for translations.

* Enable translations of Settings page

* Notification word-wrap

For EU and US_LAND only, for now.

* Notifications page rebuilt

- Notification button processed on ESPHome (as all the info is there)
- Added word-wrap for main text
- Expanded text size
- Handling display mode (used to define the number of chars per line on Notifications)
- Versioning handling - As a consequence of the previous item.

* Word-wrap buttons pages

Taking advantage of the algorithm created for notifications.

* Word-wrap for Alarm page

* Version mismatch notication

* Fix ESPHome not starting with older TFT

* Rebuilt home page status bar update

* Updated translations - Italian

Based on #1002 (comment)

Thanks @MaiPiu

* Fix `Nextion reported variable name invalid!`

* Fix `Nextion variable invalid`

* Handle `embedded_indoor_temperature`

Internal temperature display will be handled locally (ESPHome) when no other sensor is selected.

* Review temperature correction engine

* Fix display climate chip

* update `temp_nspanel` when correction changes

* Fix `Fan` page not open with long press HW button

Solves #1007

* Minor adjustments on settings page

* version 4.0 ready for release

* Clean-up docs

* Improve version notification

* Disable restore `notification_unread`

This must be changed to a binary sensor in the future.

* Beta v4.0 (#1012)

* Create ReleaseNotes.md (#879)

* Create ReleaseNotes.md

* sensor display precision

* Filter devices to esp32 only (#881)

* Filter devices to esp32 only

Show only ESP32 devices when selecting the panel

* Filtered device list

* Sensor display precision (#880)

Now the values shown in your panel will follow the [sensor display precision](https://www.home-assistant.io/blog/2023/03/01/release-20233/#sensor-display-precision) provided by Home Assistant.
=> If you have problems with a value exceeding the available space in your panel, please reduce the number of decimals using Home Assistant [sensor display precision](https://www.home-assistant.io/blog/2023/03/01/release-20233/#sensor-display-precision).

* New language selector (#882)

* New language selector

* Update ReleaseNotes.md

* Update ReleaseNotes.md

* Remove `settings_entity` (#887)

* Remove `settings_entity`

- Bump version to 3.5_dev
- Removed references to pictures removed from TFT
- Removed code related to closing settings pages
- Removed trigger `settings_entity`

* Removed `set_settings_entity` service

- Bump version to 3.5_dev
- Removed `set_settings_entity` service - BREAKING CHANGE
- Removed `settings_entity` text-sensor - BREAKING CHANGE
- Added service `open_entity_settings_page` - BREAKING CHANGE

* Removed `settings_entity`

- Bump version to 3.5_dev
- Removed old climate page (climate_backup)
- Removed pics related to old climate page (ids 16-47, 80-83, 95-96 and 125(US only))
- Enforces brightness on any page change (this allows wake-up on settings page with long press on physical buttons) - Pending removing code from Blueprint
- Added `entity` variable on pages `climate`, `lightsettings` and `coversettings`
- Added `entity` info to `nspanelevent` on pages `climate`, `lightsettings` and `coversettings`
- Added `back_page` variable on pages `climate`, `lightsettings` and `coversettings` (default: home)
- Moving to TFT close page logic on pages `climate`, `lightsettings` and `coversettings` - Pending changes on Blueprint and ESPHome
- Standardized name for `page_label` on pages `climate`, `lightsettings` and `coversettings`
- Standardized settings page names: `climate`, `cover` and `light` (Removed `settings` from page name)

* Removed `settings_entity`

* Removed `settings_entity`

* Removed `settings_entity`

* Move `entity` variable to home page (#889)

* Move `entity` variable to home page

This will enable future development of a fallback climate

* Move `entity` variable to home page

* Move `entity` variable to home page

* Move `entity` variable to home page

* Move `entity` variable to home page

* Use `en` as fallback language (#891)

* Use `en` as fallback language

Uses English if a non valid language is selected (like when using legacy language selection).

* Use `en` as fallback language

* Create `nspanel_us_land.tft` (#890)

* Create `nspanel_us_land.tft'

Add `nspanel_us_land.tft' for US panel on landscape mode, fixing the offset on the touch screen when using `nspanel_eu.tft` into a US panel.
Hides the hardware buttons labels, as Nextion cannot support rotated text.

* Created `nspanel_us_land.tft`

* Created `nspanel_us_land.tft`

solves #390
solves #432
solves #299 (comment)

* Created `nspanel_us_land.tft`

* Created `nspanel_us_land.tft`

* Fix "Button confirmation page not working correctly"

Solves #883

* Supports weather forecast with `datetime` not string

This adds support to weather integrations where the `datetime` field under `forecast` attribute is provided as a `datetime` type.
This was seen on Météo-France, while all other weather integrations tested so far used a `text` field for `datetime`.

This solves #893

* Wifi icon to indicate when API offline

This changes the behavior of Wifi icon:

How it was before:
- Wifi icon was visible only when the wifi was connected, nothing was shown when wifi was not connected.

How it is now:
- Wifi icon will have 3 states:
 - Wifi & API connected: Gray wifi icon
 - Wifi disconnected: Red wifi-off icon
 - Wifi connected, but API disconnected (HA is out?): Red api-off icon

* API status indication on the panel

* Limit light & cover to supported settings (#896)

* Limit light to supported settings

When showing light settings, only the supported features will be shown for each light.

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

This partially solves #635

* Limits covers to supported settings

Only show cover settings when `set_position` is supported.

This solves #635

* Limits covers to supported settings

* Update instructions.md

* Add Fan speed settings page (#897)

* Add Fan speed settings page

Add an initial fan speed control page for fans supporting speed control.
Add speed (%) info in the buttons pages.

Solves #404 
Solves #791 
Solves #718 (comment)

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Fix name on confirmation page

Fix the entity name on the confirmation page.

The new order is:
1. Name set on the blueprint settings
2. Entity's `friendly_name` attribute
3. Entity's `name` attribute
4. Entity's `entity_id`

Solves #501

* Select wake-up page (#898)

* Select wake-up page

Users will be able to select the wake-up page on the blueprint inputs.
This selected page will be shown after a boot (after the boot page) and with a touch in the screen when on screen saver page.
After showing this wake-up page, all the previous behavior for closing the page (with a click or after a timeout) will be the same.

Solves #576 
Solves #612 
Solves #801 
Probably improves for #718 (comment)

* Select wake-up page

* Fan update engine

Change the fan update engine to follow the same patter as other settings pages.

* Update ReleaseNotes.md

* Adding vertical bars pics

* Panel offline mode (#900)

* Panel offline mode

Introduces "offline mode" for the panel, which will be used later with a fallback climate.

Pages that are depending on the blueprint (buttons pages, entity pages, settings pages, etc) won't be shown when the API is disconnected.

* Panel offline mode

* Panel offline mode

* Panel offline mode

* Panel offline mode

* "Jump to settings" on tft

Moved "Jump to settings page" routine from ESPHome to TFT in order to reduce complexity.

* Exclude Nextion2Text

Exclude Nextion2Text

* Fix validation issue

* Time engine on ESPHome

* Time engine on ESPHome

* Notification page bigger hotspot

Added hotspots around the buttons (Accept & Clear) on Notification page to make easier to click on those.

Solves #907

* Boot page retry comm

The boot page will retry communication with the blueprint once a minute to avoid the situation where that page is shown until the automation is reloaded.

* Fix call to screen page

Fixes the call to screen page on US panel.
Reconciliate the US landscape model from EU model.

* Fix fan page `button_on`

Fixing rounding on that button.

* Fixed Fan page rounding

* Prevents boot sequence in other pages

* Physical relay local control

We are trying to make your panel as autonomous as possible by moving some of the controls from the Blueprint to ESPHome. This will reduce the load in your network and Home Assistant, but also will make a more reliable system capable to do it's core functionality even when the network is unavailable or Home Assistant is restarting.
With this version, the following engines have been moved to your panel (local control):
- Physical relay control (when hardware left button is connected to relay 1 or right button to relay 2)

Solves #910

* Embedded climate (#917)

* Performance improvements

The main focus here was to reduce the number of calls between Home Assistant and ESPHome, moving logic as much as possible to TFT and ESPHome.
- Service calls moved to ESPHome (in preparation for Alarm Control Panel)
- Page change informed via event call instead of `nspanel_event` sensor (which still in use by other calls, but might be possible to remove in the future)

* Draft embedded climate

This adds an initial version of an embedded climate/thermostat (heating only for now) with support for local control even with Wi-Fi out.

Solves #646
Solves #263

* Update ReleaseNotes.md

* Fix climate slider

Fix for climate slider opening in an incorrect position and sending only the integer part of the new target temperature

* Moving home page to ESPHome

In progress...

* Fix translations - Dutch

* Embedded chip 3

Home page - Chip 3 will be controlled locally when embedded climate is enable.

* Fixed buttons bar

Fixed buttons bar managed on ESPHome when embedded climate is visible.

* Update ReleaseNotes.md

* Services back to the Blueprint

Moving service calls back to the blueprint as latest HA requires user's permissions to call HA services from ESPHome.
This still have to be used for Alarm calls due to security concerns.

* Update ReleaseNotes.md

* support to hidden ssid (#908)

Supports hidden ssid with the use of substitutions `wifi_hidden: "true"`.

This can be breaking change for users with custom/advanced wifi settings.

Solves #906

* Update nspanel_esphome.yaml

* Removed `restore_state`

There is some incomplete work related to alarms on this commit, but the focus here is to fix `restore_state` on ESPHome v2023.7.0.

This solves #939

* US model - Fan page - Redistribute icons

Redistributed icons on Fan page on US model in order to improve usability.

Based on feedback from #791 (reply in thread)

* Align `nspanel_us_land`

Apply all changes from EU to US_Land

* Fix relays chips

Fix relay status indication on chips.

Solves #926 (comment)

* Fix "invalid variable" for "api"

Fix error "Nextion invalid variable name" when setting `api`.

* Default embedded climate to relay_0

* Fix translations - Italian

Based on #940 (comment)

* Fix `set_temperature` for climate

Solves #957

* Fix `fan.turn_off` call

Removed timer call from fan stop button.
This solves #791 (reply in thread)

* Call a `fan.turn_off` when percentage is 0%

Solves #791 (reply in thread)

* Fix call for fan stop button

Solves #791 (reply in thread)

* Icons on ESPHome

Move icons from TFT/HMI to ESPHome to prevent error on Nextion2Text.

* Updated translations - Spanish

Based on #940 (comment)

* Make home page sensor's icons consistent

Make icon selection consistent with chips where the entity's icon is used in case a icon is not set in the blueprint settings.

Solves #963

* Updated translations - Slovenian

Based on:
- #940 (comment)
-  #829 (comment)

* dutch (#974)

* small ducht translations

small ducht translations

* Dutch translations

---------

Co-authored-by: Edward Firmo <[email protected]>

* Add-on support (#977)

Moved climate settings to an add-on.
Updated documentation.

* Fixed link to addon climate docs

* Fix change brightness when sleeping

Prevents the panel to change screen brightness when sleeping.

Solves #975

* Standardize HA service calls

* Bump version to `4.0 dev`

* Create customization.md

This will reduce the need for:
- #920
- #662
- #833

* Clean-up for customizations

Clean up ESPHome in order to make easier the use of customizations.

* Create Alarm page

* Add page Alarm

* Add Alarm docs

Update docs to reflect the current state (new features & changes)

* Creating "install.md" and update add-ons instructions

* Add Alarm page buttons pics

* Add link to Alarm on page Home

* Create Alarm page

* Alarm button font color

* Add `keyb_num` page

* Alarm Control Panel with PIN (#982)

Implements an Alarm Control Panel page on NSPanel.

Solves #66
Solves #227
Solves #672
Partially solves #299 (comment)
Partially solves #64 (comment)
Partially solves #718

* Fix alarm without pin not working

Solves #930 (comment)

* Alarm page UI

Fixed close button
Disabled buttons are darker

* Move Entities button to ESPHome

Move logic behind Entities button (Home page) from Blueprint to ESPHome in order to gain performance on creating home page.

* Human readable Uptime (#986)

* Human readable Uptime

* Uptime from Frenck code

* Uptime with Frenck code

* Updated Human Readable Uptime

* Removed trailing spaces

* Renamed sensor to "Last started"

Sensor renamed
Update moved to the boot process
Clean-up

---------

Co-authored-by: Edward Firmo <[email protected]>
Co-authored-by: Edward Firmo <[email protected]>

* Update alarm icon & color

* Revert `fast_connect` back to `false`

* Extended chars on buttons pages (#988)

Replaces #740
Probably solves #664
Probably solves #738
Probably solves #987

* Removed `fast_connect`

* Support to `code_arm_required`

Only shows the alarm PIN keyboard if a code is required for arming (or when disarming).

* Update alarm icon on home page

Refresh icon when alarm state changes.

* Fix alarm icon not updating on home page

* Home buttons new format - Alarm

Modernise the button Alarm flow on page Home to improve performance.

* Home buttons new format - Entities

Modernise the button "Entities" flow on page Home to improve performance.

* Home buttons new format - QRcode

Modernise the button "QRcode" flow on page Home to improve performance.

* Home buttons new format - Notification

Modernise the button "Notification" flow on page Home to improve performance.

I haven't moved the code from the Blueprint to ESPHome yet, as I will leave this for when we rebuild the Notification flow in the near future (hopefully), so the performance gains may not be perceived now. Just aligning with other buttons format.

* Adding screenshots

* Delete ReleaseNotes.md

Moved to the release

* New entity filter format

This new format was released with HA v2023.4 and the old one will be deprecated soon.

* Fix Alarm page bypass icon

* Bump version to 4.0

* Rename `addon_climate_heat`

* Simplify climate substitutions

* Add support for `addon_climate_cool`

* Removed `${verbose_log}`

Use logger level `VERBOSE` instead

* Fix script call

* Clean up general entities & fallback

Store inputs into variables only when needed.
Removed fallback mode - Replaced by ESPHome local control when the relay is assigned to the button in the blueprint.

* Phase out sensor `nspanel_event` (partially)

This sensor is being replaced by event calls.

* uptime sensors (#998)

* Create ReleaseNotes.md

* Fix Climate page when embedded climate

And also added a lot of logs which should be removed later as it takes from memory.

Solves #995 (reply in thread)

* Move brightness control to global var

Clean up page Home

* Alarm page translations - Finnish

#940 (comment)

* Exported pics

* Clean-up TFT

- Removed a bunch of unused pics
- Changed page indicator to new format (which will allow future development to hide unused pages)
- Standardized close button in most pages

* Fixed background pics

- Entities pages
- Weather pages

* Standardize close button

* Add "Alarm" section

* Support to wake-up page on `wake_up_display` service

This changes the behavior of a service introduced by #734.

* Optimize `wake_up_display` service

* Fix icon font sizes 10 and 64

Solves #960 (comment)

And also remove all the unnecessary `wait_until`

* Fix Settings page element ids

Partially solves #960 (comment)

* Add translation keys for `settings` page

#1002

* Update settings page when brightness changes on HA

Solves #960 (comment)

* Clean-up page settings

* update docs (#1003)

* updated docs

* Update ReleaseNotes.md

---------

Co-authored-by: Edward Firmo <[email protected]>

* Clean-up Cover page

I'm preparing this page to have icons changing based on the device_class selected to a cover.

* Clean-up boot delay

* Enable `current_page` sensor by default

Otherwise the system won´t update values unless the page is reloaded.

* Use `current_page` in blueprint conditions

One more step towards the phase out of `nspanelevent`.

* Move `script.refresh_colors` to `service.global_settings`

As this is called from a single point, there's no meaning of having a separated script.

* Fix climate icon update

Partially solves #995 (reply in thread)

* Fix button show on climate page

Solves #995 (reply in thread)

* Visual improvements on climate page

- Add friendly name when embedded - Solves #995 (reply in thread)
- Make disable icons a bit darker - Solves #995 (reply in thread)
- Add space for page title in EU an US Land versions
- Reset page timer when pressing/releasing on the slider - Partially solves #990

* Don't update values when page home is not visible

To reduce load on Home Assistant and the network

* Cleanup boot sequence

Move some functionalities to ESPHome

* Display internal sensor value when wifi is out

Before it was showing on home page only when API was out. This adds a test for WiFi.

* Fix `default_target_temperature`

It also updates the page home when thermostat status changes (for the chips).
Solves #995 (reply in thread)

* Adding ID to components missing it

* Renamed `wake_up_display` to `wake_up`

* Re-arrange commands list

* Add service `set_component_color`

Deprecates the following services:
- `send_command_font_color`
- `send_command_background_color`

* Fix button pages not showing

* Adjusted time for HW long click

* Fixed buttons on settings page

* Minor adjustments to page climate

And replace font 10 to size 48 (it was 64 since a few days ago).

* Updates to breaking changes list

* Page settings redesign

Clean up the UI of settings page.
Prepare for translations.

* Enable translations of Settings page

* Notification word-wrap

For EU and US_LAND only, for now.

* Notifications page rebuilt

- Notification button processed on ESPHome (as all the info is there)
- Added word-wrap for main text
- Expanded text size
- Handling display mode (used to define the number of chars per line on Notifications)
- Versioning handling - As a consequence of the previous item.

* Word-wrap buttons pages

Taking advantage of the algorithm created for notifications.

* Word-wrap for Alarm page

* Version mismatch notication

* Fix ESPHome not starting with older TFT

* Rebuilt home page status bar update

* Updated translations - Italian

Based on #1002 (comment)

Thanks @MaiPiu

* Fix `Nextion reported variable name invalid!`

* Fix `Nextion variable invalid`

* Handle `embedded_indoor_temperature`

Internal temperature display will be handled locally (ESPHome) when no other sensor is selected.

* Review temperature correction engine

* Fix display climate chip

* update `temp_nspanel` when correction changes

* Fix `Fan` page not open with long press HW button

Solves #1007

* Minor adjustments on settings page

* version 4.0 ready for release

* Clean-up docs

---------

Co-authored-by: bkbartk <[email protected]>
Co-authored-by: w00zy <[email protected]>

* Fix Fan page button colors when opening

Solves #1017

* Translations (#1023)

* Translations

* Update nspanel_blueprint.yaml

I've changed `brightness` for now as the new design isn't implemented yet, but that string is already in use with the current design.

---------

Co-authored-by: Edward Firmo <[email protected]>

* Adjustments to settings page

* Fix entity info when calling detailed pages

Solves #1022

* Added `media_player` page (hidden)

* New "Confirm" pop-up

This also removes the sensor "NSPanel Event"

* Fix pages not updating values

Solves #1026

* Media player - Buttons

- Added code to buttons on media_player page.
- Clean-up:
  - Moved wake-up select from Blueprint to ESPHome component
  - Removed `switch.xxxxx_confirmation_message`

* Fix logging for global_settings

It was logging wakeup_page, which is deprecated

* Improved version notification

* Removed trailing spaces

* Notification for `sensor.xxxxx_current_page` missing

This might be a common issue for users migrating from v3.4 to v3.5.
This information is part of the release notes, but I believe it worth having a guide to support closely any user who miss that in the release notes.

* Simplify `touchevent` engine

The touch event is used only for the sleeping engine (it will be used for dimming later) and it was transferring all the json info with page name, component, entity, etc.
This was replaced by a simple random integer with no meaning other than "the screen was touched, reset the timer".

* Media player first buttons actions

* Fix unknown service: `media_player.null`

* Media Player control

You will be able to add a Media Player entity to any of the buttons pages and with a long press you will see the media player page.

* Remove dimming timer for now

The funcionality isn't completed.

* Home page - Custom buttons

On the blueprint you can now set up to 3 buttons to be shown on Home page.
It will show the detailed settings page, so the entity must be compatible.

* Fix Media player missing parameters

Possibly solves #1030 (comment)

* Prevents calls to `media_player.null`

* Remove `entity` info from pages on TFT

Since v3.4, the info about entity_id shown was going all the way to Nextion and then sent back in the json return, however this requires a long (100-char) global var and the way it was implemented, it was one of those per settings page, as climate should be also recorded at the same time in case the embedded climate was installed.
This was taking too much memory, so I've moved this info to a global variable (string) in ESPHome.
There is now lots of space for code cleaning (and still pending to do the same with climate entity, as it could be only a bool to inform if embedded), but this brings the functionality.

This enabled the return to global for some components, so it probably solves #1031

* Prototyping `power` page

Thanks @Floppe for doing the design
#838

* Prototyping `power` page

* New sleep flow

* Removed trailing spaces

* Fix empty page climate

* Fix names on button pages

Fix names when a name is not provided in the blueprint settings.

* Fix call to sleep routine when timeout changes

Solves #1037

* Replace `confirm` var on buttons pages

Simpler and saves some memory.

* Clean-up

* Align the code for the 3 timers

* Extend domains supported by home page custom buttons

Based on #1034

* Fix error when btn_label is `None`

* Fix `Variable invalid` on buttons pages

* Fix constructor of Entity pages

* Fallback even when button is assigned to another entity

Solves #1013 (comment)

* Add inputs for media player refresh time

* Adjustments to Media Player refresh interval default values

* Use panel's events to reset timers

Possibly solves #1040
Possibly solves #995 (reply in thread)

* State based colors to home page custom buttons

* Fix alarm not changing status

Do not clear `entity_id` when opening keyboard page, so the info can be used when sending commands.

Solves #1039

* Missing `nspanel_us.tft`

* add `touchevents` to pages `media_player` and `confirm`

To avoid panel going back to Home page while user is playing with the page.
Solves #1040

* Media player minor layout changes

* Media player - Volume timer & icon size

Volume timer changed from 1000 to 500ms
Icon change from font 9 to 10

* Media player roll back font 9 and timer 1s

* Don't send to Nextion obsolete volume settings

If the volume is the same as the last one sent to the screen, don't send again, so if changes are being made on the screen it didn't receive the update all the time, making the slider unresponsive.

* Media player - Layout improvement

- Removed button "Stop"
- Increase touch area for buttons
- Redistributed buttons on page

* Add touchevents to page climate

Possibly solves #995

* Resolve validation

* Correct playing time based on `updated_at` attribute

* Prepare for when attribute is not available

* Fix attribute `media_position`

* Fix time duration when HA isn't updating position

* Fix climate page not opening when offline

Solves #995 (reply in thread)

* Clean-up release notes

* Clean up code

- Removed commented out lines
- Removed temporary logs

Getting prepared to release

* Bump version to 4.0beta

To reduce the chance of an obsolete file in use after the release.

* Change version to 4.0dev

To differentiate from beta.

* Added missing translations (#1047)

* Added missing translations

Added missing translations for the Swedish translation.

* Caption first char

---------

Co-authored-by: Edward Firmo <[email protected]>

* Translations to Slovak on Settings page

* Refresh docs

* Update nspanel_blank.md

* Update nspanel_blank.md

* Add screensaver to `nspanel_blank.tft`

And build a new tft with latest firmware and url for instructions.

* Update nspanel_blank.md

* Fix to Slovenian translation

#1002 (reply in thread)

* Settings page - Translations to French

From #1002 (reply in thread)

* Alarm page - Translations to French

#940 (comment)

* Add customization for display sleeping/awake

Probably solves #1035

* Customizations - Blank TFT button

Probably solves #1048

* Customizations - Deep sleep

Solves #955

* Customization - Deep sleep - Fix broken link

* Translations - Slovak

- #829 (comment)
- #940 (comment)

* New versioning - not implemented

* Bump version to `4.0b2`

* v4.0 release

* Chpego patch 1 (#1059)

* Update nspanel_blueprint.yaml

fix some typo

* Update nspanel_blueprint.yaml

* Update README.md

* Update nspanel_blueprint.yaml

* Update nspanel_blueprint.yaml

* Started Release Notes for v4.1

---------

Co-authored-by: Edward Firmo <[email protected]>

* Prevents media player crash with `media_position_updated_at`

Prevents media player crashing when called before `media_position_updated_at` is able to provide a value.

I believe this solves #1062.

* timezone

* Settings page translations - Dutch

#1002 (comment)

* Typo

* Removed `display_current_brightness`

I've removed this sensor as it was spamming the logs and taking memory without providing real benefit.

* Ignore different patch versions

Change the versioning control to major and minor only, ignoring differences on the patch version.

So components with different patch versions should be able to work with each other as soon the major and minor versions are the same.
This same logic was implemented on the blueprint before the 4.0 release.

* Code clean-up

* Flexible time format selected

Solves #1083 (comment)

* Removed obsolete thermostat page pic

Based on #1076 (reply in thread)

* Add date format for Finnish

* Fix `buttonpage03` long press pointing to page 2

* Fix mute volume not working

Solves #1079 items 2 and 3

* Reset sleep timer when brightness settings changes

Solves #1087

Also removes limit to 10char on "Brightness" on Settings page.

* Bump version to `4.0.1dev`

* Update ReleaseNotes.md

Preparing for patch release.

* Review translations - Finish

Solves #1083

* Update ReleaseNotes.md

* Remove trailing space

* v4.0.1beta

* v4.0.1 patch release

---------

Co-authored-by: bkbartk <[email protected]>
Co-authored-by: w00zy <[email protected]>
Co-authored-by: w00zy <[email protected]>
Co-authored-by: Erik Larsson <[email protected]>
Co-authored-by: chpego <[email protected]>
edwardtfn added a commit that referenced this issue Sep 25, 2023
* v4.0 - Alarm and Media player pages, Climate add-ons and a more robust panel (#1033)

* Create ReleaseNotes.md (#879)

* Create ReleaseNotes.md

* sensor display precision

* Filter devices to esp32 only (#881)

* Filter devices to esp32 only

Show only ESP32 devices when selecting the panel

* Filtered device list

* Sensor display precision (#880)

Now the values shown in your panel will follow the [sensor display precision](https://www.home-assistant.io/blog/2023/03/01/release-20233/#sensor-display-precision) provided by Home Assistant.
=> If you have problems with a value exceeding the available space in your panel, please reduce the number of decimals using Home Assistant [sensor display precision](https://www.home-assistant.io/blog/2023/03/01/release-20233/#sensor-display-precision).

* New language selector (#882)

* New language selector

* Update ReleaseNotes.md

* Update ReleaseNotes.md

* Remove `settings_entity` (#887)

* Remove `settings_entity`

- Bump version to 3.5_dev
- Removed references to pictures removed from TFT
- Removed code related to closing settings pages
- Removed trigger `settings_entity`

* Removed `set_settings_entity` service

- Bump version to 3.5_dev
- Removed `set_settings_entity` service - BREAKING CHANGE
- Removed `settings_entity` text-sensor - BREAKING CHANGE
- Added service `open_entity_settings_page` - BREAKING CHANGE

* Removed `settings_entity`

- Bump version to 3.5_dev
- Removed old climate page (climate_backup)
- Removed pics related to old climate page (ids 16-47, 80-83, 95-96 and 125(US only))
- Enforces brightness on any page change (this allows wake-up on settings page with long press on physical buttons) - Pending removing code from Blueprint
- Added `entity` variable on pages `climate`, `lightsettings` and `coversettings`
- Added `entity` info to `nspanelevent` on pages `climate`, `lightsettings` and `coversettings`
- Added `back_page` variable on pages `climate`, `lightsettings` and `coversettings` (default: home)
- Moving to TFT close page logic on pages `climate`, `lightsettings` and `coversettings` - Pending changes on Blueprint and ESPHome
- Standardized name for `page_label` on pages `climate`, `lightsettings` and `coversettings`
- Standardized settings page names: `climate`, `cover` and `light` (Removed `settings` from page name)

* Removed `settings_entity`

* Removed `settings_entity`

* Removed `settings_entity`

* Move `entity` variable to home page (#889)

* Move `entity` variable to home page

This will enable future development of a fallback climate

* Move `entity` variable to home page

* Move `entity` variable to home page

* Move `entity` variable to home page

* Move `entity` variable to home page

* Use `en` as fallback language (#891)

* Use `en` as fallback language

Uses English if a non valid language is selected (like when using legacy language selection).

* Use `en` as fallback language

* Create `nspanel_us_land.tft` (#890)

* Create `nspanel_us_land.tft'

Add `nspanel_us_land.tft' for US panel on landscape mode, fixing the offset on the touch screen when using `nspanel_eu.tft` into a US panel.
Hides the hardware buttons labels, as Nextion cannot support rotated text.

* Created `nspanel_us_land.tft`

* Created `nspanel_us_land.tft`

solves #390
solves #432
solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/299#discussioncomment-4933716

* Created `nspanel_us_land.tft`

* Created `nspanel_us_land.tft`

* Fix "Button confirmation page not working correctly"

Solves #883

* Supports weather forecast with `datetime` not string

This adds support to weather integrations where the `datetime` field under `forecast` attribute is provided as a `datetime` type.
This was seen on Météo-France, while all other weather integrations tested so far used a `text` field for `datetime`.

This solves #893

* Wifi icon to indicate when API offline

This changes the behavior of Wifi icon:

How it was before:
- Wifi icon was visible only when the wifi was connected, nothing was shown when wifi was not connected.

How it is now:
- Wifi icon will have 3 states:
 - Wifi & API connected: Gray wifi icon
 - Wifi disconnected: Red wifi-off icon
 - Wifi connected, but API disconnected (HA is out?): Red api-off icon

* API status indication on the panel

* Limit light & cover to supported settings (#896)

* Limit light to supported settings

When showing light settings, only the supported features will be shown for each light.

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

This partially solves #635

* Limits covers to supported settings

Only show cover settings when `set_position` is supported.

This solves #635

* Limits covers to supported settings

* Update instructions.md

* Add Fan speed settings page (#897)

* Add Fan speed settings page

Add an initial fan speed control page for fans supporting speed control.
Add speed (%) info in the buttons pages.

Solves #404 
Solves #791 
Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/718#discussioncomment-5786106

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Fix name on confirmation page

Fix the entity name on the confirmation page.

The new order is:
1. Name set on the blueprint settings
2. Entity's `friendly_name` attribute
3. Entity's `name` attribute
4. Entity's `entity_id`

Solves #501

* Select wake-up page (#898)

* Select wake-up page

Users will be able to select the wake-up page on the blueprint inputs.
This selected page will be shown after a boot (after the boot page) and with a touch in the screen when on screen saver page.
After showing this wake-up page, all the previous behavior for closing the page (with a click or after a timeout) will be the same.

Solves #576 
Solves #612 
Solves #801 
Probably improves for https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/718#discussioncomment-5715670

* Select wake-up page

* Fan update engine

Change the fan update engine to follow the same patter as other settings pages.

* Update ReleaseNotes.md

* Adding vertical bars pics

* Panel offline mode (#900)

* Panel offline mode

Introduces "offline mode" for the panel, which will be used later with a fallback climate.

Pages that are depending on the blueprint (buttons pages, entity pages, settings pages, etc) won't be shown when the API is disconnected.

* Panel offline mode

* Panel offline mode

* Panel offline mode

* Panel offline mode

* "Jump to settings" on tft

Moved "Jump to settings page" routine from ESPHome to TFT in order to reduce complexity.

* Exclude Nextion2Text

Exclude Nextion2Text

* Fix validation issue

* Time engine on ESPHome

* Time engine on ESPHome

* Notification page bigger hotspot

Added hotspots around the buttons (Accept & Clear) on Notification page to make easier to click on those.

Solves #907

* Boot page retry comm

The boot page will retry communication with the blueprint once a minute to avoid the situation where that page is shown until the automation is reloaded.

* Fix call to screen page

Fixes the call to screen page on US panel.
Reconciliate the US landscape model from EU model.

* Fix fan page `button_on`

Fixing rounding on that button.

* Fixed Fan page rounding

* Prevents boot sequence in other pages

* Physical relay local control

We are trying to make your panel as autonomous as possible by moving some of the controls from the Blueprint to ESPHome. This will reduce the load in your network and Home Assistant, but also will make a more reliable system capable to do it's core functionality even when the network is unavailable or Home Assistant is restarting.
With this version, the following engines have been moved to your panel (local control):
- Physical relay control (when hardware left button is connected to relay 1 or right button to relay 2)

Solves #910

* Embedded climate (#917)

* Performance improvements

The main focus here was to reduce the number of calls between Home Assistant and ESPHome, moving logic as much as possible to TFT and ESPHome.
- Service calls moved to ESPHome (in preparation for Alarm Control Panel)
- Page change informed via event call instead of `nspanel_event` sensor (which still in use by other calls, but might be possible to remove in the future)

* Draft embedded climate

This adds an initial version of an embedded climate/thermostat (heating only for now) with support for local control even with Wi-Fi out.

Solves #646
Solves #263

* Update ReleaseNotes.md

* Fix climate slider

Fix for climate slider opening in an incorrect position and sending only the integer part of the new target temperature

* Moving home page to ESPHome

In progress...

* Fix translations - Dutch

* Embedded chip 3

Home page - Chip 3 will be controlled locally when embedded climate is enable.

* Fixed buttons bar

Fixed buttons bar managed on ESPHome when embedded climate is visible.

* Update ReleaseNotes.md

* Services back to the Blueprint

Moving service calls back to the blueprint as latest HA requires user's permissions to call HA services from ESPHome.
This still have to be used for Alarm calls due to security concerns.

* Update ReleaseNotes.md

* support to hidden ssid (#908)

Supports hidden ssid with the use of substitutions `wifi_hidden: "true"`.

This can be breaking change for users with custom/advanced wifi settings.

Solves #906

* Update nspanel_esphome.yaml

* Removed `restore_state`

There is some incomplete work related to alarms on this commit, but the focus here is to fix `restore_state` on ESPHome v2023.7.0.

This solves #939

* US model - Fan page - Redistribute icons

Redistributed icons on Fan page on US model in order to improve usability.

Based on feedback from https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/791#discussioncomment-6338706

* Align `nspanel_us_land`

Apply all changes from EU to US_Land

* Fix relays chips

Fix relay status indication on chips.

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/926#issuecomment-1627660273

* Fix "invalid variable" for "api"

Fix error "Nextion invalid variable name" when setting `api`.

* Default embedded climate to relay_0

* Fix issue with `restore_state` and ESPHome v2023.7.0 (#941)

Solves #939

* Fix translations - Italian

Based on https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/940#discussioncomment-6511043

* Fix `set_temperature` for climate

Solves #957

* Fix `fan.turn_off` call

Removed timer call from fan stop button.
This solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/791#discussioncomment-6494535

* Call a `fan.turn_off` when percentage is 0%

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/791#discussioncomment-6621756

* Fix call for fan stop button

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/791#discussioncomment-6622377

* Icons on ESPHome

Move icons from TFT/HMI to ESPHome to prevent error on Nextion2Text.

* Updated translations - Spanish

Based on https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/940#discussioncomment-6548961

* Make home page sensor's icons consistent

Make icon selection consistent with chips where the entity's icon is used in case a icon is not set in the blueprint settings.

Solves #963

* Updated translations - Slovenian

Based on:
- https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/940#discussioncomment-6665723
-  https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/829#discussioncomment-6665751

* dutch (#974)

* small ducht translations

small ducht translations

* Dutch translations

---------

Co-authored-by: Edward Firmo <[email protected]>

* Add-on support (#977)

Moved climate settings to an add-on.
Updated documentation.

* Fixed link to addon climate docs

* Fix change brightness when sleeping

Prevents the panel to change screen brightness when sleeping.

Solves #975

* Standardize HA service calls

* Bump version to `4.0 dev`

* Create customization.md

This will reduce the need for:
- #920
- #662
- #833

* Clean-up for customizations

Clean up ESPHome in order to make easier the use of customizations.

* Create Alarm page

* Add page Alarm

* Add Alarm docs

Update docs to reflect the current state (new features & changes)

* Creating "install.md" and update add-ons instructions

* Add Alarm page buttons pics

* Add link to Alarm on page Home

* Create Alarm page

* Alarm button font color

* Add `keyb_num` page

* Alarm Control Panel with PIN (#982)

Implements an Alarm Control Panel page on NSPanel.

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/66
Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/227
Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/672
Partially solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/299#discussioncomment-4874612
Partially solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/64#issuecomment-1566204490
Partially solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/718

* Fix alarm without pin not working

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/pull/930#issuecomment-1680981977

* Alarm page UI

Fixed close button
Disabled buttons are darker

* Move Entities button to ESPHome

Move logic behind Entities button (Home page) from Blueprint to ESPHome in order to gain performance on creating home page.

* Human readable Uptime (#986)

* Human readable Uptime

* Uptime from Frenck code

* Uptime with Frenck code

* Updated Human Readable Uptime

* Removed trailing spaces

* Renamed sensor to "Last started"

Sensor renamed
Update moved to the boot process
Clean-up

---------

Co-authored-by: Edward Firmo <[email protected]>
Co-authored-by: Edward Firmo <[email protected]>

* Update alarm icon & color

* Revert `fast_connect` back to `false`

* Extended chars on buttons pages (#988)

Replaces #740
Probably solves #664
Probably solves #738
Probably solves #987

* Removed `fast_connect`

* Support to `code_arm_required`

Only shows the alarm PIN keyboard if a code is required for arming (or when disarming).

* Update alarm icon on home page

Refresh icon when alarm state changes.

* Fix alarm icon not updating on home page

* Home buttons new format - Alarm

Modernise the button Alarm flow on page Home to improve performance.

* Home buttons new format - Entities

Modernise the button "Entities" flow on page Home to improve performance.

* Home buttons new format - QRcode

Modernise the button "QRcode" flow on page Home to improve performance.

* Home buttons new format - Notification

Modernise the button "Notification" flow on page Home to improve performance.

I haven't moved the code from the Blueprint to ESPHome yet, as I will leave this for when we rebuild the Notification flow in the near future (hopefully), so the performance gains may not be perceived now. Just aligning with other buttons format.

* Adding screenshots

* Delete ReleaseNotes.md

Moved to the release

* New entity filter format

This new format was released with HA v2023.4 and the old one will be deprecated soon.

* Fix Alarm page bypass icon

* Bump version to 4.0

* Rename `addon_climate_heat`

* Simplify climate substitutions

* Add support for `addon_climate_cool`

* Removed `${verbose_log}`

Use logger level `VERBOSE` instead

* Fix script call

* Clean up general entities & fallback

Store inputs into variables only when needed.
Removed fallback mode - Replaced by ESPHome local control when the relay is assigned to the button in the blueprint.

* Phase out sensor `nspanel_event` (partially)

This sensor is being replaced by event calls.

* uptime sensors (#998)

* Create ReleaseNotes.md

* Fix Climate page when embedded climate

And also added a lot of logs which should be removed later as it takes from memory.

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/995#discussioncomment-6835260

* Move brightness control to global var

Clean up page Home

* Alarm page translations - Finnish

https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/940#discussioncomment-6857262

* Exported pics

* Clean-up TFT

- Removed a bunch of unused pics
- Changed page indicator to new format (which will allow future development to hide unused pages)
- Standardized close button in most pages

* Fixed background pics

- Entities pages
- Weather pages

* Standardize close button

* Add "Alarm" section

* Support to wake-up page on `wake_up_display` service

This changes the behavior of a service introduced by #734.

* Optimize `wake_up_display` service

* Fix icon font sizes 10 and 64

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/960#issuecomment-1701903604

And also remove all the unnecessary `wait_until`

* Fix Settings page element ids

Partially solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/960#issuecomment-1702109668

* Add translation keys for `settings` page

#1002

* Update settings page when brightness changes on HA

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/960#issuecomment-1702149796

* Clean-up page settings

* update docs (#1003)

* updated docs

* Update ReleaseNotes.md

---------

Co-authored-by: Edward Firmo <[email protected]>

* Clean-up Cover page

I'm preparing this page to have icons changing based on the device_class selected to a cover.

* Clean-up boot delay

* Enable `current_page` sensor by default

Otherwise the system won´t update values unless the page is reloaded.

* Use `current_page` in blueprint conditions

One more step towards the phase out of `nspanelevent`.

* Move `script.refresh_colors` to `service.global_settings`

As this is called from a single point, there's no meaning of having a separated script.

* Fix climate icon update

Partially solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/995#discussioncomment-6891454

* Fix button show on climate page

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/995#discussioncomment-6891335

* Visual improvements on climate page

- Add friendly name when embedded - Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/995#discussioncomment-6891465
- Make disable icons a bit darker - Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/995#discussioncomment-6893440
- Add space for page title in EU an US Land versions
- Reset page timer when pressing/releasing on the slider - Partially solves #990

* Don't update values when page home is not visible

To reduce load on Home Assistant and the network

* Cleanup boot sequence

Move some functionalities to ESPHome

* Display internal sensor value when wifi is out

Before it was showing on home page only when API was out. This adds a test for WiFi.

* Fix `default_target_temperature`

It also updates the page home when thermostat status changes (for the chips).
Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/995#discussioncomment-6897727

* Adding ID to components missing it

* Renamed `wake_up_display` to `wake_up`

* Re-arrange commands list

* Add service `set_component_color`

Deprecates the following services:
- `send_command_font_color`
- `send_command_background_color`

* Fix button pages not showing

* Adjusted time for HW long click

* Fixed buttons on settings page

* Minor adjustments to page climate

And replace font 10 to size 48 (it was 64 since a few days ago).

* Updates to breaking changes list

* Page settings redesign

Clean up the UI of settings page.
Prepare for translations.

* Enable translations of Settings page

* Notification word-wrap

For EU and US_LAND only, for now.

* Notifications page rebuilt

- Notification button processed on ESPHome (as all the info is there)
- Added word-wrap for main text
- Expanded text size
- Handling display mode (used to define the number of chars per line on Notifications)
- Versioning handling - As a consequence of the previous item.

* Word-wrap buttons pages

Taking advantage of the algorithm created for notifications.

* Word-wrap for Alarm page

* Version mismatch notication

* Fix ESPHome not starting with older TFT

* Rebuilt home page status bar update

* Updated translations - Italian

Based on https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/1002#discussioncomment-6926846

Thanks @MaiPiu

* Fix `Nextion reported variable name invalid!`

* Fix `Nextion variable invalid`

* Handle `embedded_indoor_temperature`

Internal temperature display will be handled locally (ESPHome) when no other sensor is selected.

* Review temperature correction engine

* Fix display climate chip

* update `temp_nspanel` when correction changes

* Fix `Fan` page not open with long press HW button

Solves #1007

* Minor adjustments on settings page

* version 4.0 ready for release

* Clean-up docs

* Improve version notification

* Disable restore `notification_unread`

This must be changed to a binary sensor in the future.

* Beta v4.0 (#1012)

* Create ReleaseNotes.md (#879)

* Create ReleaseNotes.md

* sensor display precision

* Filter devices to esp32 only (#881)

* Filter devices to esp32 only

Show only ESP32 devices when selecting the panel

* Filtered device list

* Sensor display precision (#880)

Now the values shown in your panel will follow the [sensor display precision](https://www.home-assistant.io/blog/2023/03/01/release-20233/#sensor-display-precision) provided by Home Assistant.
=> If you have problems with a value exceeding the available space in your panel, please reduce the number of decimals using Home Assistant [sensor display precision](https://www.home-assistant.io/blog/2023/03/01/release-20233/#sensor-display-precision).

* New language selector (#882)

* New language selector

* Update ReleaseNotes.md

* Update ReleaseNotes.md

* Remove `settings_entity` (#887)

* Remove `settings_entity`

- Bump version to 3.5_dev
- Removed references to pictures removed from TFT
- Removed code related to closing settings pages
- Removed trigger `settings_entity`

* Removed `set_settings_entity` service

- Bump version to 3.5_dev
- Removed `set_settings_entity` service - BREAKING CHANGE
- Removed `settings_entity` text-sensor - BREAKING CHANGE
- Added service `open_entity_settings_page` - BREAKING CHANGE

* Removed `settings_entity`

- Bump version to 3.5_dev
- Removed old climate page (climate_backup)
- Removed pics related to old climate page (ids 16-47, 80-83, 95-96 and 125(US only))
- Enforces brightness on any page change (this allows wake-up on settings page with long press on physical buttons) - Pending removing code from Blueprint
- Added `entity` variable on pages `climate`, `lightsettings` and `coversettings`
- Added `entity` info to `nspanelevent` on pages `climate`, `lightsettings` and `coversettings`
- Added `back_page` variable on pages `climate`, `lightsettings` and `coversettings` (default: home)
- Moving to TFT close page logic on pages `climate`, `lightsettings` and `coversettings` - Pending changes on Blueprint and ESPHome
- Standardized name for `page_label` on pages `climate`, `lightsettings` and `coversettings`
- Standardized settings page names: `climate`, `cover` and `light` (Removed `settings` from page name)

* Removed `settings_entity`

* Removed `settings_entity`

* Removed `settings_entity`

* Move `entity` variable to home page (#889)

* Move `entity` variable to home page

This will enable future development of a fallback climate

* Move `entity` variable to home page

* Move `entity` variable to home page

* Move `entity` variable to home page

* Move `entity` variable to home page

* Use `en` as fallback language (#891)

* Use `en` as fallback language

Uses English if a non valid language is selected (like when using legacy language selection).

* Use `en` as fallback language

* Create `nspanel_us_land.tft` (#890)

* Create `nspanel_us_land.tft'

Add `nspanel_us_land.tft' for US panel on landscape mode, fixing the offset on the touch screen when using `nspanel_eu.tft` into a US panel.
Hides the hardware buttons labels, as Nextion cannot support rotated text.

* Created `nspanel_us_land.tft`

* Created `nspanel_us_land.tft`

solves #390
solves #432
solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/299#discussioncomment-4933716

* Created `nspanel_us_land.tft`

* Created `nspanel_us_land.tft`

* Fix "Button confirmation page not working correctly"

Solves #883

* Supports weather forecast with `datetime` not string

This adds support to weather integrations where the `datetime` field under `forecast` attribute is provided as a `datetime` type.
This was seen on Météo-France, while all other weather integrations tested so far used a `text` field for `datetime`.

This solves #893

* Wifi icon to indicate when API offline

This changes the behavior of Wifi icon:

How it was before:
- Wifi icon was visible only when the wifi was connected, nothing was shown when wifi was not connected.

How it is now:
- Wifi icon will have 3 states:
 - Wifi & API connected: Gray wifi icon
 - Wifi disconnected: Red wifi-off icon
 - Wifi connected, but API disconnected (HA is out?): Red api-off icon

* API status indication on the panel

* Limit light & cover to supported settings (#896)

* Limit light to supported settings

When showing light settings, only the supported features will be shown for each light.

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

This partially solves #635

* Limits covers to supported settings

Only show cover settings when `set_position` is supported.

This solves #635

* Limits covers to supported settings

* Update instructions.md

* Add Fan speed settings page (#897)

* Add Fan speed settings page

Add an initial fan speed control page for fans supporting speed control.
Add speed (%) info in the buttons pages.

Solves #404 
Solves #791 
Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/718#discussioncomment-5786106

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Fix name on confirmation page

Fix the entity name on the confirmation page.

The new order is:
1. Name set on the blueprint settings
2. Entity's `friendly_name` attribute
3. Entity's `name` attribute
4. Entity's `entity_id`

Solves #501

* Select wake-up page (#898)

* Select wake-up page

Users will be able to select the wake-up page on the blueprint inputs.
This selected page will be shown after a boot (after the boot page) and with a touch in the screen when on screen saver page.
After showing this wake-up page, all the previous behavior for closing the page (with a click or after a timeout) will be the same.

Solves #576 
Solves #612 
Solves #801 
Probably improves for https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/718#discussioncomment-5715670

* Select wake-up page

* Fan update engine

Change the fan update engine to follow the same patter as other settings pages.

* Update ReleaseNotes.md

* Adding vertical bars pics

* Panel offline mode (#900)

* Panel offline mode

Introduces "offline mode" for the panel, which will be used later with a fallback climate.

Pages that are depending on the blueprint (buttons pages, entity pages, settings pages, etc) won't be shown when the API is disconnected.

* Panel offline mode

* Panel offline mode

* Panel offline mode

* Panel offline mode

* "Jump to settings" on tft

Moved "Jump to settings page" routine from ESPHome to TFT in order to reduce complexity.

* Exclude Nextion2Text

Exclude Nextion2Text

* Fix validation issue

* Time engine on ESPHome

* Time engine on ESPHome

* Notification page bigger hotspot

Added hotspots around the buttons (Accept & Clear) on Notification page to make easier to click on those.

Solves #907

* Boot page retry comm

The boot page will retry communication with the blueprint once a minute to avoid the situation where that page is shown until the automation is reloaded.

* Fix call to screen page

Fixes the call to screen page on US panel.
Reconciliate the US landscape model from EU model.

* Fix fan page `button_on`

Fixing rounding on that button.

* Fixed Fan page rounding

* Prevents boot sequence in other pages

* Physical relay local control

We are trying to make your panel as autonomous as possible by moving some of the controls from the Blueprint to ESPHome. This will reduce the load in your network and Home Assistant, but also will make a more reliable system capable to do it's core functionality even when the network is unavailable or Home Assistant is restarting.
With this version, the following engines have been moved to your panel (local control):
- Physical relay control (when hardware left button is connected to relay 1 or right button to relay 2)

Solves #910

* Embedded climate (#917)

* Performance improvements

The main focus here was to reduce the number of calls between Home Assistant and ESPHome, moving logic as much as possible to TFT and ESPHome.
- Service calls moved to ESPHome (in preparation for Alarm Control Panel)
- Page change informed via event call instead of `nspanel_event` sensor (which still in use by other calls, but might be possible to remove in the future)

* Draft embedded climate

This adds an initial version of an embedded climate/thermostat (heating only for now) with support for local control even with Wi-Fi out.

Solves #646
Solves #263

* Update ReleaseNotes.md

* Fix climate slider

Fix for climate slider opening in an incorrect position and sending only the integer part of the new target temperature

* Moving home page to ESPHome

In progress...

* Fix translations - Dutch

* Embedded chip 3

Home page - Chip 3 will be controlled locally when embedded climate is enable.

* Fixed buttons bar

Fixed buttons bar managed on ESPHome when embedded climate is visible.

* Update ReleaseNotes.md

* Services back to the Blueprint

Moving service calls back to the blueprint as latest HA requires user's permissions to call HA services from ESPHome.
This still have to be used for Alarm calls due to security concerns.

* Update ReleaseNotes.md

* support to hidden ssid (#908)

Supports hidden ssid with the use of substitutions `wifi_hidden: "true"`.

This can be breaking change for users with custom/advanced wifi settings.

Solves #906

* Update nspanel_esphome.yaml

* Removed `restore_state`

There is some incomplete work related to alarms on this commit, but the focus here is to fix `restore_state` on ESPHome v2023.7.0.

This solves #939

* US model - Fan page - Redistribute icons

Redistributed icons on Fan page on US model in order to improve usability.

Based on feedback from https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/791#discussioncomment-6338706

* Align `nspanel_us_land`

Apply all changes from EU to US_Land

* Fix relays chips

Fix relay status indication on chips.

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/926#issuecomment-1627660273

* Fix "invalid variable" for "api"

Fix error "Nextion invalid variable name" when setting `api`.

* Default embedded climate to relay_0

* Fix translations - Italian

Based on https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/940#discussioncomment-6511043

* Fix `set_temperature` for climate

Solves #957

* Fix `fan.turn_off` call

Removed timer call from fan stop button.
This solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/791#discussioncomment-6494535

* Call a `fan.turn_off` when percentage is 0%

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/791#discussioncomment-6621756

* Fix call for fan stop button

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/791#discussioncomment-6622377

* Icons on ESPHome

Move icons from TFT/HMI to ESPHome to prevent error on Nextion2Text.

* Updated translations - Spanish

Based on https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/940#discussioncomment-6548961

* Make home page sensor's icons consistent

Make icon selection consistent with chips where the entity's icon is used in case a icon is not set in the blueprint settings.

Solves #963

* Updated translations - Slovenian

Based on:
- https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/940#discussioncomment-6665723
-  https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/829#discussioncomment-6665751

* dutch (#974)

* small ducht translations

small ducht translations

* Dutch translations

---------

Co-authored-by: Edward Firmo <[email protected]>

* Add-on support (#977)

Moved climate settings to an add-on.
Updated documentation.

* Fixed link to addon climate docs

* Fix change brightness when sleeping

Prevents the panel to change screen brightness when sleeping.

Solves #975

* Standardize HA service calls

* Bump version to `4.0 dev`

* Create customization.md

This will reduce the need for:
- #920
- #662
- #833

* Clean-up for customizations

Clean up ESPHome in order to make easier the use of customizations.

* Create Alarm page

* Add page Alarm

* Add Alarm docs

Update docs to reflect the current state (new features & changes)

* Creating "install.md" and update add-ons instructions

* Add Alarm page buttons pics

* Add link to Alarm on page Home

* Create Alarm page

* Alarm button font color

* Add `keyb_num` page

* Alarm Control Panel with PIN (#982)

Implements an Alarm Control Panel page on NSPanel.

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/66
Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/227
Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/672
Partially solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/299#discussioncomment-4874612
Partially solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/64#issuecomment-1566204490
Partially solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/718

* Fix alarm without pin not working

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/pull/930#issuecomment-1680981977

* Alarm page UI

Fixed close button
Disabled buttons are darker

* Move Entities button to ESPHome

Move logic behind Entities button (Home page) from Blueprint to ESPHome in order to gain performance on creating home page.

* Human readable Uptime (#986)

* Human readable Uptime

* Uptime from Frenck code

* Uptime with Frenck code

* Updated Human Readable Uptime

* Removed trailing spaces

* Renamed sensor to "Last started"

Sensor renamed
Update moved to the boot process
Clean-up

---------

Co-authored-by: Edward Firmo <[email protected]>
Co-authored-by: Edward Firmo <[email protected]>

* Update alarm icon & color

* Revert `fast_connect` back to `false`

* Extended chars on buttons pages (#988)

Replaces #740
Probably solves #664
Probably solves #738
Probably solves #987

* Removed `fast_connect`

* Support to `code_arm_required`

Only shows the alarm PIN keyboard if a code is required for arming (or when disarming).

* Update alarm icon on home page

Refresh icon when alarm state changes.

* Fix alarm icon not updating on home page

* Home buttons new format - Alarm

Modernise the button Alarm flow on page Home to improve performance.

* Home buttons new format - Entities

Modernise the button "Entities" flow on page Home to improve performance.

* Home buttons new format - QRcode

Modernise the button "QRcode" flow on page Home to improve performance.

* Home buttons new format - Notification

Modernise the button "Notification" flow on page Home to improve performance.

I haven't moved the code from the Blueprint to ESPHome yet, as I will leave this for when we rebuild the Notification flow in the near future (hopefully), so the performance gains may not be perceived now. Just aligning with other buttons format.

* Adding screenshots

* Delete ReleaseNotes.md

Moved to the release

* New entity filter format

This new format was released with HA v2023.4 and the old one will be deprecated soon.

* Fix Alarm page bypass icon

* Bump version to 4.0

* Rename `addon_climate_heat`

* Simplify climate substitutions

* Add support for `addon_climate_cool`

* Removed `${verbose_log}`

Use logger level `VERBOSE` instead

* Fix script call

* Clean up general entities & fallback

Store inputs into variables only when needed.
Removed fallback mode - Replaced by ESPHome local control when the relay is assigned to the button in the blueprint.

* Phase out sensor `nspanel_event` (partially)

This sensor is being replaced by event calls.

* uptime sensors (#998)

* Create ReleaseNotes.md

* Fix Climate page when embedded climate

And also added a lot of logs which should be removed later as it takes from memory.

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/995#discussioncomment-6835260

* Move brightness control to global var

Clean up page Home

* Alarm page translations - Finnish

https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/940#discussioncomment-6857262

* Exported pics

* Clean-up TFT

- Removed a bunch of unused pics
- Changed page indicator to new format (which will allow future development to hide unused pages)
- Standardized close button in most pages

* Fixed background pics

- Entities pages
- Weather pages

* Standardize close button

* Add "Alarm" section

* Support to wake-up page on `wake_up_display` service

This changes the behavior of a service introduced by #734.

* Optimize `wake_up_display` service

* Fix icon font sizes 10 and 64

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/960#issuecomment-1701903604

And also remove all the unnecessary `wait_until`

* Fix Settings page element ids

Partially solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/960#issuecomment-1702109668

* Add translation keys for `settings` page

#1002

* Update settings page when brightness changes on HA

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/960#issuecomment-1702149796

* Clean-up page settings

* update docs (#1003)

* updated docs

* Update ReleaseNotes.md

---------

Co-authored-by: Edward Firmo <[email protected]>

* Clean-up Cover page

I'm preparing this page to have icons changing based on the device_class selected to a cover.

* Clean-up boot delay

* Enable `current_page` sensor by default

Otherwise the system won´t update values unless the page is reloaded.

* Use `current_page` in blueprint conditions

One more step towards the phase out of `nspanelevent`.

* Move `script.refresh_colors` to `service.global_settings`

As this is called from a single point, there's no meaning of having a separated script.

* Fix climate icon update

Partially solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/995#discussioncomment-6891454

* Fix button show on climate page

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/995#discussioncomment-6891335

* Visual improvements on climate page

- Add friendly name when embedded - Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/995#discussioncomment-6891465
- Make disable icons a bit darker - Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/995#discussioncomment-6893440
- Add space for page title in EU an US Land versions
- Reset page timer when pressing/releasing on the slider - Partially solves #990

* Don't update values when page home is not visible

To reduce load on Home Assistant and the network

* Cleanup boot sequence

Move some functionalities to ESPHome

* Display internal sensor value when wifi is out

Before it was showing on home page only when API was out. This adds a test for WiFi.

* Fix `default_target_temperature`

It also updates the page home when thermostat status changes (for the chips).
Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/995#discussioncomment-6897727

* Adding ID to components missing it

* Renamed `wake_up_display` to `wake_up`

* Re-arrange commands list

* Add service `set_component_color`

Deprecates the following services:
- `send_command_font_color`
- `send_command_background_color`

* Fix button pages not showing

* Adjusted time for HW long click

* Fixed buttons on settings page

* Minor adjustments to page climate

And replace font 10 to size 48 (it was 64 since a few days ago).

* Updates to breaking changes list

* Page settings redesign

Clean up the UI of settings page.
Prepare for translations.

* Enable translations of Settings page

* Notification word-wrap

For EU and US_LAND only, for now.

* Notifications page rebuilt

- Notification button processed on ESPHome (as all the info is there)
- Added word-wrap for main text
- Expanded text size
- Handling display mode (used to define the number of chars per line on Notifications)
- Versioning handling - As a consequence of the previous item.

* Word-wrap buttons pages

Taking advantage of the algorithm created for notifications.

* Word-wrap for Alarm page

* Version mismatch notication

* Fix ESPHome not starting with older TFT

* Rebuilt home page status bar update

* Updated translations - Italian

Based on https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/1002#discussioncomment-6926846

Thanks @MaiPiu

* Fix `Nextion reported variable name invalid!`

* Fix `Nextion variable invalid`

* Handle `embedded_indoor_temperature`

Internal temperature display will be handled locally (ESPHome) when no other sensor is selected.

* Review temperature correction engine

* Fix display climate chip

* update `temp_nspanel` when correction changes

* Fix `Fan` page not open with long press HW button

Solves #1007

* Minor adjustments on settings page

* version 4.0 ready for release

* Clean-up docs

---------

Co-authored-by: bkbartk <[email protected]>
Co-authored-by: w00zy <[email protected]>

* Fix Fan page button colors when opening

Solves #1017

* Translations (#1023)

* Translations

* Update nspanel_blueprint.yaml

I've changed `brightness` for now as the new design isn't implemented yet, but that string is already in use with the current design.

---------

Co-authored-by: Edward Firmo <[email protected]>

* Adjustments to settings page

* Fix entity info when calling detailed pages

Solves #1022

* Added `media_player` page (hidden)

* New "Confirm" pop-up

This also removes the sensor "NSPanel Event"

* Fix pages not updating values

Solves #1026

* Media player - Buttons

- Added code to buttons on media_player page.
- Clean-up:
  - Moved wake-up select from Blueprint to ESPHome component
  - Removed `switch.xxxxx_confirmation_message`

* Fix logging for global_settings

It was logging wakeup_page, which is deprecated

* Improved version notification

* Removed trailing spaces

* Notification for `sensor.xxxxx_current_page` missing

This might be a common issue for users migrating from v3.4 to v3.5.
This information is part of the release notes, but I believe it worth having a guide to support closely any user who miss that in the release notes.

* Simplify `touchevent` engine

The touch event is used only for the sleeping engine (it will be used for dimming later) and it was transferring all the json info with page name, component, entity, etc.
This was replaced by a simple random integer with no meaning other than "the screen was touched, reset the timer".

* Media player first buttons actions

* Fix unknown service: `media_player.null`

* Media Player control

You will be able to add a Media Player entity to any of the buttons pages and with a long press you will see the media player page.

* Remove dimming timer for now

The funcionality isn't completed.

* Home page - Custom buttons

On the blueprint you can now set up to 3 buttons to be shown on Home page.
It will show the detailed settings page, so the entity must be compatible.

* Fix Media player missing parameters

Possibly solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/1030#discussioncomment-6984573

* Prevents calls to `media_player.null`

* Remove `entity` info from pages on TFT

Since v3.4, the info about entity_id shown was going all the way to Nextion and then sent back in the json return, however this requires a long (100-char) global var and the way it was implemented, it was one of those per settings page, as climate should be also recorded at the same time in case the embedded climate was installed.
This was taking too much memory, so I've moved this info to a global variable (string) in ESPHome.
There is now lots of space for code cleaning (and still pending to do the same with climate entity, as it could be only a bool to inform if embedded), but this brings the functionality.

This enabled the return to global for some components, so it probably solves #1031

---------

Co-authored-by: bkbartk <[email protected]>
Co-authored-by: w00zy <[email protected]>
Co-authored-by: w00zy <[email protected]>

* v4.0 Release Candidate 2 (#1044)

* Create ReleaseNotes.md (#879)

* Create ReleaseNotes.md

* sensor display precision

* Filter devices to esp32 only (#881)

* Filter devices to esp32 only

Show only ESP32 devices when selecting the panel

* Filtered device list

* Sensor display precision (#880)

Now the values shown in your panel will follow the [sensor display precision](https://www.home-assistant.io/blog/2023/03/01/release-20233/#sensor-display-precision) provided by Home Assistant.
=> If you have problems with a value exceeding the available space in your panel, please reduce the number of decimals using Home Assistant [sensor display precision](https://www.home-assistant.io/blog/2023/03/01/release-20233/#sensor-display-precision).

* New language selector (#882)

* New language selector

* Update ReleaseNotes.md

* Update ReleaseNotes.md

* Remove `settings_entity` (#887)

* Remove `settings_entity`

- Bump version to 3.5_dev
- Removed references to pictures removed from TFT
- Removed code related to closing settings pages
- Removed trigger `settings_entity`

* Removed `set_settings_entity` service

- Bump version to 3.5_dev
- Removed `set_settings_entity` service - BREAKING CHANGE
- Removed `settings_entity` text-sensor - BREAKING CHANGE
- Added service `open_entity_settings_page` - BREAKING CHANGE

* Removed `settings_entity`

- Bump version to 3.5_dev
- Removed old climate page (climate_backup)
- Removed pics related to old climate page (ids 16-47, 80-83, 95-96 and 125(US only))
- Enforces brightness on any page change (this allows wake-up on settings page with long press on physical buttons) - Pending removing code from Blueprint
- Added `entity` variable on pages `climate`, `lightsettings` and `coversettings`
- Added `entity` info to `nspanelevent` on pages `climate`, `lightsettings` and `coversettings`
- Added `back_page` variable on pages `climate`, `lightsettings` and `coversettings` (default: home)
- Moving to TFT close page logic on pages `climate`, `lightsettings` and `coversettings` - Pending changes on Blueprint and ESPHome
- Standardized name for `page_label` on pages `climate`, `lightsettings` and `coversettings`
- Standardized settings page names: `climate`, `cover` and `light` (Removed `settings` from page name)

* Removed `settings_entity`

* Removed `settings_entity`

* Removed `settings_entity`

* Move `entity` variable to home page (#889)

* Move `entity` variable to home page

This will enable future development of a fallback climate

* Move `entity` variable to home page

* Move `entity` variable to home page

* Move `entity` variable to home page

* Move `entity` variable to home page

* Use `en` as fallback language (#891)

* Use `en` as fallback language

Uses English if a non valid language is selected (like when using legacy language selection).

* Use `en` as fallback language

* Create `nspanel_us_land.tft` (#890)

* Create `nspanel_us_land.tft'

Add `nspanel_us_land.tft' for US panel on landscape mode, fixing the offset on the touch screen when using `nspanel_eu.tft` into a US panel.
Hides the hardware buttons labels, as Nextion cannot support rotated text.

* Created `nspanel_us_land.tft`

* Created `nspanel_us_land.tft`

solves #390
solves #432
solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/299#discussioncomment-4933716

* Created `nspanel_us_land.tft`

* Created `nspanel_us_land.tft`

* Fix "Button confirmation page not working correctly"

Solves #883

* Supports weather forecast with `datetime` not string

This adds support to weather integrations where the `datetime` field under `forecast` attribute is provided as a `datetime` type.
This was seen on Météo-France, while all other weather integrations tested so far used a `text` field for `datetime`.

This solves #893

* Wifi icon to indicate when API offline

This changes the behavior of Wifi icon:

How it was before:
- Wifi icon was visible only when the wifi was connected, nothing was shown when wifi was not connected.

How it is now:
- Wifi icon will have 3 states:
 - Wifi & API connected: Gray wifi icon
 - Wifi disconnected: Red wifi-off icon
 - Wifi connected, but API disconnected (HA is out?): Red api-off icon

* API status indication on the panel

* Limit light & cover to supported settings (#896)

* Limit light to supported settings

When showing light settings, only the supported features will be shown for each light.

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

* Limit light to supported settings

This partially solves #635

* Limits covers to supported settings

Only show cover settings when `set_position` is supported.

This solves #635

* Limits covers to supported settings

* Update instructions.md

* Add Fan speed settings page (#897)

* Add Fan speed settings page

Add an initial fan speed control page for fans supporting speed control.
Add speed (%) info in the buttons pages.

Solves #404 
Solves #791 
Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/718#discussioncomment-5786106

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Add Fan speed settings page

* Fix name on confirmation page

Fix the entity name on the confirmation page.

The new order is:
1. Name set on the blueprint settings
2. Entity's `friendly_name` attribute
3. Entity's `name` attribute
4. Entity's `entity_id`

Solves #501

* Select wake-up page (#898)

* Select wake-up page

Users will be able to select the wake-up page on the blueprint inputs.
This selected page will be shown after a boot (after the boot page) and with a touch in the screen when on screen saver page.
After showing this wake-up page, all the previous behavior for closing the page (with a click or after a timeout) will be the same.

Solves #576 
Solves #612 
Solves #801 
Probably improves for https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/718#discussioncomment-5715670

* Select wake-up page

* Fan update engine

Change the fan update engine to follow the same patter as other settings pages.

* Update ReleaseNotes.md

* Adding vertical bars pics

* Panel offline mode (#900)

* Panel offline mode

Introduces "offline mode" for the panel, which will be used later with a fallback climate.

Pages that are depending on the blueprint (buttons pages, entity pages, settings pages, etc) won't be shown when the API is disconnected.

* Panel offline mode

* Panel offline mode

* Panel offline mode

* Panel offline mode

* "Jump to settings" on tft

Moved "Jump to settings page" routine from ESPHome to TFT in order to reduce complexity.

* Exclude Nextion2Text

Exclude Nextion2Text

* Fix validation issue

* Time engine on ESPHome

* Time engine on ESPHome

* Notification page bigger hotspot

Added hotspots around the buttons (Accept & Clear) on Notification page to make easier to click on those.

Solves #907

* Boot page retry comm

The boot page will retry communication with the blueprint once a minute to avoid the situation where that page is shown until the automation is reloaded.

* Fix call to screen page

Fixes the call to screen page on US panel.
Reconciliate the US landscape model from EU model.

* Fix fan page `button_on`

Fixing rounding on that button.

* Fixed Fan page rounding

* Prevents boot sequence in other pages

* Physical relay local control

We are trying to make your panel as autonomous as possible by moving some of the controls from the Blueprint to ESPHome. This will reduce the load in your network and Home Assistant, but also will make a more reliable system capable to do it's core functionality even when the network is unavailable or Home Assistant is restarting.
With this version, the following engines have been moved to your panel (local control):
- Physical relay control (when hardware left button is connected to relay 1 or right button to relay 2)

Solves #910

* Embedded climate (#917)

* Performance improvements

The main focus here was to reduce the number of calls between Home Assistant and ESPHome, moving logic as much as possible to TFT and ESPHome.
- Service calls moved to ESPHome (in preparation for Alarm Control Panel)
- Page change informed via event call instead of `nspanel_event` sensor (which still in use by other calls, but might be possible to remove in the future)

* Draft embedded climate

This adds an initial version of an embedded climate/thermostat (heating only for now) with support for local control even with Wi-Fi out.

Solves #646
Solves #263

* Update ReleaseNotes.md

* Fix climate slider

Fix for climate slider opening in an incorrect position and sending only the integer part of the new target temperature

* Moving home page to ESPHome

In progress...

* Fix translations - Dutch

* Embedded chip 3

Home page - Chip 3 will be controlled locally when embedded climate is enable.

* Fixed buttons bar

Fixed buttons bar managed on ESPHome when embedded climate is visible.

* Update ReleaseNotes.md

* Services back to the Blueprint

Moving service calls back to the blueprint as latest HA requires user's permissions to call HA services from ESPHome.
This still have to be used for Alarm calls due to security concerns.

* Update ReleaseNotes.md

* support to hidden ssid (#908)

Supports hidden ssid with the use of substitutions `wifi_hidden: "true"`.

This can be breaking change for users with custom/advanced wifi settings.

Solves #906

* Update nspanel_esphome.yaml

* Removed `restore_state`

There is some incomplete work related to alarms on this commit, but the focus here is to fix `restore_state` on ESPHome v2023.7.0.

This solves #939

* US model - Fan page - Redistribute icons

Redistributed icons on Fan page on US model in order to improve usability.

Based on feedback from https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/791#discussioncomment-6338706

* Align `nspanel_us_land`

Apply all changes from EU to US_Land

* Fix relays chips

Fix relay status indication on chips.

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/926#issuecomment-1627660273

* Fix "invalid variable" for "api"

Fix error "Nextion invalid variable name" when setting `api`.

* Default embedded climate to relay_0

* Fix issue with `restore_state` and ESPHome v2023.7.0 (#941)

Solves #939

* Fix translations - Italian

Based on https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/940#discussioncomment-6511043

* Fix `set_temperature` for climate

Solves #957

* Fix `fan.turn_off` call

Removed timer call from fan stop button.
This solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/791#discussioncomment-6494535

* Call a `fan.turn_off` when percentage is 0%

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/791#discussioncomment-6621756

* Fix call for fan stop button

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/791#discussioncomment-6622377

* Icons on ESPHome

Move icons from TFT/HMI to ESPHome to prevent error on Nextion2Text.

* Updated translations - Spanish

Based on https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/940#discussioncomment-6548961

* Make home page sensor's icons consistent

Make icon selection consistent with chips where the entity's icon is used in case a icon is not set in the blueprint settings.

Solves #963

* Updated translations - Slovenian

Based on:
- https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/940#discussioncomment-6665723
-  https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/829#discussioncomment-6665751

* dutch (#974)

* small ducht translations

small ducht translations

* Dutch translations

---------

Co-authored-by: Edward Firmo <[email protected]>

* Add-on support (#977)

Moved climate settings to an add-on.
Updated documentation.

* Fixed link to addon climate docs

* Fix change brightness when sleeping

Prevents the panel to change screen brightness when sleeping.

Solves #975

* Standardize HA service calls

* Bump version to `4.0 dev`

* Create customization.md

This will reduce the need for:
- #920
- #662
- #833

* Clean-up for customizations

Clean up ESPHome in order to make easier the use of customizations.

* Create Alarm page

* Add page Alarm

* Add Alarm docs

Update docs to reflect the current state (new features & changes)

* Creating "install.md" and update add-ons instructions

* Add Alarm page buttons pics

* Add link to Alarm on page Home

* Create Alarm page

* Alarm button font color

* Add `keyb_num` page

* Alarm Control Panel with PIN (#982)

Implements an Alarm Control Panel page on NSPanel.

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/66
Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/227
Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/672
Partially solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/299#discussioncomment-4874612
Partially solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/64#issuecomment-1566204490
Partially solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/718

* Fix alarm without pin not working

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/pull/930#issuecomment-1680981977

* Alarm page UI

Fixed close button
Disabled buttons are darker

* Move Entities button to ESPHome

Move logic behind Entities button (Home page) from Blueprint to ESPHome in order to gain performance on creating home page.

* Human readable Uptime (#986)

* Human readable Uptime

* Uptime from Frenck code

* Uptime with Frenck code

* Updated Human Readable Uptime

* Removed trailing spaces

* Renamed sensor to "Last started"

Sensor renamed
Update moved to the boot process
Clean-up

---------

Co-authored-by: Edward Firmo <[email protected]>
Co-authored-by: Edward Firmo <[email protected]>

* Update alarm icon & color

* Revert `fast_connect` back to `false`

* Extended chars on buttons pages (#988)

Replaces #740
Probably solves #664
Probably solves #738
Probably solves #987

* Removed `fast_connect`

* Support to `code_arm_required`

Only shows the alarm PIN keyboard if a code is required for arming (or when disarming).

* Update alarm icon on home page

Refresh icon when alarm state changes.

* Fix alarm icon not updating on home page

* Home buttons new format - Alarm

Modernise the button Alarm flow on page Home to improve performance.

* Home buttons new format - Entities

Modernise the button "Entities" flow on page Home to improve performance.

* Home buttons new format - QRcode

Modernise the button "QRcode" flow on page Home to improve performance.

* Home buttons new format - Notification

Modernise the button "Notification" flow on page Home to improve performance.

I haven't moved the code from the Blueprint to ESPHome yet, as I will leave this for when we rebuild the Notification flow in the near future (hopefully), so the performance gains may not be perceived now. Just aligning with other buttons format.

* Adding screenshots

* Delete ReleaseNotes.md

Moved to the release

* New entity filter format

This new format was released with HA v2023.4 and the old one will be deprecated soon.

* Fix Alarm page bypass icon

* Bump version to 4.0

* Rename `addon_climate_heat`

* Simplify climate substitutions

* Add support for `addon_climate_cool`

* Removed `${verbose_log}`

Use logger level `VERBOSE` instead

* Fix script call

* Clean up general entities & fallback

Store inputs into variables only when needed.
Removed fallback mode - Replaced by ESPHome local control when the relay is assigned to the button in the blueprint.

* Phase out sensor `nspanel_event` (partially)

This sensor is being replaced by event calls.

* uptime sensors (#998)

* Create ReleaseNotes.md

* Fix Climate page when embedded climate

And also added a lot of logs which should be removed later as it takes from memory.

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/995#discussioncomment-6835260

* Move brightness control to global var

Clean up page Home

* Alarm page translations - Finnish

https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/940#discussioncomment-6857262

* Exported pics

* Clean-up TFT

- Removed a bunch of unused pics
- Changed page indicator to new format (which will allow future development to hide unused pages)
- Standardized close button in most pages

* Fixed background pics

- Entities pages
- Weather pages

* Standardize close button

* Add "Alarm" section

* Support to wake-up page on `wake_up_display` service

This changes the behavior of a service introduced by #734.

* Optimize `wake_up_display` service

* Fix icon font sizes 10 and 64

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/960#issuecomment-1701903604

And also remove all the unnecessary `wait_until`

* Fix Settings page element ids

Partially solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/960#issuecomment-1702109668

* Add translation keys for `settings` page

#1002

* Update settings page when brightness changes on HA

Solves https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/960#issuecomment-1702149796

* Clean-up page settings

* update docs (#1003)

* updated docs

* Update ReleaseNotes.md

---------

Co-authored-by: Edward Firmo <[email protected]>

* Clean-up Cover page

I'm preparing this page to have icons changing based…
@edwardtfn edwardtfn added the Page: buttons Concerns specific to the page's interface or functionality. label Dec 6, 2023
@edwardtfn edwardtfn added this to the v4.2 milestone Dec 6, 2023
edwardtfn added a commit that referenced this issue Dec 16, 2023
@edwardtfn
Copy link
Collaborator

Still pending some tests, as it was a quite big change, but this is implemented in dev and hopefully will be included in the next release.

@edwardtfn
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For suggestions that add new features or improve existing functionalities. Page: buttons Concerns specific to the page's interface or functionality.
Projects
None yet
Development

No branches or pull requests

2 participants