Commit graph

6122 commits

Author SHA1 Message Date
Michael Davidson
c72e789be9
Additional clang-format fixes 2024-01-01 10:37:55 +11:00
Michael Davidson
5f5c35e779
ci-custom and clang-format fixes 2024-01-01 10:34:30 +11:00
Michael Davidson
b18e217313
Make margin, borders, and padding individually settable (top vs left vs bottom vs right)
Can still take an int to set all the properties equally
2024-01-01 10:23:17 +11:00
Michael Davidson
feef234ddd
Add can_wrap_at_character - allows for overriding how lines are wrapped
This can be used if the default characters do not work for a user or to support languages other than English
2023-12-31 13:03:26 +11:00
Michael Davidson
046065b307
Use local defintions of COLOR_ON / COLOR_OFF 2023-12-31 12:41:37 +11:00
Michael Davidson
cf559ead56
More ci-custom + clang-format fixes 2023-12-31 12:05:51 +11:00
Michael Davidson
9e7ccebaa1
ci-custom and clang-format fixes 2023-12-31 11:50:18 +11:00
Michael Davidson
cbd4515900
Add ability for FixedDimensionPanel to operate in one of three modes; display dimension, child dimension, or fixed.
- Display dimensions use the width/height of the display (minus margin, border, and padding) for the dimension
- Child dimensions fix the dimension to that of the child
- Fixed dimension uses a specified pixel value (or lambda returning pixel value)
2023-12-31 09:54:07 +11:00
Michael Davidson
fed36a0af5
Add dump_config_base_properties to LayoutItem - displays the basic properties of the item (Margin, Border, Padding) 2023-12-31 09:31:51 +11:00
Michael Davidson
b1b85cdada
clang-format fixes 2023-12-30 13:48:37 +11:00
Michael Davidson
e40277aa56
clang-tidy fixes 2023-12-30 12:40:19 +11:00
Michael Davidson
62b7c05cd7
Merge branch 'dev' into add-graphical-layout-system 2023-12-30 11:59:04 +11:00
Michael Davidson
b2e949c6e9
Apply clang-tidy recommendation 2023-12-30 11:35:42 +11:00
Michael Davidson
5f47c6e255
Test, clang-format, and ci-custom fixes 2023-12-30 11:07:47 +11:00
Michael Davidson
38ac72c912
Apply clang-tidy recommendations 2023-12-30 10:53:31 +11:00
Michael Davidson
2f3b4a25b2
Add simple test layout 2023-12-30 10:49:02 +11:00
Michael Davidson
eb00e8982d
Build fixes 2023-12-30 10:35:50 +11:00
Michael Davidson
409ba147a3
clang-format, ci-custom, and build fixes 2023-12-30 10:24:38 +11:00
Pavlo Dudnytskyi
2a43e55452
HaierProtocol library updated to 0.9.25 to fix the answer_timeout bug (#6015) 2023-12-29 13:08:26 -08:00
Michael Davidson
4046d9e074
Apply flake8. pylint, ci-custom, and clang-format fixes 2023-12-29 20:30:24 +11:00
Michael Davidson
93d2e4e8ff
Add text_run_panel
Unlike text_panel (to be renamed) the text_run_panel supports multiple runs of different fonts (and thus sizes, weights, and colours) and will lay them out to the best of its ability - respecting desired alignment - as it can.
2023-12-29 20:11:30 +11:00
Michael Davidson
92f5f03bfe
Merge branch 'add-graphical-layout-system' of github.com:MrMDavidson/esphome into add-graphical-layout-system 2023-12-29 18:41:36 +11:00
Michael Davidson
b721262759
Switch to using display's definition of COLOR_ON/COLOR_OFF + improve ESP_LOGCONFIG() output 2023-12-29 18:39:38 +11:00
Michael Davidson
6e51b4f479
Ensure child items have their measure_item() called so they can perform layout, if necessary 2023-12-29 18:38:37 +11:00
Michael Davidson
9b658980b2
Add [horizontal|vertical]_child_align_to_string methods
Used as part of ESP_LOGCONFIG() to aide in human readability
2023-12-29 18:37:36 +11:00
Michael Davidson
9cb8410266
Merge branch 'dev' into add-graphical-layout-system 2023-12-29 18:36:18 +11:00
Michael Davidson
f061ff4ee4
Add setup_complete hook
Called at the end of setup() of the underlying Component. Last chance to do pre-run-time initialisation in LayoutItems
2023-12-29 18:35:55 +11:00
Clyde Stubbs
5ebb68f4ff
Ble client additions and fixes (#5277)
* Add config to disable auto-connect of BLE client.
Correct initialise MAC address of BLE client.

* Checkpont

* Fixes for automation progress.

* Fixes for automation progress.

* Checkpoint;
fix notify for ble_client

* Fix BLE client binary_output

* Various fixes

* Consider notifications on when receiving REG_FOR event.

* Add testing branch to workflow

* Add workflow

* CI changes

* CI changes

* CI clang

* CI changes

* CI changes

* Add comment about logging macros

* Add test, sanitise comment

* Revert testing change to ci config

* Update codeowners

* Revert ci config change

* Fix some state changes

* Add default case.

* Minor fixes

* Add auto-connect to logconfig
2023-12-29 01:35:44 -06:00
Michael Davidson
982942a512
Add text_align_to_string
Used for debugging ESP_LOGCONFIG purposes
2023-12-29 18:31:01 +11:00
Edward Firmo
d3567f9ac6
Nextion queue size (#6029)
* Nextion `queue_size` function

Returns the size of Nextion queue.
For troubleshooting only.

* Move `queue_size` to `nextion.h`

This is where the queue is

* Inline doc

* clang-format
2023-12-28 23:15:06 -06:00
Clyde Stubbs
21ec42f495
Add constants used by multiple display drivers to global const.py (#6033)
* Add constants used by multiple display drivers to global const.py

* Add further constants

* Refactor st7789v and st7735v
2023-12-29 02:00:19 +00:00
J. Nick Koston
d4d49e38fc
Fix device not requesting Home Assistant time at the update interval (#6022) 2023-12-28 14:51:00 +11:00
Anton Viktorov
3be97868fc
Support for ST7567 display 128x64 (I2C, SPI) (#5952) 2023-12-27 12:01:15 +11:00
Michael Davidson
d663e453a1
Remove unused item_padding 2023-12-27 10:51:59 +11:00
Michael Davidson
46285b20f8
Add the FixedDimensionPanel
This renders a single child (you'd likely want that child to be a Vertical or Horizontal Stack Panel) with constrained dimensions.

For example to achieve a fixed two column 50/50 display you could have a layout of;
Root
 - Horizontal Stack
   - Fixed Dimension (50% display width)
     - Vertical Stack
       - Text, Display, etc...
   - Fixed Dimension (50% display width)
     - Vertical Stack
       - More elements...
2023-12-27 10:12:58 +11:00
Michael Davidson
1b411a55e4
black / flake8 / pylint fixes 2023-12-26 16:04:02 +11:00
Michael Davidson
2fc6714c80
Provide a bounds to the DisplayRenderingPanel
This allows users to customise their drawing depending on the available space
2023-12-26 16:00:43 +11:00
Michael Davidson
3fabe545ee
Fix some incorrectly templatable values as well as the implementation of items that should be templatable 2023-12-26 15:48:58 +11:00
Michael Davidson
7238faa184
Black, flake8, and clang-format fixes 2023-12-26 14:57:59 +11:00
Michael Davidson
7e4cda852b
Merge branch 'add-graphical-layout-system' of github.com:MrMDavidson/esphome into add-graphical-layout-system 2023-12-26 14:18:21 +11:00
Michael Davidson
fd7f5a13d3
Merge branch 'dev' into add-graphical-layout-system 2023-12-26 14:17:58 +11:00
Michael Davidson
fa27e8eafc
Add support for text alignment to TextPanel 2023-12-26 14:17:37 +11:00
Michael Davidson
255d851125
Additional clang-format and ci-custom fixes 2023-12-26 13:12:02 +11:00
Michael Davidson
93432b85b9
Black. flake8, pylint, and clang-format fixes 2023-12-26 13:07:37 +11:00
Michael Davidson
631a969107
Add support for controlling child alignment in Horizontal and Vertical Stack
This allows the user to left/center/right/stretch items in the VerticalStack and top/center/bototm/stretch items in the HorizontalStack
2023-12-26 13:00:19 +11:00
Fabian
93ac765425
[Touchscreen] Add expire of touch record. (#5986)
* Add expire of touch record.

* Implement suggested changes.

* Alternative implementation to detect touch release.

* add `cancel_timeout`.

* Add touch timeout as configurable element.

---------

Co-authored-by: Your Name <you@example.com>
2023-12-25 06:16:53 +11:00
NP v/d Spek
46fc37b691
Display: fix class inherence in Python script (#6009) 2023-12-24 22:58:27 +09:00
J. Nick Koston
de6fc6b1dd
Fix docker builds (#6012) 2023-12-24 22:57:15 +09:00
J. Nick Koston
fe15d993f9
dashboard: Fix file writes on Windows (#6013) 2023-12-24 22:56:31 +09:00
NP v/d Spek
6583026e14
tt21100: restore init read (#6008) 2023-12-24 22:54:53 +09:00