* 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
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
* Added support for name
Added name support and changed default name to "Forecast.io" since "Weather" had conflict with Yahoo weather and Open weather map
* Update forecast.py
* Added Bluetooth Low Energy device tracker
* Added new file(s)
* Fixed pylint errors
* Remove traling zeros from device names
* recreated deleted file
* Added requirements
* Renamed to bluetooth_le tracker
Removed gattlib from tests
Minor code cleanup
* - fixed .coveragerc bug
- changed discovery algorithm, new devices will only be added if seen 5 times to make sure
HA doesn't blow the database with devices just passing by
Currently there are only hw inputs in the sources list.
Other interesting inputs can be live tv (dvbt) and vod apps.
* add customize option for webos
* add short names for livetv, youtube, mako apps
* add current app as a source
* use large icon (largeIcon is the same as icon if doesn't exists)
* filter out hw inputs that are not connected
Signed-off-by: Roi Dayan <roi.dayan@gmail.com>
* Add action and callback support to html5 (#2855).
Remove registrations from the callback view since we always get the latest anyway.
We dont put an audience in the claims so we will never hit this error.
Bring tests back up to where they were before callbacks.
Only import jwt where necessary
Fix bracket spacing errors
Fix JWT decode check for loop
Remove stale comment.
Add tests for the callback system.
Shorten line
Disable pylint broad-except and change e to jwt_decode_error.
Verify expiration
Remove duplicate jwt.exceptions.DecodeError
Catch no keys matched and return False
* Switch to using registrations for callbackview instead of json_path
* Only check for URL and such if the data object actually exists
* raise instead of return
* cleanup decode_jwt
* Clean up JWT errors
* Correctly set status_code to 401
* Improve JWT by adding target to claims and attempting to check the given target for a decode match first, as well as pass the target through in the event payload.
* Add tag support and fix formatting issues
* Pass through any keys that dont apply to the payload into the notification.data dictionary
* Remove stale print
* Pass back the data dictionary if it exists
* Actually put the default url even if a notify payload dictionary doesnt exist
* pylint, flake8
* Add subscription validation
* Add validation for the callback event payload and use constants where possible
* Use HTTP_UNAUTHORIZED instead of 401
* Change callback dictionary to dict instead of cv.match_all
* Fix up tests and make subscription required
* Whoops, that test was supposed to fail
* Use the result of CALLBACK_EVENT_PAYLOAD_SCHEMA as event_payload
* Add a test for html5 callback decode_jwt where the device has been renamed since notification has been sent.
* Remove the loop through logic, assume that target is always in JWT
* Always return something instead of possibly None.
* Update frontend