def _update_state_and_attributes(self) -> None:
        """Update sensor state from config entry options or data."""
        self._attr_native_value = self._entry.options.get(
            CONF_MAX_OUTPUT_TOKENS,
            self._entry.data.get(CONF_MAX_OUTPUT_TOKENS, DEFAULT_MAX_OUTPUT_TOKENS)
        )
Update sensor state from config entry options or data.
custom_components/ai_automation_suggester/sensor.py