From 42050010b240acb9ab2820e5f06676d146da51bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Bachmann?= Date: Fri, 4 Sep 2026 11:18:06 +0200 Subject: [PATCH] Initial project scaffold --- .gitignore | 7 +++++++ AGENTS.md | 7 +++++++ README.md | 5 +++++ custom_components/mb_secure/__init__.py | 20 ++++++++++++++++++++ custom_components/mb_secure/const.py | 3 +++ custom_components/mb_secure/manifest.json | 10 ++++++++++ 6 files changed, 52 insertions(+) create mode 100644 .gitignore create mode 100644 AGENTS.md create mode 100644 README.md create mode 100644 custom_components/mb_secure/__init__.py create mode 100644 custom_components/mb_secure/const.py create mode 100644 custom_components/mb_secure/manifest.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..09eaa33 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +__pycache__/ +.pytest_cache/ +.mypy_cache/ +.ruff_cache/ +.coverage +.venv/ +*.pyc diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..ba24a2d --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,7 @@ +# Repository Rules + +This repository is public and may communicate only with the vendor-neutral Bridge API v1. Never add direct device connections, device credentials, proprietary endpoints, wire fields, status codes, payloads, private fixtures, or protocol-derived mappings. + +Use stable bridge IDs for Home Assistant unique IDs, create entities only for reported capabilities, and sanitize diagnostics. Run the configured formatter, linter, type checker, and full test suite for changes. + +All source code, comments, tests, UI strings, and documentation must be written in English. Do not add a license, publish a release, or change versions without explicit approval. diff --git a/README.md b/README.md new file mode 100644 index 0000000..13c90a3 --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# MB-Secure for Home Assistant + +Unofficial local Home Assistant integration for MB-Secure through the vendor-neutral MB-Secure Bridge API. + +This public integration never connects directly to the controller and never stores controller credentials. The implementation is currently being developed against a neutral mock bridge. diff --git a/custom_components/mb_secure/__init__.py b/custom_components/mb_secure/__init__.py new file mode 100644 index 0000000..2b05c07 --- /dev/null +++ b/custom_components/mb_secure/__init__.py @@ -0,0 +1,20 @@ +"""The MB-Secure integration.""" + +from __future__ import annotations + +from homeassistant.config_entries import ConfigEntry +from homeassistant.core import HomeAssistant + +from .const import DOMAIN + + +async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: + """Set up MB-Secure from a config entry.""" + hass.data.setdefault(DOMAIN, {})[entry.entry_id] = None + return True + + +async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: + """Unload an MB-Secure config entry.""" + hass.data[DOMAIN].pop(entry.entry_id) + return True diff --git a/custom_components/mb_secure/const.py b/custom_components/mb_secure/const.py new file mode 100644 index 0000000..39286d4 --- /dev/null +++ b/custom_components/mb_secure/const.py @@ -0,0 +1,3 @@ +"""Constants for the MB-Secure integration.""" + +DOMAIN = "mb_secure" diff --git a/custom_components/mb_secure/manifest.json b/custom_components/mb_secure/manifest.json new file mode 100644 index 0000000..63df0bd --- /dev/null +++ b/custom_components/mb_secure/manifest.json @@ -0,0 +1,10 @@ +{ + "domain": "mb_secure", + "name": "MB-Secure", + "version": "0.1.0", + "config_flow": false, + "documentation": "https://git.bahmcloud.de/bahmcloud/home-assistant-mb-secure", + "integration_type": "hub", + "iot_class": "local_push", + "requirements": [] +}