sebirdman / hass_traeger

Hass Plugin for Traeger (WIP)
MIT License
90 stars 23 forks source link

It would be nice to capture also the usage data #67

Open eras opened 2 months ago

eras commented 2 months ago

Getting easy access to this data might help maintaining the device properly, in particular if people end up sharing their experiences, e.g. how much does a fan need to be used until it fails. Example data from the MQTT debug output:

  "usage": {
    "auger": 105926,
    "grill_clean_countdown": 0,
    "time": 1725026591,
    "error_stats": {
      "bad_thermocouple": 0,
      "ignite_fail": 0,
      "auger_ovrcur": 0,
      "overheat": 0,
      "lowtemp": 0,
      "auger_disco": 0,
      "low_ambient": 0,
      "fan_disco": 0,
      "ign_disco": 0
    },
    "fan": 170922,
    "runtime": 171282,
    "hotrod": 10184,
    "grease_trap_clean_countdown": 0,
    "cook_cycles": 10
  },

I suspect the times are in seconds. They would seem to align with my use at least.

In particular the errors seem like valuable, but also all the usage counters.

Seems like they could be provided the same way as the rest of the data.

njobrien1006 commented 2 months ago

Interesting suggestion.

I wouldn't advocate for making them exposed sensors as there is alot of them and only 1% of users may use them. I would however recommend bringing them as an extra_state_attribute making them template-able.