Skip to content
Discussion options

You must be logged in to vote

Hey - easy fix... i am asking for data from workRecord:

    @property
    def last_feed_time(self) -> datetime | None:
        """Return the recordTime of the last successful grain output as a datetime object (UTC)."""
        _LOGGER.debug("last_feed_time called for device: %s", self.serial)
        raw = self._data.get("workRecord", [])

        if not raw or not isinstance(raw, list):
            return None
        
        for day_entry in raw:
            work_records = day_entry.get("workRecords", []) ###### <----  HERE ######
            for record in work_records:
                if record.get("type") == "GRAIN_OUTPUT_SUCCESS":
                    timestamp_ms = record.get("recor…

Replies: 2 comments 13 replies

Comment options

You must be logged in to vote
12 replies
@jjjonesjr33
Comment options

@bakerkj
Comment options

@C4-Dimitri
Comment options

@C4-Dimitri
Comment options

Answer selected by jjjonesjr33
@bakerkj
Comment options

@C4-Dimitri
Comment options

@bakerkj
Comment options

Comment options

You must be logged in to vote
1 reply
@C4-Dimitri
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
3 participants