code: def fetch_all_data(self, limit=50000):
          
          # Query text
          query = text(
              """
              SELECT domain, entity_id, state, last_changed
              FROM states
              WHERE
                  state NOT IN ('unknown', 'unavailable')
              ORDER BY last_changed DESC
              LIMIT :limit
              """
          )
  
          try:
              print("Querying the database, this could take a while")
              response = self.perform_query(query, limit=limit)
              master_df = pd.DataFrame(response.fetchall())
              print("master_df created successfully.")
              self._master_df = master_df.copy()
              self.parse_all_data()
          except:
              raise ValueError("Error querying the database.")
docs: Fetch data for all entities.