diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md index 7a12694c..15e8e0d3 100644 --- a/.github/CODE_OF_CONDUCT.md +++ b/.github/CODE_OF_CONDUCT.md @@ -2,30 +2,130 @@ ## Our pledge -This is a repository. +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, caste, color, religion, or sexual +identity and orientation. -## Our standards +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. -... +## Our Standards -## Our responsibilities +Examples of behavior that contributes to a positive environment for our +community include: -Absolutely none. +- Demonstrating empathy and kindness toward other people +- Being respectful of differing opinions, viewpoints, and experiences +- Giving and gracefully accepting constructive feedback +- Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +- Focusing on what is best not just for us as individuals, but for the overall + community + +Examples of unacceptable behavior include: + +- The use of sexualized language or imagery, and sexual attention or advances of + any kind +- Trolling, insulting or derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or email address, + without their explicit permission +- Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. ## Scope -Wide, or narrow... dunno. +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. ## Enforcement -Ban at will, or hugs... be warned for the latter... +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series of +actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or permanent +ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within the +community. ## Attribution This Code of Conduct is adapted from the [Contributor Covenant][homepage], -version 1.4, available at [http://contributor-covenant.org/version/1/4][version] +version 2.1, available at +[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. + +Community Impact Guidelines were inspired by +[Mozilla's code of conduct enforcement ladder][mozilla coc]. -For real, just deleted most of the stuff. +For answers to common questions about this code of conduct, see the FAQ at +[https://www.contributor-covenant.org/faq][faq]. Translations are available at +[https://www.contributor-covenant.org/translations][translations]. -[homepage]: http://contributor-covenant.org -[version]: http://contributor-covenant.org/version/1/4/ +[homepage]: https://www.contributor-covenant.org +[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html +[mozilla coc]: https://github.com/mozilla/diversity +[faq]: https://www.contributor-covenant.org/faq +[translations]: https://www.contributor-covenant.org/translations diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 29ed6798..0e4cbac0 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -1,22 +1,9 @@ # Contributing -Are you considering doing that? For real? -This repository has quite an annoying license... +Are you considering doing that? For real? This repository has quite an annoying license... -## Issues and feature requests +Anyways, you can find all information on development and contributing on our website: -If you have found a bug... congratulations! -Feel free to fix it in your own time. +https://spook.frenck.dev/development -Got a feature request? Nice! Take a good size piece of paper, write -it down in just a couple of words. Fold it a couple of times so you -are left with a nice small folded feature request. Now shred it into -pieces. Done. - -## Pull request process - -You can try... maybe... who knows. - -## What did I just read? - -A question. +../Frenck diff --git a/.github/SECURITY.md b/.github/SECURITY.md index 78fd6e0f..4c1773d2 100644 --- a/.github/SECURITY.md +++ b/.github/SECURITY.md @@ -1,11 +1,5 @@ -# Security Policy +# Security policy -Spook only provides a false sense of security. So, don't use it. +The security policy of Spook is fully documented here: -## Supported Versions - -_(intentionally left empty)_ - -## Reporting a Vulnerability - -Maybe you can tell your neighbour or a friend about it? That might help. +https://spook.frenck.dev/security diff --git a/.github/workflows/documentation.yaml b/.github/workflows/documentation.yaml index 65b29e02..3d1416ee 100644 --- a/.github/workflows/documentation.yaml +++ b/.github/workflows/documentation.yaml @@ -19,7 +19,7 @@ jobs: node-version-file: "documentation/.nvmrc" - name: πŸ— Install MyST - run: npm install -g myst-cli + run: npm install -g mystmd - name: πŸš€ Build documenation working-directory: ./documentation diff --git a/README.md b/README.md index f6bb06ff..fd928913 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Spook πŸ‘» Not your homie. +# Spook πŸ‘» Not your homie. [![GitHub Release][releases-shield]][releases] ![Project Stage][project-stage-shield] @@ -8,674 +8,38 @@ ![Spook - Not your homie](https://raw.githubusercontent.com/frenck/spook/main/logos/logo3.png) -# About +# About -Spook is a custom integration for Home Assistant, which is not your homie. +Hi! I'm Spook πŸ‘» and I'm a custom integration for use with Home Assistant. +I will extend your Home Assistant instance with a huge set of scary powerfull +tools. πŸ› οΈ -You should not use this custom integration, nor should you expect it to work. -The integration will break a lot, and will probably not survive the next -Home Assistant upgrade. Heck, it will most likely not even survive its own -next release. +[Learn all about me in the extensive documentation](https://spook.frenck.dev/) -This integration comes with absolutely 0/zero/zip/nada/noppes support, -and has less documentation than the quirks of my partner. +## ⚠️ Just to be very clear... -Above all, this integration may just break your setup in an way -that is not recoverable. Nor will it provide you with a tissue -to dry up your tears when you are crying in a fetal position -under your desk after ignoring all of the above. +**Spook is not affiliated with, endorsed, recommended, or supported by the Home Assistant project.** -I've warned you :D - -../Frenck - -## Cool, but why? What is it? - -So, there a lot of things/features, that will never end up in Home Assistant itself. - -This can have various reasons, for example: It is just too random, out of scope, -not matching the Home Assistant philosophy, violating architectural design, -still in early development, experimental, explorative, or just freaking useless. - -Spook doesn't care. He is nobodies homie. - -So, maybe, that one feature you wanted Home Assistant to have, is in Spook. - -However, remember, Spook is not your homie. All stuff in here, is not part of -Home Assistant (or at least not yet) for a reason. So, don't expect it to work, -or to be supported, or well, for starters, to be a good idea. - -## Some guidance for the brave - -- [Installation](#installation) -- [Configuration](#configuration) -- [Entities](#entities) - - [Buttons](#buttons) - - [Sensors](#sensors) - - [Switches](#switches) -- [Services](#services) - - [Service: Import Blueprint](#service-import-blueprint) - - [Service: Disable an integration](#service-disable-an-integration) - - [Service: Enable an integration](#service-enable-an-integration) - - [Service: Disable a device](#service-disable-a-device) - - [Service: Enable a device](#service-enable-a-device) - - [Service: Disable an entity](#service-disable-an-entity) - - [Service: Enable an entity](#service-enable-an-entity) - - [Service: Hide an entity](#service-hide-an-entity) - - [Service: Unhide an entity](#service-unhide-an-entity) - - [Service: Disable polling for updates](#service-disable-polling-for-updates) - - [Service: Enable polling for updates](#service-enable-polling-for-updates) - - [Service: Ignore all discovered devices \& services](#service-ignore-all-discovered-devices--services) - - [Service: Delete all orphaned entities](#service-delete-all-orphaned-entities) - - [Service: Import statistics](#service-import-statistics) - - [Service: Create area](#service-create-area) - - [Service: Add an alias to an area](#service-add-an-alias-to-an-area) - - [Service: Remove an alias from an area](#service-remove-an-alias-from-an-area) - - [Service: Set area aliases](#service-set-area-aliases) - - [Service: Add device to area](#service-add-device-to-area) - - [Service: Remove device from area](#service-remove-device-from-area) - - [Service: Add entity to area](#service-add-entity-to-area) - - [Service: Remove entity from area](#service-remove-entity-from-area) - - [Service: Delete area](#service-delete-area) - - [Service: Create repair issue](#service-create-repair-issue) - - [Service: Remove repair issue](#service-remove-repair-issue) - - [Service: Ignore all repair issues](#service-ignore-all-repair-issues) - - [Service: Unignore all repair issues](#service-unignore-all-repair-issues) - - [Service: Restart Home Assistant (with force option)](#service-restart-home-assistant-with-force-option) - - [Service: Boo! πŸ‘»](#service-boo-) - - [Service: Random fail](#service-random-fail) -- [Entity services](#entity-services) - - [Service for `input_number`: Decrease value](#service-for-input_number-decrease-value) - - [Service for `input_number`: Increase value](#service-for-input_number-increase-value) - - [Service for `input_number`: Min value](#service-for-input_number-min-value) - - [Service for `input_number`: Max value](#service-for-input_number-max-value) - - [Service for `input_select`: Select random option](#service-for-input_select-select-random-option) - - [Service for `input_select`: Shuffle options](#service-for-input_select-shuffle-options) - - [Service for `input_select`: Sort options](#service-for-input_select-sort-options) - - [Service for `number`: Decrease value](#service-for-number-decrease-value) - - [Service for `number`: Increase value](#service-for-number-increase-value) - - [Service for `number`: Min value](#service-for-number-min-value) - - [Service for `number`: Max value](#service-for-number-max-value) - - [Service for `select`: Select random option](#service-for-select-select-random-option) -- [Repairs](#repairs) - - [Automations: Find use of non-existing areas, devices and entities](#automations-find-use-of-non-existing-areas-devices-and-entities) - - [Groups: Detect unknown group members](#groups-detect-unknown-group-members) - - [Riemann sum integral: Detect missing source sensor](#riemann-sum-integral-detect-missing-source-sensor) - - [Scripts: Find use of non-existing areas, devices and entities](#scripts-find-use-of-non-existing-areas-devices-and-entities) - - [Switch as X: Detect missing source switch](#switch-as-x-detect-missing-source-switch) -- [Previously part of Spook](#previously-part-of-spook) - - [Obsolete integration \& platform YAML configuration repairs](#obsolete-integration--platform-yaml-configuration-repairs) -- [Frequently Asked Questions](#frequently-asked-questions) - - [Is this a serious thing?](#is-this-a-serious-thing) - - [Why is Spook called Spook?](#why-is-spook-called-spook) - - [Does this integration break my Home Assistant instance?](#does-this-integration-break-my-home-assistant-instance) - - [Does Spook do random things to my home?](#does-spook-do-random-things-to-my-home) - - [Ok, so should I use Spook?](#ok-so-should-i-use-spook) -- [Translating Spook](#translating-spook) -- [Changelog \& Releases](#changelog--releases) -- [Contributing](#contributing) -- [Authors \& contributors](#authors--contributors) -- [Disclaimer](#disclaimer) -- [License](#license) - -# Installation - -[![Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.](https://my.home-assistant.io/badges/hacs_repository.svg)](https://my.home-assistant.io/redirect/hacs_repository/?owner=frenck&repository=spook&category=integration) - -You can find it in the HACS store by searching for "Spook", but you shoudn't. -You could manually add this repository to HACS, but you shouldn't. You can -also install it manually by copying the `spook` folder into your -`custom_components` folder, but you shouldn't. - -Just don't. - -# Configuration - -[![Open your Home Assistant instance and start setting up a new integration.](https://my.home-assistant.io/badges/config_flow_start.svg)](https://my.home-assistant.io/redirect/config_flow_start/?domain=spook) - -You shouldn't. - -# Entities - -This integration will provide you with entities you'd absolutely do not need. -All of them are enabled by default to ensure you have a bad time, straight -of the box. - -## Buttons - -- **Reload Home Assistant**: Wut, you are still using YAML? _#GodWhy?_ -- **Restart Home Assistant**: Have you tried turning it off and on again? _#ITCrowd_ - -## Sensors - -- **Total number of entities**: To show your friends how big your setup is. _#compensation_ -- **Number of entities for each entity type**: So you know how many lightbulbs you have. _#count_ - - Number of `air_quality` entities. - - Number of `alarm_control_panel` entities. - - Number of `binary_sensor` entities. - - Number of `button` entities. - - Number of `camera` entities. - - Number of `climate` entities. - - Number of `cover` entities. - - Number of `date` entities. - - Number of `datetime` entities. - - Number of `device_tracker` entities. - - Number of `fan` entities. - - Number of `humidifier` entities. - - Number of `image` entities. - - Number of `input_boolean` entities. - - Number of `input_button` entities. - - Number of `input_number` entities. - - Number of `input_select` entities. - - Number of `input_text` entities. - - Number of `light` entities. - - Number of `lock` entities. - - Number of `media_player` entities. - - Number of `number` entities. - - Number of `remote` entities. - - Number of `select` entities. - - Number of `sensor` entities. - - Number of `siren` entities. - - Number of `stt` entities. - - Number of `switch` entities. - - Number of `text` entities. - - Number of `time` entities. - - Number of `tts` entities. - - number of `vacuum` entities. - - Number of `update` entities. - - Number of `water_heater` entities. - - Number of `weather` entities. -- **Number of areas**: In case you forgot how many rooms your house has. _#1_ -- **Number of automations**: Because that is such a useful metric. _#robots_ -- **Number of devices**: That are in the device registry. _#bling_ -- **Number of persons**: How many people are you constantly tracking the location of? _#privacy_ -- **Number of persistent notifications**: Are you just a persistent as this thing is? _#annoyance_ -- **Number of scenes**: Maybe you can ask your partner to make a scene... _#fight_ -- **Number of scripts**: More than the average unemployed actor yet? _#hollywood_ -- **Number of suns**: Answers how godlike you are. _#burn_ -- **Number of zones**: How many comfort zones you have on a map. _#zoneing_ -- **Number of integrations in use**: Consider using less integrations. _#lessismore_ -- **Number of custom integrations in use**: In this case... _#lessisevenmore_ (delete this one! πŸ™ƒ) - -## Switches - -- **Home Assistant Cloud**: Switch to control behavior of Nabu Casa's Home Assistant Cloud. _#love_ - - **Alexa**: Enable/disable Alexa connection. _#amazon_ - - **Alexa state reporting**: Enable/disable Alexa state reporting. _#ping_ - - **Google Assistant**: Enable/disable Google Assistant connection. _#bigtech_ - - **Google Assistant state reporting**: Enable/disable Google Assistant state reporting connection. _#pong_ - - **Remote**: Enable/disable remote access to the Home Asistant frontend. _#rdp_ - -# Services - -There are quite a few useless and horrible services available for you to explore -and self-destruct your setup with. The developer service tools are great -to get you into such a situation. - -[![Open your Home Assistant instance and show your service developer tools.](https://my.home-assistant.io/badges/developer_services.svg)](https://my.home-assistant.io/redirect/developer_services/) - -## Service: Import Blueprint - -Call it using: [`blueprint.import`](https://my.home-assistant.io/redirect/developer_call_service/?service=blueprint.import) - -> Downloads and imports a automation/script Blueprint, directly from the -> URL you pass into this service. _#noquestionsasked_ - -## Service: Disable an integration - -Call it using: [`homeassistant.disable_config_entry`](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.disable_config_entry) - -> This service can be used to disable a integration configuration entry (those -> you see on your integrations dashboard) on the fly. _#bye_ - -## Service: Enable an integration - -Call it using: [`homeassistant.enable_config_entry`](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.enable_config_entry) - -> Be amazed... this service does the reverse of [`homeassistant.disable_config_entry`](#service-disable-a-config-entry). _#mindblown_ - -## Service: Disable a device - -Call it using: [`homeassistant.disable_device`](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.disable_device) - -> This service can be used to disable a device on the fly. _#whatever_ - -## Service: Enable a device - -Call it using: [`homeassistant.enable_device`](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.enable_device) - -> Guess what... this service does the reverse of [`homeassistant.disable_device`](#service-disable-a-device). _#noway_ - -## Service: Disable an entity - -Call it using: [`homeassistant.disable_entity`](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.disable_entity) - -> This service can be used to disable a entity on the fly. _#rocketship_ - -## Service: Enable an entity - -Call it using: [`homeassistant.enable_entity`](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.enable_entity) - -> Really... this service does the reverse of [`homeassistant.disable_entity`](#service-disable-an-entity). _#true_ - -## Service: Hide an entity - -Call it using: [`homeassistant.hide_entity`](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.hide_entity) - -> This service can be used to hide a entity on the fly. _#secret_ - -## Service: Unhide an entity - -Call it using: [`homeassistant.unhide_entity`](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.unhide_entity) - -> Do the math... this service does the reverse of [`homeassistant.hide_entity`](#service-hide-an-entity). _#reveal_ - -## Service: Disable polling for updates - -Call it using: [`homeassistant.disable_polling`](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.disable_polling) - -> This service can be used to disable polling for updates on an integration -> configuration entry (those you see on your integrations dashboard). _#stopit_ - -## Service: Enable polling for updates - -Call it using: [`homeassistant.enable_polling`](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.enable_polling) - -> This service can be used to enable polling for updates on an integration -> configuration entry (those you see on your integrations dashboard). -> This service does the reverse of [`homeassistant.disable_polling`](#service-disable-polling) > _#poking_ - -## Service: Ignore all discovered devices & services - -Call it using: [`homeassistant.ignore_all_discovered`](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.ignore_all_discovered) - -> Click ignore on all discovered items on the integration dashboard; optionally -> only for specific integration (e.g., bluetooth). _#talktothehand_ - -## Service: Delete all orphaned entities - -Call it using: [`homeassistant.delete_all_orphaned_entities`](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.delete_all_orphaned_entities) - -> Deletes all orphaned entities that no longer have an integration that claim/provide -> them. Please note, if the integration was just removed, it might need a restart -> for Home Assistant to realize they are orphaned. _#annie_ - -> **WARNING** Entities might have been marked orphaned because an -> integration is offline or not working since Home Assistant started. Calling -> this service will delete those entities as well. - -## Service: Import statistics - -Call it using: [`recorder.import_statistics`](https://my.home-assistant.io/redirect/developer_call_service/?service=recorder.import_statistics) - -> Advanced service to directly inject historical statistics data into -> the recorder long-term stats database. _#easy_ - -## Service: Create area - -Call it using: [`homeassistant.create_area`](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.create_area) - -> Instantly create new rooms in your home. _#BobTheBuilder_ - -## Service: Add an alias to an area - -Call it using: [`homeassistant.add_alias_to_area`](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.add_alias_to_area) - -> Adds an alias (or multiple aliases) to an area. _#aka_ - -## Service: Remove an alias from an area - -Call it using: [`homeassistant.remove_alias_from_area`](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.remove_alias_from_area) - -> Removes an alias (or multiple aliases) from an area. _#broom_ - -## Service: Set area aliases - -Call it using: [`homeassistant.set_area_aliases`](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.set_area_aliases) - -> Sets the aliases for an area. _#useless_ - -## Service: Add device to area - -Call it using: [`homeassistant.add_device_to_area`](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.add_device_to_area) - -> Dynamicaly add/move a device to an new area. _#moveit_ - -## Service: Remove device from area - -Call it using: [`homeassistant.remove_device_from_area`](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.remove_device_from_area) - -> Dynamicaly remove a device from an area. _#poef_ - -## Service: Add entity to area - -Call it using: [`homeassistant.add_entity_to_area`](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.add_entity_to_area) - -> Dynamicaly add/move an entity to an area. _#bam_ - -## Service: Remove entity from area - -Call it using: [`homeassistant.remove_entity_from_area`](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.remove_entity_from_area) - -> Dynamicaly remove an entity from an area. _#AaaaandItIsGone_ - -## Service: Delete area - -Call it using: [`homeassistant.delete_area`](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.delete_area) - -> Just like that, you made an area of your home dissapear. _#DemolitionMan_ - -## Service: Create repair issue - -Call it using: [`repairs.create`](https://my.home-assistant.io/redirect/developer_call_service/?service=repairs.create) - -> Battery empty? Raise a issue in Home Assistant Repairs. Although, you -> should probably just use a notification for this. _#issues_ - -## Service: Remove repair issue - -Call it using: [`repairs.remove`](https://my.home-assistant.io/redirect/developer_call_service/?service=repairs.remove) - -> Removes a issue from Home Assistant Repairs. Can only remove repair issues -> that have been created using the `repairs.create` service. _#trashit_ - -## Service: Ignore all repair issues - -Call it using: [`repairs.ignore_all`](https://my.home-assistant.io/redirect/developer_call_service/?service=repairs.ignore_all) - -> Whatever issue is bothering you, just ignore it all and all your -> problems will magically be gone. _#allgood_ - -## Service: Unignore all repair issues - -Call it using: [`repairs.unignore_all`](https://my.home-assistant.io/redirect/developer_call_service/?service=repairs.unignore_all) - -> Will unignore all issues marked ignored, and shows them all again. _#faceit_ - -## Service: Restart Home Assistant (with force option) - -Call it using: [`homeassistant.restart`](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.restart) - -> Extends the existing restart service with an "force" option. Because forcing -> is always a good idea. _#hammer_ - -## Service: Boo! πŸ‘» - -Call it using: [`spook.boo`](https://my.home-assistant.io/redirect/developer_call_service/?service=spook.boo) - -> This service call will just always spook the hell out of Home Assistant. -> Home Assistant will shit its pants and abort the automation or script. _#spooked_ - -## Service: Random fail - -Call it using: [`spook.random_fail`](https://my.home-assistant.io/redirect/developer_call_service/?service=spook.random_fail) - -> This service call will randomly fail (and thus randomly stop your automation or -> script). Especially combined with `continue_on_error: true` this can be a great -> way add a useless service calls to your automation or script. _#random_ - -# Entity services - -Spook also extends the services available for entities. These services may -extend the functionality if entity components (like `select`) or platform -specific services provided by integrations. - -[![Open your Home Assistant instance and show your service developer tools.](https://my.home-assistant.io/badges/developer_services.svg)](https://my.home-assistant.io/redirect/developer_services/) - -## Service for `input_number`: Decrease value - -Call it using: [`input_number.decrement`](https://my.home-assistant.io/redirect/developer_call_service/?service=input_number.decrement) - -> Override of the existing service, which provides the option to specify -> the amount to decrease the value by. _#evenlower_ - -_Under consideration for contributing back to Home Assistant Core._ - -## Service for `input_number`: Increase value - -Call it using: [`input_number.increment`](https://my.home-assistant.io/redirect/developer_call_service/?service=input_number.increment) - -> Override of the existing service, which provides the option to specify -> the amount to increase the value by. _#moreoptions_ - -_Under consideration for contributing back to Home Assistant Core._ - -## Service for `input_number`: Min value - -Call it using: [`input_number.min`](https://my.home-assistant.io/redirect/developer_call_service/?service=input_number.min) - -> Set the value of a `input_number` entity to its minimum value/ _#lowout_ - -## Service for `input_number`: Max value - -Call it using: [`input_number.max`](https://my.home-assistant.io/redirect/developer_call_service/?service=input_number.max) - -> Set the value of a `input_number` entity to the maximum value. _#maxout_ - -## Service for `input_select`: Select random option - -Call it using: [`input_select.random`](https://my.home-assistant.io/redirect/developer_call_service/?service=input_select.random) - -> This service select a random option from the list of options of a select entity. -> Optionally this can be limited to a set of given options. _#shuffle_ - -## Service for `input_select`: Shuffle options - -Call it using: [`input_select.shuffle`](https://my.home-assistant.io/redirect/developer_call_service/?service=input_select.shuffle) - -> Shuffles the list of selectable options for an `input_select` entity. -> Note: This is not persistent and will be undone once reloaded or -> Home Assistant restarts. _#31254_ - -## Service for `input_select`: Sort options - -Call it using: [`input_select.sort`](https://my.home-assistant.io/redirect/developer_call_service/?service=input_select.sort) - -> Sorts the list of selectable options for an `input_select` entity. -> Note: This is not persistent and will be undone once reloaded or -> Home Assistant restarts. _#12345_ - -## Service for `number`: Decrease value - -Call it using: [`number.decrement`](https://my.home-assistant.io/redirect/developer_call_service/?service=number.decrement) - -> Decrease the value of a number entity, either by a single step or by a -> provided amount. _#downboy_ - -_Under consideration for contributing back to Home Assistant Core._ - -## Service for `number`: Increase value - -Call it using: [`number.increment`](https://my.home-assistant.io/redirect/developer_call_service/?service=number.increment) - -> Increase the value of a number entity, either by a single step or by a -> provided amount. _#up #greatmovie_ - -_Under consideration for contributing back to Home Assistant Core._ - -## Service for `number`: Min value - -Call it using: [`number.min`](https://my.home-assistant.io/redirect/developer_call_service/?service=number.min) - -> Set the value of a number entity to its minimum value. _#lowout_ - -## Service for `number`: Max value - -Call it using: [`number.max`](https://my.home-assistant.io/redirect/developer_call_service/?service=number.max) - -> Set the value of a number entity to the maximum value. _#maxout_ - -## Service for `select`: Select random option - -Call it using: [`select.random`](https://my.home-assistant.io/redirect/developer_call_service/?service=select.random) - -> This service select a random option from the list of options of a select entity. -> Optionally this can be limited to a set of given options. _#random_ - -# Repairs - -Spook will float around your Home Assistant instance, and while it does, it -might be able to find things that need your attention. Spook will notify you -about these things using an Home Assistant repair issue. _#whoyougonnacall_ - -[![Open your Home Assistant instance and show your repairs.](https://my.home-assistant.io/badges/repairs.svg)](https://my.home-assistant.io/redirect/repairs/) - -Currently Spook will detect the following issues: - -## Automations: Find use of non-existing areas, devices and entities - -> Finds automations that use non-existing areas, devices or entities in, for -> example, their service calls. _#springcleaning_ - -_Intention to contribute back to Home Assistant Core once sure no false -postives remain, and it has been extended to catch more situations._ - -## Groups: Detect unknown group members - -> Finds groups that contain references to unknown members (entities). _#aliens_ - -_Intention to contribute back to Home Assistant Core._ - -## Riemann sum integral: Detect missing source sensor - -> Finds integrals that are missing a source sensor. _#missinglink_ - -_Intention to contribute back to Home Assistant Core._ - -## Scripts: Find use of non-existing areas, devices and entities - -> Finds scripts that use non-existing areas, devices or entities in, for -> example, their service calls. _#void_ - -_Intention to contribute back to Home Assistant Core once sure no false -postives remain, and it has been extended to catch more situations._ - -## Switch as X: Detect missing source switch - -> Finds Switch as X helpers that are missing a source switch. _#NotendoSwitch_ - -_Intention to contribute back to Home Assistant Core._ - -# Previously part of Spook - -Some of the amazing things Spook does, may turn out to be actually pretty good -and have eventually end up into Home Assistant natively, or, became obsolete -because of similar features they added. - -So here is a list of things that have been removed from Spook πŸ‘» _#loser_ - -## Obsolete integration & platform YAML configuration repairs - -> Find YAML configuration for an integrations (and older integration platforms) -> that no longer support it. - -As of Home Assistant 2023.5 (refined in 2023.6), Home Assistant will raise -repair issues for these cases itself. - -# Frequently Asked Questions - -In the first few days after putting Spook out, some of the same questions -kept popping up. So, here are some answers to those questions. - -## Is this a serious thing? - -Yes! It is just not a normal integration, like one that connects to a device or -service, or one that provides a helper of some sort. But it is a serious -integration, that is meant to be used in a serious way. - -## Why is Spook called Spook? - -I (Frenck) am Dutch. I grew up with "Casper het vriendelijke spookje", also -known as "Casper the friendly ghost". "Spook" is the Dutch for "ghost". - -Casper is scary at first sight, but you could really love him in the end. Which -seems fitting for a custom integration, as custom integrations are more likely -to break, thus being a little scared of them is not a bad thing. - -"Not your homie" is a refence to my the livestreams I used to do. I called my -viewers "My Home Assistant Homies", or just "Homies". It is thus referring -to you, the Home Assistant user, as my friend, my homie. However, "Spook" is -not your homie, it is a ghost, a spooky thing, he is suposed to make you think -a little about what you are doing before you use it. - -Nice little fact, I did use "homey" at first (to maybe annoy the Homey users a -bit in SEO), but I decided not to be that _badword_ and to change it back to -just "homie". - -Lastly, the little ghost logo & use of the emoji. This is great inspiration -from the Mushroom card project (I love it!). They use a simple mushroom emoji -and you see it everywhere in the Home Assistant community, thus decided to do -a similar thing. - -## Does this integration break my Home Assistant instance? - -Well, that is not the goal of course. But, it is a custom integration, so -there is a chance it might break your instance. This applies to any custom -integration, not just Spook. - -I'm just sharing what I have, without any warranty. I've decided to be blunt -about it, and make it at least fun to read. I could have written a small -warning, that would have been boring. - -## Does Spook do random things to my home? - -No. It does not do random things. It is not a chaos testing thing and -it will not turn lights on/off randomly in the night. Unless it is a bug -or broken of course. - -## Ok, so should I use Spook? - -No! The license doesn't allow that (see below). - -# Translating Spook - -Spook isn't very good at speaking different languages, but you can help! - -As a matter of fact, Spooks translation files are [CC0 licensed](./custom_components/spook/translations/LICENSE.md)! - -Translating can be done from your webbrowser, no programming knowledge -is needed! - -[![Translation status](https://hosted.weblate.org/widgets/spook/-/integration/open-graph.png)](https://hosted.weblate.org/engage/spook/) - -Translation status per language: - -[![Translation status](https://hosted.weblate.org/widgets/spook/-/integration/multi-auto.svg)](https://hosted.weblate.org/engage/spook/) - -# Changelog & Releases - -This repository does not keep a change log using [GitHub's releases][releases] -functionality. The format of the log is based on the direction the wind blows. - -Releases use a [Semantic Versioning][semver], compatible version number of -`MAJOR.MINOR.PATCH`, as that is required for Home Assistant. In a nutshell, -the version will be incremented based on the following: - -- `MAJOR`: If there is almost nothing changed. -- `MINOR`: I have no idea, possibily breaking. -- `PATCH`: I didn't care enough to change more numbers. +This custom integration is provided as-is, without any warranty or support. +If you experience issues with this integration, or as a result of this +integration, please go cry a lot on your own. # Contributing -We've set up a separate document for our -[contribution guidelines](CONTRIBUTING.md). +We've set up a separate document for our [contribution guidelines](https://spook.frenck.dev/development). # Authors & contributors The original setup of this repository is by [Franck Nijhof][frenck]. -For a full list of all authors and contributors, -check [the contributor's page][contributors]. - -# Disclaimer +Thanks to everyone who already contributed! ❀️ -At this point, I guess it goes without saying that this integration is -not affiliated with, endorsed or recommended by the Home Assistant project. + + + -**It is not supported by the Home Assistant project.** - -If you experience issues with this integration, or as a result -of this integration, please go cry a lot on your own. _#sorrynotsorry_ +For a full list of all authors and contributors, +check [the contributor's page][contributors]. # License diff --git a/custom_components/spook/manifest.json b/custom_components/spook/manifest.json index cdd4e100..9ef3fe20 100644 --- a/custom_components/spook/manifest.json +++ b/custom_components/spook/manifest.json @@ -14,7 +14,7 @@ "repairs", "select" ], - "documentation": "https://github.com/frenck/spook", + "documentation": "https://spook.frenck.dev", "integration_type": "hub", "iot_class": "local_push", "issue_tracker": "https://github.com/frenck/spook/issues", diff --git a/documentation/_toc.yml b/documentation/_toc.yml index 6d0d1adc..31271d0b 100644 --- a/documentation/_toc.yml +++ b/documentation/_toc.yml @@ -1,6 +1,67 @@ format: jb-book root: index parts: + - caption: Getting started πŸš€ + chapters: + - file: about + - file: installation + - file: usage + - file: features + - file: support + + - caption: Features + chapters: + - file: core_extensions + - file: enhanced_integrations + - file: other_features + + - caption: Core extensions + chapters: + - file: integrations + - file: devices + - file: entities + - file: areas + - file: devices_entities + - file: misc + + - caption: Enhanced integrations + chapters: + - file: integrations/automation + - file: integrations/blueprint + - file: integrations/lovelace + - file: integrations/group + - file: integrations/cloud + - file: integrations/input_number + - file: integrations/input_select + - file: integrations/number + - file: integrations/recorder + - file: integrations/repairs + - file: integrations/integration + - file: integrations/script + - file: integrations/select + - file: integrations/switch_as_x + + # - caption: Tutorials + # chapters: + # - file: ectoplasms + - caption: Reference chapters: + - file: services + - file: blueprints - file: glossary + + - caption: About the project + chapters: + - file: media + - file: background_and_history + - file: faq + - file: previous_features + - file: development + - file: security + + - caption: Boring stuff + chapters: + - file: disclaimers + - file: code_of_conduct + - file: license diff --git a/documentation/about.md b/documentation/about.md new file mode 100644 index 00000000..00ab1a65 --- /dev/null +++ b/documentation/about.md @@ -0,0 +1,61 @@ +--- +subject: Getting started +title: Hi! I'm Spook πŸ‘» +short_title: About +subtitle: A scary powerful toolbox for Home Assistant. +thumbnail: images/social.png +description: Spook is a scary powerful toolbox for Home Assistant, that extend native functionality and adds new features to the core of Home Assistant. +date: 2023-08-09T21:29:00+02:00 +--- + +Hi! I'm Spook πŸ‘» and I'm a {term}`custom integration ` for use with {term}`Home Assistant`. I will extend your Home Assistant instance with a huge set of scary powerful tools. πŸ› οΈ + +:::{warning} Just to be clear from the very start... +**Spook is not supported by the Home Assistant project.** + +This custom integration is provided as-is, without any warranty or support, and above all, has a very [restrictive license](license). + +If you experience issues with this integration or as a result of this integration, please go cry a lot on your own. After ignoring this warning, you will not be provided with a tissue to dry up your tears when you are crying in a fetal position under your desk. + +I've warned you. + +../Frenck +::: + +# Cool, but what does it do? + +So, there are a lot of things/features that will never end up in Home Assistant itself. + +This can have various reasons. For example, it is just too random, out of scope, not matching the Home Assistant philosophy, violates architectural design, is still in early development, experimental, explorative, or just freaking useless. + +Spook doesn't care. He is nobodies homie. + +So, maybe, that one feature you wanted Home Assistant to have, is in the toolbox provided by Spook. All stuff in here, is not part of Home Assistant (or at least not yet) for a reason. So, don't expect it to work, or to be supported, or, well, for starters, to be a good idea. + +All that said, Spook is a scary powerful toolbox for Home Assistant, but be aware, Spook is not your homie! + +# What do I get from Spook? + +Spook will add new features to Home Assistant and extend existing ones. + +For example, Spook will add new features to existing {term}`services ` that you can use in your {term}`automations ` and scripts. It will also add lots of new ones. + +Spook will also add new {term}`entities ` to existing integration you use in your Home Assistant instance to provide more data points to monitor and control. For example, it will add entities to control and monitor your {term}`Home Assistant Cloud` connection. + +Finally, Spook will constantly float around in your Home Assistant, and if it finds potential issues along the way, it will report them to you. For example, if you are using a non-existing entity in your automations, Spook will let you know by raising an issue on your {term}`repairs dashboard `. + +Spook πŸ‘» will extend your Home Assistant instance with a huge set of scary powerful tools. πŸ› οΈ + +# Sounds scary. I'm out! + +Understood. Using the least amount of custom integrations is always the best way to go. So, if you are uncomfortable with this, don't use Spook. + +Don't worry, it won't bite, and it will not deliberately break your Home Assistant system. It is just not supported, and it is not part of Home Assistant. So, if you want to use it, you are on your own. + +# I like to learn more first + +Even better, maybe check out the [](background_and_history) page to learn more about the background and history of Spook. The [](faq) page might also be a good place to start. + +# I'm in! How do I install it? + +Follow the instructions on the dedicated page for that: [](installation). diff --git a/documentation/areas.md b/documentation/areas.md new file mode 100644 index 00000000..80f2adfa --- /dev/null +++ b/documentation/areas.md @@ -0,0 +1,758 @@ +--- +subject: Core extensions +title: Areas management +subtitle: Is there room for one more? +date: 2023-08-09T21:29:00+02:00 +--- + +{term}`Areas ` in {term}`Home Assistant` is a logical grouping of {term}`devices ` and {term}`entities ` that are meant to match the areas (or rooms) in the physical world: your home. + +Spook provides {term}`services ` that allows you to manage and {term}`automate ` the areas in Home Assisatant programatically. Great for creating "dynamic" areas, or for creating areas on the fly. + +```{figure} ./images/areas/example.png +:alt: Screenshot of the developer service tools, listing the new services to manage areas. +:align: center +``` + +## Services + +Spook adds the following new service to your Home Assistant instance: + +### Create an area + +Adds a new area to your Home Assistant instance. + +```{figure} ./images/areas/create.png +:alt: Screenshot of the create area service call in the developer tools. +:align: center +``` + +```{list-table} +:header-rows: 1 +* - Service properties +* - {term}`Service` + - Create an area πŸ‘» +* - {term}`Service name` + - `homeassistant.create_area` +* - {term}`Service targets` + - No +* - {term}`Service response` + - No response +* - {term}`Spook's influence` + - Newly added service +* - {term}`Developer tools` + - [Try this service](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.create_area) + [![Open your Home Assistant instance and show your service developer tools with a specific service selected.](https://my.home-assistant.io/badges/developer_call_service.svg)](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.create_area) +``` + +```{list-table} +:header-rows: 2 +* - Service call data +* - Attribute + - Type + - Required + - Default / Example +* - `name` + - {term}`string ` + - Yes + - `Living room` +* - `aliases` + - {term}`string ` | {term}`list of strings ` + - No + - `["Lounge", "Sitting area"]` +``` + +The use of `aliases` is helpful if you want to create an area with multiple names. For example, if you want to create an area called "Living room", but also want to be able to refer to it as "Sitting area" or "Lounge", you can add those names as aliases. This is used by Home Assistant Assist and Google Assistant. + +:::{seealso} Example {term}`service call ` in {term}`YAML` +:class: dropdown + +```{code-block} yaml +:linenos: +service: homeassistant.create_area +data: + name: "Living room" + aliases: + - "Lounge" + - "Sitting area" +``` + +::: + +### Delete an area + +Adds a new area to your Home Assistant instance. + +```{figure} ./images/areas/delete.png +:alt: Screenshot of the delete area service call in the developer tools. +:align: center +``` + +```{list-table} +:header-rows: 1 +* - Service properties +* - {term}`Service` + - Delete an area πŸ‘» +* - {term}`Service name` + - `homeassistant.delete_area` +* - {term}`Service targets` + - No +* - {term}`Service response` + - No response +* - {term}`Spook's influence` + - Newly added service +* - {term}`Developer tools` + - [Try this service](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.delete_area) + [![Open your Home Assistant instance and show your service developer tools with a specific service selected.](https://my.home-assistant.io/badges/developer_call_service.svg)](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.delete_area) +``` + +```{list-table} +:header-rows: 2 +* - Service call data +* - Attribute + - Type + - Required + - Default / Example +* - `area_id` + - {term}`string ` + - Yes + - `living_room` +``` + +:::{tip} Tip on getting an area ID from an area name +:class: dropdown + +Not sure what the `area_id` of an area is? The `area_id` field also accepts templates. You can use this template to use the area's name instead: + +```yaml +area_id: "{{ area_id('Living room') }}" +``` + +That template will find the area ID of the area with the name "Living room". +::: + +:::{seealso} Example {term}`service call ` in {term}`YAML` +:class: dropdown + +```{code-block} yaml +:linenos: +service: homeassistant.delete_area +data: + area_id: "living_room" +``` + +Same example, but using the area's name instead of the area ID: + +```{code-block} yaml +:linenos: +service: homeassistant.delete_area +data: + area_id: "{{ area_id('Living room') }}" +``` + +::: + +### Add an alias to an area + +Adds one or more aliases to an existing area. This service does not remove existing aliases, but adds the new ones to the existing ones. + +As area aliases are used by voice assistants, you could add (and also remove) aliases to an area using {term}`automations `, which allows you to make them available/unavailable programatically. + +```{figure} ./images/areas/add_alias.png +:alt: Screenshot of the add an alias to an area service call in the developer tools. +:align: center +``` + +```{list-table} +:header-rows: 1 +* - Service properties +* - {term}`Service` + - Add an alias to an area πŸ‘» +* - {term}`Service name` + - `homeassistant.add_alias_to_area` +* - {term}`Service targets` + - No +* - {term}`Service response` + - No response +* - {term}`Spook's influence` + - Newly added service +* - {term}`Developer tools` + - [Try this service](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.add_alias_to_area) + [![Open your Home Assistant instance and show your service developer tools with a specific service selected.](https://my.home-assistant.io/badges/developer_call_service.svg)](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.add_alias_to_area) +``` + +```{list-table} +:header-rows: 2 +* - Service call data +* - Attribute + - Type + - Required + - Default / Example +* - `area_id` + - {term}`string ` + - Yes + - `living_room` +* - `aliases` + - {term}`string ` | {term}`list of strings ` + - Yes + - `["Lounge", "Sitting area"]` +``` + +:::{tip} Tip on getting an area ID from an area name +:class: dropdown + +Not sure what the `area_id` of an area is? The `area_id` field also accepts templates. You can use this template to use the area's name instead: + +```yaml +area_id: "{{ area_id('Living room') }}" +``` + +That template will find the area ID of the area with the name "Living room". +::: + +:::{seealso} Example {term}`service call ` in {term}`YAML` +:class: dropdown + +```{code-block} yaml +:linenos: +service: homeassistant.add_alias_to_area +data: + area_id: "living_room" + aliases: + - "Lounge" + - "Sitting area" +``` + +Same example, but using the area's name instead of the area ID: + +```{code-block} yaml +:linenos: +service: homeassistant.add_alias_to_area +data: + area_id: "{{ area_id('Living room') }}" + aliases: + - "Lounge" + - "Sitting area" +``` + +::: + +### Remove an alias from an area + +Removes one or more aliases from an existing area. This service will leave the other aliases intact. + +As area aliases are used by voice assistants, you could remove (and also add) aliases to an area using {term}`automations `, which allows you to make them available/unavailable programatically. + +```{figure} ./images/areas/remove_alias.png +:alt: Screenshot of the remove an alias to an area service call in the developer tools. +:align: center +``` + +```{list-table} +:header-rows: 1 +* - Service properties +* - {term}`Service` + - Add an alias to an area πŸ‘» +* - {term}`Service name` + - `homeassistant.remove_alias_from_area` +* - {term}`Service targets` + - No +* - {term}`Service response` + - No response +* - {term}`Spook's influence` + - Newly added service +* - {term}`Developer tools` + - [Try this service](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.remove_alias_from_area) + [![Open your Home Assistant instance and show your service developer tools with a specific service selected.](https://my.home-assistant.io/badges/developer_call_service.svg)](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.remove_alias_from_area) +``` + +```{list-table} +:header-rows: 2 +* - Service call data +* - Attribute + - Type + - Required + - Default / Example +* - `area_id` + - {term}`string ` + - Yes + - `living_room` +* - `aliases` + - {term}`string ` | {term}`list of strings ` + - Yes + - `["Lounge", "Sitting area"]` +``` + +:::{tip} Tip on getting an area ID from an area name +:class: dropdown + +Not sure what the `area_id` of an area is? The `area_id` field also accepts templates. You can use this template to use the area's name instead: + +```yaml +area_id: "{{ area_id('Living room') }}" +``` + +That template will find the area ID of the area with the name "Living room". +::: + +:::{seealso} Example {term}`service call ` in {term}`YAML` +:class: dropdown + +```{code-block} yaml +:linenos: +service: homeassistant.remove_alias_from_area +data: + area_id: "living_room" + aliases: + - "Lounge" + - "Sitting area" +``` + +Same example, but using the area's name instead of the area ID: + +```{code-block} yaml +:linenos: +service: homeassistant.remove_alias_from_area +data: + area_id: "{{ area_id('Living room') }}" + aliases: + - "Lounge" + - "Sitting area" +``` + +::: + +### Set aliases for an area + +Sets the aliases for an area. This service will overwrite/remove all existing aliases. + +As area aliases are used by voice assistants, you could remove (and also add) aliases to an area using {term}`automations `, which allows you to make them available/unavailable programatically. + +```{figure} ./images/areas/set_aliases.png +:alt: Screenshot of the set aliases to for an area service call in the developer tools. +:align: center +``` + +```{list-table} +:header-rows: 1 +* - Service properties +* - {term}`Service` + - Sets aliases for an area πŸ‘» +* - {term}`Service name` + - `homeassistant.set_area_aliases` +* - {term}`Service targets` + - No +* - {term}`Service response` + - No response +* - {term}`Spook's influence` + - Newly added service +* - {term}`Developer tools` + - [Try this service](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.set_area_aliases) + [![Open your Home Assistant instance and show your service developer tools with a specific service selected.](https://my.home-assistant.io/badges/developer_call_service.svg)](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.set_area_aliases) +``` + +```{list-table} +:header-rows: 2 +* - Service call data +* - Attribute + - Type + - Required + - Default / Example +* - `area_id` + - {term}`string ` + - Yes + - `living_room` +* - `aliases` + - {term}`string ` | {term}`list of strings ` + - Yes + - `["Lounge", "Sitting area"]` +``` + +:::{tip} Tip on getting an area ID from an area name +:class: dropdown + +Not sure what the `area_id` of an area is? The `area_id` field also accepts templates. You can use this template to use the area's name instead: + +```yaml +area_id: "{{ area_id('Living room') }}" +``` + +That template will find the area ID of the area with the name "Living room". +::: + +:::{seealso} Example {term}`service call ` in {term}`YAML` +:class: dropdown + +```{code-block} yaml +:linenos: +service: homeassistant.set_area_aliases +data: + area_id: "living_room" + aliases: + - "Lounge" + - "Sitting area" +``` + +Same example, but using the area's name instead of the area ID: + +```{code-block} yaml +:linenos: +service: homeassistant.set_area_aliases +data: + area_id: "{{ area_id('Living room') }}" + aliases: + - "Lounge" + - "Sitting area" +``` + +::: + +### Add a device to an area + +Adds one or more device(s) to an area. This service will leave the other devices in the area untouched. + +```{figure} ./images/areas/add_device.png +:alt: Screenshot of the add a device to an area service call in the developer tools. +:align: center +``` + +```{list-table} +:header-rows: 1 +* - Service properties +* - {term}`Service` + - Add a device to an area πŸ‘» +* - {term}`Service name` + - `homeassistant.add_device_to_area` +* - {term}`Service targets` + - No +* - {term}`Service response` + - No response +* - {term}`Spook's influence` + - Newly added service +* - {term}`Developer tools` + - [Try this service](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.add_device_to_area) + [![Open your Home Assistant instance and show your service developer tools with a specific service selected.](https://my.home-assistant.io/badges/developer_call_service.svg)](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.add_device_to_area) +``` + +```{list-table} +:header-rows: 2 +* - Service call data +* - Attribute + - Type + - Required + - Default / Example +* - `area_id` + - {term}`string ` + - Yes + - `living_room` +* - `device_id` + - {term}`string ` | {term}`list of strings ` + - Yes + - `dc23e666e6100f184e642a0ac345d3eb` +``` + +:::{tip} Tip on getting an area ID from an area name +:class: dropdown + +Not sure what the `area_id` of an area is? The `area_id` field also accepts templates. You can use this template to use the area's name instead: + +```yaml +area_id: "{{ area_id('Living room') }}" +``` + +That template will find the area ID of the area with the name "Living room". +::: + +:::{tip} Tip on finding a device ID +:class: dropdown + +Not sure what the `device_id` of an your device is? There are a few ways to find it: + +Use this service in the developer tools, in the UI select the device you want to add and select the **Go to YAML mode** button. This will show you the device ID in the YAML code. + +Alternatively, you can visit the device page in the UI and look at the URL. The device ID is the last part of the URL, and will look something like this: `dc23e666e6100f184e642a0ac345d3eb`. +::: + +:::{seealso} Example {term}`service call ` in {term}`YAML` +:class: dropdown + +```{code-block} yaml +:linenos: +service: homeassistant.add_device_to_area +data: + area_id: "living_room" + device_id: "dc23e666e6100f184e642a0ac345d3eb" +``` + +Same example, but using the area's name instead of the area ID: + +```{code-block} yaml +:linenos: +service: homeassistant.set_area_aliases +data: + area_id: "{{ area_id('Living room') }}" + device_id: "dc23e666e6100f184e642a0ac345d3eb" +``` + +To add multiple device at once, use a list of device IDs: + +```{code-block} yaml +:linenos: +service: homeassistant.add_device_to_area +data: + area_id: "living_room" + device_id: + - "dc23e666e6100f184e642a0ac345d3eb" + - "df98a97c9341a0f184e642a0ac345d3b" +``` + +::: + +### Remove a device from an area + +Removes one or more device(s) from an area. This service will leave the other devices in the area untouched. + +```{figure} ./images/areas/remove_device.png +:alt: Screenshot of the add a device to an area service call in the developer tools. +:align: center +``` + +```{list-table} +:header-rows: 1 +* - Service properties +* - {term}`Service` + - Remove a device from an area πŸ‘» +* - {term}`Service name` + - `homeassistant.remove_device_from_area` +* - {term}`Service targets` + - No +* - {term}`Service response` + - No response +* - {term}`Spook's influence` + - Newly added service +* - {term}`Developer tools` + - [Try this service](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.remove_device_from_area) + [![Open your Home Assistant instance and show your service developer tools with a specific service selected.](https://my.home-assistant.io/badges/developer_call_service.svg)](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.remove_device_from_area) +``` + +```{list-table} +:header-rows: 2 +* - Service call data +* - Attribute + - Type + - Required + - Default / Example +* - `device_id` + - {term}`string ` | {term}`list of strings ` + - Yes + - `dc23e666e6100f184e642a0ac345d3eb` +``` + +:::{note} This service does not need an area ID +:class: dropdown + +While this service is area related, it does not need to know the area ID. A device can only be in a single area at a time, so it will remove the device from the area it is in. Hence, it only needs to know the device you want to remove from an area. +::: + +:::{tip} Tip on finding a device ID +:class: dropdown + +Not sure what the `device_id` of an your device is? There are a few ways to find it: + +Use this service in the developer tools, in the UI select the device you want to add and select the **Go to YAML mode** button. This will show you the device ID in the YAML code. + +Alternatively, you can visit the device page in the UI and look at the URL. The device ID is the last part of the URL, and will look something like this: `dc23e666e6100f184e642a0ac345d3eb`. +::: + +:::{seealso} Example {term}`service call ` in {term}`YAML` +:class: dropdown + +```{code-block} yaml +:linenos: +service: homeassistant.remove_device_from_area +data: + device_id: "dc23e666e6100f184e642a0ac345d3eb" +``` + +To remove multiple devices at once, use a list of device IDs: + +```{code-block} yaml +:linenos: +service: homeassistant.remove_device_from_area +data: + device_id: + - "dc23e666e6100f184e642a0ac345d3eb" + - "df98a97c9341a0f184e642a0ac345d3b" +``` + +::: + +### Add an entity to an area + +Adds one or more entities to an area. This service will leave the other entities in the area untouched. + +```{figure} ./images/areas/add_entity.png +:alt: Screenshot of the add an entity to an area service call in the developer tools. +:align: center +``` + +```{list-table} +:header-rows: 1 +* - Service properties +* - {term}`Service` + - Add an entity to an area πŸ‘» +* - {term}`Service name` + - `homeassistant.add_entity_to_area` +* - {term}`Service targets` + - No +* - {term}`Service response` + - No response +* - {term}`Spook's influence` + - Newly added service +* - {term}`Developer tools` + - [Try this service](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.add_entity_to_area) + [![Open your Home Assistant instance and show your service developer tools with a specific service selected.](https://my.home-assistant.io/badges/developer_call_service.svg)](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.add_entity_to_area) +``` + +```{list-table} +:header-rows: 2 +* - Service call data +* - Attribute + - Type + - Required + - Default / Example +* - `area_id` + - {term}`string ` + - Yes + - `living_room` +* - `entity_id` + - {term}`string ` | {term}`list of strings ` + - Yes + - `light.spotlight` +``` + +:::{tip} Tip on getting an area ID from an area name +:class: dropdown + +Not sure what the `area_id` of an area is? The `area_id` field also accepts templates. You can use this template to use the area's name instead: + +```yaml +area_id: "{{ area_id('Living room') }}" +``` + +That template will find the area ID of the area with the name "Living room". +::: + +:::{seealso} Example {term}`service call ` in {term}`YAML` +:class: dropdown + +```{code-block} yaml +:linenos: +service: homeassistant.add_entity_to_area +data: + area_id: "living_room" + entity_id: light.spotlight +``` + +Same example, but using the area's name instead of the area ID: + +```{code-block} yaml +:linenos: +service: homeassistant.add_entity_to_area +data: + area_id: "{{ area_id('Living room') }}" + entity_id: light.spotlight +``` + +To add multiple entities at once, use a list of device IDs: + +```{code-block} yaml +:linenos: +service: homeassistant.add_entity_to_area +data: + area_id: "living_room" + entity_id: + - light.spotlight + - light.ceiling +``` + +::: + +### Remove an entity from an area + +Removes one or more device(s) from an area. This service will leave the other devices in the area untouched. + +```{figure} ./images/areas/remove_entity.png +:alt: Screenshot of the add a device to an area service call in the developer tools. +:align: center +``` + +```{list-table} +:header-rows: 1 +* - Service properties +* - {term}`Service` + - Remove an entity from an area πŸ‘» +* - {term}`Service name` + - `homeassistant.remove_entity_from_area` +* - {term}`Service targets` + - No +* - {term}`Service response` + - No response +* - {term}`Spook's influence` + - Newly added service +* - {term}`Developer tools` + - [Try this service](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.remove_entity_from_area) + [![Open your Home Assistant instance and show your service developer tools with a specific service selected.](https://my.home-assistant.io/badges/developer_call_service.svg)](https://my.home-assistant.io/redirect/developer_call_service/?service=homeassistant.remove_entity_from_area) +``` + +```{list-table} +:header-rows: 2 +* - Service call data +* - Attribute + - Type + - Required + - Default / Example +* - `entity_id` + - {term}`string ` | {term}`list of strings ` + - Yes + - `light.spotlight` +``` + +:::{note} This service does not need an area ID +:class: dropdown + +While this service is area related, it does not need to know the area ID. An entity can only be in a single area at a time, so it will remove the entity from the area it is in. Hence, it only needs to know the entity you want to remove from an area. +::: + +:::{seealso} Example {term}`service call ` in {term}`YAML` +:class: dropdown + +```{code-block} yaml +:linenos: +service: homeassistant.remove_entity_from_area +data: + entity_id: light.spotlight +``` + +To remove multiple entities at once, use a list of entity IDs: + +```{code-block} yaml +:linenos: +service: homeassistant.remove_entity_from_area +data: + entity_id: + - light.spotlight + - light.ceiling +``` + +::: + +## Blueprints & tutorials + +There are currently no known {term}`blueprints ` or tutorials for the enhancements Spook provides for this integration. If you created one or stumbled upon one, [please let us know in our discussion forums](https://github.com/frenck/spook/discussions). + +## Features requests, ideas and support + +If you have an idea on how to further enhance this integration, for example, by adding a new service, entity, or repairs detection; feel free to [let us know in our discussion forums](https://github.com/frenck/spook/discussions). + +Are you stuck using these new features? Or maybe you've run into a bug? Please check the [](../support) page on where to go for help. diff --git a/documentation/background_and_history.md b/documentation/background_and_history.md new file mode 100644 index 00000000..92a81e01 --- /dev/null +++ b/documentation/background_and_history.md @@ -0,0 +1,61 @@ +--- +subject: About the project +title: Background and the history of Spook πŸ‘» +short_title: Background & History +subtitle: Every story has a beginning. +thumbnail: images/social.png +description: The background and history of Spook, the custom integration that provides a scary powerful toolbox for Home Assistant. +date: 2023-08-09T21:29:00+02:00 +--- + +Spook is a project created and started by [Franck Nijhof](https://github.com/frenck) (better known as Frenck) on [February the 23rd of 2023](https://github.com/frenck/spook/commit/67803faf19bca7c8543e0865e1dba58755315652). + +## About the author + +Frenck is a {term}`Home Assistant` enthusiast and has been in the community since 2016. He is a member of the Home Assistant project and has worked on many Home Assistant-related projects since then. + +In 2019, Frenck was hired by [Nabu Casa](https://www.nabucasa.com) to work full-time on Home Assistant and related projects. + +## How Spook was born + +Frenck reviews many contributions and is heavily involved in the architectural design of Home Assistant. Some contributions, ideas, or architectural design proposals are not accepted or implemented in Home Assistant. + +This is not because they are bad, but because they do not fit the scope of Home Assistant, or maybe because they impose too much of a risk or burden on the Home Assistant project. + +Whatever the reason may be for features not being added to Home Assistant, there is still a strong wish for some of these features to exist by the Home Assistant community. + +Frenck felt the need to fill this gap and started working on a solution, and Spook was born. + +Spook is a {term}`custom integration ` created to fill the gap between Home Assistant and the community's wishes in a way. It is a toolbox of features that are not part of Home Assistant itself but that are still useful to some. + +Along the way, it also became a place for experimental features that might end up in Home Assistant one day. They are useable but not perfect enough yet. + +## Why the name Spook? + +Frenck is [Dutch](wiki:The_Netherlands) and grew up with "Casper het vriendelijke spookje", also known as . "Spook" is the Dutch for "ghost". + +Casper is scary at first sight, but you quickly get to like him. This seems fitting for a {term}`custom integration `, as custom integrations are more likely to break.T thus being a little scared of them is not a bad thing. + +"Not your homie" is a reference to the live streams Frenck used to do. He called his viewers "My Home Assistant Homies", or just "Homies". It is thus referring to you, the Home Assistant user, as its friend, its homie. However, "Spook" is not your homie. He is a ghost, a spooky thing. He is supposed to make you think a little about what you are doing before you use it. + +Nice little fact, it used to be "homey" at first (to maybe annoy the [Homey](https://homey.app) users a bit in SEO), but I decided not to be that _\*\*bad word\*\*_ and to change it back to just "homie". + +Lastly, the little ghost logo & use of the emoji. This is a great inspiration that I took from the [πŸ„ Mushroom card project](https://github.com/piitaya/lovelace-mushroom) (I love it! ❀️). They use a simple mushroom emoji, and you see it everywhere in the Home Assistant community, thus decided to do a similar thing. + +## Goals of Spook + +The goal of Spook is fairly simple: [**be the rebel**](wiki:rebel). + +Spook is here to be the rebel, the one that does not care about the rules, the one that does not care about the architectural design and the one that does not care about the philosophy of the {term}`Home Assistant` project. + +It aims to: + +- Add new services to existing Home Assistant {term}`integrations `, providing control of features you can use in your {term}`automations ` and {term}`scripts