RogerSelwyn / MS365-Mail

Microsoft 365 Mail Integration for Home Assistant
MIT License
6 stars 0 forks source link

How do a create query sensors? #6

Closed danielbrunt57 closed 3 hours ago

danielbrunt57 commented 3 hours ago

In O365 I ad created 3 query sensors in YAML but I fail to see how to do this with this integration which is/will be the successor to O365.

  accounts:
    - account_name: Daniel # Do not use email address or spaces
      client_id: "<redacted>"
      client_secret: "<redacted>"
      alt_auth_method: False
      enable_update: True

      email_sensor:
        - name: "Inbox"
          max_items: 5
          is_unread: True
          download_attachments: True

      query_sensors:
        - name: "Home Assistant Notifications"
          folder: "Inbox"
          from: "d*************a"
          subject_contains: "Notification from Home Assistant"
          has_attachment: True
          max_items: 5
          is_unread: True

        - name: "BC Hydro Higher Rate"
          folder: "Bills/BC Hydro"
          subject_contains: "now paying a higher rate"
          max_items: 2
          is_unread: True

        - name: "BC Hydro Bill is Ready"
          folder: "Bills/BC Hydro"
          subject_contains: "bill is ready"
          max_items: 1
          is_unread: True

      todo_sensors:
        enabled: True
        enable_update: True # set this to true if you want to be able to create new tasks
RogerSelwyn commented 3 hours ago

Yaounde would just install the integration three times, once for each query.

danielbrunt57 commented 3 hours ago

Silly me! Thank you!

image