Skip to content

Commit

Permalink
Fix Problem With Random
Browse files Browse the repository at this point in the history
  • Loading branch information
TrevorSchirmer committed Dec 20, 2024
1 parent 930377a commit 470c7df
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
file: # TODO: Rename
file:
- Integrations/ESPHome/H-1.yaml
- Integrations/ESPHome/H-1D.yaml
- Integrations/ESPHome/H-1_Minimal.yaml
esphome-version:
- stable
- beta
- dev
steps:
- name: Checkout source code
uses: actions/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion Integrations/ESPHome/Core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ light:
lambda: |-
for (int i = 0; i < it.size(); i++) {
// Generate a random brightness factor between 50% and 100%
float brightness_factor = 0.5 + (esp_random() % 30) / 75.0;
float brightness_factor = 0.5 + (rand() % 30) / 75.0;
// Apply brightness to white color (255, 255, 255) for a twinkle effect
int white_r = 255 * brightness_factor;
Expand Down

0 comments on commit 470c7df

Please sign in to comment.