EspHoMaTriXv2
EspHoMaTriXv2 copied to clipboard
[FEATURE REQUEST] Allow duplicate icon_screen
Feature Request
Is your feature request related to a problem?
A bit less a request and more an idea and wanting any comments on my idea for a solution that I'm going to implement in a fork.
I've got some weather screens (Forecasts, today, tomorrow, day after tomorrow) that I want to share icons on, but with the current behavior it doesn't work without duplicating icons.
I.e. If two days have an icon of "weather_cloudy" then they overwrite each other, only showing the last one sent to the screen.
I'm currently working around this by duplicating the icons but with different IDs, but that takes up a lot of flash space of course (3x what it should).
Describe the solution / feature you'd like
What I'm going to do is alter the icon_screen() function a little bit to add a new parameter "skip_duplicate_check" as a boolean, and then use that new parameter to skip the search and instead just add it as a new screen entirely. This would mean that removing the old screens must be done by the user, and so should be documented that way, but it will allow for screens like that to share icons without wasting space.
Describe alternatives you've considered
Can't really see any other alternatives other than duplicating icons but that adds up fast for things like weather when you've got 12 icons or so.
I do wonder if there should be some additional identifier (on larger systems i'd maybe use a uuid or something) to search for screens to replace duplicate screens but i think that might be significantly more invasive of a change. Maybe adding a "name" parameter to every screen being added and using that instead?
Additional context
This would also work for other use cases too.