Skip to content

Commit

Permalink
Fix Treble and Bass numbers not updating when set to 0
Browse files Browse the repository at this point in the history
  • Loading branch information
mj23000 committed Aug 27, 2024
1 parent 862cd3b commit e59cc55
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/bang_olufsen/number.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ async def async_added_to_hass(self) -> None:

async def _update_sound_settings(self, data: SoundSettings) -> None:
"""Update sound settings."""
if data.adjustments and data.adjustments.treble:
if data.adjustments and data.adjustments.treble is not None:
self._attr_native_value = data.adjustments.treble
self.async_write_ha_state()

Expand Down Expand Up @@ -133,6 +133,6 @@ async def async_added_to_hass(self) -> None:

async def _update_sound_settings(self, data: SoundSettings) -> None:
"""Update sound settings."""
if data.adjustments and data.adjustments.bass:
if data.adjustments and data.adjustments.bass is not None:
self._attr_native_value = data.adjustments.bass
self.async_write_ha_state()

0 comments on commit e59cc55

Please sign in to comment.