Implement visual feedback for stateless entities (whatever finishes with a state other than `on`, `off`, `open` and `closed`, like scenes, automations, buttons, etc.).
This extends b18f2848f4 and solves #691.
* Changes to nextion_inited
Changed from `switch` named `Nextion inited` (with entity_id like `switch.xxxx_nextion_inited`) to a `binary_sensor` named `Nextion display` (`binary_sensor.xxxx_nextion_display`).
The idea is to avoid users trying to change it's state from Home Assistant (with unknown consequences) and make this entity more clear, improving usability.
* Change `nextion_inited` to a sensor
* Rename 'Sleep mode' switch
Renamed from `Sleep Modus` to `Sleep mode`.
Breaking change: This will rename the entity_id of that switch and this can affect existing automations created by users and also will require changes in the blueprint if #698 is merged.
Note: Variable names in HMI/TFT not renamed.
* Align with other PR
* Standardize inputs descriptions
Standardize the descriptions on all inputs (visible to users when setting up the Blueprint)
* Removing trailing spaces
* Break down long lines
To improve readability.
* Update nspanel_blueprint.yaml
* Breaking down long lines
To improve readability.
* Clean-up
* Breaking down long lines
Tested with the following integrations:
- AccuWeather - Better when forecast is enabled
- Met.no - Better when hourly entity is enabled
- OpenMeteo
- OpenWeatherMap
- SMHI
1. The blueprint will now ask for user to select the panel from the list of ESPHome devices instead of typing it's name, in order to reduce the chance of an error
-> The old name format still supported, so this is not a breaking change.
2. If a weather entity is not provided, the blueprint will pick one weather entity available, if any.
* Use Home Assistant icon selector for icons
Replace all icon selection to Home Assistant native icon selector, improving the user experience.
Note: As not all the MDI icons are available for Nextion, if one of those icons is selected it will be displayed as a question mark `?`.
* Fix button icon when unavailable
Apply fixed from PR#660 into this branch to avoid merging conflicts in the future.
* Supports legacy icon selection
This add the support for legacy icon selection, so icons will still be shown if users install the new version in an environment where icons where previously selected.
This was already implemented on #543 but it was lost later:
As it is now, using minutes: "/1", the time will update every minute, but that could happen when lots of seconds has passed on that minute, making possible the displayed time to be up to 59s late.
By changing that to seconds: 0 if forces the update in the same rate, but always in the first second of a minute, keeping the displayed time always updated.
This reduces the number of parallel instances of the blueprint running. I've done several tests and couldn't see more than 10 instances, so I believe if we should limit the concurrent runs and this will probably be an indication of a problem we want to know about.
This supports users mistyping the NSPanel name in the blueprint settings. One of the most common mistakes is using `-` in the name, instead of `_` and this change will try to replace that when users type the name with this invalid char.