Skip to content
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

Implement Daily Air Quality Update Tweets with Configurable Timing #24

Open
aschuma opened this issue Dec 31, 2024 · 0 comments
Open

Implement Daily Air Quality Update Tweets with Configurable Timing #24

aschuma opened this issue Dec 31, 2024 · 0 comments

Comments

@aschuma
Copy link
Owner

aschuma commented Dec 31, 2024

Summary

Introduce a daily tweet feature that posts air quality updates at a configurable time, provided the fine dust (Feinstaub) minimal value criteria are not exceeded. Include additional logic for managing alerts and quiet periods, ensuring seamless integration with existing alarm mechanisms.

Details

Feature Requirements

  • Daily Air Quality Updates:
    • Post a daily tweet if Feinstaub minimal value criteria are not exceeded.
    • Make the tweet schedule configurable, with a default time of 7:00 AM.
  • Quiet Period Handling:
    • Suppress daily tweets during an active alert quiet period.
  • Post-Alarm Notification:
    • When exiting a quiet period, immediately post a tweet indicating normal operation resumption.

Tweet Content and Appearance

  • Alarm-Related Tweets:
    • Include a warning sign (⚠️).
    • Use a red-colored header if supported by the platform; otherwise, opt for a visually striking but non-disruptive alternative.
  • Normal Updates:
    • Use a light, non-intrusive header design.

Behavior Summary

  1. Daily Tweets: Post at the configured time if no alarms are active.
  2. Quiet Period Handling: Suppress daily tweets during quiet periods triggered by alarms.
  3. Post-Alarm Notification: When exiting a quiet period, immediately notify users via a tweet indicating a return to normal conditions.

Configuration Options

  • Configurable daily tweet time (default: 7:00 AM).
  • Quiet period and alert handling options.

Steps to Implement

  1. Add a configuration option for daily tweet timing.
  2. Modify tweet logic to:
    • Check Feinstaub criteria for daily updates.
    • Respect active quiet periods for alarms.
    • Trigger "normal operation resumed" tweets upon exiting quiet periods.
  3. Update tweet templates to include:
    • Alarm-specific styling (warning sign and red header).
    • Non-disruptive headers for regular updates.
  4. Test integration to ensure no conflicts with existing alarm mechanisms.

Acceptance Criteria

  • Configurable daily tweet feature is functional and defaults to 7:00 AM.
  • Quiet periods suppress daily tweets as expected.
  • Post-alarm notification tweets are sent when exiting quiet periods.
  • Header styles adapt based on tweet context (alarm or normal update).
  • Thorough documentation and user communication on the new feature.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant