Go to file
Faidon Liambotis 9fdad592c2
Add option to disable MQTT Alarm Control Panel supported features (#98363)
* Make MQTT Alarm Control Panel features conditional

The MQTT Alarm Control Panel currently enables all features (arm home,
arm away, arm night, arm vacation, arm custom bypass) unconditionally.
This clutters the interface and can even be potentially dangerous, by
enabling modes that the remote alarm may not support.

Make all the features conditional, by adding a new "supported_features"
configuration option, comprising a list of the supported features as
options. Feature enablement seems inconsistent across the MQTT
component; this implementation is most alike to the Humidifier modes
option, but using a generic "supported_features" name that other
implementations may reuse in the future.

The default value of this new setting remains to be all features, which
while it may be overly expansive, is necessary to maintain backwards
compatibility.

* Apply suggestions from code review

* Use vol.Optional() instead of vol.Required() for "supported_features".
* Move the initialization of _attr_supported_features to _setup_from_config.

Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>

* Apply suggestions from emontnemery's code review

* Use vol.In() instead of cv.multi_seelct()
* Remove superfluous _attr_supported_features initializers, already
  present in the base class.

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* Add invalid config tests for the MQTT Alarm Control Panel

* Set expected_features to None in the invalid MQTT Alarm Control Panel tests

* Add another expected_features=None in the invalid tests

Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>

---------

Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-08-18 08:23:48 +02:00
.devcontainer Update .devcontainer.json structure (#96537) 2023-07-20 13:11:43 +02:00
.github Skip writing pyc files [ci] (#98423) 2023-08-16 11:36:52 +02:00
.vscode Add scaffolds to vscode tasks (#92015) 2023-05-21 21:29:33 +02:00
docs Update featured integrations screenshot (#95473) 2023-06-28 21:36:46 -04:00
homeassistant Add option to disable MQTT Alarm Control Panel supported features (#98363) 2023-08-18 08:23:48 +02:00
machine Add Home Assistant Green (#98171) 2023-08-10 15:00:43 +02:00
pylint Migrate backported StrEnum to built-in StrEnum (#97101) 2023-07-23 23:19:24 +02:00
rootfs Fix logging & exit code reporting to S6 on HA shutdown (#72921) 2022-06-02 19:49:08 +02:00
script Bump protobuf to 4.24.0 (#98468) 2023-08-15 18:52:18 -05:00
tests Add option to disable MQTT Alarm Control Panel supported features (#98363) 2023-08-18 08:23:48 +02:00
.core_files.yaml Make changes in modbus trigger a full CI run (#98055) 2023-08-08 18:49:56 +02:00
.coveragerc Add PoE switch tests (#95087) 2023-08-16 13:38:53 +02:00
.dockerignore Not to Tox (#76582) 2022-11-23 14:40:37 +01:00
.gitattributes Ensure .pcm binary files do not have line endings changed (#91881) 2023-04-22 22:22:30 -04:00
.gitignore Create pytest output artifact [ci] (#98106) 2023-08-14 10:38:53 +02:00
.hadolint.yaml Add hadolint to CI (#34758) 2020-04-27 12:09:31 +02:00
.pre-commit-config.yaml Use mirror to run `black` with pre-commit (#95605) 2023-08-03 13:21:07 +02:00
.prettierignore Add tests to Lidarr (#79610) 2023-03-28 16:49:32 +02:00
.readthedocs.yml Update readthedocs config (#65230) 2022-01-30 20:15:32 -08:00
.strict-typing Alexa strict type hints (#97485) 2023-08-08 17:15:25 +02:00
.yamllint Add filters to climate and light service descriptions (#86162) 2023-03-16 15:59:51 +01:00
CLA.md
CODEOWNERS ipma: remove abmantis from codeowners (#98304) 2023-08-14 19:36:58 +02:00
CODE_OF_CONDUCT.md Update URLs forwarding to HA blog posts (#91698) 2023-04-20 20:55:13 +02:00
CONTRIBUTING.md Use core GitHub URL in contributing guidelines (#41083) 2020-10-02 20:42:33 +02:00
Dockerfile Remove legacy pip resolver (#92124) 2023-04-27 22:39:29 +02:00
Dockerfile.dev Bump python devcontainer (#94540) 2023-06-14 11:38:47 +02:00
LICENSE.md
MANIFEST.in Move remaining keys to `setup.cfg` (#65154) 2022-01-28 20:18:09 -08:00
README.rst Update URL in readme (#94282) 2023-06-09 09:24:53 +02:00
build.yaml Update Home Assistant base image to 2023.07.0 (#97103) 2023-07-23 15:27:03 -05:00
codecov.yml Add recorder platform to required test category (#86704) 2023-01-26 11:03:56 +01:00
mypy.ini Update mypy to 1.5.0 (#98179) 2023-08-11 13:13:04 +02:00
pyproject.toml Pin setuptools to 68.0.0 (#98582) 2023-08-17 17:36:22 +02:00
requirements.txt Update attrs to 23.1.0 (#98385) 2023-08-14 15:50:43 +02:00
requirements_all.txt Bump renault-api to 0.2.0 (#98587) 2023-08-17 18:16:32 +02:00
requirements_docs.txt
requirements_test.txt Update mypy to 1.5.1 (#98554) 2023-08-16 18:44:02 -05:00
requirements_test_all.txt Bump renault-api to 0.2.0 (#98587) 2023-08-17 18:16:32 +02:00
requirements_test_pre_commit.txt Update ruff to v0.0.280 (#97102) 2023-07-23 22:00:26 +02:00

README.rst

Home Assistant |Chat Status|
=================================================================================

Open source home automation that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiasts. Perfect to run on a Raspberry Pi or a local server.

Check out `home-assistant.io <https://home-assistant.io>`__ for `a
demo <https://demo.home-assistant.io>`__, `installation instructions <https://home-assistant.io/getting-started/>`__,
`tutorials <https://home-assistant.io/getting-started/automation/>`__ and `documentation <https://home-assistant.io/docs/>`__.

|screenshot-states|

Featured integrations
---------------------

|screenshot-integrations|

The system is built using a modular approach so support for other devices or actions can be implemented easily. See also the `section on architecture <https://developers.home-assistant.io/docs/architecture_index/>`__ and the `section on creating your own
components <https://developers.home-assistant.io/docs/creating_component_index/>`__.

If you run into issues while using Home Assistant or during development
of a component, check the `Home Assistant help section <https://home-assistant.io/help/>`__ of our website for further help and information.

.. |Chat Status| image:: https://img.shields.io/discord/330944238910963714.svg
   :target: https://www.home-assistant.io/join-chat/
.. |screenshot-states| image:: https://raw.githubusercontent.com/home-assistant/core/master/docs/screenshots.png
   :target: https://demo.home-assistant.io
.. |screenshot-integrations| image:: https://raw.githubusercontent.com/home-assistant/core/dev/docs/screenshot-integrations.png
   :target: https://home-assistant.io/integrations/