Skip to content

Commit

Permalink
fix bri slider
Browse files Browse the repository at this point in the history
  • Loading branch information
hendriksen-mark committed Dec 29, 2024
1 parent 04fc065 commit f17be53
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/BrightnessSlider/BrightnessSlider.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const BrightnessSlider = ({ defaultValue, onChange }) => {
type="range"
min="1"
max="254"
defaultValue={defaultValue}
defaultValue={Math.round((defaultValue / 100) * 253) + 1}
step="1"
className="slider"
onChange={(e) => onChange(parseInt(e.target.value))}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Group/GroupHeader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const GroupHeader = ({ HOST_IP, api_key, id, group, lights }) => {
<AnimatePresence initial={false}>
{group.state["any_on"] && (
<BrightnessSlider
defaultValue={group.action["bri"]}
defaultValue={group.state["avr_bri"]}
onChange={debouncedChangeHandler}
/>
)}
Expand Down

0 comments on commit f17be53

Please sign in to comment.