Skip to content

Implement Daily Air Quality Update Tweets with Configurable Timing #24

@aschuma

Description

@aschuma

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions