Skip to content

Commit

Permalink
Make all barrier commands public
Browse files Browse the repository at this point in the history
  • Loading branch information
IceBotYT committed Jul 28, 2024
1 parent acb29c8 commit a373cad
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Added
- Made all barrier commands public

## [0.1.1] - 2024-07-25
### Added
Expand Down
8 changes: 4 additions & 4 deletions src/nice_go/_barrier.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,31 +92,31 @@ async def open(self) -> bool:
Returns:
A boolean indicating whether the command was successful.
"""
return await self.api._open_barrier(self.id)
return await self.api.open_barrier(self.id)

async def close(self) -> bool:
"""Close the barrier.
Returns:
A boolean indicating whether the command was successful.
"""
return await self.api._close_barrier(self.id)
return await self.api.close_barrier(self.id)

async def light_on(self) -> bool:
"""Turn on the light of the barrier.
Returns:
A boolean indicating whether the command was successful.
"""
return await self.api._light_on(self.id)
return await self.api.light_on(self.id)

async def light_off(self) -> bool:
"""Turn off the light of the barrier.
Returns:
A boolean indicating whether the command was successful.
"""
return await self.api._light_off(self.id)
return await self.api.light_off(self.id)

async def get_attr(self, key: str) -> str:
"""Get the value of an attribute.
Expand Down
8 changes: 4 additions & 4 deletions src/nice_go/nice_go_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ async def get_all_barriers(self) -> list[Barrier]:

return barriers

async def _open_barrier(self, barrier_id: str) -> bool:
async def open_barrier(self, barrier_id: str) -> bool:
"""Open a barrier.
Args:
Expand Down Expand Up @@ -484,7 +484,7 @@ async def _open_barrier(self, barrier_id: str) -> bool:

return result

async def _close_barrier(self, barrier_id: str) -> bool:
async def close_barrier(self, barrier_id: str) -> bool:
"""Close a barrier.
Args:
Expand Down Expand Up @@ -518,7 +518,7 @@ async def _close_barrier(self, barrier_id: str) -> bool:

return result

async def _light_on(self, barrier_id: str) -> bool:
async def light_on(self, barrier_id: str) -> bool:
"""Turn the light on.
Args:
Expand Down Expand Up @@ -555,7 +555,7 @@ async def _light_on(self, barrier_id: str) -> bool:

return result

async def _light_off(self, barrier_id: str) -> bool:
async def light_off(self, barrier_id: str) -> bool:
"""Turn the light off.
Args:
Expand Down

0 comments on commit a373cad

Please sign in to comment.