Skip to content

Commit

Permalink
disable some sensors by default
Browse files Browse the repository at this point in the history
  • Loading branch information
Ernst79 committed Jun 20, 2024
1 parent 150c478 commit 0dac9c6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions custom_components/ble_monitor/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,8 @@ def entity_registry_enabled_default(self):
"""Return if the entity should be enabled when first added to the entity registry."""
if self._device_type == "ATC":
return False
elif self.entity_description.key == 'reset':
return False
else:
return True

Expand Down
5 changes: 4 additions & 1 deletion custom_components/ble_monitor/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,10 @@ def entity_registry_enabled_default(self) -> bool:
if not self.is_beacon:
return True

if self.entity_description.key in ['cypress temperature', 'cypress humidity', 'uuid']:
if self.entity_description.key in [
'cypress temperature', 'cypress humidity', 'uuid', 'pressure present duration',
'pressure not present duration', 'pressure present time set', 'pressure not present time set'
]:
return False

return True
Expand Down

0 comments on commit 0dac9c6

Please sign in to comment.