* Add support for notifying with Slack messages.
When creating notifications, this allows you to pass in `attachments`
with the `data`. It's an array of attachments as defined in
https://api.slack.com/docs/message-attachments
When passing in attachments, message is still required, but it's okay to
be a blank string.
* Split over multiple lines
* Make sure attachments gets assigned, even if there isn't attachment data
* Added support for serial HM-Z19 CO2 sensor
* Minor pylint bug fixes
* Added new files to .coveragerc
* Removed newline
* Changes in requirements after change of pmsensor library
* Change the implementation of default name
* Check if serial interface is working before adding the sensor
* Maximum sensor value is 5000ppm
The repository already merged the pull request adding python3 support.
root is no longer required to use the gpio.
Signed-off-by: Roi Dayan <roi.dayan@gmail.com>
* Clean-up, ordering, constants, and extend of schema
* Put REQUIREMENTS back and re-add line breaks
* Clean-up, ordering, constants, and extend of schema
* Extend platform
* Move secret cache out of loader so it can be referenced by other folders
* Unit test to verify secrets from another folder work & see if it overrides parent secret
* Clear secret cache after load
Current documentation suggests to use personal API tokens. This isn't
ideal because for a few reasons:
* messages will come as your own user, so it's hard to tell it's coming
from hass
* it's harder to manage if multiple people are using Slack and home
* assistant, since you'd have to coordinate rolling of it
It is possible to use Slack bot users already. Just make a new one from https://your-team.slack.com/apps/build/custom-integration, and use the token for that. You can even add an icon from the web frontend for home assistant.
However, the message will appear as a bot without a name or icon. This pull requests fixes this by passing the as_user parameter, which uses the bot user's name and icon.
One caveat is you need to invite the bot user into the room you want to
post to. This probably was an issue before though.
🎩 to @jnewland who pointed me to this in his branch