-
Notifications
You must be signed in to change notification settings - Fork 1
/howfresh command
#306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
samcorky
merged 7 commits into
master
from
279-have-a-smib-slack-command-to-query-current-sensor-conditions
Apr 3, 2025
Merged
/howfresh command
#306
samcorky
merged 7 commits into
master
from
279-have-a-smib-slack-command-to-query-current-sensor-conditions
Apr 3, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Introduced the /howfresh slash command to the Slack app, allowing users to inquire about the freshness of the space. Updated manifest.yaml to include necessary command configuration and bot scope. Added initial plugin implementation with a basic handler for the command.
Introduced functionality to fetch and display sensor data via the `/howfresh` command in Slack. Includes scheduled metadata updates, API interactions for sensor data, and dynamic message generation with Slack blocks. Updated permissions in `manifest.yaml` to support the new features.
Contributor
Author
|
Something not quite working |
Split the command into separate loading and execution functions for better clarity and modularity. Added a new `how_fresh_loading` function for initial checks and handling unconfigured hosts. Adjusted `/howfresh` command registration to use a lazy-loaded approach.
Added new dependencies `certifi` (2025.1.31) and `charset-normalizer` (3.4.1). Updated `jinja2` to version 3.1.6. These changes ensure compatibility and include the latest versions of required packages.
Introduced a loading message when handling the `/howfresh` Slack command, using a profile for consistent messaging. Enhanced error handling and replaced `chat_postMessage` with `chat_update` for smoother message updates. Updated function arguments to support context management.
Member
|
Looks good, however it would be good if the units cache refreshed if the units aren't found when a new sensor is added and queried before the cache refreshes. Also good if there is an option to ask SMIB how fresh without everyone else seeing. |
Adjusted the logic to update sensor metadata when readings are incomplete. Enabled the messages tab in the app's home section by modifying the manifest to improve user experience.
Replaced print statements with logging to ensure better error reporting and cleaner output. Introduced a logger for the plugin and updated various points in the code to log warnings and info as appropriate. This helps improve code maintainability and debugging.
sjefferson99
approved these changes
Apr 3, 2025
Member
sjefferson99
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fresh.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds /howfresh command.
.env file needs
HOW_FRESH_SMIBHID_HOSTand optionallyHOW_FRESH_SMIBHID_PORTconfigured