Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,25 @@ device.target_humidity = 45
await device.push_state_update()
```

#### Disable beep

In-door units have a very annoying beep on each status push.
Hopefully, there is a parameter that can help to avoid it.

Unfortunately, it doesn't work on some firmware versions.

```python
device = Device(...)
device.beep = False
await device.push_state_update()
```

This setting is not stored on the device and must be set in python each time you want to use it.

**Based on the following discussion**

- [Command to disable beeping](https://github.com/tomikaa87/gree-remote/issues/44)

## Debugging

Maybe the reason you're here is that you're working with Home Assistant and your device isn't being detected.
Expand Down
13 changes: 13 additions & 0 deletions greeclimate/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ def __init__(self, device_info: DeviceInfo, timeout: int = 120, bind_timeout: in
self.check_version = True
self._properties = {}
self._dirty = []
self._beep = False

async def bind(
self,
Expand Down Expand Up @@ -329,6 +330,10 @@ async def push_state_update(self, wait_for: float = 30):
Props.TEMP_UNIT.value
)

if not self._beep:
self._logger.debug("Disable nuzzer")
props["Buzzer_ON_OFF"] = 1
Copy link
Owner

@cmroche cmroche Jan 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is just a standard property, please implement it through the generic property handling via _properties. If it's possible to read this property, we should read it from the device as well so that the state can properly be reported back to clients (such as in homeassistant).

However, if the property is unsupported, that might cause a problem with the read/write requests and cause the requests to be dropped by the device making it unusable. It might be possible to limit availability of this property based on the versions strings coming back after binding.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I know, this is not a property (part of device state).
It disables BEEP only when the controller applies the received command.
Next command without "Buzzer_ON_OFF" will generate a BEEP regardless of previous commands.
Actually, it's a property of the connection/client but not part of the device state.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any news here guys? I'm really interested on it and happy to help


self._dirty.clear()

try:
Expand Down Expand Up @@ -569,3 +574,11 @@ def clean_filter(self) -> bool:
@property
def water_full(self) -> bool:
return bool(self.get_property(Props.WATER_FULL))

@property
def beep(self) -> bool:
return self._beep

@beep.setter
def beep(self, value: bool):
self._beep = bool(value)
26 changes: 25 additions & 1 deletion tests/test_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,7 @@ async def test_set_properties(cipher, send):
device.steady_heat = True
device.power_save = True
device.target_humidity = 30
device.beep = True

await device.push_state_update()
send.assert_called_once()
Expand Down Expand Up @@ -733,4 +734,27 @@ def test_device_key_set_get():
device.device_cipher = CipherV1()
device.device_key = "fake_key"
assert device.device_key == "fake_key"



@pytest.mark.asyncio
async def test_disable_beep(cipher, send):
"""Check that disabled beep add Buzzer_ON_OFF."""
device = await generate_device_mock_async()

device.power = True
device.beep = False
await device.push_state_update()
assert send.call_count == 1
assert set(send.call_args_list[0].args[0]['pack']['opt']) == {'Pow', 'Buzzer_ON_OFF'}

assert not device.beep

send.reset_mock()

device.power = False
device.beep = True
await device.push_state_update()
assert send.call_count == 1
assert set(send.call_args_list[0].args[0]['pack']['opt']) == {'Pow'}

assert device.beep