mqtt:
  sensor:
    - unique_id: piano.lastfinish
      name: "Last Piano Practice Complete"
      state_topic: "viewroad-status/activityfeed/pianopractice"
    - unique_id: piano.lastpracticeduration
      state_topic: "viewroad-status/piano/lastPracticeDuration"
      name: "Last Piano Practice Time"
      unit_of_measurement: "mins"
    - unique_id: piano.todayspracticeduration
      state_topic: "viewroad-status/piano/todayPracticeDuration"
      name: "Today's Piano Practice Time"
      unit_of_measurement: "mins"
    - unique_id: piano.thisweekspracticeduration
      state_topic: "viewroad-status/piano/thisWeekPracticeDuration"
      name: "This Week's Piano Practice Time"
      unit_of_measurement: "mins"

automation:
  - id: "1648705777863"
    alias: Tag Started Piano Practice is Scanned
    description: ""
    trigger:
      - platform: tag
        tag_id: af3f595c-5d41-4bb6-8985-27c70b0e6217
    condition: []
    action:
      - service: mqtt.publish
        data:
          topic: viewroad-commands/chores/piano_practice
          payload: start
    mode: single
  - id: "Tag Finished Piano Practice is Scanned"
    alias: Tag Finished Piano Practice is Scanned
    description: ""
    trigger:
      - platform: tag
        tag_id: 6e7a6ab5-c7e4-47f3-be8f-830241175d69
    condition: []
    action:
      - service: mqtt.publish
        data:
          topic: viewroad-commands/chores/piano_practice
          payload: end
    mode: single
