Skip to content
Snippets Groups Projects
Commit 698a467a authored by jkerdreu's avatar jkerdreu
Browse files

- hide buttons by default (usefull ??)



git-svn-id: https://redmine.imt-atlantique.fr/svn/xaal/code/Python/branches/0.7@3024 b32b6428-25c9-4566-ad07-03861ab6144f
parent 963cd73c
No related branches found
No related tags found
No related merge requests found
import imp
import logging
from typing import Literal
......@@ -14,12 +13,13 @@ from xaal.lib import Message
_LOGGER = logging.getLogger(__name__)
# https://www.home-assistant.io/integrations/binary_sensor/
async def async_setup_entry(
hass: HomeAssistant,
config_entry: ConfigEntry,
async_add_entities: AddEntitiesCallback) -> None:
binding = {'motion.' : [Motion],
'contact.': [Contact],
'switch.' : [Switch],
......@@ -56,6 +56,10 @@ class Switch(XAALBinarySensorEntity):
class Button(XAALBinarySensorEntity):
@property
def entity_registry_visible_default(self):
return False
def click_event(self, click_type):
# TODO change this sig, to hande several button types..
_LOGGER.warning(f"Button event: {self.entity_id}")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment