From d9ab052cbcd14ca71b110182a22a5bfee3bcc4e5 Mon Sep 17 00:00:00 2001 From: Benjamin Nussbaum Date: Thu, 12 Feb 2026 16:34:28 +0100 Subject: [PATCH 1/4] chore: update dependencies --- composer.lock | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/composer.lock b/composer.lock index 1789c64..2f94f0d 100644 --- a/composer.lock +++ b/composer.lock @@ -9066,16 +9066,16 @@ }, { "name": "laravel/boost", - "version": "v2.1.2", + "version": "v2.1.3", "source": { "type": "git", "url": "https://github.com/laravel/boost.git", - "reference": "81ecf79e82c979efd92afaeac012605cc7b2f31f" + "reference": "b96e0ab547d51d3810498dcc4d5535486991df6f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/boost/zipball/81ecf79e82c979efd92afaeac012605cc7b2f31f", - "reference": "81ecf79e82c979efd92afaeac012605cc7b2f31f", + "url": "https://api.github.com/repos/laravel/boost/zipball/b96e0ab547d51d3810498dcc4d5535486991df6f", + "reference": "b96e0ab547d51d3810498dcc4d5535486991df6f", "shasum": "" }, "require": { @@ -9086,7 +9086,7 @@ "illuminate/support": "^11.45.3|^12.41.1", "laravel/mcp": "^0.5.1", "laravel/prompts": "^0.3.10", - "laravel/roster": "^0.2.9", + "laravel/roster": "^0.4.0", "php": "^8.2" }, "require-dev": { @@ -9128,7 +9128,7 @@ "issues": "https://github.com/laravel/boost/issues", "source": "https://github.com/laravel/boost" }, - "time": "2026-02-10T17:40:45+00:00" + "time": "2026-02-11T19:22:04+00:00" }, { "name": "laravel/mcp", @@ -9352,31 +9352,31 @@ }, { "name": "laravel/roster", - "version": "v0.2.9", + "version": "v0.4.0", "source": { "type": "git", "url": "https://github.com/laravel/roster.git", - "reference": "82bbd0e2de614906811aebdf16b4305956816fa6" + "reference": "77e6c1187952d0eef50a54922db47893f5e7c986" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/roster/zipball/82bbd0e2de614906811aebdf16b4305956816fa6", - "reference": "82bbd0e2de614906811aebdf16b4305956816fa6", + "url": "https://api.github.com/repos/laravel/roster/zipball/77e6c1187952d0eef50a54922db47893f5e7c986", + "reference": "77e6c1187952d0eef50a54922db47893f5e7c986", "shasum": "" }, "require": { - "illuminate/console": "^10.0|^11.0|^12.0", - "illuminate/contracts": "^10.0|^11.0|^12.0", - "illuminate/routing": "^10.0|^11.0|^12.0", - "illuminate/support": "^10.0|^11.0|^12.0", - "php": "^8.1|^8.2", - "symfony/yaml": "^6.4|^7.2" + "illuminate/console": "^11.0|^12.0|^13.0", + "illuminate/contracts": "^11.0|^12.0|^13.0", + "illuminate/routing": "^11.0|^12.0|^13.0", + "illuminate/support": "^11.0|^12.0|^13.0", + "php": "^8.2", + "symfony/yaml": "^7.2|^8.0" }, "require-dev": { "laravel/pint": "^1.14", "mockery/mockery": "^1.6", - "orchestra/testbench": "^8.22.0|^9.0|^10.0", - "pestphp/pest": "^2.0|^3.0", + "orchestra/testbench": "^9.0|^10.0|^11.0", + "pestphp/pest": "^3.0|^4.1", "phpstan/phpstan": "^2.0" }, "type": "library", @@ -9409,7 +9409,7 @@ "issues": "https://github.com/laravel/roster/issues", "source": "https://github.com/laravel/roster" }, - "time": "2025-10-20T09:56:46+00:00" + "time": "2026-02-11T07:24:41+00:00" }, { "name": "laravel/sail", From 8400c1eaf1495d272c14e4012cc0fce6ddc5f9b9 Mon Sep 17 00:00:00 2001 From: Benjamin Nussbaum Date: Thu, 12 Feb 2026 21:48:03 +0100 Subject: [PATCH 2/4] feat(#188): support `battery-percent` header --- routes/api.php | 5 ++-- tests/Feature/Api/DeviceEndpointsTest.php | 34 +++++++++++++++++++++++ 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/routes/api.php b/routes/api.php index 73b2749..c759d61 100644 --- a/routes/api.php +++ b/routes/api.php @@ -49,8 +49,9 @@ Route::get('/display', function (Request $request) { 'last_refreshed_at' => now(), ]); - if ($request->hasHeader('battery-percent')) { - $batteryPercent = (int) $request->header('battery-percent'); + $batteryPercent = $request->header('battery-percent') ?? $request->header('percent-charged'); + if ($batteryPercent !== null) { + $batteryPercent = (int) $batteryPercent; $batteryVoltage = $device->calculateVoltageFromPercent($batteryPercent); $device->update([ 'last_battery_voltage' => $batteryVoltage, diff --git a/tests/Feature/Api/DeviceEndpointsTest.php b/tests/Feature/Api/DeviceEndpointsTest.php index 44fb651..f64d203 100644 --- a/tests/Feature/Api/DeviceEndpointsTest.php +++ b/tests/Feature/Api/DeviceEndpointsTest.php @@ -725,6 +725,40 @@ test('display endpoint updates last_refreshed_at timestamp', function (): void { ->and($device->last_refreshed_at->diffInSeconds(now()))->toBeLessThan(2); }); +test('display endpoint accepts battery-percent header and updates device', function (): void { + $device = Device::factory()->create([ + 'mac_address' => '00:11:22:33:44:56', + 'api_key' => 'test-api-key-battery', + 'last_battery_voltage' => null, + ]); + + $this->withHeaders([ + 'id' => $device->mac_address, + 'access-token' => $device->api_key, + 'battery-percent' => '67', + ])->get('/api/display')->assertOk(); + + $device->refresh(); + expect($device->battery_percent)->toEqual(67); +}); + +test('display endpoint accepts Percent-Charged header and updates device', function (): void { + $device = Device::factory()->create([ + 'mac_address' => '00:11:22:33:44:57', + 'api_key' => 'test-api-key-percent-charged', + 'last_battery_voltage' => null, + ]); + + $this->withHeaders([ + 'id' => $device->mac_address, + 'access-token' => $device->api_key, + 'Percent-Charged' => '51', + ])->get('/api/display')->assertOk(); + + $device->refresh(); + expect($device->battery_percent)->toEqual(51); +}); + test('display endpoint updates last_refreshed_at timestamp for mirrored devices', function (): void { // Create source device $sourceDevice = Device::factory()->create([ From cb4663645280e04c60581b9f63eadef591da37cf Mon Sep 17 00:00:00 2001 From: Benjamin Nussbaum Date: Thu, 12 Feb 2026 21:48:20 +0100 Subject: [PATCH 3/4] fix: remove duplicate layout in zen recipe --- resources/views/recipes/zen.blade.php | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/resources/views/recipes/zen.blade.php b/resources/views/recipes/zen.blade.php index 0ae920f..cc62c63 100644 --- a/resources/views/recipes/zen.blade.php +++ b/resources/views/recipes/zen.blade.php @@ -1,15 +1,13 @@ {{--@dump($data)--}} @props(['size' => 'full']) - - -
{{$data['data'][0]['a'] ?? ''}}
- @if (strlen($data['data'][0]['q'] ?? '') < 300 && $size != 'quadrant') -

{{ $data['data'][0]['q'] ?? '' }}

- @else -

{{ $data['data'][0]['q'] ?? '' }}

- @endif -
+ +
{{$data['data'][0]['a'] ?? ''}}
+ @if (strlen($data['data'][0]['q'] ?? '') < 300 && $size != 'quadrant') +

{{ $data['data'][0]['q'] ?? '' }}

+ @else +

{{ $data['data'][0]['q'] ?? '' }}

+ @endif
From 226afa2ed33a608dbf28fd2fa66a4b7fef8f36cd Mon Sep 17 00:00:00 2001 From: Benjamin Nussbaum Date: Thu, 12 Feb 2026 22:15:34 +0100 Subject: [PATCH 4/4] feat(pipeline): enhance color palette support --- composer.json | 2 +- composer.lock | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/composer.json b/composer.json index c6f59c8..6f00826 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ "ext-simplexml": "*", "ext-zip": "*", "bnussbau/laravel-trmnl-blade": "2.3.*", - "bnussbau/trmnl-pipeline-php": "^0.6.0", + "bnussbau/trmnl-pipeline-php": "0.7.*", "keepsuit/laravel-liquid": "^0.5.2", "laravel/fortify": "^1.30", "laravel/framework": "^12.1", diff --git a/composer.lock b/composer.lock index 2f94f0d..b22316d 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "a4438c591a5d746f546eab261e9e1efc", + "content-hash": "909d7acdf3f0ace9fb6d20b4de1eeaca", "packages": [ { "name": "aws/aws-crt-php", @@ -298,16 +298,16 @@ }, { "name": "bnussbau/trmnl-pipeline-php", - "version": "0.6.0", + "version": "0.7.0", "source": { "type": "git", "url": "https://github.com/bnussbau/trmnl-pipeline-php.git", - "reference": "228505afa8a39a5033916e9ae5ccbf1733092c1f" + "reference": "da80de2b6456776eeabc1fb95fd42e5f3357d865" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bnussbau/trmnl-pipeline-php/zipball/228505afa8a39a5033916e9ae5ccbf1733092c1f", - "reference": "228505afa8a39a5033916e9ae5ccbf1733092c1f", + "url": "https://api.github.com/repos/bnussbau/trmnl-pipeline-php/zipball/da80de2b6456776eeabc1fb95fd42e5f3357d865", + "reference": "da80de2b6456776eeabc1fb95fd42e5f3357d865", "shasum": "" }, "require": { @@ -349,7 +349,7 @@ ], "support": { "issues": "https://github.com/bnussbau/trmnl-pipeline-php/issues", - "source": "https://github.com/bnussbau/trmnl-pipeline-php/tree/0.6.0" + "source": "https://github.com/bnussbau/trmnl-pipeline-php/tree/0.7.0" }, "funding": [ { @@ -357,7 +357,7 @@ "type": "buy_me_a_coffee" }, { - "url": "https://usetrmnl.com/?ref=laravel-trmnl", + "url": "https://trmnl.com/?ref=laravel-trmnl", "type": "custom" }, { @@ -365,7 +365,7 @@ "type": "github" } ], - "time": "2025-12-02T15:18:51+00:00" + "time": "2026-02-07T22:22:18+00:00" }, { "name": "brick/math",