Skip to content

Commit

Permalink
move to native and fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
dgomes committed Aug 3, 2022
1 parent f1cbfed commit 7bb56c0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions custom_components/openhasp/number.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ class HASPNumberDescription(NumberEntityDescription, HASPNumberDescriptionMixin)
name="Page Number",
entity_category=EntityCategory.CONFIG,
icon="mdi:numeric-1-box-multiple-outline",
min_value=1,
max_value=12,
native_min_value=1,
native_max_value=12,
command_topic="/command/page",
state_topic="/state/page",
)
Expand Down Expand Up @@ -114,11 +114,11 @@ async def page_state_message_received(msg):
await self.refresh()

@property
def value(self) -> int:
def native_value(self) -> int:
"""Return the current number."""
return self._number

async def async_set_value(self, value: float) -> None:
async def async_set_native_value(self, value: float) -> None:
"""Set the perfume amount."""
if not value.is_integer():
raise ValueError(
Expand Down

0 comments on commit 7bb56c0

Please sign in to comment.